exercism / rust

Exercism exercises in Rust.
https://exercism.org/tracks/rust
MIT License
1.47k stars 520 forks source link

Discuss tournament exercise #122

Closed ijanos closed 8 years ago

ijanos commented 8 years ago

I see the following issues with the tournament exercise:

And another issue, thinking about the "big picture": this exercise requires reading files, parsing them and writing data to files. I think smaller exercises with only reading and only writing files should precede this one.

IanWhitney commented 8 years ago

Thanks! I haven't done this exericse yet, but it sounds like it has some issues. I will dig into it this weekend.

IanWhitney commented 8 years ago

Points 1 & 2 could be addressed in the common readme, I think. A change there would propagate to all tracks that implement Tournament, which would be good.

I think the common Readme should also address the format of the inputs, and include examples. I'm equally baffled by it. I can not tell you which team won a game.

A lot of my confusion comes from the common description. It's unclear to me what problem this exercise is trying to get me to solve. Is it:

Or some combination of the three?

If the exercise's goal is "Parse text files", then I think the tests of invalid/commented lines are valid. That is exactly the sort of edge case you want to make students think about.

But if not, then invalid lines are an unnecessary wrinkle in this exercise.

Since this exercise is not widely supported, it's pretty easy to do a quick survey of the other implementations and see what they focus on. From there, maybe we can identify some changes to make in our version.

All three are nearly identical.

I think if we bring the Rust implementation in line with that, while also improving the common readme (and adding a common test suite), we could improve this exercise.

petertseng commented 8 years ago

It's my belief that we'll have resolved all points when all three of the below issues are closed:

We may wish to open another issue to discuss the possibility of file I/O.

IanWhitney commented 8 years ago

I believe we've addressed this. The problem description now addresses these missing pieces, and the Rust implementation no longer uses the files. Thanks for pointing out the problems with this exercise, @ijanos !