Read short guide: Learning Test Driven Development with TDD Katas
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."
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.
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 | |
scala/spec2 | scala | specs2 | |
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 |
- 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
Difficulty: Hard
Difficulty: Medium
Difficulty: Easy
Difficulty: Medium
Difficulty: Easy
Difficulty: Medium
Difficulty: Easy
Difficulty: Easy
Difficulty: Medium
Difficulty: Medium
Difficulty: Hardcore
Katas from Dave Thomas
-
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.
- TDD-Kata Practices: http://tddkatas.codeplex.com/
- More: http://codekata.pragprog.com/2007/01/code_kata_backg.html#more