Skip to content

Instantly share code, notes, and snippets.

View rickardlindberg's full-sized avatar

Rickard Lindberg rickardlindberg

View GitHub Profile
@rickardlindberg
rickardlindberg / gist:1395519
Created November 26, 2011 11:57
My first complete implementation of game of life
import Control.Concurrent
import System.Console.ANSI
-- Logic
data Cell = Alive | Dead
deriving (Eq, Show)
type Neighbours = [Cell]
@rickardlindberg
rickardlindberg / gist:857329
Created March 6, 2011 14:25
string calculator kata in python
#!/usr/bin/python
import unittest
class StringCalculatorSpec(unittest.TestCase):
def test_returs_0_for_empty_string(self):
when_calculating("").the_result_is(0)
def test_returns_single_numbers(self):
@rickardlindberg
rickardlindberg / calc.py
Created July 23, 2010 11:50
TDD Calculator
# Response to http://misko.hevery.com/2009/11/17/how-to-get-started-with-tdd/
import unittest
class CalculatorTest(unittest.TestCase):
def setUp(self):
class MockView(object):