Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
tournament: Put inputs/expectations inline, not in files #152
The previous iteration of reading/writing files is a valuable experience
Note that this preserves all behavior of existing test files. In
amusing fact: Since the files output1.txt, output2.txt, output3.txt were pre-provided before this commit, I believe this means an empty implementation that does nothing will pass the tests.
Edit: That comment is incorrect, because the number of lines read will still succeed, but it's close. What I mean is you don't need to write the output file.
Edit: Yup. See #153.
With the removal of the File IO stuff, this problem could probably now be moved to a different spot in the order. It still requires a fair amount of work, but it's mostly just string parsing and some comparisons. Maybe it should move to somewhere in these problems?
Yeah now the list of skills is "string parsing, custom sorting, string formatting". I'm going to say after grade-school; both are problems that may see use of a HashMap to solve (store students by grade, store reults by team). Of course, if we have a desire to not put them together since they have too similar things, just say the word (that's why I mention it!)
Jul 12, 2016
1 check passed
referenced this pull request
Jul 28, 2016
added a commit
this pull request
Sep 11, 2016
Amazing. According to exercism/problem-specifications#22 , tournament was intentionally designed to include file I/O. The Rust track was the first track to have this exercise.
Looks like that purpose has been lost since then, both in this track and others. C# is the only track with vestiges of that file I/O since it uses streams.
I generally think the file I/O portion is not well-suited for the testing style of Exercism, but I see that above we considered whether there can be an exercise specifically dedicated for file I/O (the grep exercise ostensibly requires file I/O too).
I am sorry to the creator of this exercise for playing my part in the exercise's diversion from its original purpose. It was in the name of giving the exercise some purpose at all.