Markdown-backed catalog

Kata catalog

Each entry is generated from a top-level folder in `katas/`. The README in that folder is both the source documentation and the rendered detail page.

C#

Args

Most of us have had to parse commandline arguments from time to time. If we don’t have a convenient utility, then we simply walk the array of strings that is passed into the main function. There are several good utilities available from various sources, but they probably don’t do exactly what we want. So let’s write another one!

#kata#tdd
katas/args Open
C#

Bowling Game Kata

The game consists of 10 frames as shown above. In each frame the player has two opportunities to knock down 10 pins. The score for the frame is the total number of pins knocked down, plus bonuses for strikes and spares.

#kata#tdd
katas/bowling-game Open
C#

DDD

Practice exercise around domain modeling and validation.

#kata#tdd
katas/ddd Open
C#

FileSystem

Write a program that simulate a file system. A file system is a tree structure that contains Folders and Files. At the top, there is a root folder. A folder can contain several Folder and several Files.

#kata#tdd
katas/file-system Open
C# F#

FizzBuzz

Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz"" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz". Print a new line after each string or number.

#kata#tdd
katas/fizz-buzz Open
C#

FooBarQix

Write a program that displays numbers from 1 to 100. A number per line. Follow the following rules:

#kata#tdd
katas/foo-bar-qix Open
C#

Game Of Life

Game of life is a so called cellular automaton. You can read up all about it at wikipedia.

#kata#tdd
katas/game-of-life Open
C# F#

Gilded Rose

This Kata was originally created by Terry Hughes (http://twitter.com/!/TerryHughes). It is already on GitHub here. See also Bobby Johnson's description of the kata.

#kata#multi-language#refactoring
katas/gilded-rose Open
C#

Introduction

Le premier objectif de ce Kata est identique à tous les Kata: S’améliorer dans la technique du TDD, par l’écriture de tests, l’écriture du code. Puis le refactoring des tests et du code à cause des changements de spécifications (complexification de l’algo, exception à la règle, besoin d’amélioration techniques induit,…).

#kata#refactoring#tdd
katas/mini-pricer Open
C#

Introduction

The prime factors kata is a mathbased kata in which we write a method which will break down any number into a list of its prime factors. This means that we return the set of one or more prime numbers that when multiplied together will give us the initial number. Requirements

#kata#tdd
katas/prime-factor Open
Python C# Java Ruby

Kata: Train Reservation

Railway operators aren't always known for their use of cutting edge technology, and in this case they're a little behind the times. The railway people want you to help them to improve their online booking service. They'd like to be able to not only sell tickets online, but to decide exactly which seats should be reserved, at the time of booking.

#kata#tdd
katas/kata-train-reservation Open
C#

Leap Year

Write a function that returns true or false depending on whether its input integer is a leap year or not.

#kata#tdd
katas/leap-years Open
C#

Minesweeper

Have you ever played Minesweeper? It's a cute little game which comes within a certain Operating System whose name we can't really remember. Well, the goal of the game is to find all the mines within an MxN field. To help you, the game shows a number in a square which tells you how many mines there are adjacent to that square. For instance, take the following 4x4 field with 2 mines (which are represented by an character):

#kata#tdd
katas/minesweeper Open
C#

Movie Rental

A base code that we use during Scrum.org Professional Scrum Developer Certification Course.

#kata#refactoring
katas/movie-rental Open
C#

Print Diamond

Given a letter, print a diamond starting with 'A' with the supplied letter at the widest point.

#kata#tdd
katas/diamond Open
Java C# JavaScript Scala

Racing Car Katas

Racing Car Katas =================

#kata#refactoring#tdd
katas/racing-car-katas Open
C# Java PHP Python

Refactoring Guru Examples

This repository contains code examples for http://refactoring.guru/

#examples#kata#refactoring
katas/refactoring-guru-examples Open
C#

Reload Countdown

In many games, the logic of firing your gun is as follows:

#kata#tdd
katas/reload-countdown Open
C# F#

Roman Numerals

The Romans were a clever bunch. They conquered most of Europe and ruled it for hundreds of years. They invented concrete and straight roads and even bikinis. One thing they never discovered though was the number zero. This made writing and dating extensive histories of their exploits slightly more challenging, but the system of numbers they came up with is still in use today. For example the BBC uses Roman numerals to date their programs.

#kata#tdd
katas/roman-numerals Open
C#

Tennis Refactoring Kata

Imagine you work for a consultancy company, and one of your colleagues has been doing some work for the Tennis Society. The contract is for 10 hours billable work, and your colleague has spent 8.5 hours working on it. Unfortunately he has now fallen ill. He says he has completed the work, and the tests all pass. Your boss has asked you to take over from him. She wants you to spend an hour or so on the code so she can bill the client for the full 10 hours. She instructs you to tidy up the code a little and perhaps make some notes so you can give your colleague some feedback on his chosen design.

#kata#refactoring
katas/tennis Open
F#

TennisGame

Tennis has a rather quirky scoring system, and to newcomers it can be a little difficult to keep track of. The Tennis Society has contracted you to build a scoreboard to display the current score during tennis games. The umpire will have a handset with two buttons labelled “player 1 scores” and “player 2 scores”, which he or she will press when the respective players score a point. When this happens, a big scoreboard display should update to show the current score. (When you first switch on the scoreboard, both players are assumed to have no points). When one of the players has won, the scoreboard should display which one. Your task is to write a “TennisGame” class containing the logic which outputs the correct score as a string for display on the scoreboard. You can assume that the umpire pressing the button “player 1 scores” will result in a method “WonPoint(“player1”)” being called on your class, and similarly WonPoint(“player2”) for the other button. Afterwards, you will get a call “Score” from the scoreboard asking what it should display. This property should return a string with the current score.

#kata#tdd
katas/tennis-game Open
C#

Tic Tac Toe

Build and test the rules for a tictactoe game.

#kata#tdd
katas/tic-tac-toe Open
C#

Trip Service

Refactoring kata for isolating dependencies around a trip service.

#kata#refactoring
katas/trip-service Open
C#

Trivia

Legacycode refactoring kata around a trivia game.

#kata#refactoring
katas/trivia Open
C#

Yatzy Refactoring Kata

This Refactoring Kata was designed by Jon Jagger and is available in his CyberDojo. See his blog post

#kata#refactoring
katas/yatzy Open