code retreat june24th

23
Code Retreat june 24th 2011 - XEBIA

Upload: jean-laurent-de-morlhon

Post on 10-May-2015

672 views

Category:

Technology


0 download

DESCRIPTION

Slides supporting our June 24th 2011 CodeRetreat at Xebia TechEvent.

TRANSCRIPT

Page 1: Code retreat june24th

Code Retreat june 24th 2011 - XEBIA

Page 2: Code retreat june24th

Welcome

Page 3: Code retreat june24th

Deliberate Practice

Improve ability to perform a task

Repetition, repetition, repetition...

Not complete the task, but master it.

Page 4: Code retreat june24th

Simple DesignRun all tests and check they pass.

Don't Repeat Yourself

Reveal intent

Small methods & classes

Page 5: Code retreat june24th

Open your mind !

Try things you can't try @ work.

Do silly things that just *can't* work...

Explore, experiment.

Pair with as much people as you can

Don't be shy, try new languages.

Page 6: Code retreat june24th

Introduction

a session lasts 40 minutes

followed by a 10-15 minutes retrospective

pair programming

swap on each session

delete all code after each session

Page 7: Code retreat june24th

PlanningCode Session 1

Retrospective 1

Code Session 2

Retrospective 2

Code Session 3

Retrospective 3

Lunch

Code Session 4

Retrospective 4

Code Session 5

Retrospective 5

Code Session 6

Day Retrospective

10h00

11h00

12h00

13h00

14h00

14h00

15h00

16h00

16h40

...

Page 8: Code retreat june24th

TicTacToe

Page 9: Code retreat june24th

TicTacToe rules1. a game is over when all fields are taken

2. a game is over when all fields in a column are taken by a player

3. a game is over when all fields in a row are taken by a player

4. a game is over when all fields in a diagonal are taken by a player

5. a player can take a field if not already taken

6. players take turns taking fields until the game is over

Page 10: Code retreat june24th

Session #1 10h00 10h401. a game is over when all fields are taken

2. a game is over when all fields in a column are taken by a player

3. a game is over when all fields in a row are taken by a player

4. a game is over when all fields in a diagonal are taken by a player

5. a player can take a field if not already taken

6. players take turns taking fields until the game is over

Page 11: Code retreat june24th

Does your code work at the end of the session ?

What is your implementation path ?

How was your pair programming experience ?

How was your TDD experience ? How did it help ?

Did you notice any code smells ?

Did you notice any communication smells ?

Any tips for the others ?

Rétro #1 10h40 11h00

Page 12: Code retreat june24th

Session #2 11h00 11h401. a game is over when all fields are taken

2. a game is over when all fields in a column are taken by a player

3. a game is over when all fields in a row are taken by a player

4. a game is over when all fields in a diagonal are taken by a player

5. a player can take a field if not already taken

6. players take turns taking fields until the game is over

Page 13: Code retreat june24th

Does your code work at the end of the session ?

What is your implementation path ?

How was your pair programming experience ?

How was your TDD experience ? How did it help ?

Did you notice any code smells ?

Did you notice any communication smells ?

Any tips for the others ?

Rétro #2 11h40 12h00

Page 14: Code retreat june24th

Session #3 12h00 12h401. a game is over when all fields are taken

2. a game is over when all fields in a column are taken by a player

3. a game is over when all fields in a row are taken by a player

4. a game is over when all fields in a diagonal are taken by a player

5. a player can take a field if not already taken

6. players take turns taking fields until the game is over

Page 15: Code retreat june24th

Does your code work at the end of the session ?

What is your implementation path ?

How was your pair programming experience ?

How was your TDD experience ? How did it help ?

Did you notice any code smells ?

Did you notice any communication smells ?

Any tips for the others ?

Rétro #3 12h40 13h00

Page 16: Code retreat june24th

Lunch Time !

Page 17: Code retreat june24th

Session #4 14h00 14h401. a game is over when all fields are taken

2. a game is over when all fields in a column are taken by a player

3. a game is over when all fields in a row are taken by a player

4. a game is over when all fields in a diagonal are taken by a player

5. a player can take a field if not already taken

6. players take turns taking fields until the game is over

TDD as you meant it || No mouse || Switch keyb.

Page 18: Code retreat june24th

1. write exactly ONE failing test

2. make this test pass by first writing implementation code IN THE TEST METHOD

3. create a new implementation method by:

1. doing extract method on implementation code created as per (2), or

2. moving implementation code as per (2) into an existing implementation method

4. only ever create new methods IN THE TEST CLASS

5. only ever create implementation classes to provide a destination for extracting a method created as per (4).

6. populate implementation classes by doing move method from a test class into them

7. refactor as required

8. go to (1)

TDD AS YOU MEANT IT

Page 19: Code retreat june24th

Does your code work at the end of the session ?

What is your implementation path ?

How was your pair programming experience ?

How was your TDD experience ? How did it help ?

Did you notice any code smells ?

Did you notice any communication smells ?

Any tips for the others ?

Rétro #4 14h40 15h00

Page 20: Code retreat june24th

Session #5 15h00 15h401. a game is over when all fields are taken

2. a game is over when all fields in a column are taken by a player

3. a game is over when all fields in a row are taken by a player

4. a game is over when all fields in a diagonal are taken by a player

5. a player can take a field if not already taken

6. players take turns taking fields until the game is over

No Loops || No if(s) || Small methods (<5)

Page 21: Code retreat june24th

Does your code work at the end of the session ?

What is your implementation path ?

How was your pair programming experience ?

How was your TDD experience ? How did it help ?

Did you notice any code smells ?

Did you notice any communication smells ?

Any tips for the others ?

Rétro #5 15h40 16h00

Page 22: Code retreat june24th

Session #6 16h00 16h401. a game is over when all fields are taken

2. a game is over when all fields in a column are taken by a player

3. a game is over when all fields in a row are taken by a player

4. a game is over when all fields in a diagonal are taken by a player

5. a player can take a field if not already taken

6. players take turns taking fields until the game is over

No Loops || No if(s) || Small methods (<5)

Page 23: Code retreat june24th

What did you learn today ?

What were you surprised about today ?

What will you apply starting Monday ?

Day Retrospective