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

Rikki bot complains about for loops on Ruby accumulate exercise #3338

Closed
armchairlinguist opened this issue Jan 8, 2017 · 11 comments
Closed

Comments

@armchairlinguist
Copy link

http://exercism.io/tracks/ruby/exercises/accumulate

The feedback Rikki provided on my implementation (http://exercism.io/submissions/839cb740b3a6498f9e3ca10f9784a3be) was:

Rubyists tend to prefer methods over for loops. for loops affect variables outside of the iteration. > ...It's worth being aware of the methods available for Ruby, since there are some very powerful and expressive ones.
The most basic one is each, which can be used with objects like Array and Hash:

I'm well aware of .each, but didn't use it for accumulate because it seems like cheating to me - .map (the 'real' Ruby name of this method) is just each + a passed-in function to transform with. I thought it would be nice to get a little more fundamental.

Can Rikki skip certain types of comments on certain exercises?

@mhelmetag
Copy link

mhelmetag commented Jan 8, 2017

Hmmm... While I'm all for the fundamentals and believe for element in self is more explicit... I think that each (with an explicit resulting array) or map (implicit resulting array) are cleaner and more idiomatic solutions...

However, rikki's comments are just suggestions and abiding by them is totally up to you.

@kotp
Copy link
Member

kotp commented Jan 8, 2017

Though "map" is on the "restricted list" for that exercise specifically... after the initial solution, I have been guilty of exploring different approaches related but using that forbidden method.

The each method is also something that is defined by the author of the module or class, so this is only cheating, really, if you borrow that from one of the classes that implement it. Yes, my current survived iterations cheat by both definitions here.

I do think that some feedback may indeed be candidates to be excluded from some exercises though, perhaps this one, maybe not... I can place that in the "rikki" repository to explore this...

@mhelmetag
Copy link

Ah okay. Thanks for the info. That makes more sense then.

This should be pretty easily solvable on either the rikki or ruby-analyzer side.

@kytrinyx
Copy link
Member

I wonder if we should also make sure to only complain about something once for a given exercise, so that people can explore but not get nagged to death by a comment that they've decided to ignore.

@kotp
Copy link
Member

kotp commented Jan 29, 2017

There was a recent "nag" that happened 3 times, because the exerciser did not understand (though stated they had made the change) that it was not what they thought it was. The terminology was clear, just not yet having the knowledge in the language.

Perhaps it would be helpful to have Rikki show the lines effected?

@kytrinyx
Copy link
Member

Perhaps it would be helpful to have Rikki show the lines effected?

That is not a trivial change, as far as I can tell.

@kotp
Copy link
Member

kotp commented Jan 30, 2017

No, I don't think it would be trivial...

@kytrinyx
Copy link
Member

I'm adding the design research label to this, as I think this is part of a much larger discussion about bots.

@kytrinyx
Copy link
Member

I'm taking a pass through our issue tracker with the goal of making sure that every open issue we have on exercism/exercism.io is actionable.

As this issue stands it isn't actionable. If you would like to move this topic forward, please open a new issue in http://github.com/exercism/discussions

Please:

  • summarize the points so far
  • link back to this issue
  • include the intended goals for the discussion

@armchairlinguist
Copy link
Author

It looks like this is still open on exercism/DEPRECATED.rikki#27, so I'll assume it's being pursued there.

@kytrinyx
Copy link
Member

Oh, nice. Yepp, that's the right place for it. Thanks!

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

No branches or pull requests

4 participants