Skip to content

Feedback: Exercise Clock is a little confusing #908

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
kevin-meyers opened this issue Apr 20, 2020 · 7 comments · Fixed by #910
Closed

Feedback: Exercise Clock is a little confusing #908

kevin-meyers opened this issue Apr 20, 2020 · 7 comments · Fixed by #910

Comments

@kevin-meyers
Copy link
Contributor

Right at the beginning it has Implement a clock that handles times without dates. I can't tell if this means without a date library, or just dateless (like from 11:59 am -11:59 pm).

It also doesn't have clear instructions on what fromHourMin and toString are supposed to do. I can infer fromHourMin from the type signature but toString didn't seem to have a place.

Also as this is the first challenge creating data types, it would be nice if there were a simple example right in the instructions.

@kevin-meyers kevin-meyers changed the title Exercise Clock is a little confusing Feedback: Exercise Clock is a little confusing Apr 20, 2020
@kevin-meyers
Copy link
Contributor Author

I am about to work through the problem, I just wanted to let you know how I felt as an end user. Once I get through it I would like to make suggestions and maybe attempt a pull request. (This will be my first open source attempt)

@kevin-meyers
Copy link
Contributor Author

Just to keep this updating with my ideas. toStrings use is so we can debug and see the value of the clock. We could derive show on the data type but that wouldnt be nice to read.

@kevin-meyers
Copy link
Contributor Author

The tests shined some light on its purpose, I originally wrote something like "The hour on the clock is: 8 and the minutes are: 0"

but see they should be "08:00" WITHOUT am pm periods.

@kevin-meyers
Copy link
Contributor Author

It should have 0 padded numbers

@kevin-meyers
Copy link
Contributor Author

Interestingly this isnt a 12 hour clock with hands? The image made me think so but the tests have up to 24 hours.

@kevin-meyers
Copy link
Contributor Author

The negatives were a surprise but i think its better that way... That way the user can build it step by step and deal with the learning process better.

@kevin-meyers
Copy link
Contributor Author

I am gonna recap and check back in the morning, but I mainly want to add 3 things:
Note that the clock is for the entire day (24 hours), include a single example of toString in actions (i.e. "08:23", and a couple resources like:
https://ebzzry.io/en/haskell-division/
http://learnyouahaskell.com/making-our-own-types-and-typeclasses

sshine pushed a commit that referenced this issue Apr 22, 2020
This addresses and closes #908.
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 a pull request may close this issue.

1 participant