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

dnd-character: add new exercise #782

Merged
merged 8 commits into from
Dec 14, 2018
Merged

dnd-character: add new exercise #782

merged 8 commits into from
Dec 14, 2018

Conversation

sshine
Copy link
Contributor

@sshine sshine commented Nov 26, 2018

This exercise was created in exercism/problem-specifications#1397.

It is a basic exercise in random generators, so the idea I had for the
Haskell track was to practice making QuickCheck generators rather than
simply use the standard random generator.

For this reason, QuickCheck is added as a root dependency.

@sshine sshine self-assigned this Nov 26, 2018
@sshine sshine requested a review from petertseng November 26, 2018 13:54
@sshine
Copy link
Contributor Author

sshine commented Nov 26, 2018

@petertseng: How do I run the checks of Travis CI locally before submitting a PR?

Update: I see that you answered this in #751, e.g.:

bin/test-all-examples examples/dnd-character

My current workflow implies a lot of forth-and-back between the PR and Travis before succeeding.

It appears that it's the following lines from .travis.yml that triggers various failures:

for exercise in ${TRAVIS_BUILD_DIR}/exercises/*/ ; do
    time bin/test-stub $exercise
    time bin/test-all-examples $exercise
done

Perhaps this could be delegated to a script in bin/ that is compatible with both Travis and running it locally?

Copy link
Member

@petertseng petertseng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am hoping this exercise with randomness is easier to understand than the other two exercises that want it (simple-cipher and robot-name). I think it is because we know it's going to be Gen, whereas with the other two exercises we have IO and there are a lot of things that could be IO. (though hopefully students do know to search for random at some point. It's in the exercise descriptions after all)

If students still find it too hard, perhaps they would benefit from a link to Gen. And perhaps an exercise showing do-notation should be strategically placed, with links to explanations of that. If that is so, we'd want to record that last idea in #761 .

@sshine
Copy link
Contributor Author

sshine commented Dec 1, 2018

Thanks! I'll address your comments on Monday.

@sshine
Copy link
Contributor Author

sshine commented Dec 7, 2018

Since I haven't advanced this one yet, note to self:

  • Make a .meta/hints.md for this exercise.

This exercise was created in exercism/problem-specifications#1397.

It is a basic exercise in random generators, so the idea I had for the
Haskell track was to practice making QuickCheck generators rather than
simply use the standard random generator.

For this reason, QuickCheck is added as a root dependency.
Another test case was added in exercism/problem-specifications#1416, but it doesn't apply to QuickCheck generators, I think.
@sshine
Copy link
Contributor Author

sshine commented Dec 13, 2018

I've added some links in the hints section, changed the title, switched to RecordWildCards in the example and switched to printf in the test.

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

Successfully merging this pull request may close these issues.

2 participants