Katas : every day short-time xTDD practice
Read short guide: Learning Test Driven Development with TDD Katas
What is the Kata?
Dave Thomas (@pragdave), co-author of the book The Pragmatic Programmer explained:
"What makes a good practice session? You need time without interruptions, and a simple thing you want to try. You need to try it as many times as it takes, and be comfortable making mistakes. You need to look for feedback each time so you can work to improve. There needs to be no pressure: this is why it is hard to practice in a project environment. it helps to keep it fun: make small steps forward when you can. Finally, you’ll recognize a good practice session because you’ll came out of it knowing more than when you went in.
Code Kata is an attempt to bring this element of practice to software development. A kata is an exercise in karate where you repeat a form many, many times, making little improvements in each. The intent behind code kata is similar. Each is a short exercise (perhaps 30 minutes to an hour long). Some involve programming, and can be coded in many different ways. Some are open ended, and involve thinking about the issues behind programming. These are unlikely to have a single correct answer."
What`s next
Invest some time in your craft and try Kata in different languages - every language has it`s own branch in this repo.
Feel free to make pull request for adding new katas more frequently.
Remember that the point of the kata is not arriving at a correct answer. The point is the stuff you learn along the way. The goal is the practice, not the solution.
Branch keeping
There are branches for each technology/language. Currently there are:
Branch | Language | Test suite | Build Status |
---|---|---|---|
dotnet/csharp | C# | NUnit | |
java/junit | java | junit | |
java/spock | java | spock | |
groovy/spock | groovy | spock | |
js/jasmine | javascript | jasmine | |
js/mocha | javascript | mochajs, chaijs | |
python/behave | python | behave | |
cpp/igloo | C++ | igloo | |
ruby/rspec | ruby | rspec | |
elixir/exunit | Elixir | ExUnit |
Agreements
- Every branch should contain How to section
- Each branch have a working (and test-covered) code which is the result of Kata practice. That`s why it should be integrated with some continuous integraion server aka Travis or AppVeyor
- You can review code and add your comment on our Upsource instance
List of Katas
Bear And Steady Gene Kata
Difficulty: Hard
String Sum Kata
String Calculator Kata
BinaryGap Kata
Difficulty: Medium
Bowling Game Kata
Circular primes
Difficulty: Easy
Equi Kata
Difficulty: Medium
FizzBuzz Kata
OddEven Kata
PrimeComposite Kata
Natural Order String Sorting Kata
Berlin Clock Kata
Difficulty: Easy
Reverse Polish Notation Kata
Difficulty: Medium
Tennis Game Kata
Difficulty: Easy
Sudoku Kata
Difficulty: Easy
Calc Stats Kata
Diversion Kata
Game of Life Kata
Harry Potter Kata
LCD Digits Kata
Leap Year Kata
Mine Fields Kata
Poker Hands Kata
Recently Used List Kata
Reversi Kata
Yehtzee Game Kata
Word Wrap Kata
Dictionary Replacer Kata
Bank OCR Kata
Difficulty: Medium
Labyrinth Kata
Difficulty: Medium
A Star Problem
Difficulty: Hardcore
Dave Thomas
Katas fromSupermarket Pricing Kata
Contributing
-
master branch contains list folder with Kata descriptions
-
If you want to add new Kata with description then do following steps
- Create branch with the name of Kata
- Add folder with Kata name under list folder
- Fill and review README.md - look at examples
- Make PR to master
-
Want to share your solution?
- Fork repository
- Checkout specific branch, e.g. java/junit
- Create your branch {kata-name}-{feature-name}
- Follow code guidance, add src for new kata or more tests for existing
- Make PR to branch you have checkout (not master)
-
Geek section
- If you want to add new language support - create {lang}/{test-suite} branch and implement some Katas
- Make PR to create this new branch in this repo to share with others
We shaped and benefited by hard work from our contributors.
References
- TDD-Kata Practices: http://tddkatas.codeplex.com/
- More: http://codekata.pragprog.com/2007/01/code_kata_backg.html#more