Global Day of Code Retreat – Practicing Your Craft With the Rest of the World – #gdcr2013



Global Day of Code Retreat – Practicing Your Craft With the Rest of the World – #gdcr2013

0 0


code-retreat

Notes and presentation for facilitating code retreat

On Github zhon / code-retreat

Global Day of Code Retreat

Practicing Your Craft With the Rest of the World

Started by Corey Haines

3,000 Programmers and You

#gdcr2013

Thank You, Sponsers

Local Level

Pluralsight

Keeping you happy with food and swag

Global Level

JetBrains

GitHub

Continent Level

DNSimple

Neo4J

"Write a thousand words a day and in three years you will be a writer." - Ray Bradbury
"How many of you have written the same program more than ten times?" - Richard P. Gabriel
"If you make a mistake, celebrate." - Benjamin Zander

Simple Design

Passes all tests

Express Intent

No Duplication

Minimal methods, classes, & modules

Code Retreat

Write all code test first

Code in 2-tuples (maybe one 4-tuple)

Stop means STOP in the middle of

Share your code with others

Delete code (Save you code for the last session)

Links

http://pmav.eu/stuff/javascript-game-of-life-v3.1.1/ http://en.wikipedia.org/wiki/Conway's_Game_of_Life http://www.youtube.com/watch?v=a9xAKttWgP4

Rules for Conway's Game of Life

You have a world containing cells. Each cell has 8 neighbors.

Every generation, cells live or die according to the following rules:

nextState :: CellState -> NeighborCount -> CellState
nextState Dead 3 = Alive
nextState _ n | n < 2 = Dead
              | n > 3 = Dead
              | Alive
       A.A    ...    .A.    ...    A.A    ...   .A.    ...    .A.    ...
       .D. -> .A.    .A. -> .D.    .AA -> ...   .A. -> .A.    .A. -> .A.
       .A.    ...    ...    ...    A..    ...   A..    ...    A.A    ...

All rules are applied to every cell at the same time.