Getting better through Katas

50 %
50 %
Information about Getting better through Katas

Published on March 4, 2014

Author: rubygeek



Inspired by the Coding Dojo book and Uncle Bob Martin, I wrote this talk to inspire you to invest into your own career by practicing katas. This is a slide deck I intended to give at AustinRB group but due to mother nature I presented online at Google Hangouts followed by a demonstration of the string kata.

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

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.!

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 ( • test libraries (rspec, minitest/spec, test unit) • styles (Functional, TDD, London Style, etc)

Functional • recursion, lists, reduce, map • Tom Stuart video •

Traditional TDD

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

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 = 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]/)!!(&:to_i)! sum = 0! numbers.each do |num|! sum += num! end! sum! end! end! !

Example describe Calc do before do @c = 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 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

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

Katas | LinkedIn

View 665 Katas posts, presentations, experts, and more. Get the professional knowledge you need on LinkedIn.
Read more

The Improvement Kata - U-M Personal World Wide Web Server

The Improvement Kata is for the Learner. The Coaching Kata is for the Coach. To make the scientific Improvement Kata pattern part of how an organization does
Read more

GUIDELINES FOR PRACTICING - U-M Personal World Wide Web Server

periodic feeling that one is getting better ... through applying the Improvement Kata ... Kata Handbook Guidelines for Practicing 44
Read more

Where can I find real code katas? - Quora

Where can I find real code katas? Frequently asked in. Update Cancel. 1 Answer. ... That is the core idea of a coding kata: getting better through practice.
Read more

Code Kata - DZone - DZone: Programming & DevOps news ...

For some reason this whole Code Kata ... getting better at ... once you've worked out the solution to your kata problem, you work through building it ...
Read more

GitHub - wbailey/kata: A language for describing and ... Kata . A kata is defined as an exercise in programming which helps hone your skills through practice and repetition. Authoring katas is done in ...
Read more

Code Kata : Algorithms for the masses - julian m bucknall

For some reason this whole Code Kata movement passed me by, so I'm coming late to the party, but I'm getting hooked. The term kata comes from Japanese ...
Read more

How to Learn Kata Faster | Ikigai Way | Martial Arts Blog

Tips and tricks on how to learn kata faster. It can be tough memorizing kata, and these are proven ways of learning kata fast.
Read more

5 Katas Fundamentales - Documents

Getting better through Katas. Los Katas Del Karate. KATAS SHITO RYU - Blackgord.pdf. Peforming Code Katas. Code Katas Spring 2012. Login or Join. Processing
Read more