Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013

Adi Bolboaca
Adi BolboacaProgrammer, Trainer, Coach at Mozaic Works
Code retreat

www.mozaicworks.com
Me

Adi Bolboaca
Organizational & Technical
Trainer & Coach
www.mozaicworks.com
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
Ping-pong pair-programming
Option 1: evil coding
Option 2: silent pairing
Option 3: beginner's mind

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
Programming by Wishful Thinking
1.Find a real-life scenario from top to bottom
2.Write an acceptance test on the scenario
3.Write the first unit test at the top
4.Whenever your test or implementation needs something, create a
stub
5.Go on writing next test until you reach the bottom layer
6.Only implement the stubs that you need for your vertical slice
7.Make the real-life scenario test pass
8.Write the next real-life scenario

www.mozaicworks.com
Only one decision at a time
1.Introduce only one notion at a time
2.Write down what notions you introduced
3.Note down the steps/tests you took
4.Write down which were the decisions you needed to revert from

www.mozaicworks.com
Code retreat

1 hour Lunch

www.mozaicworks.com
Tell don't ask
The internal state of a class is not accessible
A method call sends all the data needed to retrieve an
answer
Each class computes the output using only its internal
state

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
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 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
1 of 23

Recommended

Coderetreat @Sibiu 2012 08 18 by
Coderetreat @Sibiu 2012 08 18Coderetreat @Sibiu 2012 08 18
Coderetreat @Sibiu 2012 08 18Adi Bolboaca
276 views23 slides
Intro to TDD by
Intro to TDDIntro to TDD
Intro to TDDJason Nocks
197 views16 slides
Yana Lysa "Best practices of building good manual test suits" by
Yana Lysa "Best practices of building good manual test suits"Yana Lysa "Best practices of building good manual test suits"
Yana Lysa "Best practices of building good manual test suits"Fwdays
394 views29 slides
Unit testing-patterns by
Unit testing-patternsUnit testing-patterns
Unit testing-patternsAlexandru Bolboaca
3.9K views29 slides
Evolutionary Design - Refactoring Heuristics by
Evolutionary Design - Refactoring HeuristicsEvolutionary Design - Refactoring Heuristics
Evolutionary Design - Refactoring HeuristicsAdi Bolboaca
1.1K views23 slides
Value of Unit Testing by
Value of Unit TestingValue of Unit Testing
Value of Unit TestingFerose Khan J
300 views15 slides

More Related Content

Viewers also liked

Crucial Confrontations Overview by
Crucial Confrontations OverviewCrucial Confrontations Overview
Crucial Confrontations OverviewBusiness Transformations
1.4K views2 slides
Brad wood -_whats_a_pull_request by
Brad wood -_whats_a_pull_requestBrad wood -_whats_a_pull_request
Brad wood -_whats_a_pull_requestColdFusionConference
355 views49 slides
Code Retreat by
Code RetreatCode Retreat
Code RetreatIgor Popov
1.2K views34 slides
Introduction to software craftsmanship by
Introduction to software craftsmanshipIntroduction to software craftsmanship
Introduction to software craftsmanshipAlexandru Bolboaca
3.1K views28 slides
Introduction to software craftsmanship by
Introduction to software craftsmanshipIntroduction to software craftsmanship
Introduction to software craftsmanshipAlexandru Bolboaca
1.6K views26 slides
Crucial accountability-preparation-worksheet by
Crucial accountability-preparation-worksheetCrucial accountability-preparation-worksheet
Crucial accountability-preparation-worksheetHugo Rojas
1.6K views1 slide

Viewers also liked(9)

Similar to Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013

Coderetreat @AgileFinland Helsinki 2014 11 13 by
Coderetreat @AgileFinland Helsinki 2014 11 13Coderetreat @AgileFinland Helsinki 2014 11 13
Coderetreat @AgileFinland Helsinki 2014 11 13Adi Bolboaca
380 views25 slides
Coderetreat @AgileWorks Bucharest 2012 07 06 by
Coderetreat @AgileWorks Bucharest 2012 07 06 Coderetreat @AgileWorks Bucharest 2012 07 06
Coderetreat @AgileWorks Bucharest 2012 07 06 Adi Bolboaca
388 views23 slides
Coderetreat @Vienna 2013 06 08 by
Coderetreat @Vienna 2013 06 08Coderetreat @Vienna 2013 06 08
Coderetreat @Vienna 2013 06 08Adi Bolboaca
275 views23 slides
Coderetreat @Sofia 2012 10 27 by
Coderetreat @Sofia 2012 10 27Coderetreat @Sofia 2012 10 27
Coderetreat @Sofia 2012 10 27Adi Bolboaca
310 views23 slides
Coderetreat @AgileFinland Tampere 2014 11 12 by
Coderetreat @AgileFinland Tampere 2014 11 12Coderetreat @AgileFinland Tampere 2014 11 12
Coderetreat @AgileFinland Tampere 2014 11 12Adi Bolboaca
456 views25 slides
Code retreat @AgileWorks Bucharest 7 September 2013 by
Code retreat @AgileWorks Bucharest 7 September 2013Code retreat @AgileWorks Bucharest 7 September 2013
Code retreat @AgileWorks Bucharest 7 September 2013Adi Bolboaca
496 views23 slides

Similar to Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013(20)

Coderetreat @AgileFinland Helsinki 2014 11 13 by Adi Bolboaca
Coderetreat @AgileFinland Helsinki 2014 11 13Coderetreat @AgileFinland Helsinki 2014 11 13
Coderetreat @AgileFinland Helsinki 2014 11 13
Adi Bolboaca380 views
Coderetreat @AgileWorks Bucharest 2012 07 06 by Adi Bolboaca
Coderetreat @AgileWorks Bucharest 2012 07 06 Coderetreat @AgileWorks Bucharest 2012 07 06
Coderetreat @AgileWorks Bucharest 2012 07 06
Adi Bolboaca388 views
Coderetreat @Vienna 2013 06 08 by Adi Bolboaca
Coderetreat @Vienna 2013 06 08Coderetreat @Vienna 2013 06 08
Coderetreat @Vienna 2013 06 08
Adi Bolboaca275 views
Coderetreat @Sofia 2012 10 27 by Adi Bolboaca
Coderetreat @Sofia 2012 10 27Coderetreat @Sofia 2012 10 27
Coderetreat @Sofia 2012 10 27
Adi Bolboaca310 views
Coderetreat @AgileFinland Tampere 2014 11 12 by Adi Bolboaca
Coderetreat @AgileFinland Tampere 2014 11 12Coderetreat @AgileFinland Tampere 2014 11 12
Coderetreat @AgileFinland Tampere 2014 11 12
Adi Bolboaca456 views
Code retreat @AgileWorks Bucharest 7 September 2013 by Adi Bolboaca
Code retreat @AgileWorks Bucharest 7 September 2013Code retreat @AgileWorks Bucharest 7 September 2013
Code retreat @AgileWorks Bucharest 7 September 2013
Adi Bolboaca496 views
Coderetreat @Turku 2012 10 20 by Adi Bolboaca
Coderetreat @Turku 2012 10 20 Coderetreat @Turku 2012 10 20
Coderetreat @Turku 2012 10 20
Adi Bolboaca285 views
Coderetreat @AgileFinland Turku 2014 11 15 by Adi Bolboaca
 Coderetreat @AgileFinland Turku 2014 11 15 Coderetreat @AgileFinland Turku 2014 11 15
Coderetreat @AgileFinland Turku 2014 11 15
Adi Bolboaca647 views
Global Day of Coderetreat'14 - Istanbul Event by Lemi Orhan Ergin
Global Day of Coderetreat'14 - Istanbul EventGlobal Day of Coderetreat'14 - Istanbul Event
Global Day of Coderetreat'14 - Istanbul Event
Lemi Orhan Ergin14.7K views
Kata Your Way to SW Craftsmanship by Camille Bell
Kata Your Way to SW CraftsmanshipKata Your Way to SW Craftsmanship
Kata Your Way to SW Craftsmanship
Camille Bell545 views
Adopting tdd in the workplace by Donny Wals
Adopting tdd in the workplaceAdopting tdd in the workplace
Adopting tdd in the workplace
Donny Wals157 views
Adopting tdd in the workplace by Donny Wals
Adopting tdd in the workplaceAdopting tdd in the workplace
Adopting tdd in the workplace
Donny Wals4.6K views
Triggers for Admins: A Five-step Framework for Creating Triggers by Salesforce Developers
Triggers for Admins: A Five-step Framework for Creating TriggersTriggers for Admins: A Five-step Framework for Creating Triggers
Triggers for Admins: A Five-step Framework for Creating Triggers
Pragmatic Introduction to Python Unit Testing (PyDays 2018) by Peter Kofler
Pragmatic Introduction to Python Unit Testing (PyDays 2018)Pragmatic Introduction to Python Unit Testing (PyDays 2018)
Pragmatic Introduction to Python Unit Testing (PyDays 2018)
Peter Kofler564 views
Coderetreat - Practice to Master Your Crafts by Lemi Orhan Ergin
Coderetreat - Practice to Master Your CraftsCoderetreat - Practice to Master Your Crafts
Coderetreat - Practice to Master Your Crafts
Lemi Orhan Ergin9.2K views

More from Adi Bolboaca

Evolutionary Design - NewCrafts Paris 18 May 2018 by
Evolutionary Design - NewCrafts Paris 18 May 2018Evolutionary Design - NewCrafts Paris 18 May 2018
Evolutionary Design - NewCrafts Paris 18 May 2018Adi Bolboaca
2.6K views38 slides
Stop Task Switching by
Stop Task SwitchingStop Task Switching
Stop Task SwitchingAdi Bolboaca
286 views13 slides
Evolutionary Design: Take Only One Decision at a Time by
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
168 views16 slides
Behind Agile Practices by
Behind Agile PracticesBehind Agile Practices
Behind Agile PracticesAdi Bolboaca
698 views15 slides
Architecture for Disaster Resistant Systems @I TAKE Unconference 29 05 2015 by
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
1.2K views37 slides
Refactoring Dojo @AgileWorks Bucharest 21 May 2014 by
Refactoring Dojo @AgileWorks Bucharest 21 May 2014Refactoring Dojo @AgileWorks Bucharest 21 May 2014
Refactoring Dojo @AgileWorks Bucharest 21 May 2014Adi Bolboaca
435 views21 slides

More from Adi Bolboaca(11)

Evolutionary Design - NewCrafts Paris 18 May 2018 by Adi Bolboaca
Evolutionary Design - NewCrafts Paris 18 May 2018Evolutionary Design - NewCrafts Paris 18 May 2018
Evolutionary Design - NewCrafts Paris 18 May 2018
Adi Bolboaca2.6K views
Evolutionary Design: Take Only One Decision at a Time by Adi Bolboaca
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
Adi Bolboaca168 views
Behind Agile Practices by Adi Bolboaca
Behind Agile PracticesBehind Agile Practices
Behind Agile Practices
Adi Bolboaca698 views
Architecture for Disaster Resistant Systems @I TAKE Unconference 29 05 2015 by Adi Bolboaca
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
Adi Bolboaca1.2K views
Refactoring Dojo @AgileWorks Bucharest 21 May 2014 by Adi Bolboaca
Refactoring Dojo @AgileWorks Bucharest 21 May 2014Refactoring Dojo @AgileWorks Bucharest 21 May 2014
Refactoring Dojo @AgileWorks Bucharest 21 May 2014
Adi Bolboaca435 views
Sherlock Holmes and Pairing @Romanian Testing Conference 2014 05 15 by Adi Bolboaca
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
Adi Bolboaca695 views
TDD Mini Workshop @ Bucharest JUG 2014 04 24 by Adi Bolboaca
TDD Mini Workshop @ Bucharest JUG 2014 04 24TDD Mini Workshop @ Bucharest JUG 2014 04 24
TDD Mini Workshop @ Bucharest JUG 2014 04 24
Adi Bolboaca551 views
Sherlock Holmes and Pairing @Bucharest JUG 2013 11 21 by Adi Bolboaca
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
Adi Bolboaca510 views
Sherlock Holmes and Pairing @Wlidcard Conference 2013 09 13 by Adi Bolboaca
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
Adi Bolboaca2.6K views
Legacy Coderetreat @Budapest 2013 02 16 by Adi Bolboaca
Legacy Coderetreat @Budapest 2013 02 16Legacy Coderetreat @Budapest 2013 02 16
Legacy Coderetreat @Budapest 2013 02 16
Adi Bolboaca406 views

Recently uploaded

State of the Union - Rohit Yadav - Apache CloudStack by
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStackShapeBlue
106 views53 slides
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueShapeBlue
89 views23 slides
Kyo - Functional Scala 2023.pdf by
Kyo - Functional Scala 2023.pdfKyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdfFlavio W. Brasil
418 views92 slides
PharoJS - Zürich Smalltalk Group Meetup November 2023 by
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023Noury Bouraqadi
139 views17 slides
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueShapeBlue
62 views54 slides
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueShapeBlue
70 views7 slides

Recently uploaded(20)

State of the Union - Rohit Yadav - Apache CloudStack by ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue106 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue89 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi139 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue62 views
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue70 views
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... by Moses Kemibaro
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Moses Kemibaro27 views
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... by ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue26 views
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by ShapeBlue
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TCloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
ShapeBlue38 views
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue by ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
ShapeBlue71 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue40 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman38 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely29 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software317 views
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue by ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue31 views
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue46 views

Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013

  • 2. Me Adi Bolboaca Organizational & Technical Trainer & Coach 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. 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 Ping-pong pair-programming Option 1: evil coding Option 2: silent pairing Option 3: beginner's mind 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. Programming by Wishful Thinking 1.Find a real-life scenario from top to bottom 2.Write an acceptance test on the scenario 3.Write the first unit test at the top 4.Whenever your test or implementation needs something, create a stub 5.Go on writing next test until you reach the bottom layer 6.Only implement the stubs that you need for your vertical slice 7.Make the real-life scenario test pass 8.Write the next real-life scenario www.mozaicworks.com
  • 15. Only one decision at a time 1.Introduce only one notion at a time 2.Write down what notions you introduced 3.Note down the steps/tests you took 4.Write down which were the decisions you needed to revert from www.mozaicworks.com
  • 16. Code retreat 1 hour Lunch www.mozaicworks.com
  • 17. Tell don't ask The internal state of a class is not accessible A method call sends all the data needed to retrieve an answer Each class computes the output using only its internal state www.mozaicworks.com
  • 18. 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
  • 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 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