CODE
DOJO
@cakper
17/06/13 Gdańskcode dojo
@CAKPER
Software Engineer @SensioLabsUK
Silesia PHP User Group // Spug.pl
#symfony-pl // Symfonylab.pl
flickr.com/foliosus/2792686705/
道場
Dojo
17/06/13 Gdańskcode dojo
“PLACE OF THE WAY”
17/06/13 Gdańskcode dojo
DELIBERATE PRACTICE
“Done	
  on	
  purpose;	
  inten.onal.
Formed	
  with	
  delibera.on;	
  well-­‐
advised;	
  carefully	
  considered;	
  not	
  
sudden	
  or	
  rash.
Not	
  hasty	
  or	
  sudden;	
  slow.”
17/06/13 Gdańskcode dojo
DELIBERATE PRACTICE
10 000
Hours
17/06/13 Gdańskcode dojo
DELIBERATE PRACTICE
practice must:
be focussed
be goal-directed
stretch your abilities
give continuous feedback
be followed by self-reflection
@sleepyfox
17/06/13 Gdańskcode dojo
DREYFUS MODEL OF SKILL ACQUISITION
Novice
Advanced beginner
Proficient
Competent
Expert
flickr.com/kaibara/1449448184/
型
KAta
17/06/13 Gdańskcode dojo
“FORM”
CODE KATA
17/06/13 Gdańskcode dojo
Dave ThomAs
17/06/13 Gdańskcode dojo
CODE KATA
Time to improve skills
Focus on process, not results
Practice
Repetition
TDD
17/06/13 Gdańskcode dojo
CODE KATA
uninterrupted
challenging
No Pressure
Mistakes are good
Small steps
17/06/13 Gdańskcode dojo
KATA IDEAS
String Calculator
Code breaker
Argument Parser
Bowling Game
Number Names
Fizz Buzz
17/06/13 Gdańskcode dojo
KATA IDEAS
http://codekata.pragprog.com/
codekata/
http://www.wiredtothemoon.com/
2012/12/12-tdds-of-christmas/
TEST DRIVEN
DEVELOPMENT
17/06/13 Gdańskcode dojo
17/06/13 Gdańskcode dojo
TDD CYCLE
RED
GREENREFACTOR
17/06/13 Gdańskcode dojo
3 LAWS OF TDD
1.Don’t write any code unless you are
making a failing test pass
2.Don’t add to the test more than enough
to get a failure
3.Only write enough code to make the one
failing test pass
17/06/13 Gdańskcode dojo
4 RULES OF SIMPLE DESING
1.All the tests pass.
2.Express every idea we need to express.
3.Contains no duplication.
4.minimize the number of classes,
methods and other moving parts.
PAIR PROGRAMMING
17/06/13 Gdańskcode dojo
17/06/13 Gdańskcode dojo
PAIR PROGRAMMING
Navigator
&
Observer
17/06/13 Gdańskcode dojo
PAIR PROGRAMMING
Knowledge Flow
Reduction of defects
Better design
improved discipline
Better Time management
Confidence
17/06/13 Gdańskcode dojo
TDD PING PONG
First Person writes a test
Second writes an implementation
both refactor
Second Person writes next test
Iterate
BE ORGANISED
17/06/13 Gdańskcode dojo
17/06/13 Gdańskcode dojo
CODE CLUB
Choose your kata
Set session time // 3*20 minutes
Pair programming
Delete code after each session
Swap with Partner
17/06/13 Gdańskcode dojo
CODE RETREAT
Day-Long session // 4*1 hour
Discuss what happened
Problem is more complex
Example: Game-of-life
17/06/13 Gdańskcode dojo
CODE DOJO
Choose your kata
ONE Projector
ONE IDE
ONe Pair
Sensei Guides the session
Learn from the group
Swap every N-Minutes
TOOLS MATTER
17/06/13 Gdańskcode dojo
17/06/13 Gdańskcode dojo
TOOLS MATTER
Language
IDE
Testing Framework
Mocking Framework
Refactoring tools
17/06/13 Gdańskcode dojo
TOOLS MATTER
BUT CHALLENGE YOURSELF
AND TRY SOMETHING NEW
17/06/13 Gdańskcode dojo
KATA CONSTRAINTS
Method length limit
No Mouse
No loops
No If/else/switch statements
Refactor at least 3 times
No state
“It's not practice that
makes it perfect. It's
perfect practice”
17/06/13 Gdańskcode dojo
17/06/13 Gdańskcode dojo
Questions?
17/06/13 Gdańskcode dojo
WE ARE HIRING!
Software Engineer
Front-end Engineer
Software Engineer in test
PRoject manager
Business analyst
www.sensiolabs.co.uk
www.inviqa.com
THANK YOU!
@cakper

Code Dojo