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

Fix incorrect expected values for all-your-base. #468

Closed
wants to merge 1 commit into from

Conversation

stevejb71
Copy link
Contributor

3 of the error cases in all-your-base do not look correct to me.

@Insti
Copy link
Contributor

Insti commented Dec 7, 2016

From the top of the file:

          "It's up to each track do decide:"

            , "3. Are leading zeroes allowed?"
            , ""
            , "4. How should invalid input be handled?"
            , ""
            , "All the undefined cases are marked as null."

implies null is the correct value.

@stevejb71
Copy link
Contributor Author

Whoops, I missed that. Will close.

@stevejb71 stevejb71 closed this Dec 7, 2016
@Insti
Copy link
Contributor

Insti commented Dec 7, 2016

There was a big discussion about all this when the exercise was created: #280

@kytrinyx kytrinyx deleted the FixAllYourBase branch December 7, 2016 23:29
petertseng added a commit that referenced this pull request Nov 11, 2017
all-your-base 1.2.0

In #280 we made
the explicit choice to leave various cases `expected: null` where tracks
can make their own decisions (leading zeroes, the representations of
zero, whether empty sequence is acceptable as input).

There are four affected cases.

#473 results in
a discussion that some post-processing is necessary, based on the
decisions that a given track makes. One might even imagine that each
individual generator may have to reimplement base translation to arrive
at the proper answers for each case.

To ease the process of translation, instead we make some canonical
choices, explicitly show what the choices are, and offer that tracks may
make a different choice if desired.

A previous proposal did not receive support:
#468

However, this proposal differs because it does change the comments at
the top of the file.

Closes #1002 by mutual exclusion
emcoding pushed a commit that referenced this pull request Nov 19, 2018
The 'problems' key is deprecated in favour of 'exercises' so we can
remove the unused 'problems'
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.

2 participants