-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Implement new Concept Exercise: tuples #1009
Implement new Concept Exercise: tuples #1009
Conversation
…8/fsharp into tuples-concept-create
I'll look at this tomorrow! Thanks. |
@Grenkin1988 I've left some comments, but before you look into any of them, I feel like we should first discuss #1009 (comment), as that is key to this exercise. |
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
@ErikSchierboom Hopefully I've covered all of the comments. |
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.
Looking good! I'll comment on the various markdown documents later. I focused on the other files first.
exercises/concept/tisbury-treasure-hunt/TisburyTreasureHuntTests.fs
Outdated
Show resolved
Hide resolved
exercises/concept/tisbury-treasure-hunt/TisburyTreasureHuntTests.fs
Outdated
Show resolved
Hide resolved
exercises/concept/tisbury-treasure-hunt/TisburyTreasureHuntTests.fs
Outdated
Show resolved
Hide resolved
exercises/concept/tisbury-treasure-hunt/TisburyTreasureHuntTests.fs
Outdated
Show resolved
Hide resolved
exercises/concept/tisbury-treasure-hunt/TisburyTreasureHuntTests.fs
Outdated
Show resolved
Hide resolved
exercises/concept/tisbury-treasure-hunt/TisburyTreasureHuntTests.fs
Outdated
Show resolved
Hide resolved
let getCoordinate (line: string * string): string = snd line | ||
|
||
let convertCoordinate(coordinate: string): int * char = | ||
Int32.Parse(string coordinate.[0]), coordinate.[1] |
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 hadn't considered the fact that we need students to convert a char
to an int
, which they probably don't know how to do. I do think it's worth keeping an int
to really stress the "different types" feature of a tuple. Could you perhaps add a suggestion how to do this to the hints.md
file?
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.
Done
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.
Also might be worse adding parsing to the strings
concept?
For example we could have some "EventId=1356"
in the log message, and as last task to get EventId as an int
?
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'll think on it.
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
(a + 1, b + 1) | ||
``` | ||
|
||
## Obtaining Individual Values |
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 think it would be nice to move the examples next to the text where the concept is explained. For example, the example of matching a tuple can be moved to the pattern matching example, possibly including the deconstruction code too.
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.
Sorry, not sure I understand what is required
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.
No problem. I can do a follow-up PR later.
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
@Grenkin1988 Happy with the current state of the PR? If so, I can merge this and tweak the introduction phrasing slightly in a follow-up PR (easier that modifying in this PR). |
I guess so |
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.
Let's go! Awesome work @Grenkin1988! 🎉
This was really interesting experience 😸 Hope it wasn't way to terrible 😅 |
No not at all! Building Concept Exercises is quite a lot of work, so some churn is to be expected :) You did great! |
Fixws #863