Code retreat
www.mozaicworks.com
www.mozaicworks.com
Me
Adi Bolboaca
Organizational & Technical
Trainer & Coach
Why?
Learn through pairing
Extend your comfort zone
Practice
Experiment
Learn new practices
www.mozaicworks.com
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
How it started
CodeMash conference 2009
Gary Bernhardt
Patrick Welsh
Nayan Hajratwala
Corey Haines
www.mozaicworks.com
How it started
Repeatable
Day-long
Practice the fundamentals of programming
Intense day of coding
www.mozaicworks.com
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
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
Prerequisites
Computer
Coding environment
Testing framework
Source control (git, svn, etc)
www.mozaicworks.com
The four elements of simple design
1) Passes its tests
2) Minimizes duplication
3) Maximizes clarity
4) Has fewer elements
www.mozaicworks.com
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
First session
Find a pair
Choose a programming language
Setup the environment
Choose an entry point for the problem
Start in 5 min
www.mozaicworks.com
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
Session 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
Taking Baby Steps
1) Initialize source control repository
2) Start a timer for 2 minutes
3) Write exactly one test
a) 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 timer
5) Refactor
a) 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
Code retreat
1 hour Lunch
www.mozaicworks.com
TDD as if you meant it
1) Write exactly one failing test
2) Make the test pass by writing implementation code in the test
method
3) Create a new implementation method by:
a) Extracting implementation code to a new method in the test
class
b) Moving implementation code into an existing implementation
method from the test class
4) Create implementation classes to provide a destination for
extracting a method in the test class
5) When necessary move implementation methods into
implementation classes
6) Refactor as required www.mozaicworks.com
Brutal refactoring game
www.mozaicworks.com
1)Lack of tests
2)Name not from domain
3)Name not expressing intent
4)Unnecessary if
5)Unnecessary else
6)Duplication of constant
7)Method does more than
one thing
8)Primitive obsession
9)Feature envy
10)Method too long (> 6 lines)
11)Too many parameters (> 3)
12)Test – not unitary
13)Test – setup too complex
14)Test – unclear Act
15)Test - more than one assert
16)Test – no assert
17)Test – too many paths
Code retreat
Choose your own practice
Decide with your pair in the first 5 minutes
www.mozaicworks.com
Closing circle
1) How did you feel?
2) What did you learn today?
3) What will you do differently on Monday?
www.mozaicworks.com
Code retreat
Why?
Learn through pairing
Extend your comfort zone
Practice
Experiment
Learn new practices
www.mozaicworks.com
Contact me
● Remote pair-programming
● Unit testing workshop
● Test driven development workshop
● Clean code workshop
● Refactoring workshop
● Legacy code retreat
● Legacy code workshop
● Code retreat
www.mozaicworks.com
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

More Related Content

PDF
Coderetreat @Vienna 2013 06 08
PDF
Coderetreat @Turku 2012 10 20
ODP
Coderetreat @AgileFinland Helsinki 2014 11 13
ODP
Coderetreat @AgileFinland Tampere 2014 11 12
PDF
Coderetreat @Sofia 2012 10 27
ODP
Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013
PDF
Best practices for unit testing RxJava
ZIP
Unit testing for the TYPO3 4.x core
Coderetreat @Vienna 2013 06 08
Coderetreat @Turku 2012 10 20
Coderetreat @AgileFinland Helsinki 2014 11 13
Coderetreat @AgileFinland Tampere 2014 11 12
Coderetreat @Sofia 2012 10 27
Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013
Best practices for unit testing RxJava
Unit testing for the TYPO3 4.x core

Similar to Coderetreat @Sibiu 2012 08 18 (20)

PDF
Coderetreat @AgileWorks Bucharest 2012 07 06
ODP
Code retreat @AgileWorks Bucharest 7 September 2013
ODP
Coderetreat @AgileFinland Turku 2014 11 15
PDF
Day1 - TDD (Lecture SS 2015)
PPTX
Introduction to TDD
PDF
Global Day of Coderetreat'14 - Istanbul Event
PPTX
Test Driven Development on Android (Kotlin Kenya)
PDF
Kata Your Way to SW Craftsmanship
PPTX
TDD: seriously, try it! 
PPTX
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)
PDF
Unit Testing Best Practices
PDF
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven Development
PDF
ABAPCodeRetreat Frankfurt 2016 - TDD with ABAP
PDF
Coderetreat - Practice to Master Your Crafts
ODP
Unit testing-patterns
PPTX
An Introduction to unit testing
PPTX
Enhanced Web Service Testing: A Better Mock Structure
PPTX
An Introduction To Software Development - Test Driven Development, Part 1
PPTX
Stop fearing legacy code
PPTX
Intro to TDD
Coderetreat @AgileWorks Bucharest 2012 07 06
Code retreat @AgileWorks Bucharest 7 September 2013
Coderetreat @AgileFinland Turku 2014 11 15
Day1 - TDD (Lecture SS 2015)
Introduction to TDD
Global Day of Coderetreat'14 - Istanbul Event
Test Driven Development on Android (Kotlin Kenya)
Kata Your Way to SW Craftsmanship
TDD: seriously, try it! 
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)
Unit Testing Best Practices
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven Development
ABAPCodeRetreat Frankfurt 2016 - TDD with ABAP
Coderetreat - Practice to Master Your Crafts
Unit testing-patterns
An Introduction to unit testing
Enhanced Web Service Testing: A Better Mock Structure
An Introduction To Software Development - Test Driven Development, Part 1
Stop fearing legacy code
Intro to TDD
Ad

More from Adi Bolboaca (12)

PDF
Evolutionary Design - NewCrafts Paris 18 May 2018
ODP
Stop Task Switching
ODP
Evolutionary Design: Take Only One Decision at a Time
PDF
Evolutionary Design - Refactoring Heuristics
ODP
Behind Agile Practices
ODP
Architecture for Disaster Resistant Systems @I TAKE Unconference 29 05 2015
ODP
Refactoring Dojo @AgileWorks Bucharest 21 May 2014
ODP
Sherlock Holmes and Pairing @Romanian Testing Conference 2014 05 15
ODP
TDD Mini Workshop @ Bucharest JUG 2014 04 24
ODP
Sherlock Holmes and Pairing @Bucharest JUG 2013 11 21
ODP
Sherlock Holmes and Pairing @Wlidcard Conference 2013 09 13
PDF
Legacy Coderetreat @Budapest 2013 02 16
Evolutionary Design - NewCrafts Paris 18 May 2018
Stop Task Switching
Evolutionary Design: Take Only One Decision at a Time
Evolutionary Design - Refactoring Heuristics
Behind Agile Practices
Architecture for Disaster Resistant Systems @I TAKE Unconference 29 05 2015
Refactoring Dojo @AgileWorks Bucharest 21 May 2014
Sherlock Holmes and Pairing @Romanian Testing Conference 2014 05 15
TDD Mini Workshop @ Bucharest JUG 2014 04 24
Sherlock Holmes and Pairing @Bucharest JUG 2013 11 21
Sherlock Holmes and Pairing @Wlidcard Conference 2013 09 13
Legacy Coderetreat @Budapest 2013 02 16
Ad

Recently uploaded (20)

PPT
What is a Computer? Input Devices /output devices
PDF
CloudStack 4.21: First Look Webinar slides
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPTX
Tartificialntelligence_presentation.pptx
PDF
August Patch Tuesday
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
DOCX
search engine optimization ppt fir known well about this
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
What is a Computer? Input Devices /output devices
CloudStack 4.21: First Look Webinar slides
Getting started with AI Agents and Multi-Agent Systems
A review of recent deep learning applications in wood surface defect identifi...
Developing a website for English-speaking practice to English as a foreign la...
sustainability-14-14877-v2.pddhzftheheeeee
Tartificialntelligence_presentation.pptx
August Patch Tuesday
Benefits of Physical activity for teenagers.pptx
Zenith AI: Advanced Artificial Intelligence
Taming the Chaos: How to Turn Unstructured Data into Decisions
Group 1 Presentation -Planning and Decision Making .pptx
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
search engine optimization ppt fir known well about this
Enhancing emotion recognition model for a student engagement use case through...
DP Operators-handbook-extract for the Mautical Institute
A novel scalable deep ensemble learning framework for big data classification...
A contest of sentiment analysis: k-nearest neighbor versus neural network
Univ-Connecticut-ChatGPT-Presentaion.pdf
Assigned Numbers - 2025 - Bluetooth® Document

Coderetreat @Sibiu 2012 08 18

  • 3. Why? Learn through pairing Extend your comfort zone Practice Experiment Learn new practices www.mozaicworks.com
  • 4. 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
  • 5. How it started CodeMash conference 2009 Gary Bernhardt Patrick Welsh Nayan Hajratwala Corey Haines www.mozaicworks.com
  • 6. How it started Repeatable Day-long Practice the fundamentals of programming Intense day of coding www.mozaicworks.com
  • 7. 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
  • 8. 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
  • 9. Prerequisites Computer Coding environment Testing framework Source control (git, svn, etc) www.mozaicworks.com
  • 10. The four elements of simple design 1) Passes its tests 2) Minimizes duplication 3) Maximizes clarity 4) Has fewer elements www.mozaicworks.com
  • 11. 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
  • 12. First session Find a pair Choose a programming language Setup the environment Choose an entry point for the problem Start in 5 min 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 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
  • 15. Taking Baby Steps 1) Initialize source control repository 2) Start a timer for 2 minutes 3) Write exactly one test a) 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 timer 5) Refactor a) 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
  • 16. Code retreat 1 hour Lunch www.mozaicworks.com
  • 17. TDD as if you meant it 1) Write exactly one failing test 2) Make the test pass by writing implementation code in the test method 3) Create a new implementation method by: a) Extracting implementation code to a new method in the test class b) Moving implementation code into an existing implementation method from the test class 4) Create implementation classes to provide a destination for extracting a method in the test class 5) When necessary move implementation methods into implementation classes 6) Refactor as required www.mozaicworks.com
  • 18. Brutal refactoring game www.mozaicworks.com 1)Lack of tests 2)Name not from domain 3)Name not expressing intent 4)Unnecessary if 5)Unnecessary else 6)Duplication of constant 7)Method does more than one thing 8)Primitive obsession 9)Feature envy 10)Method too long (> 6 lines) 11)Too many parameters (> 3) 12)Test – not unitary 13)Test – setup too complex 14)Test – unclear Act 15)Test - more than one assert 16)Test – no assert 17)Test – too many paths
  • 19. Code retreat Choose your own practice Decide with your pair in the first 5 minutes www.mozaicworks.com
  • 20. Closing circle 1) How did you feel? 2) What did you learn today? 3) What will you do differently on Monday? www.mozaicworks.com
  • 21. Code retreat Why? Learn through pairing Extend your comfort zone Practice Experiment Learn new practices www.mozaicworks.com
  • 22. Contact me ● Remote pair-programming ● Unit testing workshop ● Test driven development workshop ● Clean code workshop ● Refactoring workshop ● Legacy code retreat ● Legacy code workshop ● Code retreat www.mozaicworks.com
  • 23. Code retreat Extend your mentoring & training capacity Accelerate learning through communities of practice Grow your functional leaders and top talents http://www.mozaicworks.com [email protected] @adibolb