KEMBAR78
Experience Agile Programming | PPTX
Experience Agile Programming
Йоханнес Бродвалл        Featuring:
Стерия Норвегия          Boris Staal
Experience Agile
  Programming
              Software People 2012, Moscow
     Йоханнес Бродвалл, Just-a-programmer
                          Стерия Норвегия

                             @jhannes
Goal
         • To have fun now!
• For you to have fun now!
 • For you to have fun later
               (stretch goal)
Agenda
                  • Description
•Demonstration with Boris Staal
                  • Discussion
              • Tips and tricks
Please:
 • Talk about what you see to the person
                    next to you (whisper)
•Tweet to @jhannes and @_inossidabile
                   in English or Russian
Description
Kata: Minesweeper
Given:
var minefield = new Minefield([
              "....",
              ".*..",
              ".*.*",
              "...*“ ])
What do watch for
                  • How we interact
• How we progress through the code
                   • How we design
         • How we use the language
Demonstration
 (Featuring Boris Staal)
What did you see?
What did you see?
• How often did we switch ”driver”?
                • Effects of pairing?
    • What did the ”non-driver” do?
What did you see?
     • Was the step size right?
      • What was the first test?
• How did we decide next test?
     • What was the final test?
What did you see?
                 • Language tricks?
• Did we refactor the right amount?
      • How long was the code red?
          • Strengths in final design
        •Weaknesses in final design
Why become better at
      programming?
Seriously. Why?
Only 13.37% of effort
Getting better quality
Getting better quality
             Correctness
           Maintainability
But more importantly!
Think better
Think better
Raise your level of abstraction
What to practice
Test the contract
Test the contract
                 API
         Not behavior
Test from outside-in
Practice pair
programming
Ping pong
Failing test

               Write code


               Failing test

Write code


Failing test
Failing test

                            Write code
                      Refactor code
                        and tests
                            Failing test
Write code
      Refactor code
        and tests
Failing test
Johannes               Dmytro




Dmitro                                   Sergey




                    Volodymyr
Johannes               Boris




Dmitro                                  Sergey




                    Volodymyr
Johannes               Boris




Dmitro                                  Sergey




                    Volodymyr
All-green refactoring
All-green refactoring
  Reduce the time of uncertainty
How to practice
Practice
Practice at work
  Practice katas
Practice in dojos
Moscow Coding
        Dojo?
Moscow Coding Dojo
       (tweet @jhannes)
Conclusion
Conclusion
 Free your mind
Free your mind
    Practice our art
Thank you
  johannes.brodwall@steria.no

  http://johannesbrodwall.com

      http://twitter.com/jhannes
   (Please tweet in Cyrillic with
              english-like words)

Experience Agile Programming

Editor's Notes

  • #9 Note to translator: I willexplainthe game of minesweeper whileshowingthis slide.The game initiallypresents a fieldwheretherearehidden minesWhentheplayerclickson a cell, eitherhe «steps» on a mine or he reveals thecellIf he «stepson a mine», the game is over, player losesIf he reveals thecell, thecelltellshowmany mines arenext to it
  • #10 Note to translator: I willexplainthe game of minesweeper whileshowingthis slide.The game initiallypresents a fieldwheretherearehidden minesWhentheplayerclickson a cell, eitherhe «steps» on a mine or he reveals thecellIf he «stepson a mine», the game is over, player losesIf he reveals thecell, thecelltellshowmany mines arenext to it
  • #11 Note to translator:Here I willexplaintheworkingofthe program wewillcreate:Given a definitionof a minefieldwith mines as stars and non-mines as periods, the program should output the hints for eachcell (as in theprevious screen shot)«If you’re not familiarwith mine sweeper, youcan just ask a project manager»
  • #14 Note to translator: Here, Iwill ask the English speakingmembersoftheaudience to give feedback onwhattheysaw. I will hand outchocolates to those to answer. 
  • #29 Note to translator: If there’s not toomany questions beforethis, I willdemonstratethiscodewith in Eclipse, ratherthan talk about it.
  • #31 Note to translator: If there’s not toomany questions beforethis, I willdemonstratethiscodewith in Eclipse, ratherthan talk about it.
  • #34 Note to translator: Here, I willexplainhow pair programmingcanwork in practice:One person writes a failing test and theother person writesthecode to make it pass. Thenthe person whomadethe test pass writesthenext test.In theexamplewithme and Boris, weswitched «drivers» (the person at thekeyboard) aboutonce a minute. On real lifeproject, I usuallyexperiencethatweswitch drivers everytenminutes or so.It’s alsoimportant to refactorbetween tests. I like to onlyrefactorwhenthecode is green. This way I knowthatthecodedoesn’t stop working. Therearetwoways to thinkaboutthis:Either, ifyoucan, refactorthecode and the tests a little to «getready» for thenext testOr, ifyouseethatyoucan’t make the test pass, commentout (or @Ignore) the test and refactoron green.
  • #36 Note to translator:Here I willexplain a «pair programming star».If the team feels it wouldbenefit from more programmers pair programmingwitheachother, youcancreate a «pair programming star».First, writethenamesofeach team member in a circleWhensomeone pair program withsomeoneelse, put a line betweentheirnamesThe resulting «star» can be used to reflectonyour team. It’s not necessarily a bad thingthat Sergey and Dmitro program together a lot, butit’sworthnoting
  • #39 Note to translator: I may show a practical demo here, iftheaudiencewants it
  • #43 Note to translator: On thefollowing screenshots, therearepictures from Oslo CodingDojo and Kiev CodingDojo. I willexplain (eachbulletpointononeofthefollowing slides):WemeetaboutonceeverymonthWeusuallymeet in a pub and program around a projector (withbeer!)We have also done a Code Retreat, where 24 peoplesetaside a full Saturday to practicecoding. «During theweek, youcode for money. Today, youcode for you»After I gave this talk in Kiev, AlekseySolntsev and othersorganized Kiev codingdojoAnyvolunteers to organize a CodingDojo in Moscow?