28
Code retreat www.mozaicworks.com

Coderetreat @AgileFinland Turku 2014 11 15

Embed Size (px)

DESCRIPTION

The slides from the coderetreat on the Global Day of Coderetreat 2014 in Turku, Finland

Citation preview

Page 1: Coderetreat @AgileFinland Turku 2014 11 15

Code retreat

www.mozaicworks.com

Page 2: Coderetreat @AgileFinland Turku 2014 11 15

www.mozaicworks.com

Me

Adi BolboacaOrganizational & Technical

Trainer & Coach

Page 3: Coderetreat @AgileFinland Turku 2014 11 15

2009, First time outside US

Page 4: Coderetreat @AgileFinland Turku 2014 11 15

Why?

Learn through pairingExtend your comfort zone

PracticeExperiment

Learn new practices

www.mozaicworks.com

Page 5: Coderetreat @AgileFinland Turku 2014 11 15

How?

1 day of codingChoose a simple problem

6 pairing partnersOn average 135 minutes of coding

6 different constraintsA lot of fun!

www.mozaicworks.com

Page 6: Coderetreat @AgileFinland Turku 2014 11 15

How it started

CodeMash conference 2009

Gary BernhardtPatrick Welsh

Nayan HajratwalaCorey Haines

www.mozaicworks.com

Page 7: Coderetreat @AgileFinland Turku 2014 11 15

How it started

RepeatableDay-long

Practice the fundamentals of programmingIntense day of coding

www.mozaicworks.com

Page 8: Coderetreat @AgileFinland Turku 2014 11 15

Day structure

15' introduction3 sessions of 45' coding + 15' retro&break

1h lunch3 sessions of 45' coding + 15' retro&break

15' closing circle

www.mozaicworks.com

Page 9: Coderetreat @AgileFinland Turku 2014 11 15

Principles

Language agnosticDo not try to finish the problem

Delete the code after each sessionFocus on practicing

Experiment each sessionHave fun!

www.mozaicworks.com

Page 10: Coderetreat @AgileFinland Turku 2014 11 15

How to take advantage1. Embrace the freedom of deleting the code

2. Do what you always wanted but couldn't

3. Get out of your comfort zone

4. Pair with strangers in languages you don't know

5. What you learn is your responsibility

Page 11: Coderetreat @AgileFinland Turku 2014 11 15

Prerequisites

ComputerCoding environmentTesting framework

Source control (git, svn, etc)

www.mozaicworks.com

Page 12: Coderetreat @AgileFinland Turku 2014 11 15

The four elements of simple design

1) Passes its tests2) Minimizes duplication

3) Maximizes clarity4) Has fewer elements

www.mozaicworks.com

Page 13: Coderetreat @AgileFinland Turku 2014 11 15

Conway's game of life

Having an infinite 2D orthogonal universeBeing given an initial generation called a seedThe following rules are applied simultaneously

A live cell having less than 2 live neighbors diesA live cell having 2 or 3 live neighbors lives A live cell having more than 3 neighbors diesA dead cell having 3 neighbors becomes alive

www.mozaicworks.com

Page 14: Coderetreat @AgileFinland Turku 2014 11 15

Session 1: Understand the problem

Find a pairChoose a programming language

Setup the environmentChoose an entry point for the problem

Start in 5 min

www.mozaicworks.com

Page 15: Coderetreat @AgileFinland Turku 2014 11 15

Conway's game of life

Having an infinite 2D orthogonal universeBeing given an initial generation called a seedThe following rules are applied simultaneously

A live cell having less than 2 live neighbors diesA live cell having 2 or 3 live neighbors lives A live cell having more than 3 neighbors diesA dead cell having 3 neighbors becomes alive

www.mozaicworks.com

Page 16: Coderetreat @AgileFinland Turku 2014 11 15

Session 2: Evil pairing

Ping-pong pairingBe evil, write the bad implementation for test

www.mozaicworks.com

Page 17: Coderetreat @AgileFinland Turku 2014 11 15

Session 3: Immutable

You cannot change the state of an object during execution

www.mozaicworks.com

Page 18: Coderetreat @AgileFinland Turku 2014 11 15

Code retreat

1 hour Lunch

www.mozaicworks.com

Page 19: Coderetreat @AgileFinland Turku 2014 11 15

Session 4: Universe wormholes

Both orthogonal and hexagonal universeTime passes differently

There is a pentagonal transient area between them

www.mozaicworks.com

Page 20: Coderetreat @AgileFinland Turku 2014 11 15

Session 4: Universe wormholes

www.mozaicworks.com

Page 21: Coderetreat @AgileFinland Turku 2014 11 15

Session 4: Universe wormholesThere are six 1st tier neighborsThere are six 2nd tier neighbors

Live 1st tier neighbors weight 1.0Live 2nd tier neighbors weight 0.3Each cell has a weighted sum of all

its 12 neighbors

www.mozaicworks.com

Page 22: Coderetreat @AgileFinland Turku 2014 11 15

Session 4: Universe wormholes

Having an infinite 2D hexagonal universe

Being given an initial generation called a seedThese rules are applied simultaneously on tick

A live cell having less than 2.0 sum diesA live cell having 2.0 – 3.3 sum lives onA live cell having more than sum 3.3 dies

A dead cell having 2.3 - 2.9 sum becomes alive

www.mozaicworks.com

Page 23: Coderetreat @AgileFinland Turku 2014 11 15

Session 5: Event driven

All the connections are just eventsNo other way of communication is allowed

www.mozaicworks.com

Page 24: Coderetreat @AgileFinland Turku 2014 11 15

Session 6: New language

Try a new language

www.mozaicworks.com

Page 25: Coderetreat @AgileFinland Turku 2014 11 15

Closing circle

1) How did you feel? 2) What did you learn today?

3) What will you do differently tomorrow?

www.mozaicworks.com

Page 26: Coderetreat @AgileFinland Turku 2014 11 15

Code retreatWhy?

Learn through pairingExtend your comfort zone

PracticeExperiment

Learn new practices

www.mozaicworks.com

Page 27: Coderetreat @AgileFinland Turku 2014 11 15

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

Page 28: Coderetreat @AgileFinland Turku 2014 11 15

Code retreatExtend your mentoring & training capacity

Accelerate learning through communities of practice

Grow your functional leaders and top talents

http://www.mozaicworks.com

[email protected]

@adibolb