Slide 1

Slide 1 text

Code Retreat Lemi Orhan Ergin Agile Software Craftsman practice to master your crafts

Slide 2

Slide 2 text

Agile Software Craftsman Passionate Developer and Coach Sony & GittiGidiyor/eBay LEMİ ORHAN ERGİN @lemiorhan lemiorhanergin.com @lemiorhan

Slide 3

Slide 3 text

like to work alone feel safe to work on confort zone have to focus on daily work skip writing tests cannot find time to experiment not willing to learn new practices do not think about design focus on gettings things done over-engineer do not refactor Developers

Slide 4

Slide 4 text

have to improve their craft Developers

Slide 5

Slide 5 text

is the best way how we improve our craft Practicing

Slide 6

Slide 6 text

How to Practice Challenge Repeat Feedback again and again and again and again

Slide 7

Slide 7 text

How to Practice No Pressure do not complete the task
 but master it

Slide 8

Slide 8 text

practicing ! mastering Code Retreat is about and

Slide 9

Slide 9 text

writing the perfect code Code Retreat is about

Slide 10

Slide 10 text

learning through pairing extending your confort zone no pressure of daily work experimenting learning new practices thinking deeply about design building structures simple developing whenever required refactoring Code Retreat is about

Slide 11

Slide 11 text

1 day coding 45 minutes sessions Pair programming Test first development Different partners on each session Different constraints Format

Slide 12

Slide 12 text

Schedule Retrospective Break Closing Ceramony Coding 45 10 5 5 5 5 5 10 10 10 10 15 45 45 45 45 45 Lunch

Slide 13

Slide 13 text

History The idea was spawned at CodeMash Conference’09 ! The owners of the idea Gary Bernhardt Patrick Welsh Nayan Hajratwala Corey Haines ! First was held on January 24, 2009 Corey Haines https://www.flickr.com/photos/charliekilo/7717370426

Slide 14

Slide 14 text

Global Day of Code Retreat 2000+ developers 150+ locations 20 timezones 16 hours of coding 6 continents coderetreat.org Coderetreat Community Network 14th of December https://www.flickr.com/photos/stef3d/4560661663

Slide 15

Slide 15 text

Code generation is not important Generate code by thinking the design Focus on naming test cases Focus on Red/Green/Refactor cycle Why Repeating?

Slide 16

Slide 16 text

You are not your code Learn to go slower Focus on being better Do not think about finishing It’s all about practicing Why Deleting?

Slide 17

Slide 17 text

Language agnostic Do not try to complete Focus on practicing Write code than open to accept change Follow 4 rules of simple design Delete code after each session Have fun Principles

Slide 18

Slide 18 text

SOLID Principles Law of Demeter Design Patterns 4 Rules of Simple Design Design Guidelines

Slide 19

Slide 19 text

Simple Design Simple design in one that is easy to change. We don’t know exactly what is going to need to change We’ll never be more ignorant than we are at this moment

Slide 20

Slide 20 text

Simple Design Tests pass 4 Rules of “Tests pass” can be a significant factor in making changes. If you have to ask how fast your test suite should be, it should be faster 1

Slide 21

Slide 21 text

Simple Design Express Intent 4 Rules of Paying attention to the names and how your code expresses itself is the key. 2

Slide 22

Slide 22 text

Simple Design No Duplication (DRY) 4 Rules of It’s not about code duplication, it’s about knowledge duplication. Don’t repeat yourself. Every piece of knowledge should have one and only one representation. 3

Slide 23

Slide 23 text

Simple Design Small 4 Rules of Has fewer classes, modules, packages. Any not- used code should be deleted. You should also check missing or duplicate abstractions. Over- extraction should also be not allowed. 4

Slide 24

Slide 24 text

http://blog.thecodewhisperer.com/2013/12/07/putting-an-age-old-battle-to-rest “Putting an Age-Old Battle to Rest” by Joe Rainsberger The Simple Design Dynamo

Slide 25

Slide 25 text

TDD Write exactly one new test 1 2 Run the test to make sure it fails 3 Write least amount of code to make the test pass 4 Refactor to remove duplication 5 Repeat the process Test Driven Development Test Driven Design Test First Development

Slide 26

Slide 26 text

Zero-player game Cellular automation system Devised by John Horton Conway Evolution is determined by initial state Each cell can be alive or dead Conway’s Game of Life Problem to solve:

Slide 27

Slide 27 text

Each cell has 8 neighbours and follows 3 rules 1 2 3 4 5 6 7 8

Slide 28

Slide 28 text

Any live cell with fewer than 2 live neighbours dies of loneliness Rule 1

Slide 29

Slide 29 text

Any live cell with more than 3 live neighbours dies of overcrowding Rule 2

Slide 30

Slide 30 text

Any dead cell with exactly 3 live neighbours comes to life of warmth Rule 3

Slide 31

Slide 31 text

Avoid to use primitives Avoid to use conditional conditions (if, ?:, switch) Avoid to use loops (while, for) All methods return void Max 5 lines of code per method Verbs instead of nouns Ping pong programming Mute ping pong programming Swap computers Do not use mouse Variations

Slide 32

Slide 32 text

ENJOY remember whatever you do do not forget to https://www.flickr.com/photos/fraserspeirs/3394902061 Joe O'Brien and Jim Weirich while doing ruby code review

Slide 33

Slide 33 text

sessions let the begin We select 6 activities amoung the activities list after checking TDD and pair programming experiences of the attendees. Every coderetreat has its own set of activities.

Slide 34

Slide 34 text

No constraints Do your best

Slide 35

Slide 35 text

Ping-pong pair programming

Slide 36

Slide 36 text

No primitives Use only immutable objects

Slide 37

Slide 37 text

No primitives No conditionals Max 5 lines of code

Slide 38

Slide 38 text

No way to return any value Verbs instead of Nouns

Slide 39

Slide 39 text

Mute ping-pong

Slide 40

Slide 40 text

What, if anything, did you learn today? What, if anything, surprised you today? What, if anything, will you do differently? closing

Slide 41

Slide 41 text

https://leanpub.com/4rulesofsimpledesign The only thing we truly know about software development is that we can expect changes to our system. Through concrete examples, let's explore ways to build flexible, adaptable software systems by better understanding Kent Beck's 4 Rules of Simple Design. Book from Corey Haines Published at LeanPub on 2014

Slide 42

Slide 42 text

http://www.coderetreat.org Coderetreat Community Network http://blog.zilverline.com/2013/12/20/facilitating-the-global-day-of-coderetreat-2013-in-amsterdam Facilitating the Global Day of Coderetreat 2013 in Amsterdam http://www.alexbolboaca.ro/wordpress/articles/how-to-organize-a-code-retreat How to organize a code retreat Coderetreat Facilitator Training https://vimeo.com/54519386 https://leanpub.com/4rulesofsimpledesign Understanding the 4 Rules of Simple Design

Slide 43

Slide 43 text

Lemİ orhan ergİn Founder & Author @ agilistanbul.com [email protected] @lemiorhan https://www.linkedin.com/in/lemiorhan @lemiorhan https://twitter.com/lemiorhan @lemiorhan https://github.com/lemiorhan @lemiorhan http://www.slideshare.net/lemiorhan agile software craftsman agilistanbul.com Turkish blog about agile development lemiorhanergin.com Official site having personal information