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

.ml stubs for exercises #285

Closed
sshine opened this issue Oct 9, 2018 · 5 comments
Closed

.ml stubs for exercises #285

sshine opened this issue Oct 9, 2018 · 5 comments

Comments

@sshine
Copy link
Contributor

sshine commented Oct 9, 2018

Some language tracks have a {{ stub }}.ml that the student can fill out.

The Ocaml track doesn't. Ideally, add stubs to all exercises.

To begin with, start with ones that use Map from Base, like the four exercises in #277.

Issue spawned from this message I wrote on Slack:

I just reviewed the new version of Nucleotide Count and asked if there were any hard points, and [the student] said that the (module Char) annotations were difficult to figure out because they're not very well-documented. That was exactly the pain point that made it hard for me to convert the exercises from Core(_kernel) to Base. A solution could be to add a template .ml file with a stub in it that throws an exception. For some exercises, e.g. ones that require a data type definition repeated from the .mli, or in case of Nucleotide Count, a line like let empty = Map.empty (module Char), that'd be really neat.

@stevejb71
Copy link
Contributor

If it's too much effort, perhaps just prioritise the initial few exercises, and nucleotide count.

@sshine
Copy link
Contributor Author

sshine commented Oct 11, 2018

Good point to have this order.

@sshine
Copy link
Contributor Author

sshine commented Nov 6, 2018

Another incident with a student spending way too much time (4 days) figuring out Map.empty (module Char) has pushed me to address this issue for Nucleotide Count. I'll look at the other exercises later.

@LucasMembrane
Copy link

I just spent a bunch of time on this with poor results, too. One thing I did not get from the readme is that Map is in Base when Base is opened (which I think is true, now). I was looking at the standard library, not aware that Base replaces Map. The standard library base documentation works ok for a while on this problem, but after a while the differences become more than apparent.

Another odd thing is that when I googled for solutions, the first three that I saw were apparently not doing the problem now out there -- I didn't see anything in them about the (Ok count) (Error c) (Ok map) returns, just counts and maps.

I have so far found these exercises a fine way to learn, so I have nothing but gratitude for your work, but since I came across this effort to improve things, I figured I should share my POV. Thanks much!

@sshine
Copy link
Contributor Author

sshine commented Dec 10, 2018

I have postponed this for nucleotide count for too long now.

Thanks for reminding me, @LucasMembrane.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants