Skip to content

bank-account: Implement canonical-data.json #554

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
kytrinyx opened this issue Feb 13, 2017 · 1 comment · Fixed by #2192
Closed

bank-account: Implement canonical-data.json #554

kytrinyx opened this issue Feb 13, 2017 · 1 comment · Fixed by #2192

Comments

@kytrinyx
Copy link
Member

kytrinyx commented Feb 13, 2017

We want to have a standard set of test inputs and outputs for each exercise to
make it easier to port them to new languages, as well as to help keep the
exercises in sync.

The Bank Account exercise can be found in the ./exercises/bank-account/ directory.

The step-by-step instructions for how to compile a canonical-data.json file is
described in this section of the contributing guide.

See http://exercism.io/contribute/canonical-data/bank-account for the up-to-date list of
language tracks that have an implementation of the Bank Account exercise.

The tracking issue has more context.

@petertseng
Copy link
Member

I have some specific thoughts about this problem.

Most problems you will see are stateless - write a function, give it some inputs, expect a certain output. All exercises listed in the example section in fact follow that pattern (custom-set is a bit more complex, but fundamentally it still fits into that pattern, just with multiple functoins)

You may find that bank-account doesn't fall into that pattern if it is very stateful - create a bank account, do some things to that bank account, check some state of that bank account.

If it looks like the bank-account tests can't fit well with the examples listed, try looking at what happened in #488 and #358 , which were also two very stateful exercises.

(Of course, if you find that bank-account can fit well into the stateless model, then you can ignore everything I've said, no worries!)

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

Successfully merging a pull request may close this issue.

3 participants