-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Add hello-world exercise #475
Conversation
Don't forget to add to config.json. The questions below assume hello world is intended to be the first exercise: I have slight unease with introducing Looking at Learn You a Haskell, the first-ever mention of Then again, we also introduce Maybe I'm underestimating the audience's ability to understand |
@petertseng I can only agree, it's just that |
Maybe I need to look at exercism/problem-specifications#290 again. I want to know what the purpose of this first exercise should be.
|
Hmm... given that I have your agreement too, I am very inclined to reject the supposition entirely. Or if Of course, that's in contravention of the README, so now we have another problem to deal with. I wonder if we can stick something in HINTS.md that says something to the effect of "ha ha, ignore what it says above", but that's clumsy and indicates disharmony in the world. Or another possibility is to go campaign to all tracks that unconditional "Hello, world!" is the right thing to do. And then all of them have to change their tests because otherwise they're in contravention of a hypothetical README that says it's unconditional "Hello, world!". I'm slightly disinclined to be the one who spends time embarking on this campaign. All this above is why I suspect
These suggest that it's a combination of all of these: intro-to-exercism, intro-to-track, intro-to-tdd. Argh, this puts a hole into the |
I would also have thought that |
My original idea for hello world was to give a very easy exercise to make sure that the person gets everything wired together. The secondary goal is to introduce people to how to run the test suite in a given language. I don't see any particular reason to require each track to have a hello world exercise, and certainly not with any particular implementation. Especially where the implementation introduces concepts that make it frustrating to get started. |
There is one potential implementation I can offer that is faithful to the README and does not introduce Use the same technique from helloDefault :: String
helloDefault = error "You need to implement this"
hello :: String -> String
hello = error "You need to implement this" If that is deemed usable, we could go with it.
|
We could also considering making the README simpler and more—uhm—flexible. |
While evaluating that a proposed hello-world exercise in #475 would introduce Maybe into the track at the first exercise, I found myself wondering what other exercises introduce Maybe. I decided to put this, and select other topics, into the config.json file. The topics selected are, largely, those that might affect a problem ordering decision. They are topics that either require some effort to grasp (so we should not put them too early) and/or are repetitive (so we should not place them too close together). * Maybe * Either * Lazy evaluation * Define a data type * Library reimplementation * Refactoring * Accumulator-strictness * instance TC (where TC is any typeclass other than Eq or Show) * IO Monad * Random * Mutable state Closes #274.
I can try to do that, but I'm having a real hard. Currently I'm complaining that it's overspecified. But if I go too far in the other direction and make it underspecified, that's no good either. I'll make my case anyway, since there's no harm in asking. |
It seems I'm a little late, but I'll try to summarize my thoughts about it: About the implementationThe implementation seems perfect, @ErikSchierboom, but I'm also not comfortable with a About the
|
My personal preference would be to simply the README of the
The I think the main disdvantage of simplifying the |
I think this discussion is important enough that we should promote it to the discussions repository. If we can get some sort of consensus we can draft an issue that can be submitted to all the tracks that have a hello-world currently. |
Indeed, such a discussion is at exercism/problem-specifications#520 (Sorry, I chose the x-common repository instead of the discussion repository). I was hoping that you personally did not have any objection to it, because this is one case where curriculum matters and user experience are pretty inter-related. I will take the fact that you haven't immediately objected indignantly as one half of a good sign (the other half would be explicit agreement because implicit non-disagreement is not the same as explicit agreement) |
Considering that exercism/problem-specifications#520 is going to be merged soon, I think there is no reason to keep this PR on hold anymore. |
So I should update this PR to do the simple "Only return the 'Hello, World!'" string version, right? |
That would be great!
|
I've just updated the PR. The updated exercise is very simple and a good first exercise now I guess. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems great!
module HelloWorld (hello) where | ||
|
||
hello :: String | ||
hello = "Hello, World!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worry a little that maybe this way the student will be able to pass the tests without finding the source file that needs to be changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand. Isn't this (putting the sample in an examples
directory) the way other exercises also work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh...sorry! It is perfect. I just confused the files. 👍
This PR adds the
hello-world
exercise, as requested in https://github.com/exercism/todo/issues/34.This is my first PR in this language track, so I hope everything is in order. Let me know if it isn't.