Download - Coderetreat @AgileFinland Tampere 2014 11 12
![Page 2: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/2.jpg)
www.mozaicworks.com
Me
Adi BolboacaOrganizational & Technical
Trainer & Coach
![Page 3: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/3.jpg)
2009, First time outside US
![Page 4: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/4.jpg)
Why?
Learn through pairingExtend your comfort zone
PracticeExperiment
Learn new practices
www.mozaicworks.com
![Page 5: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/5.jpg)
How?
1 day of codingChoose a simple problem
6 pairing partnersOn average 135 minutes of coding
6 different constraintsA lot of fun!
www.mozaicworks.com
![Page 6: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/6.jpg)
How it started
CodeMash conference 2009
Gary BernhardtPatrick Welsh
Nayan HajratwalaCorey Haines
www.mozaicworks.com
![Page 7: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/7.jpg)
How it started
RepeatableDay-long
Practice the fundamentals of programmingIntense day of coding
www.mozaicworks.com
![Page 8: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/8.jpg)
Day structure
15' introduction3 sessions of 45' coding + 15' retro&break
1h lunch3 sessions of 45' coding + 15' retro&break
15' closing circle
www.mozaicworks.com
![Page 9: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/9.jpg)
Principles
Language agnosticDo not try to finish the problem
Delete the code after each sessionFocus on practicing
Experiment each sessionHave fun!
www.mozaicworks.com
![Page 10: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/10.jpg)
How to take advantage1. 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
![Page 11: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/11.jpg)
Prerequisites
ComputerCoding environmentTesting framework
Source control (git, svn, etc)
www.mozaicworks.com
![Page 12: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/12.jpg)
The four elements of simple design
1) Passes its tests2) Minimizes duplication
3) Maximizes clarity4) Has fewer elements
www.mozaicworks.com
![Page 13: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/13.jpg)
Conway's game of life
Having an infinite 2D orthogonal universeBeing given an initial generation called a seedThe following rules are applied simultaneously
A live cell having less than 2 live neighbors diesA live cell having 2 or 3 live neighbors lives A live cell having more than 3 neighbors diesA dead cell having 3 neighbors becomes alive
www.mozaicworks.com
![Page 14: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/14.jpg)
Session 1: Understand the problem
Find a pairChoose a programming language
Setup the environmentChoose an entry point for the problem
Start in 5 min
www.mozaicworks.com
![Page 15: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/15.jpg)
Conway's game of life
Having an infinite 2D orthogonal universeBeing given an initial generation called a seedThe following rules are applied simultaneously
A live cell having less than 2 live neighbors diesA live cell having 2 or 3 live neighbors lives A live cell having more than 3 neighbors diesA dead cell having 3 neighbors becomes alive
www.mozaicworks.com
![Page 16: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/16.jpg)
Session 2: Constraints at your choice
No conditionals (if, while, etc)No loops (for, foreach, while, etc)Four lines of code per method
Use only one dot/arrow per line
www.mozaicworks.com
![Page 17: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/17.jpg)
Session 3: Data and encapsulation
Do not use any data structures(array, list, stack, hash, etc)
All the primitives need to be encapsulated(string, int, etc)
www.mozaicworks.com
![Page 19: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/19.jpg)
Session 4: Taking Baby Steps1) Initialize source control repository2) Start a timer for 2 minutes3) Write exactly one testa) Timer rings, the test is red, then revert and go to 2)b) The test is green before the timer rings, then commit
4) Restart timer5) Refactora) Timer rings, the refactoring is not complete then revert and restart
b) The refactoring is complete before the timer rings, commit and go to 2)
Obs.The timers must run continuously, don't stop to talk! www.mozaicworks.com
![Page 20: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/20.jpg)
Session 5: Incremental Design
Choose a user story/use caseWrite down all the behaviours for it
Order the behaviours from simplest to most complex
Start writing tests for each behaviourCommit after each green test
www.mozaicworks.com
![Page 21: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/21.jpg)
Session 6: Perfoming KAta
Show top-down TDD mockist approach
www.mozaicworks.com
![Page 22: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/22.jpg)
Closing circle
1) How did you feel? 2) What did you learn today?
3) What will you do differently tomorrow?
www.mozaicworks.com
![Page 23: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/23.jpg)
Code retreatWhy?
Learn through pairingExtend your comfort zone
PracticeExperiment
Learn new practices
www.mozaicworks.com
![Page 24: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/24.jpg)
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
![Page 25: Coderetreat @AgileFinland Tampere 2014 11 12](https://reader033.vdocuments.site/reader033/viewer/2022060202/559bff841a28ab36468b45b7/html5/thumbnails/25.jpg)
Code retreatExtend your mentoring & training capacity
Accelerate learning through communities of practice
Grow your functional leaders and top talents
http://www.mozaicworks.com
@adibolb