Closed ijanos closed 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.
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.
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.
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 !
I see the following issues with the tournament exercise:
| MP | W | D | L | P
. OK, I'm kind of ignorant about sports and I made an educated guess that the W is for Win and L is Loss but still it baffled me at first.#
team1;team2;win
does it mean team1 or team2 won?tally
function return the number of parsed lines? What purpose does it serve? Why does it need a return value at all? I think the author intended the use ofResult
but it is not expressed anywhere and because tests useunwrap
theOptional
type can also be used.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.