RailsWayCon 2010 Coding Dojo

30
Coding Dojo RailsWayCon 2010 Michael Mahlberg & Jens-Christian Fischer 1

description

These are the actual slides from the Coding Dojo I held together with Jens-Christian Fischer (jcfischer) at the RailsWayCon in Berlin in 2010

Transcript of RailsWayCon 2010 Coding Dojo

Page 1: RailsWayCon 2010 Coding Dojo

Coding DojoRailsWayCon 2010

Michael Mahlberg & Jens-Christian Fischer

1

Page 2: RailsWayCon 2010 Coding Dojo

Warning

2

Page 3: RailsWayCon 2010 Coding Dojo

Audience Participation

3

Page 4: RailsWayCon 2010 Coding Dojo

Dojo?Kata?

4

Page 6: RailsWayCon 2010 Coding Dojo

it‘s not about rails

http://www.flickr.com/photos/chris_gin/2490980153/

6

Page 7: RailsWayCon 2010 Coding Dojo

Kata 形

• Form

• Choreographed pattern of movements

7

Page 8: RailsWayCon 2010 Coding Dojo

Dojo 道場

• The Place of the Way

8

Page 9: RailsWayCon 2010 Coding Dojo

But Why?

9

Page 10: RailsWayCon 2010 Coding Dojo

In the live presentation we switched to thishttp://www.youtube.com/watch?v=AQt2inyxNNg

10

Page 11: RailsWayCon 2010 Coding Dojo

11

Page 12: RailsWayCon 2010 Coding Dojo

12

Page 13: RailsWayCon 2010 Coding Dojo

13

Page 14: RailsWayCon 2010 Coding Dojo

Kata - Form

• Allows you to practice

• Allows you to free your mind of tediousness

• Muscle Memory

14

Page 15: RailsWayCon 2010 Coding Dojo

Different Katas

• Problem Solving Kata

• Tools Kata

15

Page 16: RailsWayCon 2010 Coding Dojo

Problem Solving

If can‘t think of at least 3 solutions,you haven‘t yet understood theproblem

– G. Weinberg

16

Page 17: RailsWayCon 2010 Coding Dojo

Tools

The Way of the carpenter is to become proficient in the use of his tools, first to lay his plans with a true measure and then perform his work according to plan.

– Go Rin No Sho

17

Page 18: RailsWayCon 2010 Coding Dojo

Now that we have covered the theory

18

Page 19: RailsWayCon 2010 Coding Dojo

Coding Dojo

Randori Style

19

Page 20: RailsWayCon 2010 Coding Dojo

Rules

• Choose a problem (Actually, we have chosen)

• Pair programming - Driver / Navigator

• Test Driven

• Red-Green => Switch Roles

• New Person coming in after 2 cycles

• Time limit (2 Minutes)

20

Page 21: RailsWayCon 2010 Coding Dojo

I wrote some codeThrew it awayRewrote it againIn front of other peopleIt was clever codeThey frowned at it

http://bossavit.com/dojo/archives/000792.html

21

Page 22: RailsWayCon 2010 Coding Dojo

No Spoilers!

22

Page 23: RailsWayCon 2010 Coding Dojo

100 Doors

There are 100 closed Doors & 100 Monkeys

23

Page 24: RailsWayCon 2010 Coding Dojo

100 Doors

The first monkey goes through all doors and opens them

24

Page 25: RailsWayCon 2010 Coding Dojo

100 Doors

The second monkey goes through every 2nd door, and changes it (open when closed, close

when open)

starting with the second

#2, #4, #6, ....

25

Page 26: RailsWayCon 2010 Coding Dojo

100 Doors

The third monkey changes every 3rd door

Starting with the third

#3, #6, #9, ....

26

Page 27: RailsWayCon 2010 Coding Dojo

Your Mission

List all open doors

27

Page 28: RailsWayCon 2010 Coding Dojo

100 Doors

 ;assume all memory is initially set to 0

inc $1  openloop: inc $200,X   inc $1   inc $1 txa   adc $1 tax cpx #$65   bmi openloop  

28

Page 30: RailsWayCon 2010 Coding Dojo

Contact Us

Michael Mahlberg

Consulting Guild AG

@MMahlberg

[email protected]

http://agile-aspects.blogspot.com

Jens-Christian Fischer

InVisible GmbH

@jcfischer

[email protected]

http://blog.invisible.ch

30