The original instructions imply (to me) that both conditions have to be true for a list to be exciting, but the tests indicate that is not the case, that only one or the other of the conditions has to be true for the tests to pass.
I read that as separate conditions. The first item is C# OR the second item is C# (and the list has two or three languages), but I can see how that would be confusing since it looks like a sequential list of conditions. What’s the proposed fix here given we need to show that there are two separate sets of conditions?
71 │ ## 7. Check if list is exciting
72 │
73 │ While you love all languages, C# has a special place in your heart. As such, you're really excited about a list of languages if:
74 │
75 │ - The first on the list is C#.
76 │ - The second item on the list is C# and the list contains either two or three languages.
It could use some tender loving care, where the first bullet implies “the first (what??) on the list”, while the second bullet states in reference “the second item on the list”. I think “item” could be “language” and could be identical on each line.
And we could definitely state “or” explicitly in the writing, which would likely clear it up.
Not a C Sharp maintainer, though, but that would be how I might address the confusion.
I submitted a PR for the instructions file before learning that I was to come out here first and ask about it, so you can see my suggestion.
My proposed edit is to change the instructions:
While you love all languages, C# has a special place in your heart. As such, you’re really excited about a list of languages if:
To this:
While you love all languages, C# has a special place in your heart. As such, you’re really excited about a list of languages if one of the following conditions is true:
You will likely want to add a link to this forum discussion in the top message in the PR so that the maintainers know that it is being discussed here. That completes the “link loop” for discovery.
I like the change for “one of” or “either of”.
if one of the following conditions is true could be interpreted as allowing both conditions to be true. One of the conditions is true in that case, but so is the other. We don’t test for both conditions being true, and a language isn’t introduced until a later part of the exercise. However, I’ve definitely read ahead on concept exercises so I’m sure others have too.
if only one of the following conditions is true removes that ambiguity by making it very explicit that it’s A OR B not A AND/OR B.
It is likely the case that the language can not be listed twice, and so there is a natural case where having it as the first automatically means that it will not be in the second place, and vice-versa.
As I read it, and look at the tests, [“C#”, “C#”, “C#”] satisfies both conditions and is allowed per the descriptions of the methods in the exercise’s class. It doesn’t really follow the purpose of keeping track of a unique list of favorite languages, but it’s not prohibited.
The proposed change indicates that one of them has to be true. That doesn’t eliminate the possibility that both are true, but tells the reader that one is enough.
It’s also worth pointing out that in times of ambiguity, if there are unit tests written for the method in question, the unit tests can reveal the intention of the specification’s author. What may seem vague to a reader like me can be figured out by reading the unit tests along with the spec, and the clues combined to understand the instructions as the author meant them. In this case, the author did so, and that made my submission ultimately successful.