-
-
Notifications
You must be signed in to change notification settings - Fork 946
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
Ruby/Resistor Colors: Add Mentor Notes #853
Conversation
We are about to merge the new exercise Resistor Colors. It's introduced as a side exercise first, so I don't expect much mentoring requests, but just in case, here's some preliminary Mentor Notes. They will need evaluating after we've seen some solutions submitted. References: Ruby PR https://github.com/exercism/ruby/pulls Problem Specifications: exercism/problem-specifications#1466 This exercise is meant to be part of a series of Resistor exercises, building up to decoding up to 6 colors: exercism/problem-specifications#1458, and starting with just one color in Resistor Series nr 1
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.
Looks good 👍 Left a couple of notes for you to look over.
``` | ||
|
||
### General | ||
This is the very first Array exercise, and the first loop. Introducing `map` is key in this exercise. |
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.
This is the very first Array exercise
Isn't this set up as a bonus exercise? (reference)
|
||
|
||
### Changelog | ||
First introduced 2019 Mar 10 |
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 we should have a specific format for the changelog. Maybe something like:
- Version 1: exercise first introduced on March 10, 2019
Maybe HighScores can be a good guide as well?
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.
Some comments inline
|
||
class ResistorColors | ||
|
||
COLOR_CODES = ["black", "brown", "red", "orange", "yellow", "green", "blue", "violet", "grey", "white"] |
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.
COLOR_CODES = ["black", "brown", "red", "orange", "yellow", "green", "blue", "violet", "grey", "white"] | |
COLOR_CODES = %w[black brown red orange yellow green blue violet grey white].freeze |
Default style via rubocop WordArray and rubocop MutableConstant.
Add below this solution that:
- "Alternatives include writing out the array using brackets"; the talking points already mention this.
freeze
should only be a talking point but not a reason to disapprove
|
||
### Minimal solution for approval | ||
```ruby | ||
|
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 suggest removing the whitespace above class
, but adding an empty line below the header, following default markdownlint.
Resistor Colors is a side exercise, unlocked by Hello World | ||
|
||
### New Concepts | ||
Array, Array#index, `map`, Constant, chaining methods |
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.
Add blank line between header and content, following default markdownlint
end | ||
|
||
end | ||
|
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.
Remove whitespace between final end
and end of code block.
end | ||
|
||
``` | ||
|
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.
Add note about acceptable variations include using a module
, class << self
, module_function
and the likes. We don't want mentors to comment on any of that, seeing it's such an early exercise!
Thanks @SleeplessByte and @pgaspar. I'm merging it first, as I just want something ready for when the exercise is live. We can and will improve it later. 🍻 |
We are about to merge the new side exercise Resistor Colors exercism/ruby#939. 🎉
I just want to get something ready for mentors. We can adjust after we've seen some submissions.
@exercism/website-copy-ruby