Skip to content

hamming: remove redundant test cases #1412

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

Merged
merged 1 commit into from
Dec 2, 2018
Merged

Conversation

ErikSchierboom
Copy link
Member

@ErikSchierboom ErikSchierboom commented Dec 1, 2018

Closes #1403

Copy link
Member

@rpottsoh rpottsoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this PR close the issue? Just getting up, need coffee, what I can see on my phone looks good.

@ErikSchierboom
Copy link
Member Author

Shouldn't this PR close the issue?

Absolutely. I've updated the PR.

Copy link
Member

@rpottsoh rpottsoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM!

"expected": 1
},
{
"description": "same nucleotides in different positions",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case is interesting. It is clearly catered toward certain specific implementations, such as those that simply compare the frequencies of each character.

Luckily, such an implementation would also give a wrong answer long different strands case, giving 4 instead of 9. So, removing this case doesn't remove any coverage, and it is okay to remove it.

The only possible reason to keep it would be to explicitly signal to students who have written such an implementation that trouble is brewing ahead, in a smaller more manageable step.

In deciding this, consider the likelihood of a student writing such an implementation and the value (if any!) of this test to such a student.

Please don't wait for further feedback from me before merging this. My job is only to make sure that this information is considered, not to provide an opinion (I have none and do not care in the least what decision is made here).

"expected": 2
},
{
"description": "non-unique character in first strand",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have never understood what kinds of implementations this case was meant to detect, and #51 which added it did not provide the rationale.

However, I suppose in its original form (AGA vs AGG), it would find implementations that would checked whether the set of letters is the same (for example, here, declare that the two strings have distance 0 because both of them contain at least one A and at least one G).

If that is so, #953 lost that ability. Since nobody has come forth in the year that it's been gone and requested that it be changed back, that's a fine indication that that was of no concern to anyone, and thus should be removed.

@kotp kotp merged commit 436d217 into exercism:master Dec 2, 2018
ZapAnton added a commit to ZapAnton/rust that referenced this pull request Dec 11, 2018
sshine added a commit to exercism/haskell that referenced this pull request Feb 1, 2019
petertseng pushed a commit to petertseng/exercism-ceylon that referenced this pull request Sep 1, 2019
@ErikSchierboom ErikSchierboom deleted the hamming branch February 4, 2022 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants