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...
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&br...
Principles
Language agnostic
Do not try to finish the problem
Delete the code after each session
Focus on practicing
Exper...
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...
Poker
A deck of 52 cards
Minimum 2 players
A dealer handles the cards
Cards are dealt clockwise around the poker table
Eac...
First session
Find a pair
Choose a programming language
Setup the environment
Choose an entry point for the problem
Start ...
Conway's game of life
A deck of 52 cards
Minimum 2 players
A dealer handles the cards
Cards are dealt clockwise around the...
Full Test Coverage
100% test coverage during the whole session
When test is below 100% the facilitator stops you
from addi...
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) Time...
Single Responsibility Principle
A method has more functionalities add all in
the method’s name with use or/and to separate...
No primitives
You have to encapsulate the:
Arrays
Other data structures
Integer
String
Boolean
Other primitives
www.mozaic...
Focus on refactoring
Use naming that reveals intent
Rename concepts to improve naming (use
domain language)
Extract duplic...
Closing circle
1) How did you feel?
2) What did you learn today?
3) What will you do differently tomorrow?
www.mozaicworks...
Code retreat
Why?
Learn through pairing
Extend your comfort zone
Practice
Experiment
Learn new practices
www.mozaicworks.c...
Contact me
● Remote pair-programming
● Unit testing workshop
● Test driven development workshop
● Clean code workshop
● Re...
Code retreat
Extend your mentoring & training capacity
Accelerate learning through communities
of practice
Grow your funct...
Upcoming SlideShare
Loading in...5
×

Code retreat @AgileWorks Bucharest 7 September 2013

225

Published on

Slides for a coderetreat I facilitated in Buchaers in the AgileWorks community. The problem is poker and the sessions are quite different than the usual ones.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
225
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Code retreat @AgileWorks Bucharest 7 September 2013

  1. 1. Bucharest, 7 September 2013 Code retreat www.mozaicworks.com
  2. 2. www.mozaicworks.com Me Adi Bolboaca Organizational & Technical Trainer & Coach
  3. 3. Why? Learn through pairing Extend your comfort zone Practice Experiment Learn new practices www.mozaicworks.com
  4. 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. 5. How it started CodeMash conference 2009 Gary Bernhardt Patrick Welsh Nayan Hajratwala Corey Haines www.mozaicworks.com
  6. 6. How it started Repeatable Day-long Practice the fundamentals of programming Intense day of coding www.mozaicworks.com
  7. 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. 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. 9. Prerequisites Computer Coding environment Testing framework Source control (git, svn, etc) www.mozaicworks.com
  10. 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. 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. 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. 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. 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. 15. Code retreat 1 hour Lunch www.mozaicworks.com
  16. 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. 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. 18. No primitives You have to encapsulate the: Arrays Other data structures Integer String Boolean Other primitives www.mozaicworks.com
  19. 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. 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. 21. Code retreat Why? Learn through pairing Extend your comfort zone Practice Experiment Learn new practices www.mozaicworks.com
  22. 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. 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
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×