5. How?
1 day of coding
Choose a simple problem
6 pairing partners
On average 135 minutes of coding
6 different constraints
A lot of fun!
www.mozaicworks.com
6. How it started
CodeMash conference 2009
Gary Bernhardt
Patrick Welsh
Nayan Hajratwala
Corey Haines
www.mozaicworks.com
8. Day structure
15' introduction
3 sessions of 45' coding + 15' retro&break
1h lunch
3 sessions of 45' coding + 15' retro&break
15' closing circle
www.mozaicworks.com
9. Principles
Language agnostic
Do not try to finish the problem
Delete the code after each session
Focus on practicing
Experiment each session
Have fun!
www.mozaicworks.com
10. How to take advantage
1. Embrace the freedom of deleting the code
2. Do what you always wanted but couldn't
3. Get out of your comfort zone
4. Pair with strangers in languages you don't know
5. What you learn is your responsibility
12. The four elements of simple design
1) Passes its tests
2) Minimizes duplication
3) Maximizes clarity
4) Has fewer elements
www.mozaicworks.com
13. Conway's game of life
Having an infinite 2D orthogonal universe
Being given an initial generation called a seed
The following rules are applied simultaneously
A live cell having less than 2 live neighbors dies
A live cell having 2 or 3 live neighbors lives
A live cell having more than 3 neighbors dies
A dead cell having 3 neighbors becomes alive
www.mozaicworks.com
14. Session 1: Understand the problem
Find a pair
Choose a programming language
Setup the environment
Choose an entry point for the problem
Start in 5 min
www.mozaicworks.com
15. Conway's game of life
Having an infinite 2D orthogonal universe
Being given an initial generation called a seed
The following rules are applied simultaneously
A live cell having less than 2 live neighbors dies
A live cell having 2 or 3 live neighbors lives
A live cell having more than 3 neighbors dies
A dead cell having 3 neighbors becomes alive
www.mozaicworks.com
16. Session 2: Evil pairing
Ping-pong pairing
Be evil, write the bad implementation for test
www.mozaicworks.com
17. Session 3: Immutable
You cannot change the state of an object during
execution
www.mozaicworks.com
19. Session 4: Universe wormholes
Both orthogonal and hexagonal universe
Time passes differently
There is a pentagonal transient area between
them
www.mozaicworks.com
21. Session 4: Universe wormholes
There are six 1st tier neighbors
There are six 2nd tier neighbors
Live 1st tier neighbors weight 1.0
Live 2nd tier neighbors weight 0.3
Each cell has a weighted sum of all
its 12 neighbors
www.mozaicworks.com
22. Session 4: Universe wormholes
Having an infinite 2D hexagonal universe
Being given an initial generation called a seed
These rules are applied simultaneously on tick
A live cell having less than 2.0 sum dies
A live cell having 2.0 – 3.3 sum lives on
A live cell having more than sum 3.3 dies
A dead cell having 2.3 - 2.9 sum becomes alive
www.mozaicworks.com
23. Session 5: Event driven
All the connections are just events
No other way of communication is allowed
www.mozaicworks.com
24. Session 6: New language
Try a new language
www.mozaicworks.com
25. Closing circle
1) How did you feel?
2) What did you learn today?
3) What will you do differently tomorrow?
www.mozaicworks.com
26. Code retreat
Why?
Learn through pairing
Extend your comfort zone
Practice
Experiment
Learn new practices
www.mozaicworks.com
27. Contact me
● Remote pair-programming
● Unit testing workshop
● Test driven development workshop
● Clean code workshop
● Refactoring workshop
● Legacy code retreat
● Working FAST and Safe with existing
code
● Code retreat
www.mozaicworks.com
28. Code retreat
Extend your mentoring & training capacity
Accelerate learning through communities
of practice
Grow your functional leaders and top
talents
http://www.mozaicworks.com
adrian.bolboaca@mozaicworks.com
@adibolb