-
Notifications
You must be signed in to change notification settings - Fork 529
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
Could the grade-school tests be less prescriptive? #254
Comments
What API do you think we should use in the tests? Grade-school predates my time working on this track, so I don't know the history. But, generally, we try to avoid writing tests that require specific implementations. |
(I see I was beaten to commenting, but I'll add what I have to say) Thanks for the report from the ground. The policy of Exercism is that the tests should not be over-prescriptive: exercism/discussions#44. Therefore, we should move in the direction indicated by this issue. The next step is to figure out how we can make it better. I can try to complete this exercise myself (as you can see, I have not) to see if I notice any specific recommendations to make. But anyone else can feel free to beat me to the punch in making suggestions here. |
Hey guys, thanks for the swift responses and all the great work you do on here! It's great to see how the Rust track has developed over the last year. I started over a year ago then had a long break before returning recently. I wish I had useful/concrete suggestions but sadly I don't. I do plan to revisit the exercise at a later point though. It just occurred to me that we could make the other commenters aware: @tokenrove @dewidaniels @pviecelli @chrisvittal @aslpavel @glennpratt @DuBistKomisch |
Mostly unfiltered comments from the time of me fetching the exercise until I got the first test passing: No stub provided, makes me a little sad. Time to figure out what sigs the test wants.
Observations at this point:
|
That sounds pretty clever. |
One question I would ask is - there are a few other problems that ask for I thought of two answers, myself. Could someone familiar with the subject matter add more to help me?
Given what I've seen, my first recommendations would be:
|
I agree with Returning iterators should probably only be considered once Rust adds a tidier way to do it. I ended up doing it internally in a later problem and it was a PITA. |
This seems to me to be the key change, but I didn't feel comfortable enough with Rust to suggest it here. If the point is of the exercise is to teach about lifetimes and avoiding copies, an iterator would make more sense than returning a reference to an internal data structure, although it sounds like this is too painful for an early exercise. It would be nice if, when a constraining choice like this is made, the README or stub file could be explicit about why that interface was chosen. |
Looks like consensus then is to move to returning Now that I've done the exercise again I'm not sure we need stubs. Seems like a good exercise to me, having to figure that out. Then again I was struggling with that before we had this conversation... |
All interested are invited to review #256. |
I'm working through the Rust exercisms and have so far enjoyed the journey. grade-school led to some frustration though. At first I thought that was just down to me trying to program on the train home after having had a few beers, but when I decided (which I hadn't done on any other of the exercises so far) to just submit an empty solution in order to see what others have done I couldn't help but notice I wasn't alone in my struggles, others commented on/criticised the tests as follows:
The text was updated successfully, but these errors were encountered: