SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Bucharest, 7 September 2013
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
Poker
A deck of 52 cards
Minimum 2 players
A dealer handles the cards
Cards are dealt clockwise around the poker table
Each player bets, adding it clockwise to the pot
Players can change cards, (see game variant)
One player with the best cards wins all the pot
If no player wins, we have a draw
For draw the winning players split the pot
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
A deck of 52 cards
Minimum 2 players
A dealer handles the cards
Cards are dealt clockwise around the poker table
Each player bets, adding it clockwise to the pot
Players can change cards, (see game variant)
One player with the best cards wins all the pot
If no player wins, we have a draw
For draw the winning players split the pot
www.mozaicworks.com
Full Test Coverage
100% test coverage during the whole session
When test is below 100% the facilitator stops you
from adding functionalities until the coverage is
back at 100%
All your tests must contain the assert
You need to install a code coverage tool
www.mozaicworks.com
Code retreat
1 hour Lunch
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
Single Responsibility Principle
A method has more functionalities add all in
the method’s name with use or/and to separate
them
The method name has and/or then split the
method
No conditionals: if, switch, etc
No try/catch
Exactly one assert per test
Test one behaviour per test
www.mozaicworks.com
No primitives
You have to encapsulate the:
Arrays
Other data structures
Integer
String
Boolean
Other primitives
www.mozaicworks.com
Focus on refactoring
Use naming that reveals intent
Rename concepts to improve naming (use
domain language)
Extract duplicate identical chunks of code
Extract methods having the same noun into their
class
Split methods containing Or, And in their names
www.mozaicworks.com
Closing circle
1) How did you feel?
2) What did you learn today?
3) What will you do differently tomorrow?
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
● Working FAST and Safe with existing
code
● 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

Weitere ähnliche Inhalte

Ähnlich wie Code retreat @AgileWorks Bucharest 7 September 2013

Coderetreat @Vienna 2013 06 08
Coderetreat @Vienna 2013 06 08Coderetreat @Vienna 2013 06 08
Coderetreat @Vienna 2013 06 08
Adi Bolboaca
 
Coderetreat @Sibiu 2012 08 18
Coderetreat @Sibiu 2012 08 18Coderetreat @Sibiu 2012 08 18
Coderetreat @Sibiu 2012 08 18
Adi Bolboaca
 
Coderetreat @AgileFinland Helsinki 2014 11 13
Coderetreat @AgileFinland Helsinki 2014 11 13Coderetreat @AgileFinland Helsinki 2014 11 13
Coderetreat @AgileFinland Helsinki 2014 11 13
Adi Bolboaca
 
Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013
Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013
Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013
Adi Bolboaca
 
Coderetreat @AgileFinland Tampere 2014 11 12
Coderetreat @AgileFinland Tampere 2014 11 12Coderetreat @AgileFinland Tampere 2014 11 12
Coderetreat @AgileFinland Tampere 2014 11 12
Adi Bolboaca
 
Automock: Interaction-Based Mock Code Generation
Automock: Interaction-Based Mock Code GenerationAutomock: Interaction-Based Mock Code Generation
Automock: Interaction-Based Mock Code Generation
Sabrina Souto
 

Ähnlich wie Code retreat @AgileWorks Bucharest 7 September 2013 (20)

Coderetreat @Vienna 2013 06 08
Coderetreat @Vienna 2013 06 08Coderetreat @Vienna 2013 06 08
Coderetreat @Vienna 2013 06 08
 
Coderetreat @Sibiu 2012 08 18
Coderetreat @Sibiu 2012 08 18Coderetreat @Sibiu 2012 08 18
Coderetreat @Sibiu 2012 08 18
 
Coderetreat @AgileFinland Helsinki 2014 11 13
Coderetreat @AgileFinland Helsinki 2014 11 13Coderetreat @AgileFinland Helsinki 2014 11 13
Coderetreat @AgileFinland Helsinki 2014 11 13
 
Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013
Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013
Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013
 
Coderetreat @AgileFinland Tampere 2014 11 12
Coderetreat @AgileFinland Tampere 2014 11 12Coderetreat @AgileFinland Tampere 2014 11 12
Coderetreat @AgileFinland Tampere 2014 11 12
 
Test automation engineer
Test automation engineerTest automation engineer
Test automation engineer
 
QA Best Practices
QA  Best PracticesQA  Best Practices
QA Best Practices
 
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)Bye Bye Cowboy Coder Days! (Legacy Code & TDD)
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)
 
Making the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingMaking the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To Testing
 
Writing Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkWriting Tests with the Unity Test Framework
Writing Tests with the Unity Test Framework
 
Implementing Quality on a Java Project
Implementing Quality on a Java ProjectImplementing Quality on a Java Project
Implementing Quality on a Java Project
 
STOP! You're Testing Too Much - Shawn Wallace
STOP!  You're Testing Too Much - Shawn WallaceSTOP!  You're Testing Too Much - Shawn Wallace
STOP! You're Testing Too Much - Shawn Wallace
 
Stop! you're testing too much
Stop!  you're testing too muchStop!  you're testing too much
Stop! you're testing too much
 
Stop fearing legacy code
Stop fearing legacy codeStop fearing legacy code
Stop fearing legacy code
 
Getting Started with Test-Driven Development at Longhorn PHP 2023
Getting Started with Test-Driven Development at Longhorn PHP 2023Getting Started with Test-Driven Development at Longhorn PHP 2023
Getting Started with Test-Driven Development at Longhorn PHP 2023
 
Great! another bug
Great! another bugGreat! another bug
Great! another bug
 
Android Test Driven Development & Android Unit Testing
Android Test Driven Development & Android Unit TestingAndroid Test Driven Development & Android Unit Testing
Android Test Driven Development & Android Unit Testing
 
Winning the battle against Automated testing
Winning the battle against Automated testingWinning the battle against Automated testing
Winning the battle against Automated testing
 
Unit Testing and TDD 2017
Unit Testing and TDD 2017Unit Testing and TDD 2017
Unit Testing and TDD 2017
 
Automock: Interaction-Based Mock Code Generation
Automock: Interaction-Based Mock Code GenerationAutomock: Interaction-Based Mock Code Generation
Automock: Interaction-Based Mock Code Generation
 

Mehr von Adi Bolboaca

Legacy Coderetreat @Budapest 2013 02 16
Legacy Coderetreat @Budapest 2013 02 16Legacy Coderetreat @Budapest 2013 02 16
Legacy Coderetreat @Budapest 2013 02 16
Adi Bolboaca
 

Mehr von Adi Bolboaca (12)

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

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Code retreat @AgileWorks Bucharest 7 September 2013

  • 1. Bucharest, 7 September 2013 Code retreat www.mozaicworks.com
  • 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. Poker A deck of 52 cards Minimum 2 players A dealer handles the cards Cards are dealt clockwise around the poker table Each player bets, adding it clockwise to the pot Players can change cards, (see game variant) One player with the best cards wins all the pot If no player wins, we have a draw For draw the winning players split the pot 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 A deck of 52 cards Minimum 2 players A dealer handles the cards Cards are dealt clockwise around the poker table Each player bets, adding it clockwise to the pot Players can change cards, (see game variant) One player with the best cards wins all the pot If no player wins, we have a draw For draw the winning players split the pot www.mozaicworks.com
  • 14. Full Test Coverage 100% test coverage during the whole session When test is below 100% the facilitator stops you from adding functionalities until the coverage is back at 100% All your tests must contain the assert You need to install a code coverage tool www.mozaicworks.com
  • 15. Code retreat 1 hour Lunch www.mozaicworks.com
  • 16. 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
  • 17. Single Responsibility Principle A method has more functionalities add all in the method’s name with use or/and to separate them The method name has and/or then split the method No conditionals: if, switch, etc No try/catch Exactly one assert per test Test one behaviour per test www.mozaicworks.com
  • 18. No primitives You have to encapsulate the: Arrays Other data structures Integer String Boolean Other primitives www.mozaicworks.com
  • 19. Focus on refactoring Use naming that reveals intent Rename concepts to improve naming (use domain language) Extract duplicate identical chunks of code Extract methods having the same noun into their class Split methods containing Or, And in their names www.mozaicworks.com
  • 20. Closing circle 1) How did you feel? 2) What did you learn today? 3) What will you do differently tomorrow? 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 ● Working FAST and Safe with existing code ● 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 adrian.bolboaca@mozaicworks.com @adibolb