SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Similaire à 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 08Adi Bolboaca
 
Coderetreat @Sibiu 2012 08 18
Coderetreat @Sibiu 2012 08 18Coderetreat @Sibiu 2012 08 18
Coderetreat @Sibiu 2012 08 18Adi Bolboaca
 
Coderetreat @AgileFinland Helsinki 2014 11 13
Coderetreat @AgileFinland Helsinki 2014 11 13Coderetreat @AgileFinland Helsinki 2014 11 13
Coderetreat @AgileFinland Helsinki 2014 11 13Adi 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 2013Adi Bolboaca
 
Coderetreat @AgileFinland Tampere 2014 11 12
Coderetreat @AgileFinland Tampere 2014 11 12Coderetreat @AgileFinland Tampere 2014 11 12
Coderetreat @AgileFinland Tampere 2014 11 12Adi Bolboaca
 
Test automation engineer
Test automation engineerTest automation engineer
Test automation engineerSadaaki Emura
 
QA Best Practices
QA  Best PracticesQA  Best Practices
QA Best PracticesJames York
 
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)Kaunas Java User Group
 
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 TestingCameron Presley
 
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 FrameworkPeter Kofler
 
Implementing Quality on a Java Project
Implementing Quality on a Java ProjectImplementing Quality on a Java Project
Implementing Quality on a Java ProjectVincent Massol
 
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 WallaceQA or the Highway
 
Stop! you're testing too much
Stop!  you're testing too muchStop!  you're testing too much
Stop! you're testing too muchShawn Wallace
 
Stop fearing legacy code
Stop fearing legacy codeStop fearing legacy code
Stop fearing legacy codeYaki Koren
 
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 2023Scott Keck-Warren
 
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 Testingmahmoud ramadan
 
Winning the battle against Automated testing
Winning the battle against Automated testingWinning the battle against Automated testing
Winning the battle against Automated testingElena Laskavaia
 
Unit Testing and TDD 2017
Unit Testing and TDD 2017Unit Testing and TDD 2017
Unit Testing and TDD 2017Xavi Hidalgo
 
Automock: Interaction-Based Mock Code Generation
Automock: Interaction-Based Mock Code GenerationAutomock: Interaction-Based Mock Code Generation
Automock: Interaction-Based Mock Code GenerationSabrina Souto
 

Similaire à 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
 

Plus de Adi Bolboaca

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 2018Adi Bolboaca
 
Stop Task Switching
Stop Task SwitchingStop Task Switching
Stop Task SwitchingAdi Bolboaca
 
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 TimeAdi Bolboaca
 
Evolutionary Design - Refactoring Heuristics
Evolutionary Design - Refactoring HeuristicsEvolutionary Design - Refactoring Heuristics
Evolutionary Design - Refactoring HeuristicsAdi Bolboaca
 
Behind Agile Practices
Behind Agile PracticesBehind Agile Practices
Behind Agile PracticesAdi Bolboaca
 
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 2015Adi Bolboaca
 
Coderetreat @AgileFinland Turku 2014 11 15
 Coderetreat @AgileFinland Turku 2014 11 15 Coderetreat @AgileFinland Turku 2014 11 15
Coderetreat @AgileFinland Turku 2014 11 15Adi Bolboaca
 
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 2014Adi Bolboaca
 
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 15Adi Bolboaca
 
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 21Adi Bolboaca
 
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 13Adi Bolboaca
 
Legacy Coderetreat @Budapest 2013 02 16
Legacy Coderetreat @Budapest 2013 02 16Legacy Coderetreat @Budapest 2013 02 16
Legacy Coderetreat @Budapest 2013 02 16Adi Bolboaca
 

Plus de 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
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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 productivityPrincipled Technologies
 
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 2024Rafal Los
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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.pptxKatpro Technologies
 
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.pptxEarley Information Science
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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 MenDelhi Call girls
 
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 textsMaria Levchenko
 
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?Igalia
 

Dernier (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
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
 
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?
 

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