-
-
Notifications
You must be signed in to change notification settings - Fork 542
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
I posit that hello-world is too complex for a first exercise. How do we deal with it? #520
Comments
👍 for option 1: Change it to just "Hello, World!! The purpose of a Hello, World! exercise seems to be, IMHO, just testing the tool-chain. Anything beyond returning/outputting the string makes it less suitable to that purpose. Also, the |
I think this is out of scope for hello world, leaving just the first two.
💯 What to do:
|
I would find it so great if I could change the existing hello-world README and let the various tracks converge on it, maybe emblazon them. Avoids any confusing operations with having a second starter exercise, or moving hello-world -> greeter (now if I look at a track that has hello-world, how can I tell whether it is the new or old hello world?) We've done this process once or twice before. We discussed how to handle it in exercism/discussions#2. Maybe it's time to revisit this. I asked tracks to change their sum-of-multiples last April. I marked in the README that there's a change in flight, and let all readers know, if you see a track is using the old version, help us fix it. That was done in #236. If we get agreement that hello-world should be simplified (I confess, I was thinking I would get more opposition!), how about taking that plan? On the other hand, hello-world is a bit of a special case since it's the very first experience of a track. If the first experience seems weird and inconsistent in this manner, it may confuse a student who is just trying to get started. We would have to be very careful in applying this plan. One thing that gives me pause is - I may be getting ahead of myself. It is absolutely true that hello-world in its current form would not be a good first exercise for Haskell (and, I argue, every other option/maybe track, but I couldn't know for sure!). For Haskell, the unconditional hello world is the right thing to do. But then I wonder, is it too presumptuous to claim that it's the right thing for all tracks? Maybe they're perfectly happy with their hello-world in its current form, and do not want a change. This is actually a time when I wish we could survey students to see what they think. Would they have appreciated this new simple hello world? Any patterns among the tracks that have harder hello-world exercises? I try to advocate for changes that I have very good reason to think are better, but especially given that this change tries to better an onboarding experience, wouldn't it be great if there was any data at all to back it up? |
I agree that the current hello-world is too complicated in some languages considering its purpose. However, this is not the case for all languages. I can say for certain that the exercise in its current form is solved fairly easily with the use of default arguments in languages such as Pony and Kotlin. |
I believe that the question is not "Is is too hard?", @Theodus, but "Could it be easier?" In my view, it should be ridiculously easy to solve it, and I would even supply a stub solution like this: module HelloWorld (hello) where
hello :: String
hello = "Goodbye, World!"
This discussion may have started because it is hard for beginners to deal with optional argument in Haskell, @petertseng, and certainly changes are temporary inconveniences for tracks that already have it implemented, but the rationale is sound and there is still no one defending the usefulness of having it more difficult than it needs to be. If someone comes with a good reason to keep the optional argument, of course we could leave it the way it is. Anyone? |
I'm also firmly in favor op option 1. The exercise should not be about specific language features in my opinion (no matter how simple), but only about getting to know the track's setup. How do I run the test? What is a red test? How do I get it to pass? Sure, some languages have easy ways to do optional values, but is that really the first thing you expect people to learn? I don't think so. |
I prefer option 1. Hello World should be as simple as it gets. I think languages with easy option types could have a "Hello World+" language specific exercise with option types baked in. |
There was more support for option 1 than I thought there would be! I will leave for a while longer before I take action in x-common, but I think I will prepare a few PRs those tracks on which I'm a maintainer. |
Why not keep the exercise as is except call it something else? Is there nothing that can't be learned from the exercise in its present form? At the same time I am also for having hello-world be more of test/confirmation exercise to help the student realize that they have setup the tools correctly for a particular track. |
Indeed, the current hello-world could become |
|
Keeping the existing exercise as a new exercise does have its advantages, as it gently introduces optional values. But if our new |
You're right, @ErikSchierboom. It would be better to have something less repetitive. 👍 |
Perhaps we can come up with another exercise which sole focus is optional values? |
It would be nice, but I usually prefer to tweak a existing one and avoid the proliferation of language-specific exercises. We could easily write dozens of exercises to cover Haskell topics, but I'm not sure if this would be good for Exercism as a whole. |
Well, actually I do think that this would be a good subject, as many languages have their own concept of optional values and how to deal with it. |
Hmm. Those tracks that use hello-world as an intro to TDD (as well as exercism), such as exercism/kotlin#31 and https://github.com/exercism/xjava/blob/master/exercises/hello-world/TUTORIAL.md (exercism/java#139), are going to be in for a rude awakening. I wonder how to reconcile the differences between those tracks that want to use the directed introduction and those that want something dead simple. |
I think that our message to them would be to perhaps see if they can move the TDD intro to the next exercise (which I would suggest would be |
So...are we settled about changing the To proceed, I think we should, ideally...
With that, the tracks could approximately sync their changes if they want to. Makes sense? |
Absolutely! |
I just opened the PR and mentioned all the track maintainers there to raise awareness. This will probably allow us to discover if there is anyone against it soon. I temporarily set the date to 2016-02-20, but we can change it or suspend the process anytime. |
The introductory exercise should require as little Go knowledge as necessary. We'd like to introduce `go test` and `testVersion` here. We skip introducing the empty string as no string, as this is more specific knowledge. exercism/problem-specifications#520
The introductory exercise should require as little Rust knowledge as necessary. We'd like to introduce `cargo test` here since it will be used for all exercises, but introducing Option is too much. We add a stub in case it is not clear how to return a string. That way, the student only has to change the string provided. exercism/problem-specifications#520
re: exercism/problem-specifications#520 Hello world exercise updated to only return 'Hello world!' without the name substitution that was present in the previous version.
…s#520 (#370) * Updated hello_world problem to reflect exercism/problem-specifications#520 exercism/problem-specifications#520 * Adding example
It was determined [upstream] that the hello world excercise should be simplified to always expect a return value of "Hello, World!". [upstream]: exercism/problem-specifications#520
It was determined [upstream] that the hello world excercise should be simplified to always expect a return value of "Hello, World!". [upstream]: exercism/problem-specifications#520
It was determined [upstream] that the hello world excercise should be simplified to always expect a return value of "Hello, World!". [upstream]: exercism/problem-specifications#520
It was determined [upstream] that the hello world excercise should be simplified to always expect a return value of "Hello, World!". [upstream]: exercism/problem-specifications#520
I learned from:
Hello world should be a very easy exercise. Its objectives:
exercism fetch
andexercism submit
are working (NB, this could be a language-agnostic exercise, but it is not clear where we would put it)I am here to argue that the current hello-world ("Alice" -> "Hello, Alice!", "Bob" -> "Hello, Bob!", no input -> "Hello, World!") does not serve this purpose well, since it also requires the student to know enough about the language to handle the no-input case.
This effect is especially pronounced in languages that do not allow function overloading or default arguments. Some languages resort to passing an empty string, defining two functions, or others discussed in #290. Elm, F#, Haskell, Kotlin, OCaml, Purescript, and Rust are all using their Option/Maybe type, which I argue is not suitable for hello-world (In Learn You A Haskell, Maybe is not mentioned until chapter 7 of 14). But even in languages with function overloading or default arguments, I suggest that these two features are too much for hello-world.
I would say that the best way to achieve the goal of hello-world is to have the function-under-test take zero arguments and return "Hello, World!" unconditionally.
But what can we do? The current hello-world is already out there, and several languages have it.
the-answer
, whose only function-under-test should return 42 unconditionally. Then, languages can do whichever of the two they please. The only disadvantage is that it will be confusing to track maintainers and exercise porters to have two starter exercises.The text was updated successfully, but these errors were encountered: