Skip to content

meetup: Test descriptions are unhelpful. #974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Insti opened this issue Oct 27, 2017 · 5 comments · Fixed by #1919
Closed

meetup: Test descriptions are unhelpful. #974

Insti opened this issue Oct 27, 2017 · 5 comments · Fixed by #1919

Comments

@Insti
Copy link
Contributor

Insti commented Oct 27, 2017

The canonical-data for meetup has a lot of test cases, each of which has a description that just echoes the test input values.

None of the descriptions say why these values are interesting or useful to test.

Task:

Update the descriptions so each description describes which particular property of the solution it is trying to test for.

References: Meetup description

@ErikSchierboom
Copy link
Member

The test case descriptions have since all been updated, so this issue can be closed.

@petertseng
Copy link
Member

There have not been any changes to the test case descriptions since the creation of meetup/canonical-data.json.

My comment doesn't recommend for or against closing this issue; it is only saying that if this issue is to be closed, it has to be closed based on an assertion like "we decided that it is okay to close it without updating the descriptions".

@petertseng petertseng reopened this Jan 14, 2022
@ErikSchierboom
Copy link
Member

Hmmm, I misread then, my mistake.

None of the descriptions say why these values are interesting or useful to test.

Well, most of the values are not interesting :) With meetup, we took a fairly exhaustive approach to the test cases, which makes most of them not very interesting, but mostly useful for checking the code for exhaustiveness. I'd argue that the current descriptions are fine, but I'm open to people disagreeing.

The fact though that nobody has replied to this in 5 years may give some indication on how others view this, but maybe not.

@petertseng
Copy link
Member

But there's a pattern to the values. Look at the expected dates for teenth Mondays:

  • 2013-05-13
  • 2013-08-19
  • 2013-09-16

Days in the teenth week can fall between 13th to the 19th inclusive, so the cases have been carefully chosen to test both endpoints and an arbitrary date in the middle. This pattern (testing 13th, 19th, and a date in the middle) is consistently followed for all seven days of the teenth week, so this was a deliberate choice. And failing to note this deliberate choice is losing information.

The choices are not as thorough for the other weeks, but that can be rectified by adding cases.

  • first: 1-7
  • second: 8-14
  • third: 15-21
  • fourth: 22-28
  • last: several interesting cases here, depending on whether the month has five of that day or four, and also for a February in a leap year.

This does raise an interesting choice of how one would write the description though. Taking an example for teenth Monday of May 2013 which lands on 2013-05-13, would it be written as:

  • description: "teenth Monday of a month where it lands on the 13th"
  • description: "teenth Monday of a month where it lands on the first possible day"
  • description: "teenth Monday of a month where it lands on the 13th, the first possible day"
  • other suggestion

@ErikSchierboom
Copy link
Member

ErikSchierboom commented Jan 14, 2022

"teenth Monday of a month where it lands on the 13th, the first possible day" contains the most information, so should possibly be preferred over the other two.

Maybe change slightly to:

description: "teenth Monday of a month where it lands on the 13th, the first teenth day"

petertseng added a commit to petertseng/exercism-problem-specifications that referenced this issue Jan 14, 2022
descriptions show whether a date is the first, last, or an arbitrary
middle date of the week. This helps understand why certain cases are
selected.

Closes exercism#974
petertseng added a commit to petertseng/exercism-problem-specifications that referenced this issue Jan 14, 2022
descriptions show whether a date is the first, last, or an arbitrary
middle date of the week. This helps understand why certain cases are
selected.

Closes exercism#974
petertseng added a commit to petertseng/exercism-problem-specifications that referenced this issue Jan 19, 2022
descriptions show whether a date is the first, last, or an arbitrary
middle date of the week. This helps understand why certain cases are
selected.

Closes exercism#974
petertseng added a commit to petertseng/exercism-problem-specifications that referenced this issue Feb 6, 2022
descriptions show whether a date is the first, last, or an arbitrary
middle date of the week. This helps understand why certain cases are
selected.

Closes exercism#974
petertseng added a commit that referenced this issue Feb 6, 2022
descriptions show whether a date is the first, last, or an arbitrary
middle date of the week. This helps understand why certain cases are
selected.

Closes #974
ErikSchierboom added a commit to ErikSchierboom/problem-specifications that referenced this issue Feb 11, 2022
* Format using prettier (exercism#1917)

Format using prettier

* updated description of anagrams exercise (exercism#1928)

* updated description of anagrams

* changed anagram description to be one-sentence-per-line

* updated description of anagrams to use sets

* Update Licence

Give a look at the discussion in BR exercism#1930

* rational-numbers: test to reduce abs value (exercism#1938)

* Change saddle point references to row, column (exercism#1948)

* word-search: Add test case

* Update exercises/word-search/canonical-data.json

Agreed.

Co-authored-by: Erik Schierboom <[email protected]>

* meetup: improve descriptions by saying why each case is tested (exercism#1919)

descriptions show whether a date is the first, last, or an arbitrary
middle date of the week. This helps understand why certain cases are
selected.

Closes exercism#974

* word-search: Add cases checking for concatenation and wrapping

The author of this commit thinks that concatenation is highly unlikely,
but the wrapping might be useful to check in languages that allow
negative indices.

* `flatten-array` Add additional test cases (exercism#1953)

* Add additional test cases to flatten-array

* Update exercises/flatten-array/canonical-data.json

Co-authored-by: Peter Tseng <[email protected]>

Co-authored-by: BethanyG <[email protected]>
Co-authored-by: Peter Tseng <[email protected]>

* Fix bowling game copy (exercism#1955)

Fixes exercism#1954

* Add action to format code (exercism#1941)

* build(deps): bump DavidAnson/markdownlint-cli2-action (exercism#1952)

Bumps [DavidAnson/markdownlint-cli2-action](https://github.com/DavidAnson/markdownlint-cli2-action) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/DavidAnson/markdownlint-cli2-action/releases)
- [Commits](DavidAnson/markdownlint-cli2-action@b3c3b40...744f913)

---
updated-dependencies:
- dependency-name: DavidAnson/markdownlint-cli2-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Reduced rational nr. should be in standard form. (exercism#1958)

* Reduced rational should be in standard form.

The current instructors fail to mention that a reduced rational number should always be rendered in standard form (without any negative value at the denominator).

* remove superflous blank lines; fix wording

* scale-generator: use flat and sharp symbols (exercism#1942)

* Update configlet part in README (exercism#1949)

Co-authored-by: ee7 <[email protected]>

* phone number: only one problem per test input (exercism#1959)

* [Phone Number] Only one problem per test input

Because the area code is not allowed to start with 0 or 1, inputs designed to elicit other errors should not use area codes that start with either of those digits.

* Respect immutability

* Correct field name: s/comment/comments/

* Comments should contain a list.

* Allow prettier to improve comments

* book-store: reorder keys

* darts: reorder keys

* grade-school: reorder keys

* hamming: reorder keys

* high-scores: reorder keys

* largest-series-product: reorder keys

* list-ops: reorder keys

* luhn: reorder keys

* triangle: reorder keys

* scale-generator: reorder keys

* saddle-points: reorder keys

* diffie-hellman: reorder keys

* collatz-conjecture: reorder keys

* anagram: reorder keys

* accumulate: reorder keys

* Add CI script to check correct order of keys

Co-authored-by: Bart Massey <[email protected]>
Co-authored-by: y8l <[email protected]>
Co-authored-by: Ivan Ivanov <[email protected]>
Co-authored-by: Damian C. Rossney <[email protected]>
Co-authored-by: mariohuq <[email protected]>
Co-authored-by: mariohuq <[email protected]>
Co-authored-by: Peter Tseng <[email protected]>
Co-authored-by: Peter Tseng <[email protected]>
Co-authored-by: AH WEI <[email protected]>
Co-authored-by: BethanyG <[email protected]>
Co-authored-by: Cedd Burge <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Davide Alberto Molin <[email protected]>
Co-authored-by: wolf99 <[email protected]>
Co-authored-by: June <[email protected]>
Co-authored-by: ee7 <[email protected]>
Co-authored-by: Leah Hanson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants