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

Add spiral matrix exercise #1636

Merged
merged 6 commits into from
Feb 14, 2024
Merged

Conversation

ccadden
Copy link
Contributor

@ccadden ccadden commented Feb 13, 2024

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!

Copy link
Contributor

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.

@github-actions github-actions bot closed this Feb 13, 2024
@iHiD iHiD reopened this Feb 13, 2024
class SpiralMatrix
def initialize
# Your code here
end
Copy link
Member

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.

Copy link
Contributor Author

@ccadden ccadden Feb 13, 2024

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!

Copy link
Member

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 :)

Copy link
Member

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.

@ccadden ccadden force-pushed the add-spiral-matrix-exercise branch from a5a30d6 to 290d31b Compare February 13, 2024 18:58
@ccadden ccadden requested a review from iHiD February 13, 2024 18:59
Copy link
Member

@kotp kotp left a 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good.

exercises/practice/spiral-matrix/.docs/instructions.md Outdated Show resolved Hide resolved
@ccadden ccadden force-pushed the add-spiral-matrix-exercise branch from e507bef to 5c86451 Compare February 13, 2024 21:51
@ccadden ccadden requested a review from kotp February 13, 2024 21:52
@kotp kotp merged commit dfcb5b1 into exercism:main Feb 14, 2024
4 checks passed
@kotp
Copy link
Member

kotp commented Feb 14, 2024

Looking good! Thank you @Mr-sigma

@ccadden ccadden deleted the add-spiral-matrix-exercise branch February 14, 2024 12:49
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.

3 participants