-
Notifications
You must be signed in to change notification settings - Fork 220
Kata Best Practices
Jake Hoffner edited this page Aug 23, 2017
·
10 revisions
It should be clear in the instructions what the codewarrior is expected to complete in the kata. This is not always straightforward, especially for more challenging exercises. It is helpful to:
- Include all relevant details
- Give clear definitions of technical terms, along with references
- Mention all of the corner cases you intend to cover in your tests
- Motivate problems using concrete examples
- Give examples of input/output pairs
- Irrelevant details
- Very abstract concepts
- Overly complex specifications
Something important to consider when one is writing or editing kata: Is the concept behind this kata novel?
There are many standard exercises in programming that are well represented on CodeWars. Some examples include:
- FizzBuzz
- Fibonacci Sequences
- String Reversal
When working on a kata, make sure to check that it has not been done already. Every new kata should ideally teach something different.
A good kata should be as simple as possible. Even though there are no hard and fast rules for ensuring simplicity, however the following is recommended:
- Limit the number of corner cases tested for
- Unless specified explicitly, only test on valid inputs declared in the description
- Focus on testing for behavior, rather than implementation details
*This page is a stub, please consider contributing