FindMyPast
Coderetreat
What is a Coderetreat?
Write perfect code, no GTD constraint
What is a Coderetreat?
Pair programming with new people all the time
What is a Coderetreat?
Four rules of simple design
(Kent Beck):
1. TDD
2. No duplication
3. Reveal intend (naming)
4. Small
What is a Coderetreat?
Logistics:
- 25 minutes sessions
- Delete your code at the end of the session
- Small retrospective (Closing circle)
- Swap pairs.
- Start again
What is a Coderetreat?
Some other basics:
- Use any language
- Use TDD
Conway's Game of Life
An infinite board with cells, some dead, some alive
Given a generation of cells, calculate next generation based on simple rules
Rules of the game
For every cell in the universe:
Under-population:
Any cell with fewer than two live neighbours dies
Any live cell with two or three live neighbour lives on the next generation
Overcrowding:
Any live cell with more than three live neighbours dies
Reproduction:
Any dead cell with exactly three live neighbours becomes a live cell
Rules of the game
It was picked because it is too big to be finished
The domain is very rich
Mobile, Asier and Juan will be around to mock your code (in the good way)
SESSION 1
SINGLE LEVEL OF IDENTATION PER METHOD
DON'T USE ABBREVIATIONS
Rules of the game
For every cell in the universe:
Under-population:
Any cell with fewer than two live neighbours dies
Any live cell with two or three live neighbour lives on the next generation
Overcrowding:
Any live cell with more than three live neighbours dies
Reproduction:
Any dead cell with exactly three live neighbours becomes a live cell
SESSION 2:
OBJECT CALISTHENICS
OBJECT CALISTHENICS
-
Only One Level Of Indentation Per Method
-
Don't use ELSE
-
Wrap All Primitives And Strings
- First Class Collections
- One Dot Per Line
- Don't Abbreviate
- Keep All The Entities Small
- No Classes With More than Two Instance Variables
- No Getters/Setters
Rules of the game
For every cell in the universe:
Under-population:
Any cell with fewer than two live neighbours dies
Any live cell with two or three live neighbour lives on the next generation
Overcrowding:
Any live cell with more than three live neighbours dies
Reproduction:
Any dead cell with exactly three live neighbours becomes a live cell
FindMyPast
Coderetreat
To Be Continued...
deck
By Juan Antonio Vicaria
deck
- 111