Skip to content
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 hints to some exercises #234

Closed
ErikSchierboom opened this issue Dec 8, 2016 · 12 comments
Closed

Add hints to some exercises #234

ErikSchierboom opened this issue Dec 8, 2016 · 12 comments

Comments

@ErikSchierboom
Copy link
Member

@abo64 added this issue to the Scala track, which I thought was a brilliant plan. I'm just gonna literally copy-and-paste that issue's text:

Most exercises have their own favorable solutions and characteristic pitfalls.
To give people some guidance and avoid writing repetitive or similar code comments again and again
we should add a HINTS.md file to any exercise where it makes sense.

Especially the first couple of exercises should have such a file to assist beginners.
Another case is exercises dealing with special features of the language like option or async.

We should make a list of exercises for which some hints can be added. Of course, the first exercises should be more hint-heavy than the latter, although even for advanced exercises hints can be very useful. One example of this are the text parsing exercises, where we could guide people to using FParsec.

@ErikSchierboom
Copy link
Member Author

ErikSchierboom commented Dec 9, 2016

The following exercises could probably use some hints:

  • accumulate: give hints about making a tail-call recursive function
  • alphametics: give hint on using FParsec and hint on not-using brute force algorithm
  • beer-song: give hint on encoding the algorithm using the structure in the song
  • diamond: give hint on property-based testing
  • difference-of-squares give hint on Seq.sumBy
  • grade-school: give hint on using the map type
  • grains: give hint on BigInt
  • helloworld: give hints on [pattern matching](https://fsharpforfunandprofit.com/posts/match-
    expression/) and sprintf
  • linked-list: give hints on mutability.
  • parallel-letter-frequency: give hint on async programming in F#
  • poker: give hint solving it by designing with types
  • raindrops: give hint on consider structuring the code to be extensible with more raindrop values
  • rna-transcription: give hint that match expressions are favored over dictionaries
  • space-age: give hints that code duplication should be avoided and that match expressions are favored over dictionaries
  • wordy: give hint on using FParsec

robkeim added a commit to robkeim/xfsharp that referenced this issue Dec 11, 2016
@robkeim
Copy link
Contributor

robkeim commented Dec 11, 2016

Great idea @abo64 and thanks @ErikSchierboom for bringing this to the F# track as well. I've gone ahead and sent a first exercise here and if it looks good I'll try to take care of some of the others as well.

@ErikSchierboom
Copy link
Member Author

@robkeim I've updated the list with more suggested hints.

robkeim added a commit to robkeim/xfsharp that referenced this issue Dec 12, 2016
@robkeim
Copy link
Contributor

robkeim commented Dec 12, 2016

Thanks @ErikSchierboom you're making fixing this too easy by going as far as to include links :) I sent a PR with a few additional ones, and I'll try to get some more done soon.

@ErikSchierboom
Copy link
Member Author

Fantastic!

@robkeim
Copy link
Contributor

robkeim commented Dec 12, 2016

I added hints for the rest of the ones where I understood what you were thinking @ErikSchierboom. Here are the remaining ones (they're also unchecked above):

  • Alphametics -> I haven't done this one yet myself
  • Beer song -> I couldn't come up with anything that didn't seem so obvious it was patronizing :)
  • Grade school -> I didn't use a map to solve this one personally, so didn't know what to say relating to the map
  • Sum of multiples -> Not exactly sure what you meant by "ranges" here
  • Wordy -> I haven't done this one yet myself either

I think we've got a great start here, and people can add/adopt/modify as we go along. Given that I solved these exercises a while ago, the potential pain points/traps aren't fresh in my head like when I first solved them.

@ErikSchierboom
Copy link
Member Author

Fantastic! I'll do the remaining hints later this week. I just have to finish the last 10 problems of the EcmaScript track first :)

Once again, thanks for the great work!

@robkeim
Copy link
Contributor

robkeim commented Dec 13, 2016

You're welcome, thanks for putting together the list.

Looking forward to being able to use your hints for the two problems I haven't solved on your list if I get stuck ;)

@ErikSchierboom
Copy link
Member Author

One them must be alphametics. That one I struggle quite a bit with, so good luck :)

@robkeim
Copy link
Contributor

robkeim commented Dec 13, 2016

Haha thanks :)

@ErikSchierboom
Copy link
Member Author

All hints have been added. This issue can be closed. If we do think of more hints, we can just add them individually.

@robkeim
Copy link
Contributor

robkeim commented Jan 3, 2017

Great, thanks for driving this effort @ErikSchierboom!

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

No branches or pull requests

2 participants