Skip to content

two-bucket: Do not constrain bucket representation to Strings #989

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
wants to merge 1 commit into from
Closed

two-bucket: Do not constrain bucket representation to Strings #989

wants to merge 1 commit into from

Conversation

petertseng
Copy link
Member

@petertseng petertseng commented Oct 31, 2017

The description currently specifies that buckets are represented, in
both the input and the output, as strings.

This seems overly constraining. Consider those tracks that wish to
represent these buckets as variants of a tagged union or of an enum for
the purpose of better type safety. These tracks have these options in
order to do so:

  • Accept the problem-specifications README as is, but act in
    contravention of it. But it is confusing if the README contradicts the
    tests.
  • Create a custom description.md. But this is a little unfortunate
    because only two lines need to change, and it adds extra maintenance
    burden to have to maintain the custom description.md. Consider that if
    this description.md changes, the changes will probably need to be
    copied to each custom description.md
  • Add to .meta/hints.md saying something to the effect of "ha ha ignore
    the above text about using Strings, we're using tagged unions / enums"
    so that this will be appended to the description. But it seems too
    strange to have a README contradict itself.
  • Other solution I did not think of.

Removing the specification of the buckets as a string allows the
flexibility, but now it acquires some inconsistency. All inputs/outputs
that are numeric are explicitly stated to be so, but the specification
is silent on the bucket representation. It would not be unreasonable for
a reader of this specification to say "But wait! You told me what types
all the other inputs/outputs are, why didn't you tell me about the
buckets?"

If this commit is accepted, it implies we value the flexibility over
the consistency.

Closes #990 by mutual exclusion.

The description currently specifies that buckets are represented, in
both the input and the output, as strings.

This seems overly constraining. Consider those tracks that wish to
represent these buckets as variants of a tagged union or of an enum for
the purpose of better type safety. These tracks have these options in
order to do so:

* Accept the problem-specifications README as is, but act in
  contravention of it. But it is confusing if the README contradicts the
  tests.
* Create a custom description.md. But this is a little unfortunate
  because only two lines need to change, and it adds extra maintenance
  burden to have to maintain the custom description.md. Consider that if
  this description.md changes, the changes will probably need to be
  copied to each custom description.md
* Add to .meta/hints.md saying something to the effect of "ha ha ignore
  the above text about using Strings, we're using tagged unions / enums"
  so that this will be appended to the description. But it seems too
  strange to have a README contradict itself.
* Other solution I did not think of.

Removing the specification of the buckets as a string allows the
flexibility, but now it acquires some inconsistency. All inputs/outputs
that are numeric are explicitly stated to be so, but the specification
is silent on the bucket representation. It would not be unreasonable for
a reader of this specification to say "But wait! You told me what types
all the other inputs/outputs are, why didn't you tell me about the
buckets?"

If this commit is accepted, it implies we value the flexibility over
the consistency.

Closes #990 by mutual exclusion.
@Insti
Copy link
Contributor

Insti commented Oct 31, 2017

I approve of this PR but I approve of the other one more.

petertseng added a commit that referenced this pull request Nov 4, 2017
The description currently specifies that buckets are represented, in
both the input and the output, as strings.

This seems overly constraining. Consider those tracks that wish to
represent these buckets as variants of a tagged union or of an enum for
the purpose of better type safety. These tracks have these options in
order to do so:

* Accept the problem-specifications README as is, but act in
  contravention of it. But it is confusing if the README contradicts the
  tests.
* Create a custom description.md. But this is a little unfortunate
  because only two lines need to change, and it adds extra maintenance
  burden to have to maintain the custom description.md. Consider that if
  this description.md changes, the changes will probably need to be
  copied to each custom description.md
* Add to .meta/hints.md saying something to the effect of "ha ha ignore
  the above text about using Strings, we're using tagged unions / enums"
  so that this will be appended to the description. But it seems too
  strange to have a README contradict itself.
* Other solution I did not think of.

Thus, it seems it is best to remove the specification of the buckets as
a string so as to allow the flexibility.

For the purpose of consistency, all other types have been removed as
well, otherwise it would invite (very reasonable) questions about why
all inputs/outputs except the buckets have types given.

It is surmised that this leads to no real loss, because it should be
obvious that sizes, number of moves, and number of liters are all
numeric values.

Closes #989 by mutual exclusion.
@petertseng petertseng deleted the bucket-not-string branch November 4, 2017 22:28
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