Skip to content
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

Make Hamming conform to official definition #31

Closed
kytrinyx opened this issue Sep 27, 2014 · 0 comments
Closed

Make Hamming conform to official definition #31

kytrinyx opened this issue Sep 27, 2014 · 0 comments

Comments

@kytrinyx
Copy link
Member

From issue exercism/exercism#1867

Wikipedia says the Hamming distance is not defined for strings of different length.

I am not saying the problems cannot be different, but for such a well-defined concept it would make sense to stick to one definition, especially when the READMEs provide so little information about what is expected from the implementation.

Let's clean this up so that we're using the official definition.

kytrinyx added a commit that referenced this issue Nov 24, 2014
This removes the tests that define behavior for cases where the strings are of unequal
length. Since the hamming problem is the first one on the Ruby track, and so many people
who are new to programming start with the Ruby track, I didn't want to introduce error
handling here.

The wikipedia article about the Hamming distance says that the behavior is undefined if
the strings are of unequal length. I don't necessarily think that this means that a particular
implementation _shouldn't_ specify an error, only that it's OK to leave it undefined.

This will also make it possible to bring up the idea of edge cases and error handling in the
discussions on the site.

Closes #44 and #31.
kytrinyx added a commit that referenced this issue Mar 31, 2015
This removes the tests that define behavior for cases where the strings are of unequal
length. Since the hamming problem is the first one on the Ruby track, and so many people
who are new to programming start with the Ruby track, I didn't want to introduce error
handling here.

The wikipedia article about the Hamming distance says that the behavior is undefined if
the strings are of unequal length. I don't necessarily think that this means that a particular
implementation _shouldn't_ specify an error, only that it's OK to leave it undefined.

This will also make it possible to bring up the idea of edge cases and error handling in the
discussions on the site.

Closes #44 and #31.
gchan pushed a commit to gchan/xruby that referenced this issue Oct 18, 2016
Make queen positions more obvious on the chess board diagram.
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

No branches or pull requests

1 participant