Awesome
Katas
Here are 27 solved katas; each in a different language.
Sources: CodingDojo, Ruby Quiz, and CodeKata.
KataBankOCR
- Language: Ruby
- Solution:
KataBankOCR.rb
- Tests:
KataBankOCR_test.rb
KataFizzBuzz
- Language: Java
- Solution:
KataFizzBuzz.java
- Tests:
KataFizzBuzzTest.java
; seejunit.sh
.
KataPotter
- Language: Python
- Solution:
KataPotter.py
- Tests:
KataPotter_test.py
- Remark: It needs more tests to know if it's really solved
KataRomanNumerals
- Language: Bash
- Solution:
KataRomanNumerals.sh
- Tests:
KataRomanNumerals_test.sh
; see alsoassert.sh
.
KataRomanCalculator
- Language: JavaScript
- Solution:
KataRomanCalculator.js
- Tests:
KataRomanCalculator_tests.js
KataNumberToLCD
- Language: PHP
- Solution:
KataNumberToLCD.php
- Tests:
KataNumberToLCD_tests.php
KataTennis
- Language: C
- Solution:
KataTennis.c
- Tests:
KataTennis_tests.c
KataBowling
- Language: Scala
- Solution:
KataBowling.scala
- Tests:
KataBowlingTest.scala
using ScalaTest 1.7.1; seeKataBowling_tests.sh
for command-line shortcuts.
KataPokerHands
- Language: CoffeeScript
- Solution:
KataPokerHands.coffee
- Tests:
KataPokerHands_tests.coffee
usingjasmine-node
KataMinesweeper
- Language: Io
- Solution:
KataMinesweeper.io
- Tests:
KataMinesweeper_tests.io
KataKarateChop
- Language: Lisp
- Solution:
KataKarateChop.lisp
- Tests:
KataKarateChop_tests.lisp
KataReversi
- Language: Perl
- Solution:
KataReversi.pl
- Tests:
KataReversi_tests.pl
KataGameOfLife
- Language: Groovy
- Solution:
KataGameOfLife.groovy
- Tests:
KataGameOfLife_tests.groovy
; see alsojunit_gameoflife.sh
.
KataSecretSantas
- Language: Smalltalk
- Solution:
KataSecretSantas.st
- Tests:
KataSecretSantas_tests.st
; see alsogst_tests.sh
.
KataWordWrap
- Language: C++
- Solution:
KataWordWrap.cpp
- Tests:
KataWordWrap_tests.cpp
using CppUnit
KataDiversion
- Language: Forth
- Solution:
KataDiversion.fth
- Tests:
KataDiversion_tests.fth
KataAnimalQuiz
- Language: Lua
- Solution:
KataAnimalQuiz.lua
- Tests:
KataAnimalQuiz_tests.lua
using lunit
KataWordQuery
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
.
KataCheckout
- Language: Erlang
- Solution:
katacheckout.erl
- Tests:
katacheckout_tests.erl
using EUnit; see alsokatacheckout_tests.sh
.
KataDependencies
- Language: Go
- Solution:
katadependencies.go
- Tests:
katadependencies_test.go
KataTrigrams
- 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
.
KataEnglishWords
- Language: Rust (0.9)
- Solution:
kata_english_words.rs
- Tests:
kata_english_words_tests.rs
; compile and run withmake
.
KataWordChains
- Language: Crystal (0.4.3)
- Solution:
kata_word_chains.cr
- Tests:
kata_word_chains_test.cr
KataSortChars
- Language: Commodore BASIC
- Solution:
kata_sort_chars.bas
and a homemade crunched version,kata_sort_chars.crunch.bas
- Tests:
kata_sort_chars_tests.sh
KataChange
- Language: Prolog
- Solution:
kata_change.pl
andkata_change_cli.pl
. Usemake
then./kata_change <sum>
. - Tests:
kata_change_tests.pl
KataCodeCracker
- Language: awk
- Solution:
./code_cracker.awk -v key=<key>
. It reads (and prints) one message per line. - Tests:
./code_cracker_tests.sh
KataID3
- Language: Julia
- Solution:
./parse_id3.jl <file1.mp3> [...]
- Tests:
./parse_id3_test.jl