際際滷

際際滷Share a Scribd company logo
Code Kata




Giordano Scalzo
Who is a programmer?
A step towards management...
...or point of no return!
NO!
Classical Ages of Computer Programming
Dark Ages of Computer Programming
Renaissance of Computer Programming
A real profession
The Way of the carpenter is to become
pro鍖cient in the use of his tools,
鍖rst to lay his plans with a true measure and
then perform his work according to plan.

                -Go Rin No Sho
SW Craftsman Tools: Languages
SW Craftsman Tools: Tdd



Test-driven development (TDD) is a
software development technique that relies
on the repetition of a very short development
cycle




                                     http://en.wikipedia.org/wiki/Test-driven_development
Tdd




first the developer writes a failing automated
test case that defines a desired improvement
or new function




                                 http://en.wikipedia.org/wiki/Test-driven_development
Tdd




then produces code to pass that test




                            http://en.wikipedia.org/wiki/Test-driven_development
Tdd




and finally refactors the new code to
acceptable standard




                            http://en.wikipedia.org/wiki/Test-driven_development
Tdd cycle
Tdd cycle
Tdd cycle
Tdd cycle
Tdd cycle
Tdd cycle
Tdd cycle
Tdd cycle
Tdd cycle
Tdd cycle
Tdd cycle




Got it!
Tdd cycle




Easy, isnt it?
Tdd cycle




No, at all! :-(
SW Craftsman Tools: Split stories




     Business problem
SW Craftsman Tools: Split stories




        Presentation


       Business logic


        Persistence
SW Craftsman Tools: Split stories

     Ft1    Ft2         Ftn

        Presentation


       Business logic


        Persistence
SW Craftsman Tools: Editors
When improve
   them?
Work != Practice
Code kata
Code kata




Kata (    or    literally: "form") is a Japanese
word describing detailed choreographed
patterns of movements practised either solo
or in pairs.
Code kata




Practice on small exercise
Code kata




30 minutes to an hour long
Code kata styles


Prag Dave Thomas
Simple Problems
Many correct solutions
Different each time
Learn by experimentation
Code kata styles


Uncle Bob Martin
Copy a Master
Follow forms precisely
Learn by Repetition
Aim for perfect performance
Performance!
Kata 9: Back to Checkout
 http://codekata.pragprog.com/2007/01/kata_nine_back_.html




    Item   Unit      Special
           Price     Price
    --------------------------
      A     50       3 for 130
      B     30       2 for 45
      C     20
      D     15
total with no special offers

it "is zero when nothing is scanned"
it "is 50 when A is scanned"
it "is 80 when AB is scanned"
it "is 115 when CDBA is scanned"
total when A is on special offer

   it "is 130 when AAA is scanned"
   it "is 180 when AAAA is scanned"
   it "is 260 when AAAAAA is scanned"
total when A and B are both in
special offer

  it "is 175 when AAABB is scanned"
Resources
http://codekata.pragprog.com
http://codingkata.org
http://www.katacasts.org
http://www.coderloop.com
http://www.vimgolf.com
Randori
Code Retreat
Its your turn!
giordano.scalzo@cleancode.it
@giordanoscalzo
www.slideshare.net/giordano
github.com/gscalzo
Ad

Recommended

Coding Dojo
Coding Dojo
Caike Souza
Coding Dojo In 5 minutes
Coding Dojo In 5 minutes
Wouter Lagerweij
Deliberate Practice (2014)
Deliberate Practice (2014)
Peter Kofler
覯讌 startlink.live: ロ譴 (hongjun7) - Teamwork in Programming Contests
覯讌 startlink.live: ロ譴 (hongjun7) - Teamwork in Programming Contests
Startlink
TDD and Simple Design Workshop - Session 1 - November 2018
TDD and Simple Design Workshop - Session 1 - November 2018
Paulo Clavijo
Talking about craftsmanship with ensaimadas and katas
Talking about craftsmanship with ensaimadas and katas
Rachel M. Carmena
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
Rachel M. Carmena
Programming in HTML5 with JavaScript and CSS3
Programming in HTML5 with JavaScript and CSS3
Ali Fallahi
JavaScript Speech Recognition
JavaScript Speech Recognition
FITC
Innoveo coding dojo
Innoveo coding dojo
Tech Head Brothers
Lesson 1
Lesson 1
Dr. Rupinder Singh
Class 4 IPO and Intro to Ruby
Class 4 IPO and Intro to Ruby
Stephen Parsons
Comefrom
Comefrom
Siddharth Shukla
Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)
Peter Kofler
Designing Test Cases for the Gilded Rose Kata v2 (2015)
Designing Test Cases for the Gilded Rose Kata v2 (2015)
Peter Kofler
Coding Dojo: Bank OCR Outside-In (2015)
Coding Dojo: Bank OCR Outside-In (2015)
Peter Kofler
AgilePT2012 PGMADS
AgilePT2012 PGMADS
Catarina Reis
Designing Test Cases for the Gilded Rose Kata (2013)
Designing Test Cases for the Gilded Rose Kata (2013)
Peter Kofler
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)
Babul Mirdha
Kata String Calculator
Kata String Calculator
Software Craftsmanship Alicante
Kanban for Software Development and Kaizen Culture
Kanban for Software Development and Kaizen Culture
Acquate
Introduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debugger
Naoto Ono
S坦 Os Imaturos N達O Testam
S坦 Os Imaturos N達O Testam
Carlos Brando
Writing Performant Front-end Code
Writing Performant Front-end Code
Lyubomir Bozhinov
TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012
Pietro Di Bello
Test Driven Development
Test Driven Development
Valerio Maggio
TDD and Getting Paid
TDD and Getting Paid
Rowan Merewood
Code Review
Code Review
rantav
Day1 - TDD (Lecture SS 2015)
Day1 - TDD (Lecture SS 2015)
wolframkriesing
Unit Testing like a Pro - The Circle of Purity
Unit Testing like a Pro - The Circle of Purity
Victor Rentea

More Related Content

What's hot (10)

JavaScript Speech Recognition
JavaScript Speech Recognition
FITC
Innoveo coding dojo
Innoveo coding dojo
Tech Head Brothers
Lesson 1
Lesson 1
Dr. Rupinder Singh
Class 4 IPO and Intro to Ruby
Class 4 IPO and Intro to Ruby
Stephen Parsons
Comefrom
Comefrom
Siddharth Shukla
Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)
Peter Kofler
Designing Test Cases for the Gilded Rose Kata v2 (2015)
Designing Test Cases for the Gilded Rose Kata v2 (2015)
Peter Kofler
Coding Dojo: Bank OCR Outside-In (2015)
Coding Dojo: Bank OCR Outside-In (2015)
Peter Kofler
AgilePT2012 PGMADS
AgilePT2012 PGMADS
Catarina Reis
Designing Test Cases for the Gilded Rose Kata (2013)
Designing Test Cases for the Gilded Rose Kata (2013)
Peter Kofler
JavaScript Speech Recognition
JavaScript Speech Recognition
FITC
Class 4 IPO and Intro to Ruby
Class 4 IPO and Intro to Ruby
Stephen Parsons
Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)
Peter Kofler
Designing Test Cases for the Gilded Rose Kata v2 (2015)
Designing Test Cases for the Gilded Rose Kata v2 (2015)
Peter Kofler
Coding Dojo: Bank OCR Outside-In (2015)
Coding Dojo: Bank OCR Outside-In (2015)
Peter Kofler
AgilePT2012 PGMADS
AgilePT2012 PGMADS
Catarina Reis
Designing Test Cases for the Gilded Rose Kata (2013)
Designing Test Cases for the Gilded Rose Kata (2013)
Peter Kofler

Similar to Code kata (20)

Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)
Babul Mirdha
Kata String Calculator
Kata String Calculator
Software Craftsmanship Alicante
Kanban for Software Development and Kaizen Culture
Kanban for Software Development and Kaizen Culture
Acquate
Introduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debugger
Naoto Ono
S坦 Os Imaturos N達O Testam
S坦 Os Imaturos N達O Testam
Carlos Brando
Writing Performant Front-end Code
Writing Performant Front-end Code
Lyubomir Bozhinov
TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012
Pietro Di Bello
Test Driven Development
Test Driven Development
Valerio Maggio
TDD and Getting Paid
TDD and Getting Paid
Rowan Merewood
Code Review
Code Review
rantav
Day1 - TDD (Lecture SS 2015)
Day1 - TDD (Lecture SS 2015)
wolframkriesing
Unit Testing like a Pro - The Circle of Purity
Unit Testing like a Pro - The Circle of Purity
Victor Rentea
Developers mDay u Banjoj Luci - Milan Popovi, PHP Srbija Testimony (about...
Developers mDay u Banjoj Luci - Milan Popovi, PHP Srbija Testimony (about...
mCloud
Xp days ukraine 2012
Xp days ukraine 2012
Wiktor 纏onowski
Test Driven Development
Test Driven Development
jakubkoci
TDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDD
David Rodenas
Bdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propri
Commit University
TDD in Python With Pytest
TDD in Python With Pytest
Eddy Reyes
It's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspec
Giulio De Donato
CD in Machine Learning Systems
CD in Machine Learning Systems
Thoughtworks
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)
Babul Mirdha
Kanban for Software Development and Kaizen Culture
Kanban for Software Development and Kaizen Culture
Acquate
Introduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debugger
Naoto Ono
S坦 Os Imaturos N達O Testam
S坦 Os Imaturos N達O Testam
Carlos Brando
Writing Performant Front-end Code
Writing Performant Front-end Code
Lyubomir Bozhinov
TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012
Pietro Di Bello
Test Driven Development
Test Driven Development
Valerio Maggio
TDD and Getting Paid
TDD and Getting Paid
Rowan Merewood
Code Review
Code Review
rantav
Day1 - TDD (Lecture SS 2015)
Day1 - TDD (Lecture SS 2015)
wolframkriesing
Unit Testing like a Pro - The Circle of Purity
Unit Testing like a Pro - The Circle of Purity
Victor Rentea
Developers mDay u Banjoj Luci - Milan Popovi, PHP Srbija Testimony (about...
Developers mDay u Banjoj Luci - Milan Popovi, PHP Srbija Testimony (about...
mCloud
Test Driven Development
Test Driven Development
jakubkoci
TDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDD
David Rodenas
Bdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propri
Commit University
TDD in Python With Pytest
TDD in Python With Pytest
Eddy Reyes
It's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspec
Giulio De Donato
CD in Machine Learning Systems
CD in Machine Learning Systems
Thoughtworks
Ad

More from Giordano Scalzo (14)

The Joy Of Server Side Swift Development
The Joy Of Server Side Swift Development
Giordano Scalzo
How to Clone Flappy Bird in Swift
How to Clone Flappy Bird in Swift
Giordano Scalzo
A swift introduction to Swift
A swift introduction to Swift
Giordano Scalzo
Better Software: introduction to good code
Better Software: introduction to good code
Giordano Scalzo
Tame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapper
Giordano Scalzo
JavaScript Survival Guide
JavaScript Survival Guide
Giordano Scalzo
JavaScript Patterns
JavaScript Patterns
Giordano Scalzo
Tdd iPhone For Dummies
Tdd iPhone For Dummies
Giordano Scalzo
Better Software Developers
Better Software Developers
Giordano Scalzo
Agile Iphone Development
Agile Iphone Development
Giordano Scalzo
XpUg Coding Dojo: KataYahtzee in Ocp way
XpUg Coding Dojo: KataYahtzee in Ocp way
Giordano Scalzo
Bdd: Tdd and beyond the infinite
Bdd: Tdd and beyond the infinite
Giordano Scalzo
10 minutes of me: Giordano Scalzo's Visual Resume
10 minutes of me: Giordano Scalzo's Visual Resume
Giordano Scalzo
Scrum in an hour
Scrum in an hour
Giordano Scalzo
The Joy Of Server Side Swift Development
The Joy Of Server Side Swift Development
Giordano Scalzo
How to Clone Flappy Bird in Swift
How to Clone Flappy Bird in Swift
Giordano Scalzo
A swift introduction to Swift
A swift introduction to Swift
Giordano Scalzo
Better Software: introduction to good code
Better Software: introduction to good code
Giordano Scalzo
Tame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapper
Giordano Scalzo
JavaScript Survival Guide
JavaScript Survival Guide
Giordano Scalzo
Tdd iPhone For Dummies
Tdd iPhone For Dummies
Giordano Scalzo
Better Software Developers
Better Software Developers
Giordano Scalzo
Agile Iphone Development
Agile Iphone Development
Giordano Scalzo
XpUg Coding Dojo: KataYahtzee in Ocp way
XpUg Coding Dojo: KataYahtzee in Ocp way
Giordano Scalzo
Bdd: Tdd and beyond the infinite
Bdd: Tdd and beyond the infinite
Giordano Scalzo
10 minutes of me: Giordano Scalzo's Visual Resume
10 minutes of me: Giordano Scalzo's Visual Resume
Giordano Scalzo
Ad

Code kata