Here are 27 solved katas; each in a different language.
Sources: CodingDojo, Ruby Quiz, and CodeKata.
- Language: Ruby
- Solution:
KataBankOCR.rb
- Tests:
KataBankOCR_test.rb
- Language: Java
- Solution:
KataFizzBuzz.java
- Tests:
KataFizzBuzzTest.java
; seejunit.sh
.
- Language: Python
- Solution:
KataPotter.py
- Tests:
KataPotter_test.py
- Remark: It needs more tests to know if it's really solved
- Language: Bash
- Solution:
KataRomanNumerals.sh
- Tests:
KataRomanNumerals_test.sh
; see alsoassert.sh
.
- Language: JavaScript
- Solution:
KataRomanCalculator.js
- Tests:
KataRomanCalculator_tests.js
- Language: PHP
- Solution:
KataNumberToLCD.php
- Tests:
KataNumberToLCD_tests.php
- Language: C
- Solution:
KataTennis.c
- Tests:
KataTennis_tests.c
- Language: Scala
- Solution:
KataBowling.scala
- Tests:
KataBowlingTest.scala
using ScalaTest 1.7.1; seeKataBowling_tests.sh
for command-line shortcuts.
- Language: CoffeeScript
- Solution:
KataPokerHands.coffee
- Tests:
KataPokerHands_tests.coffee
usingjasmine-node
- Language: Io
- Solution:
KataMinesweeper.io
- Tests:
KataMinesweeper_tests.io
- Language: Lisp
- Solution:
KataKarateChop.lisp
- Tests:
KataKarateChop_tests.lisp
- Language: Perl
- Solution:
KataReversi.pl
- Tests:
KataReversi_tests.pl
- Language: Groovy
- Solution:
KataGameOfLife.groovy
- Tests:
KataGameOfLife_tests.groovy
; see alsojunit_gameoflife.sh
.
- Language: Smalltalk
- Solution:
KataSecretSantas.st
- Tests:
KataSecretSantas_tests.st
; see alsogst_tests.sh
.
- Language: C++
- Solution:
KataWordWrap.cpp
- Tests:
KataWordWrap_tests.cpp
using CppUnit
- Language: Forth
- Solution:
KataDiversion.fth
- Tests:
KataDiversion_tests.fth
- Language: Lua
- Solution:
KataAnimalQuiz.lua
- Tests:
KataAnimalQuiz_tests.lua
using lunit
This is a slightly modified version of the RubyQuiz #54 that doesn't use a bits index.
- Language: OCaml
- Solution:
kataWordQuery.ml
- Tests:
kataWordQueryTests.ml
using OUnit; see alsokataWordQueryTests.sh
.
- Language: Erlang
- Solution:
katacheckout.erl
- Tests:
katacheckout_tests.erl
using EUnit; see alsokatacheckout_tests.sh
.
- Language: Go
- Solution:
katadependencies.go
- Tests:
katadependencies_test.go
- Language: Clojure
- Solution:
src/kata_trigrams/core.clj
; uselein run generate f1.txt f2.json
to indexf1.txt
intof2.json
, thenlein run generate f2.json 42
to generate 42 random words from the filef2.json
- Tests:
test/kata_trigrams/test/*.clj
; uselein test
.
- Language: Rust (0.9)
- Solution:
kata_english_words.rs
- Tests:
kata_english_words_tests.rs
; compile and run withmake
.
- Language: Crystal (0.4.3)
- Solution:
kata_word_chains.cr
- Tests:
kata_word_chains_test.cr
- Language: Commodore BASIC
- Solution:
kata_sort_chars.bas
and a homemade crunched version,kata_sort_chars.crunch.bas
- Tests:
kata_sort_chars_tests.sh
- Language: Prolog
- Solution:
kata_change.pl
andkata_change_cli.pl
. Usemake
then./kata_change <sum>
. - Tests:
kata_change_tests.pl
- Language: awk
- Solution:
./code_cracker.awk -v key=<key>
. It reads (and prints) one message per line. - Tests:
./code_cracker_tests.sh
- Language: Julia
- Solution:
./parse_id3.jl <file1.mp3> [...]
- Tests:
./parse_id3_test.jl