0
Upcoming SlideShare
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Standard text messaging rates apply

# Code retreat @BMW Car IT

1,446

Published on

The slides I used during our code retreat at BMW Car IT.

The slides I used during our code retreat at BMW Car IT.

Published in: Technology
3 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total Views
1,446
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
5
0
Likes
3
Embeds 0
No embeds

No notes for slide

### Transcript

• 1. 1.BMW Car ITCode Retreat Sebastian.Benz@bmw-carit.de
• 2. 1. code2. delete 6x3. repeat
• 3. The point of a code retreat is not to make progress on the problem. The point is to write perfect code! Corey Haines
• 4. In each session...1. Set a goal2. Try to reach it3. Destroy your code4. Retrospect
• 5. Pair Programming&#x2022; Talk about your assumptions, short-term goals, general direction&#x2022; Switch roles frequently&#x2022; Communication: "This method is too long" vs "Could we make this method shorter?"&#x2022; Exercise: Ping-Pong-Pairing - one person writes a test, the other tries to &#xFB01;x it. more http://jamesshore.com/Agile-Book/pair_programming.html
• 6. Session IGet to know the problem...
• 7. Conway&#x2018;s Game of Life
• 8. Conway&#x2018;s Game of Life
• 9. 1. Any live cell with fewer than two live neighbours dies, as if caused by under-population.
• 10. 1. Any live cell with fewer than two live neighbours dies, as if caused by under-population.
• 11. 1. Any live cell with fewer than two live neighbours dies, as if caused by under-population.
• 12. 2. Any live cell with two or three live neighbours lives on to the next generation
• 13. 2. Any live cell with two or three live neighbours lives on to the next generation
• 14. 3. Any live cell with more than three live neighbours dies, as if by overcrowding.
• 15. 3. Any live cell with more than three live neighbours dies, as if by overcrowding.
• 16. 4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
• 17. 4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
• 18. Notes&#x2022; All rules are applied simultaneously&#x2022; Start by focusing on the rules&#x2022; No GUI - use tests instead
• 19. Session IIEverything is an object.
• 20. Example neighbours CellCellCell Cell vs. Cell CellCell Cell
• 21. Challenge&#x2022; Thou shalt not use arrays.
• 22. Session IIITest-drive your design.
• 23. Test-&#xFB01;rst &#x2260; Test-driven
• 24. TDDWrite a failing Make the unit test test pass Refactor
• 25. TDD as if you meant it&#x2022; Write one failing test&#x2022; Make the test pass by writing implementation code in the test&#x2022; Create a new implementation method/function by: &#x2022; extract method on implementation code from (2), or &#x2022; moving implementation code from (2) into an existing method&#x2022; Only ever create new methods in the test class&#x2022; Only ever create implementation classes to provide a destination for extracting a method created as per (4).&#x2022; Populate implementation classes by moving methods from a test class&#x2022; Refactor
• 26. Example
• 27. Challenge&#x2022; Thou shalt TDD as if thou meant it.&#x2022; Thou shalt not use the debugger.&#x2022; Thou shalt know in advance which test will fail.
• 28. Session IVIts all about the looks...
• 29. "There are two hard problems in computerscience: cache invalidation, naming things, and off-by-one errors." Eric Florenzano / Phil Karlton
• 30. "There are two hard problems in computerscience: cache invalidation, naming things, and off-by-one errors." Eric Florenzano / Phil Karlton
• 31. Example
• 32. Challenge&#x2022; Thou shalt use good names.&#x2022; Thou shalt express your intend by method names.&#x2022; Thou shalt have only methods with LOC &lt; 3.
• 33. Session VMore challenges...
• 34. Challenge&#x2022; Thou shalt use only functions and constants. or&#x2022; Thou shalt not use loops (while, for, iterators,..).
• 35. Session VIThe end game...