Skip to content
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

Update instructions.md #1530

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

srcsintheta
Copy link

The description as is doesn't make sense. It states at function 2: "Store the default initial score in a module attribute. It will be needed again."

The reset function however simply resets to 0, and implementing so passes all tests. There's no module attribute needed, neither to be defined nor to be used at any point. The enforcement to use one when adding a player is either arbitrary or not properly reflected in the exercise structure as is.

This pull request provides the minimal needed rewording to avoid confusion, stating outright a default attribute shall be used for a reset value.

The description as is doesn't make sense. It states at function 2: "Store the default initial score in a module attribute. It will be needed again."

The reset function however simply resets to 0, and implementing so passes all tests. There's no module attribute needed, neither to be defined nor to be used at any point. The enforcement to use one when adding a player is either arbitrary or not properly reflected in the exercise structure as is.

This pull request provides the minimal needed rewording to avoid confusion, stating outright a default attribute shall be used for a reset value.
Copy link
Contributor

github-actions bot commented Oct 5, 2024

Thank you for contributing to exercism/elixir 💜 🎉. This is an automated PR comment 🤖 for the maintainers of this repository that helps with the PR review process. You can safely ignore it and wait for a maintainer to review your changes.

Based on the files changed in this PR, it would be good to pay attention to the following details when reviewing the PR:

  • General steps

    • 🏆 Does this PR need to receive a label with a reputation modifier (x:size/{tiny,small,medium,large,massive})? (A medium reputation amount is awarded by default, see docs)
  • Any exercise changed

    • 👤 Does the author of the PR need to be added as an author or contributor in <exercise>/.meta/config.json (see docs)?
    • 🔬 Do the analyzer and the analyzer comments exist for this exercise? Do they need to be changed?
    • 📜 Does the design file (<exercise>/.meta/design.md) need to be updated to document new implementation decisions?
  • Concept exercise changed

    • 🌲 Do prerequisites and practices in config.json need to be updated?
    • 📖 Does the concept introduction provide all necessary information to solve this exercise?

Automated comment created by PR Commenter 🤖.

@jiegillet
Copy link
Contributor

Hi.

The description as is doesn't make sense. It states at function 2: "Store the default initial score in a module attribute. It will be needed again."

The reset function however simply resets to 0, and implementing so passes all tests. There's no module attribute needed, neither to be defined nor to be used at any point. The enforcement to use one when adding a player is either arbitrary or not properly reflected in the exercise structure as is.

It's true that a solution without module attributes passes the tests, but we have an analyzer rule to check that the module attribute is used (rule and tests). Does it not work properly?

What we are trying to do here is to identify a common value so that it can be reused, and defining it in an idiomatic way (module attribute).

This pull request provides the minimal needed rewording to avoid confusion, stating outright a default attribute shall be used for a reset value.

I'm all for avoiding confusion, but to be honest I'm not sure your version does the trick. We should not mention in the introduction what students have to do in step 4.

What we could do to address your point is add something in step 4 along the lines of "The reset value (zero) is the same as the default initial score you defined earlier, reuse the same module attribute."
What do you think?

@jiegillet jiegillet self-assigned this Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants