SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
Getting Better
through practice
Athletes train
•

Train Every Day

•

Keep Eye on the Prize

•

Be specific in training

•

Fuel body for peak performance

•

Know when to rest

•

Have perfect form
http://exercise.about.com/od/healthinjuries/a/olympictraining.htm
Musicians Train
•

Continuous improvement is a fundamental part
of the job and of the performer.

•

Many musicians continue to pay for their own
lessons to further develop their skills.

http://www.prospects.ac.uk/musician_training.htm!
Your Career is your
Responsibility
<start channelling UncleBob>

It’s not your employers responsibility

says Uncle Bob
book: The Clean Coder
Not Your Company’s
Responsibility To
!

•
•
•

buy books
send you to conferences
subscriptions ( CodeSchool, PluralSite, TreeHouse )

!
!

Take Responsibility for your own career!

</end channelling UncleBob>
Ways to Practice
•

reading a book

•

watch videos at confreaks / youtube

•

going to and/or speaking to user group

•

mentor someone
Practice with Katas
•

Kata is a simple programing problem

•

Goal is to train your fingers and brain
!

•

Pick one to work on every day for a week, ok
maybe at least 3 days :)

•

Uncle Bob does one in morning and at night
Variations
•

Practice with new languages

•

editors (VI, Emacs, Textmate, Sublime, Atom,
Light Table)

•

practice keyboard shortcuts (shortcutfoo.com)

•

test libraries (rspec, minitest/spec, test unit)

•

styles (Functional, TDD, London Style, etc)
Functional
•

recursion, lists, reduce, map

•

Tom Stuart video

•

https://skillsmatter.com/skillscasts/1101enumerators
Traditional TDD

http://ryantablada.com/post/red-green-refactor---a-tdd-fairytale
Write all the tests
•

rapid fire, just write out every test you could think
of as it statements

•

keep them in pending state

•

pass them one by one

•

fiveruns gem is a great way to look at test
output, spec —documentation is also great
Write it out on paper
•

stepping away from the keyboard

•

list every possible way

•

sketch it or psuedo code

•

then code it!
London-Style TDD
•

Developed in London by early adopters of of Extreme
Programming

•

Mock Everything

•

Test relationships

•

Naysayers say using mocks is crutch for bad design

•

Good video from Gary Bernhardt
https://www.youtube.com/watch?v=tdNnN5yTIeM
Nola’s interpretation
•

I’ve seen mocks use badly.

•

Very Badly.

•

Great to “skip” certain parts of the problem, as a
temporary measure.

•

Great to “skip” making expensive API calls

•

Just depends what part your tests are focused on

#facepalm
shocking white slide
of code next!!
Example of London Style
class Calc!
end!

describe Calc do
before do
@c = Calc.new
end

!

!

it "should be a class" do
@c.should be_an_instance_of(Calc)
end
it "should accept a string" do
@c.should_receive(:add).with("1").and_return(1)
expect(@c.add("1")).to be 1
end

it "should accept a string with 2 numbers" do
@c.should_receive(:add).with("1,2,3").and_return(6)
expect(@c.add("1,2,3")).to be 6
end
end
Example
class Calc!
def add(input)!
return 0 if input.empty?!
numbers = input.split(/[,n]/)!
numbers.map!(&:to_i)!
sum = 0!
numbers.each do |num|!
sum += num!
end!
sum!
end!
end!
!
Example
describe Calc do
before do
@c = Calc.new
end

!

!

it "should be a class" do
@c.should be_an_instance_of(Calc)
end
it "should accept a string" do
@c.should_receive(:add).with("1").and_return(1)
expect(@c.add("1")).to be 1
end

it "should accept a string with 2 numbers" do
@c.should_receive(:add).with("1,2,3").and_return(6)
expect(@c.add("1,2,3")).to be 6
end
end
The Coding Dojo Book

!

•
•

group “Dojo” and how to lead a group
Has 23 katas with variations

http://www.kataclub.com is inspired by this book
I am attempting to index all the Katas I know about there!
Katas as a Group
•

Styles for groups:
•

working in pairs

•

look-at-me-coding

•

whole-group
Randori - a Group Format
•

Code is project with one computer

•

Everyone codes

•

Taking turns

•

Whiteboards to explain problem
•

if you have keyboard:
•

you decide what to type

•

or you ask for ideas

Weitere ähnliche Inhalte

Andere mochten auch

международные конвенции и договоры об интеллектуальной собственности
международные конвенции и договоры об интеллектуальной собственностимеждународные конвенции и договоры об интеллектуальной собственности
международные конвенции и договоры об интеллектуальной собственности
areginalnaia
 

Andere mochten auch (16)

Women Who Code Functional Programming - 9/26/2016
Women Who Code   Functional Programming - 9/26/2016Women Who Code   Functional Programming - 9/26/2016
Women Who Code Functional Programming - 9/26/2016
 
международные конвенции и договоры об интеллектуальной собственности
международные конвенции и договоры об интеллектуальной собственностимеждународные конвенции и договоры об интеллектуальной собственности
международные конвенции и договоры об интеллектуальной собственности
 
Jekyll and MrBlog
Jekyll and MrBlogJekyll and MrBlog
Jekyll and MrBlog
 
Ruby Data Types and Data Structures
Ruby Data Types and Data StructuresRuby Data Types and Data Structures
Ruby Data Types and Data Structures
 
All girlhacknight intro to rails
All girlhacknight intro to railsAll girlhacknight intro to rails
All girlhacknight intro to rails
 
Presenters
PresentersPresenters
Presenters
 
Intro to Clojure 4 Developers
Intro to Clojure 4 DevelopersIntro to Clojure 4 Developers
Intro to Clojure 4 Developers
 
Intro to Clojure lightningtalk
Intro to Clojure lightningtalkIntro to Clojure lightningtalk
Intro to Clojure lightningtalk
 
Beginning Clojure at AustinClojure Meetup
Beginning Clojure at AustinClojure MeetupBeginning Clojure at AustinClojure Meetup
Beginning Clojure at AustinClojure Meetup
 
Ruby101
Ruby101Ruby101
Ruby101
 
Manjemen produksi dan operasi
Manjemen produksi dan operasiManjemen produksi dan operasi
Manjemen produksi dan operasi
 
Dart: Another Tool in the Toolbox
Dart: Another Tool in the ToolboxDart: Another Tool in the Toolbox
Dart: Another Tool in the Toolbox
 
EKONOMI & MANAJEMEN AGRIBISNIS
EKONOMI & MANAJEMEN AGRIBISNISEKONOMI & MANAJEMEN AGRIBISNIS
EKONOMI & MANAJEMEN AGRIBISNIS
 
How to Run a ClojureBridge Workshop
How to Run a ClojureBridge WorkshopHow to Run a ClojureBridge Workshop
How to Run a ClojureBridge Workshop
 
Euptoieta claudia hortensia
Euptoieta claudia hortensiaEuptoieta claudia hortensia
Euptoieta claudia hortensia
 
Pseudoscada erruca
Pseudoscada errucaPseudoscada erruca
Pseudoscada erruca
 

Ähnlich wie Getting better through Katas

Exploratory Testing with the Team_ATDNL
Exploratory Testing with the Team_ATDNLExploratory Testing with the Team_ATDNL
Exploratory Testing with the Team_ATDNL
Maaike Brinkhof
 
Good programming practices updated
Good programming practices updatedGood programming practices updated
Good programming practices updated
Agha Dostain
 

Ähnlich wie Getting better through Katas (20)

Bug Hunting Safari
Bug Hunting SafariBug Hunting Safari
Bug Hunting Safari
 
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)
 
CPP01 - Introduction to C++
CPP01 - Introduction to C++CPP01 - Introduction to C++
CPP01 - Introduction to C++
 
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
 
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
 
Exploratory Testing with the Team_ATDNL
Exploratory Testing with the Team_ATDNLExploratory Testing with the Team_ATDNL
Exploratory Testing with the Team_ATDNL
 
eXtreme Programming
eXtreme ProgrammingeXtreme Programming
eXtreme Programming
 
Untangling - fall2017 - week 7
Untangling - fall2017 - week 7Untangling - fall2017 - week 7
Untangling - fall2017 - week 7
 
How engineering practices help business
How engineering practices help businessHow engineering practices help business
How engineering practices help business
 
Technical Excellence Doesn't Just Happen--Igniting a Craftsmanship Culture
Technical Excellence Doesn't Just Happen--Igniting a Craftsmanship CultureTechnical Excellence Doesn't Just Happen--Igniting a Craftsmanship Culture
Technical Excellence Doesn't Just Happen--Igniting a Craftsmanship Culture
 
As media studies lesson 1
As media studies   lesson 1As media studies   lesson 1
As media studies lesson 1
 
TDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech WeekTDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech Week
 
Being a designer
Being a designerBeing a designer
Being a designer
 
Choosing a Simple 3D Printing and Arduino Project for Maximum Learning
Choosing a Simple 3D Printing and Arduino Project for Maximum LearningChoosing a Simple 3D Printing and Arduino Project for Maximum Learning
Choosing a Simple 3D Printing and Arduino Project for Maximum Learning
 
Practical engineering
Practical engineeringPractical engineering
Practical engineering
 
Hacker News Meetup April 2014
Hacker News Meetup April 2014Hacker News Meetup April 2014
Hacker News Meetup April 2014
 
Good programming practices updated
Good programming practices updatedGood programming practices updated
Good programming practices updated
 
Creating change from within - Agile Practitioners 2012
Creating change from within - Agile Practitioners 2012Creating change from within - Agile Practitioners 2012
Creating change from within - Agile Practitioners 2012
 
Confessions of a Senior Mind
Confessions of a Senior MindConfessions of a Senior Mind
Confessions of a Senior Mind
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Getting better through Katas

  • 2. Athletes train • Train Every Day • Keep Eye on the Prize • Be specific in training • Fuel body for peak performance • Know when to rest • Have perfect form http://exercise.about.com/od/healthinjuries/a/olympictraining.htm
  • 3. Musicians Train • Continuous improvement is a fundamental part of the job and of the performer. • Many musicians continue to pay for their own lessons to further develop their skills. http://www.prospects.ac.uk/musician_training.htm!
  • 4. Your Career is your Responsibility <start channelling UncleBob> It’s not your employers responsibility says Uncle Bob book: The Clean Coder
  • 5. Not Your Company’s Responsibility To ! • • • buy books send you to conferences subscriptions ( CodeSchool, PluralSite, TreeHouse ) ! ! Take Responsibility for your own career! </end channelling UncleBob>
  • 6. Ways to Practice • reading a book • watch videos at confreaks / youtube • going to and/or speaking to user group • mentor someone
  • 7. Practice with Katas • Kata is a simple programing problem • Goal is to train your fingers and brain ! • Pick one to work on every day for a week, ok maybe at least 3 days :) • Uncle Bob does one in morning and at night
  • 8. Variations • Practice with new languages • editors (VI, Emacs, Textmate, Sublime, Atom, Light Table) • practice keyboard shortcuts (shortcutfoo.com) • test libraries (rspec, minitest/spec, test unit) • styles (Functional, TDD, London Style, etc)
  • 9. Functional • recursion, lists, reduce, map • Tom Stuart video • https://skillsmatter.com/skillscasts/1101enumerators
  • 11. Write all the tests • rapid fire, just write out every test you could think of as it statements • keep them in pending state • pass them one by one • fiveruns gem is a great way to look at test output, spec —documentation is also great
  • 12. Write it out on paper • stepping away from the keyboard • list every possible way • sketch it or psuedo code • then code it!
  • 13. London-Style TDD • Developed in London by early adopters of of Extreme Programming • Mock Everything • Test relationships • Naysayers say using mocks is crutch for bad design • Good video from Gary Bernhardt https://www.youtube.com/watch?v=tdNnN5yTIeM
  • 14. Nola’s interpretation • I’ve seen mocks use badly. • Very Badly. • Great to “skip” certain parts of the problem, as a temporary measure. • Great to “skip” making expensive API calls • Just depends what part your tests are focused on #facepalm
  • 15. shocking white slide of code next!!
  • 16. Example of London Style class Calc! end! describe Calc do before do @c = Calc.new end ! ! it "should be a class" do @c.should be_an_instance_of(Calc) end it "should accept a string" do @c.should_receive(:add).with("1").and_return(1) expect(@c.add("1")).to be 1 end it "should accept a string with 2 numbers" do @c.should_receive(:add).with("1,2,3").and_return(6) expect(@c.add("1,2,3")).to be 6 end end
  • 17. Example class Calc! def add(input)! return 0 if input.empty?! numbers = input.split(/[,n]/)! numbers.map!(&:to_i)! sum = 0! numbers.each do |num|! sum += num! end! sum! end! end! !
  • 18. Example describe Calc do before do @c = Calc.new end ! ! it "should be a class" do @c.should be_an_instance_of(Calc) end it "should accept a string" do @c.should_receive(:add).with("1").and_return(1) expect(@c.add("1")).to be 1 end it "should accept a string with 2 numbers" do @c.should_receive(:add).with("1,2,3").and_return(6) expect(@c.add("1,2,3")).to be 6 end end
  • 19. The Coding Dojo Book ! • • group “Dojo” and how to lead a group Has 23 katas with variations http://www.kataclub.com is inspired by this book I am attempting to index all the Katas I know about there!
  • 20. Katas as a Group • Styles for groups: • working in pairs • look-at-me-coding • whole-group
  • 21. Randori - a Group Format • Code is project with one computer • Everyone codes • Taking turns • Whiteboards to explain problem • if you have keyboard: • you decide what to type • or you ask for ideas