-
-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed new exercise: Eliud's Eggs #2333
Conversation
Count the 1 bits in a number. Name and description by @vaeng https://forum.exercism.org/t/new-exercise-suggestion-pop-count/7632
Hello. Thanks for opening a PR on Exercism. We are currently in a phase of our journey where we have paused community contributions to allow us to take a breather and redesign our community model. You can learn more in this blog post. As such, all issues and PRs in this repository are being automatically closed. That doesn't mean we're not interested in your ideas, or that if you're stuck on something we don't want to help. The best place to discuss things is with our community on the Exercism Community Forum. You can use this link to copy this into a new topic there. Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it. |
Fix issues lint reported in eliuds-eggs description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely work! Just a few couple of comments.
exercises/eliuds-eggs/metadata.toml
Outdated
@@ -0,0 +1,2 @@ | |||
title = "Eliud's Eggs" | |||
blurb = "Count the 1 bits in a number" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add your name and vaeng's as source
and the forum URL as source_url
:
blurb = "Count the 1 bits in a number" | |
blurb = "Count the 1 bits in a number" | |
source = "keiravillekode, vaeng" | |
source_url = "https://forum.exercism.org/t/new-exercise-suggestion-pop-count/7632/4" |
We did something similar for resistor-color
: https://github.com/exercism/problem-specifications/blob/main/exercises/resistor-color/metadata.toml
P.S. I don't know if you'd like to use your own name or you nickname as source (same goes for vaeng)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My real name is fine :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source and source_url added
exercises/eliuds-eggs/description.md
Outdated
@@ -0,0 +1,50 @@ | |||
# Description | |||
|
|||
Your friend Eliud inherited a farm from her grandma Tigist. Her granny was an inventor and had a tendency to build things in an overly complicated manner. The chicken coop has a digital display showing an encoded number representing the positions of all eggs that could be picked up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use a single line per sentence?
Your friend Eliud inherited a farm from her grandma Tigist. Her granny was an inventor and had a tendency to build things in an overly complicated manner. The chicken coop has a digital display showing an encoded number representing the positions of all eggs that could be picked up. | |
Your friend Eliud inherited a farm from her grandma Tigist. | |
Her granny was an inventor and had a tendency to build things in an overly complicated manner. | |
The chicken coop has a digital display showing an encoded number representing the positions of all eggs that could be picked up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should have written the forum post that way. Next time :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now using one line per sentence
{ | ||
"uuid": "559e789d-07d1-4422-9004-3b699f83bca3", | ||
"description": "pop-count of 0", | ||
"property": "popCount", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure that I have a better suggestion, but does popCount
fit the domain? I wonder if eggCount
is a more descriptive name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, all eggs, please. That makes it easier for users to see the connection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now using eggCount for function name,
"cases": [ | ||
{ | ||
"uuid": "559e789d-07d1-4422-9004-3b699f83bca3", | ||
"description": "pop-count of 0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the description could focus a bit more on what makes this case unique. In this case, an alternative description could be:
"description": "pop-count of 0", | |
"description": "no eggs", |
or:
"description": "pop-count of 0", | |
"description": "all zeros", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also suggest to make the descriptions about eggs, rather than the mechanics behind it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Descriptions updated
@exercism/reviewers I'd appreciate you all taking a look at this too. We could use this exercise for Nibbly November. |
@@ -0,0 +1,50 @@ | |||
{ | |||
"exercise": "eliuds-eggs", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think all the practice exercises have more direct names which map to the problem being solved, like pop count. I may be mistaken but I think the cute names are only used in concept exercises.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exercise renamed to Pop Count
"cases": [ | ||
{ | ||
"uuid": "559e789d-07d1-4422-9004-3b699f83bca3", | ||
"description": "all zeros", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, maybe do:
"description": "all zeros", | |
"description": "0 eggs", |
exercises/pop-count/introduction.md
Outdated
1. Scan the potential egg-laying spots and mark down a `1` for an existing egg or a `0` for an empty spot. | ||
2. Convert the number from binary to decimal | ||
3. Show the result on the display |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Scan the potential egg-laying spots and mark down a `1` for an existing egg or a `0` for an empty spot. | |
2. Convert the number from binary to decimal | |
3. Show the result on the display | |
1. Scan the potential egg-laying spots and mark down a `1` for an existing egg or a `0` for an empty spot. | |
2. Convert the number from binary to decimal. | |
3. Show the result on the display. |
All comments addressed |
Count the 1 bits in a number.
Name and description by @vaeng
https://forum.exercism.org/t/new-exercise-suggestion-pop-count/7632
Example implementation:
exercism/vlang@main...keiravillekode:vlang:eliuds-eggs
Nibbly November implementations (mips, wasm, x86-64-assembly) to follow.
website-icons issue: exercism/website-icons#159