-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Assignments for updated exercises and new exercises #776
Comments
update for pig-latin ✅ |
|
|
|
update for hamming ✅ |
|
I'll pass on the bowling exercise for now, as i'm a bit confused by the instructions, as usual. update for transpose ✅ |
update for matching-brackets ✅ |
I'm trying to update binary-search now. The current tests check for Any idea what would be idiomatic here? Throwing exception does not look like the correct approach here, and i'm not even able to find an appropriate exception type. What do you think about returning -1? This looks more reasonable to me. |
I checked Java's built-in Arrays.binarySearch and it's returning See https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html#binarySearch-int:A-int- This looks reasonable, but it also feels like a bit overkill, as the insertion point might not be clearly communicated by the tests. It can be mentioned in an append file, though. |
I think throwing an exception is wrong, and not finding a value is not something exceptional.
That's fine, but I think that is mostly done in languages that don't allow for returning a nullable integer. What about just using |
I have considered using I was reading a book that talked about it. There was a chapter with title:
Some examples from the book:
and so on. It did go into some lengthy explanation about what happens if
Obviously, using |
Then I would prefer to use -1. That's quite a common pattern used in other languages |
Trying to update sieve. Looks like the last test has the result as an array split into multiple lines, with each line showing 14 numbers. Is there any way to keep it formatted like that? Currently i'm only able to either put all numbers in one very long line, or all numbers in one very long column. Any idea about the best approach here? |
Ehm, maybe we could allow generators to opt-out off auto formatting of the code? |
I think switching off auto-formatting sounds very reasonable, and nice to have as an option. However, in this particular case, I don't think that having a very long row of integers is too problematic. |
updates for: eliuds-eggs ✅ |
Trying to update protein-translation. The current implementation does not include input validation at all. The specs say that those tests are optional. Should they still be left out? I'm leaning towards including them, but this would obviously break existing solutions — something that already happens we update an exercise that has error handling, so I'm not too worried. @ErikSchierboom Thoughts? |
I don't mind it either way. Go for what you feel is best |
updates for: robot-simulator |
To avoid duplicate work, assign yourself an exercise that you plan to work on by posting it here.
cc @ErikSchierboom
The text was updated successfully, but these errors were encountered: