Off-by-1 error in `TestFixBirdCount` of `bird_watcher_test` (or problem description)

The description for Problem 3 of the Bird Watcher go exercise states,

You realized that all the time you were trying to keep track of the birds, there was one bird that was hiding in a far corner of the garden.

You figured out that this bird always spent every second day in your garden.

This means that the 1st day, the bird was not in the garden, the 2nd day it was, the 3rd day it was not, the 4th day it was, and so on and so forth.

bird_watcher_test, however, is coded to test something different: It expects that the 1st day, the bird was in the garden, the 2nd day it was not, the 3rd day it was, the 4th day it was not:

Thus, either the problem description or the test is off by 1. I’m not sure which of the 2 y’all prefer to change. I can make a PR for either.

Not necessarily. Every second day means it’s either every even day or every odd day. “Every second day” describes an interval or period. It does not specify the start day. The tests make it clear which day is the start day.

If the problem description said “every second day, starting with the first day”, the test would be correct. By default, “every second day” means, starting with the second day.

I am happy to draw up a PR clarifying the description to say “every second day, starting with the first day”, if you prefer to keep the test as-is.

Do you have a source for that?

https://www.collinsdictionary.com/dictionary/english/every-other-day-every-second-day-etc

If something happens every other day or every second day, for example, it happens one day, then does not happen the next day, then happens the day after that, and so on.

Do you have a source for that?

Happy to help you out here! The source is the word “second”!

For a more authoritative source, here is what the Pearson Education dictionary of contemporary English has to say:

every second year/person/thing etc:

the second, then the fourth, then the sixth year etc.

Glad I could help you out here here and provide sources!

If something happens every other day or every second day, for example, it happens one day, then does not happen the next day, then happens the day after that, and so on.

This is potentially correct for the ambiguous “every other”!

Since the 2 dictionaries seem to disagree, and at least 1 dictionary says the wording is wrong, I am happy to draw up a PR clarifying the problem description to say, “every other day, starting with the 1st day” :slight_smile:

Rather than both of us continuing to argue, an unconstructive action which isn’t getting us anywhere, please instead let me know what you think about my proposed resolution. Based on what you’ve said, I think it is a mutually acceptable wording which avoids both ambiguity and incorrectness. I am eager to contribute to Exercism, so such a collaboration would be a win for both of us. For the benefit of discussing this proposed resolution, I have drawn up what such a PR would look like:

Thank you for your useful feedback on this post (and on many other posts)! Without your feedback, we might not have discovered as a team that the current problem wording is definitely ambiguous, if not possibly outright erroneous.

In my opinion this clarification is not needed, because it’s actually already there. After the “every second day” sentence, there are two others related. This one:

You do not know exactly where it was in between those days but definitely not in your garden.

But more importantly, this one:

Your bird watcher intuition also tells you that the bird was in your garden on the first day that you tracked in your list.

So, the clarification that the bird is present in the first day of our tracking is already there. And I like how it’s done, because it doesn’t get in the way of the storytelling of the exercise, like I feel adding “starting with the first” would do.

4 Likes

Would “every other day” be clearer than “every second day”? (Need the opinions of non-native speakers :))

As a non-native speaker, I understand both equally well, but I’ll let others speak.

As a non-native I think, that “every other day” is not clear enough for this task. Because it can make task looks harder then it is. When actually it’s all about even numbers + 1

As a non-native speaker, “every other day” sounds more like irregular appearance. “every second day” at least hints about the cadence.

As a long term programmer I no longer expect plain language explanations to be “precise” / “unambigious” to a level, a standards document like RFC or ISO standard is. For being precise / unambigious we have tests - in language that is made to be precise.