Skip to content

hello-world: Change to always expect "Hello, World!"#544

Merged
rbasso merged 1 commit intoexercism:masterfrom
rbasso:hello-world-simplified
Feb 20, 2017
Merged

hello-world: Change to always expect "Hello, World!"#544
rbasso merged 1 commit intoexercism:masterfrom
rbasso:hello-world-simplified

Conversation

@rbasso
Copy link
Copy Markdown
Contributor

@rbasso rbasso commented Feb 10, 2017

As discussed in #520, the exercise hello-world is too complex to fulfill its purpose and we decided to simplify it.

The new test suite will simply expect the string "Hello, World!", and will serve mainly as a sanity check that everything is working.

This change may disrupt some tracks that already have it implemented, so we are scheduling the merging of this PR to allow the @exercism/track-maintainers to sync track-specific changes with x-common.

The merging is tentatively scheduled to: 2016-02-20 00:01 UTC +-1 day 😄

Please direct any question/critic to #520, so that we can keep the discussion focused there.

Closes #520.

{
"hello":{
"description":"Say Hi!",
"expected":"Hello, World!"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no standard format for the canonical-data.json, so I used the one I proposed here. If by any chance it gets accepted without change, it will be one less file to update. 😄

Copy link
Copy Markdown
Member

@petertseng petertseng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking over. It's a big effort, given that it affects new user experience for any languages that have it. Thus, all help is appreciated (I'm relieved and grateful!). You know you have my support.

A few comments.

It's tough for me to put myself in a new user's shoes anymore, since it has been too long since I was one.

Comment thread exercises/hello-world/metadata.yml Outdated
@@ -1,4 +1,4 @@
---
blurb: 'Greet the user by name, or by saying "Hello, World!" if no name is given.'
blurb: 'Just say "Hello, World!"'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this exercise gets shown in e.g. http://exercism.io/languages/c/exercises , it may be nice to display prominently in this line that this is an introductory exercise.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it, but I really don't know what would be good to put there.
If you have any suggestion, please write it here and I'll change it immediately.


If a name is not given, the response should be "Hello, World!"

## Test-Driven Development
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. The fact that this was here makes me wonder whether it should be put into a second introductory exercise, whatever exercise is used as intro-to-TDD. Unless we think each track should deal with this.

Or, maybe we keep it here, but note that in this exercise the test suite is a single case, and in later ones it will have more cases.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the instructions where misplaced.

Not all exercises implemented the hello-world exercise. Moving the instructions to leap's description.md would just reproduce the problem in another place.

The immediate solution I can think of is track-dependent: Move it to the HINTS.md from the first exercise that is not hello-world. This is more flexible than forcing it to be leap.

This way, each track can customize the instructions to reflect what are the best practices for testing in the language. Not all languages are so TDD focused as ruby seems to be, specially the strongly-typed ones, that force users to type-check everything before running a single test.

I just create a Gist of a HINTS.md file with the old instructions here, to make migration easier. If you think this is a good idea, we could link it in a more visible place to help the track maintainers.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the instrutions were misplaced. Languages can use the proposed hint for their next exercise, whatever it may be.

readable as we can. However, solutions to the hello-world exercise will not be
reviewed by a person, but by rikki- the robot, who will offer an encouraging
word.
If everything goes well, you will be ready to fetch your first real exercise.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice. One note (probably to myself): while the instructions we lose in this Pull seem appropriate to remove here, they might be useful somewhere else. If we do end up choosing a intro-to-tdd exercise, this might be a good source for that description.md.

Comment thread exercises/hello-world/description.md Outdated

exercism skip $TRACK_ID hello-world
- Write a function that says "Hello, World!".
- Run the tests and make sure that they succeed.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "Run the tests" should be "Run the test(s)", as I expect most languages to only have a single test.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run the test file? This is always the case, unless there are tracks with multiple files for testing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Run the test suite..." ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run the test suite is a very nice suggestion! I like that.

@rbasso
Copy link
Copy Markdown
Contributor Author

rbasso commented Feb 20, 2017

The time for merging has come (in fact we are 4 hours and 30 minutes late), so I'm merging this as promised/agreed and hope that all the tracks also merge their changes soon, to keep consistency

The merging is tentatively scheduled to: 2016-02-20 00:01 UTC +-1 day 😄

@rbasso rbasso merged commit feef23e into exercism:master Feb 20, 2017
@rbasso rbasso deleted the hello-world-simplified branch February 20, 2017 04:44
NobbZ pushed a commit to NobbZ/exercism-erlang that referenced this pull request Feb 20, 2017
NobbZ added a commit to exercism/erlang that referenced this pull request Feb 20, 2017
robphoenix added a commit to robphoenix/exercism-lua that referenced this pull request Feb 21, 2017
ryanplusplus pushed a commit to exercism/lua that referenced this pull request Feb 21, 2017
* hello-world: Change to always expect "Hello, World!"

see exercism/problem-specifications#544

* hello-world: add stub file
tejasbubane added a commit to tejasbubane/xjavascript that referenced this pull request Apr 18, 2017
by always expecting "Hello, World!"

Change in x-common:
[here](exercism/problem-specifications#544)

Upcoming new exercise to kinda replace `hello-world`:
[here](exercism/problem-specifications#759)

Since this `hello-world` is just meant to be a sanity check for
everything working, I also went ahead and removed the use of class
for the sake of simplicity.
We can introduce classes with the next `two-fer` exercise.
matthewmorgan pushed a commit to exercism/javascript that referenced this pull request Apr 18, 2017
by always expecting "Hello, World!"

Change in x-common:
[here](exercism/problem-specifications#544)

Upcoming new exercise to kinda replace `hello-world`:
[here](exercism/problem-specifications#759)

Since this `hello-world` is just meant to be a sanity check for
everything working, I also went ahead and removed the use of class
for the sake of simplicity.
We can introduce classes with the next `two-fer` exercise.
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.

5 participants