"Dynamic programming" in Kindergarten Garden

The description of the Kindergarten Garden exercise contains the following paragraph at the end:

In this exercise you’re going to be using a concept called dynamic programming. Dynamic programming - Wikipedia Your solution could use the class method #define_singleton_method or the combination of #method_missing and #respond_to_missing .

The term dynamic programming is not well used here, as it is a technical term from algorithm design which has nothing to do with metaprogramming suggested by the following sentence. As such, I find it misleading, which is aggravated by the fact that the link points to an article that, of course, discusses the algorithm design technique, not metaprogramming.

The file in question is https://github.com/exercism/ruby/blob/54d89d696b619aca1b2d8656b95d52136533dd6c/exercises/practice/kindergarten-garden/.docs/instructions.append.md.

Would you like to submit a PR? If so, be sure to post your suggested changes to the forum first.

Sure, I can submit a PR. When it comes to rewriting the paragraph, I would also add a mention of #define_method into the suggested “reading”. As such, I would propose replacing that paragraph with this:

The exercise requires you to write a class that responds to a single method for each child in the class, respectively. You can make your work easier and less repetitive if, instead of manually defining 12 different methods, you use a bit of metaprogramming. Your solution could use the method #define_method (or #define_singleton_method), or alternatively a combination of #method_missing and #respond_to_missing?.

(cc @Meatball to look at this exercise in general when you do your syllabus update, if you keep it! :))

I suffered a nonsensical yet persistent misreading of responds as corresponds. Would your suggested paragraph lose significant meaning if it used with instead?

Another possible point of confusion (which actually contributed to my misreading): class is used twice in the same sentence, but with different meanings. Maybe replacing child with student would help here (as child could refer to a CS concept as well).

For the rest your suggestion looks good and makes sense to me. I am not familiar with Ruby though.

I suffered a nonsensical yet persistent misreading of responds as corresponds . Would your suggested paragraph lose significant meaning if it used with instead?

I think that responds to is a Ruby terminology (see, e. g., #respond_to? and #respond_to_missing?, though I am not completely sure. But it could be changed, I believe, without loss of precision.

Another possible point of confusion (which actually contributed to my misreading): class is used twice in the same sentence, but with different meanings. Maybe replacing child with student would help here (as child could refer to a CS concept as well).

Reading it again, I see the problem, but the rest of the assignment unfortunately already uses this terminology of children in a kindergarten class, so I am not completely sure how to rephrase it to stay consistent with the rest.

All in all, I could imagine a possible rephrasing like so:

The exercise requires you to write a class that provides a single method for each child in the kindergarten, respectively. You can make your work easier and less repetitive if, instead of manually defining 12 different methods, you use a bit of metaprogramming. Your solution could use the method #define_method (or #define_singleton_method ), or alternatively a combination of #method_missing and #respond_to_missing? .

Well, I tried to open a pull request ([Kindergarten Garden] Fix a mention of dynamic programming. by JakubSarnik · Pull Request #1557 · exercism/ruby · GitHub), but it was automatically closed, so I am not really sure where to go from here, considering I have already opened the discussion here.

@JakubSarnik The system doesn’t know that you’ve already had a forum discussion, but it will get reopened if you reference such a discussion (which has happened now)