-
-
Notifications
You must be signed in to change notification settings - Fork 519
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
Add spiral matrix exercise #1636
Conversation
Hello. Thanks for opening a PR on Exercism 🙂 We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in. You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch. If you're interested in learning more about this auto-responder, please read this blog post. 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. |
class SpiralMatrix | ||
def initialize | ||
# Your code here | ||
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.
I have a preference not to have methods defined in stubs with the wrong signatures (e.g. here initialize needs to take a size). And equally, I'd rather not force the implementation by having a param defined, so I think my preference is just to remove this method and the the one below.
But please tell me if there's a specific reason you felt they would be good to include.
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 was how I'd been asked to implement it in the Dnd Character exercise PR, was copying here, but happy to change whatever!
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.
Yeah, I think you should remove the code and just leave the comment at the top please. That's how all the other practice exercises are implemented (e.g. https://github.com/exercism/ruby/blob/main/exercises/practice/binary-search/binary_search.rb :)
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 it was a focus on providing a comment so that we did not submit an empty file. Leave the practice exercises as mostly unguided.
a5a30d6
to
290d31b
Compare
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 pending one change concerning the colon use before a heading.
|
||
To get started with TDD, see the `README.md` file in your | ||
`ruby/spiral-matrix` directory. | ||
=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.
This is good.
Co-authored-by: KOTP <[email protected]>
Co-authored-by: Victor Goff <[email protected]>
e507bef
to
5c86451
Compare
Looking good! Thank you @Mr-sigma |
Forum thread: https://forum.exercism.org/t/add-spiral-matrix-exercise/9795
Ran into some issues with Rubocop's ABC complexity for generating the matrix, as well as it being unhappy with using
attr_reader
in some cases so would be interested in feedback for the example solution, but don't need it to be a blocker for getting the code in!