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

[exercises/bob] Mention linebreak handling #284

Closed

Conversation

oleks
Copy link
Contributor

@oleks oleks commented Oct 28, 2024

No description provided.

@oleks oleks changed the title Mention linebreak handling [bob] Mention linebreak handling Oct 28, 2024
@oleks oleks changed the title [bob] Mention linebreak handling [exercises/bob] Mention linebreak handling Oct 28, 2024
@IsaacG
Copy link
Member

IsaacG commented Oct 28, 2024

  1. This file is copied/synced from the upstream problem spec and should not be charged from that. An instructions.append can be used if needed.
  2. The tests are the authoritative source of the requirements. The instructions aren't always entirely complete, and that's fine; we rely on the test driven approach.

@oleks
Copy link
Contributor Author

oleks commented Oct 28, 2024

  1. This file is copied/synced from the upstream problem spec and should not be charged from that. An instructions.append can be used if needed.

I see.

2. The tests are the authoritative source of the requirements. The instructions aren't always entirely complete, and that's fine; we rely on the test driven approach.

But then you tend to "game" the test suite rather than show ability to implement what is asked of you in human language. That's fine, but just mentioning this shortcoming.

@oleks oleks closed this Oct 28, 2024
@oleks oleks deleted the oleks-bob-mention-linebreak-handling branch October 28, 2024 11:40
@oleks
Copy link
Contributor Author

oleks commented Oct 28, 2024

  1. The tests are the authoritative source of the requirements. The instructions aren't always entirely complete, and that's fine; we rely on the test driven approach.

But then you tend to "game" the test suite rather than show ability to implement what is asked of you in human language. That's fine, but just mentioning this shortcoming.

Furthermore, an improperly stated description can lead you astray until you have read/run the tests. In this particular case, I first implemented a solution which was correct by the description, but wrong by the tests: I let bob respond to each line in the input (which honestly, seems just as sensible). I don't really care which way around it is, but why make the implementer waste their time?

@IsaacG
Copy link
Member

IsaacG commented Oct 28, 2024

It is recommended you always run the tests first. Exercism explicitly takes a TDD approach and explicitly relies on the tests to drive the requirements.

If a user wants to game the tests, changing the description slightly will not change anything.

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