What's your favorite Kata? 72

Posted by Brett Schuchert Tue, 30 Jun 2009 20:22:00 GMT

I’m looking to collect several katas for the OkC CoCo Dojo to make sure we have plenty of future practice sessions already in place. Ultimately I want it to be at least bi-weekly (or weekly) and self sustaining. Along those lines, I’d like to hear what are your favorite katas.

I’d prefer you mention things you’ve tried yourself. Please post links and your impressions in response to the blog. I’ll collect them here, and let me know if you’d like me to credit you with pointing me to the idea (or for the idea itself if you created it).

FWIW, after a little thinking, my favorite kata based on the number of times I’ve used it in one manner or another is Monopoly®.

Comments

Leave a response

  1. Avatar
    Philip Schwarz 1 day later:

    @Brett

    You said:

    my favorite kata based on the number of times I’ve used it in one manner or another is Monopoly®

    I followed the Monopoly hyperlink to your site and counted the number of times you say you have used this Kata (ignoring ‘some times’ and ‘a few times’), and came up with an astonishing 170+ times.

    This single figure has definitely improved my appreciation of the role that Katas can play in a professional’s work.

    Thanks for sharing the monopoly material on your site.

  2. Avatar
    Paul Holser 2 days later:

    Some suggestions:

    Given a set S of strings, decide whether a specific string t is a prefix of exactly one member of S. I found this useful in JOpt Simple, which allows abbreviations of command line switches if a switch is a unique abbreviation—so if your command line accepted -c and—cool, specifying—co would be interpreted as though you had typed—cool, whereas—c would still count as -c.

    Which reminds me: command line switch parsers might make a good kata.

    Data structures—Bloom filters, skip lists…

  3. Avatar
    Brett L. Schuchert 3 days later:
    Philip Schwarz wrote:
    This single figure has definitely improved my appreciation of the role that Katas can play in a professional’s work.

    Years ago, I was aware of the impact the Monopoly project had on my use of formal methodologies. Specifically The Fusion Method by Coleman and later the UML and UP.

    We used this problem in both language classes as well as process classes so that’s why such a large number of times for me.

    Until I wrote that page, I did not really understand how I had been using it as a Kata. That was quite of a realization for me.

    I just got off a flight from ORD -> LHR, where I worked on Monopoly again using Mockito and I found myself struggling to keep to a strict mock approach and also envision a different solution for one particular part of the problem where violating the LSP makes the problem easy to solve, but I cannot think of a “great” solution, I’m just selecting from the one that sucks the least.

    FWIW, that’s my definition of design: Select the solution that sucks the least. Somewhat modified now to include (for what I know now), with the assumption of automated test coverage…

    Glad you enjoyed it. I’m hoping to use it again in a future dojo at the OkC coco.

  4. Avatar
    Philip Schwarz 7 days later:

    @Brett

    In chapter 3 of ‘Holub on Patterns, Learning Design Patterns by Looking at Code’, Allen Holub says:

    This chapter provides an in-depth look at an implementation of John Conway’s Game of Life – probably the most widely implemented application on the planet. You’ll look at this particular program because my version applies ten distinct patterns, all jumbled together as they are in the real world. At the same time, the program isn’t so large as to be impossible to understand. ...
    ...the code in this chapter is toy code. Consequently I let myself get rather carried away with the patterns. The point of the exercise is to learn how design patterns work, however, not to write the best possible implementation of life.

    Holub has a goodies page dedicated to the game.

    It seems that quite a few people are using Life as a kata. I first came across the idea in Uncle Bob’s The Programming Dojo.

    Here is the opinion of someone at CodeRetreat:

    We have now settled on a disembowled Conway’s Game of Life Java applet, whose guts we shall test-drive, as the morning exercise. We are leaning toward being emergent about the afternoon exercise. We have two programmers (Corey and Bill) who will perform Kata/exercises for us around mid-day, and we may just as well decide to spend the afternoon elaborating one of those. Or we may go with Plan A, which is to test-drive from scratch a Ruby version of the Game of Life.
    And this chap goes as far as saying the following:
    My personal favourite is implementing the model behind Conway’s game of life.

    I had a go at coding Life a few months ago. Now I am doing it a second time using TDD: I want to see how different they turn out.

    Have you used it as a kata before?

  5. Avatar
    Philip Schwarz 7 days later:

    @Brett

    As Kirk Knoernschild says in Java Design – Objects, UML and Process:

    In The Mythical Man-Month, Frederick Brooks cites two complexities associated with software development. He categorizes them as essential complexities and accidental complexities [BROOKS95]. Essential complexities are those difficulties that are inherent in the nature of software, whereas accidental complexities are difficulties that attend the production of software but can be eliminated.
    There have been many attempts to eliminate accidental complexity. Examples of accidental complexity include a mismatch of tools or paradigms, a lack of formal methodologies or models, and awkward programming languages.

    If I do a kata with both an OO language like Java, and a functional language like Haskell, I can’t help observing that in the former, I am mostly practicing how to deal with accidental complexity, whereas in the latter I am mainly practicing how to deal with essential complexity.

    This begs the question: if I we are soon all going to be able to use functional languages in our day jobs, won’t all the skills we have acquired by doing katas in OO languages become worthless or seriously devalued?

    E.g. one of the Katas you have collected is Uncle Bob’s Bowling Game Kata.

    On the one hand, I like this Kata, and up to now it is the one I have practiced most, using Java. But some time ago I did the kata using a functional language like Haskell. If you look at the end result

    score [x, y]                             = x + y      -- Normal Frame
    score [10, x, y]                         = 10 + x + y -- Strike
    score [x, y, z]                          = 10 + z     -- Spare
    score (10:(x:(y:rest)))                  = 10 + x + y + score (x:(y:rest)) -- Strike
    score (x:(y:(z:rest)))  | (x + y) == 10  = 10 + z + score (z:rest)         -- Spare
    score (x:(y:rest))      | otherwise      = x + y + score rest              -- Normal Fram
    

    it is kind of obvious that the kata was mainly about dealing with essential complexity.

    In the Java version of the kata instead, while the end-result is relatively uncomplicated thanks to its cleanliness

    public class Game
    {
        private int currentRoll;
        private int[] rolls = new int[21];
    
        public void roll(int pins)
        {
            rolls[currentRoll++] = pins;
        }
    
        public int score()
        {
            int score = 0;
            int frameIndex = 0;
            for (int frame = 0; frame < 10; frame++)
            {
                if ( isStrike( frameIndex ) )
                {
                    score += 10 + strikeBonus(frameIndex);
                    frameIndex += 1;
                }
                else if ( isSpare( frameIndex ) )
                {
                    score += 10 + spareBonus(frameIndex);
                    frameIndex += 2;
                }
                else
                {
                    score += sumOfPinsInFrame(frameIndex);
                    frameIndex += 2;
                }
            }
            return score ;
        }
    
        private boolean isStrike(int frameIndex)
        {
            return rolls[frameIndex]==10;
        }
    
        private boolean isSpare(int frameIndex)
        {
            return (sumOfPinsInFrame(frameIndex)) == 10;
        }
    
        private int strikeBonus(int frameIndex)
        {
            return rolls[frameIndex+1] + rolls[frameIndex+2];
        }
    
        private int spareBonus(int frameIndex)
        {
            return rolls[frameIndex+2];
        }
    
        private int sumOfPinsInFrame(int frameIndex)
        {
            return rolls[frameIndex] + rolls[frameIndex+1];
        }
    }
    

    at some points in the TDD journey from first failing test to end-result, the code morphs into something quite ugly (see slides titled ‘Fourth Test’ in Uncle Bob’s Powepoint Presentation) whose complexity is accidental in that it stems from the fact that we are using an imperative language which requires us to tell the computer HOW to compute the score by manipulating state, rather than telling it WHAT to compute using side-effect free functions, like in Haskell.

    What do you think? Do you ever think that some of the refactoring we do in imperative language katas is a bit pointless?

  6. Avatar
    ??? ???? 7 days later:

    ? ? ?? ???

  7. Avatar
    Thomas Nilsson 9 days later:

    Have a look at http://www.codingdojo.org where some of us have been collection our own experiences.

  8. Avatar
    ed hardy 3 months later:

    Good post….thanks for sharing.. very useful for me i will bookmark this for my future needed. thanks for a great source.

  9. Avatar
    Mania 8 months later:

    I just love to read stuff like that

  10. Avatar
    1 9 months later:

    Right I understand what you say, I learned from you is very help me.

  11. Avatar
    FLV extractor 9 months later:

    so what ?

  12. Avatar
    han 10 months later:

    http://www.ipadvideoconverters.biz iPad Video Converter iPad Video Converter is a great software for iPad lovers to convert videos to iPad with super fast speed and high quality. Its easy-to-use interface makes iPad to videos conversion routine very simple. And also it can keep the original quality of video files.

  13. Avatar
    jingjia about 1 year later:

    MTS Converter can help you to convert mts files easily and quickly, and it is very easy to use. if you are in need, you can download it and experience by yourself.

    Main Features of MTS Converter

    • Convert AVC HD(.MTS) to all standard video formats like AVI, WMV, MPG, MOV, DVD, etc and various audio files like AAC, AC3, MP3, WAV, WMA, etc.
    • Support batch conversion, you can import more input mts files to the file playlist
    • Provide rich profiles, customize and save your profile for future use
    • Capture current pictures by click “snapshot” and save the current image to snapshot folder
    • Supports extract audio, pictures from video
    • Split one source file to several
  14. Avatar
    cheap vps about 1 year later:

    that it stems from the fact that we are using an imperative language which requires us to tell the computer HOW to compute the score by manipulating state, rather than telling it WHAT to compute using side-effect free functions, like in Haskell.

    What do you think? Do you ever think that some of the refactoring we do in imperative language katas is a bit pointless?cheap VPS

  15. Avatar
    FXG about 1 year later:

    Good post….thanks for sharing.. very useful for me i will bookmark this for my future needed.

  16. Avatar
    freakonomics about 1 year later:

    Dojo, Katas what is this?

  17. Avatar
    goodymary about 1 year later:

    Mac iPad Video Converter is iPad Video Converter working on Mac OS X. It is specially-designed video converter to convert any popular video file (You tube, TS, TOD, MKV, MTS, AVI, FLV, WMV, MPG, M4V, RM, MOV, etc.) to iPad video MP4, MPEG, H.264 on Mac with high speed and great quality. When you free download videos from youtube.com and you want to enjoy them on your iPad. Here Mac YouTube to iPad Converter is suitable for you. You can convert any YouTube videos to iPad MP4 video formats. Mac AVI to iPad Converter is necessary for us to have a try, which can help you convert all AVI videos and other popular video formats like WMV, 3GP, MPEG, VOB, FLV, Xvid to iPad supported MP4 video format. Mac MOV to iPad Converter is your best choice to convert MOV files to iPad MP4

  18. Avatar
    Designer Bags about 1 year later:

    Really Cool!Thanks for ur nice sharing!!It help me a lot with those information!

  19. Avatar
    Dog bark collar about 1 year later:

    I do not have my own favorite Kata. I have just learn about some of them and hope that I can find out one that I like.

  20. Avatar
    video to ipad converter about 1 year later:

    good post, i will recommend it to my friends

  21. Avatar
    free essay samples about 1 year later:

    Good job done about the post, thank you!

  22. Avatar
    http://www.whiteiphone4transformer.com about 1 year later:

    As iphone 4 white 3GS has something of non-update to the iPhone range, but there are finally decent alternatives in the smartphone market, with the HTC Desire and Samsung Galaxy S leading the Android fight right to Apple’s door.

  23. Avatar
    cialis 10 about 1 year later:

    I would have to say my favorite kata wouldbe seisan or basai because they require a great deal of speed and power. Ny favorite weapon kata would be yoshu. Because it was very challenging for me to learn and now I love competing with it at tournaments.

  24. Avatar
    Bubble Shooter about 1 year later:

    Web master & all thanks for kind information.. I am going to bookmark this page. keep it up.

  25. Avatar
    hublot replicas about 1 year later:

    she was inspiring the replica breitling watches uk the country with her courage and that replica tag heuer link that we couldn’t wait to take her best panerai replica her out to

  26. Avatar
    cheap viarga about 1 year later:

    I can see than schuchert.wikispaces.com is great place. Thanks for sharing this.

  27. Avatar
    how to lose man breast about 1 year later:

    I really like reading your posts. Thanks!

  28. Avatar
    lcd enclosures about 1 year later:

    THanks for your kind information.. I think it is useful for most user… thanks a lot.

  29. Avatar
    iPhone SMS to Mac Backup about 1 year later:

    Thanks for shareing! I agree with you. The artical improve me so much! I will come here frequently. Would you like to banckup iphone SMS to mac, macBook, macbookPro as .txt files? Now a software iphone SMS to Mac Backup can help you to realize it.

  30. Avatar
    iPad to Mac Transfer about 1 year later:

    iPad to Mac Transfer can help you transfer music, movie, photo, ePub, PDF, Audiobook, Podcast and TV Show from ipad to mac freely.

  31. Avatar
    cold room about 1 year later:

    Haile Electric Industrial Co. Ltd. is the leading manufacturer and exporter of cold room,axial fan,condensing unit,centrifugal fan,shaded pole motor and refrigeration products in China.

  32. Avatar
    wholesale hair weave about 1 year later:

    wholesale hair wholesale hair weaveGently dip the hair system into the tub of water. Swoosh it around very gently several times for about 2-3 minutes, then remove it from the tub, squeeze all the excess water from the hair system. Do not rub like when we hand wash clothes

    Step4. Dispose of the shampoo and water in the tub, run a fresh batch of luke water, and use it to wholesale hair extensions thoroughly rinse all traces of shampoo from the hair system until water runs clear.

  33. Avatar
    dory about 1 year later:

    interesting thanks for sharing. Social Network

  34. Avatar
    bird houses for sale about 1 year later:

    Good stuff you have here, I was going to mention this to a good friend of mine bird houses for sale

  35. Avatar
    Seobaglyak about 1 year later:

    a Seobaglyak igazán éjszaka érzik elemükben magukat. Szinte ”kétlaki” életet élnek. A Seobaglyak éjszaka sokkal éberebbek, és agresszívabbak, olyannyira, hogy olyankor saját fajtársaikat tartják a legnagyobb ellenségeiknek.

  36. Avatar
    Nike Sneakers Outlet about 1 year later:

    In case scientific disciplines should be to advancement, might know about have to have can be to be able to research, seriously throughout canceling your results—the final results have to be described with no a person expressing precisely what they will much like the results to get been—along with finally—a crucial thing—your thinking ability for you to think of the final results. A crucial place about it thinking ability can be who’s mustn’t be confident before hand precisely what have to be. The idea is not prejudiced, along with declare ‘That is incredibly less likely; My spouse and i aren’t keen on that’. Nike Sneakers Outlet

  37. Avatar
    Travel Baby Cribs about 1 year later:

    My favorite Kata is “bnoroi Kata”. by the I have found the post great for the Kata.

  38. Avatar
    okey oyunu oyna about 1 year later:

    Thank you very much.

    internette görüntülü olarak okey oyunu oyna, gerçek kisilerle tanis, turnuva heyecanini yasa.

  39. Avatar
    ghd australia about 1 year later:

    nternette görüntülü olarak okey oyunu oyna, gerçek kisilerle tanis, turnuva heyecanini yasa.???

  40. Avatar
    Best Lip Moisturizer about 1 year later:

    I have found the site very informative and helpful for Java. It really helpful for the learner like me.

  41. Avatar
    ford leveling kit about 1 year later:

    very good website.. really like it.

  42. Avatar
    leveling kit ford about 1 year later:

    so nice in here.. i enjoyed.. thank you.

  43. Avatar
    leveling kit f250 about 1 year later:

    wow,, i really love your website so cool.. thanks for sharing.

  44. Avatar
    f350 leveling kit about 1 year later:

    wow! its simple and amazing here in your website.. i love it , thanks for sharing.

  45. Avatar
    shoes christian louboutin about 1 year later:

    Everyone looks so cute!

  46. Avatar
    Customized running shirts about 1 year later:

    2nd Kata is probably my favorite.

  47. Avatar
    clothing factory about 1 year later:

    website.. i love it , thanks for sharing.

  48. Avatar
    christian louboutin shoes on sale about 1 year later:

    Have the christian louboutin patent leather pumps is a happy thing. Here have the most complete kinds of christian louboutin leather platform pumps.

  49. Avatar
    beats by dr dre headphones about 1 year later:

    The article is dull.

  50. Avatar
    cookies gift baskets about 1 year later:

    Blog posts about wedding and bridal are always rare to find , at least with great quality,you qualify for a great blog post writer title,kep the great job happening

  51. Avatar
    haloro about 1 year later:

    Thanks for sharing this. In exchange, I will show you my ipad tips. As you know, ipad is popular now, if you want to transfer files to ipad without itunes, the ipad to mac transfer and this step by step guide can help you.

  52. Avatar
    beats by dr dre over 2 years later:

    and active noise canceling, the headphones delivers all the power, clarity and deepbeats by dr dre beats by dre sale bass today’s top artists and producers want you to hear.

  53. Avatar
    bagsupplyer over 2 years later:

    Good Luck!It is nice of you to post it.wholesale brand women Gucci backpacks freee shipping

  54. Avatar
    Diablo3 over 2 years later:

    it needs a bokmark so i can come back to it later ,nice stuff

  55. Avatar
    Ashley Bowling over 2 years later:

    You can’t teach an old dog new tricks You can’t judge a book by its cover You can’t win them all

  56. Avatar
    christian louboutin over 2 years later:

    The professional design make you foot more comfortable. Even more tantalizing,this pattern make your legs look as long as you can,it will make you looked more attractive.Moveover,it has reasonable price.If you are a popular woman,do not miss it.

    Technical details of Christian Louboutin Velours Scrunch Suede Boots Coffee:

    Color: Coffee
    Material: Suede
    4(100mm) heel
    Signature red sole x

    Fashion, delicate, luxurious Christian louboutins shoes on sale, one of its series is Christian Louboutin Tall Boots, is urbanism collocation. This Christian louboutins shoes design makes people new and refreshing. Red soles shoes is personality, your charm will be wonderful performance.

  57. Avatar
    gucci sale over 2 years later:

    Thank your for sharing your wonderful article.I very agree with your views from here.

  58. Avatar
    moncler italia over 2 years later:

    Thanks for sharing the the valuable conversation with us.

  59. Avatar
    jimmy choo ugg boots over 2 years later:

    Ugg boots, you can use a pair of Hunter Willies for muddy, sunny, <a href=” http://www.jimmychoougg3042.com/”>jimmy choo ugg 3042 and water-resistant boots for the reason that Aussies critically adore enjoying the heat by <a href=” http://www.jimmychoougg3042.com/”>jimmy choo ugg means of the sunshine at an all-purpose pair of women’s boots, not merely women’ <a href=” http://www.jimmychoougg3042.com/”>jimmy choo ugg boots s boots. If not yet, then start looking<a href=” http://www.jimmychoougg3042.com/”>jimmy choo uggs no farther in comparison to women’s boots inside the world.

  60. Avatar
    http://www.pen-mont-blanc.com over 2 years later:

    The fountain pen is a distinctive writing device that contains ink without the use of a cartridge, as a ballpoint pen does.

  61. Avatar
    Mont blanc Pen over 2 years later:

    Montblanc will not sell customers or dealers replacement Mont blanc Pen without the company performing the repair. When a Mont blanc Pen Sale is damaged, it is accepted at any Montblanc boutique where it will be forwarded to their service centre for evaluation. A quote for the repair will be provided to the customer if the Pen Mont blanc is out of warranty. If the estimate is accepted, the repair is completed and Mont blanc pens will provide a one year repair warranty on the work that was done.

  62. Avatar
    ugg triplet bailey button over 2 years later:

    It had been an authentic difficult choice, she didn’need to miss this kind of high probability, so she wanted to get a try. She without warning appreciated the karen millen coat outfit, might be she was admit due to the Karen Millen outfit. So, she thought we would be aware of essential fashion understanding from karen millen coats magazine, as Karen Millen could be a top brand on the planet, there’s unquestionably that they may figure all of this from Karen Millen. Throughout her idle time, she frequently read Karen Millen magazine, she becomes a lot more thinking about coat karen millen, so, her wardrobe filled with Karen Millen dress. The very best consequence is the fact she becomes among the heart persons within their company, all of the people don’t realize that she’d ever understood nothing about fashion.What’s more, the garments in coats karen millenpurchase may also suit for the women with diferent figures, for you body body fat ones, Karen Millen will get the shaft color stripe dress around the account which will make them looks slim.

  63. Avatar
    moncler over 2 years later:

    Moncler Outlet Women whose jobs require them to rotate through day and night shifts may be increasing their diabetes riskMoncler, especially if they maintain that schedule over a long period of time, a new study of nurses suggestsMoncler Men’ Vest With Fur. In the study, which appears in the journal PLoS Medicine, Hu and his colleagues analyzed data on 177,184 women between the ages of 42 and 67 who were followed for about two decades as part of the long-running Nurse’s Health Study. The women were considered rotating night-shift workers if they worked at least three nights per monthMonkuredaun, in addition to day and evening hours – Moncler sale .

    The study was the largest to date to explore the link between shift work and diabetes, but the authors stress that more research will be needed to confirm the results, especially in other populationsMoncler Women Sauvage Fur. The study included only female nurses and the vast majority were white, so the findings don’t necessarily apply to men or other ethnic groups, they say – Moncler store Moncler Down.

  64. Avatar
    iphone mp3 to ringtone over 2 years later:

    iPhone MP3 to Ringtone Maker can convert MP3 to iPhone/iPhone OS 3.0/3.1 Ringtone, even convert any video/audio to iphone ringtone.

  65. Avatar
    Womens Moncler Jackets over 3 years later:

    Everyone should have a Mens Moncler Jackets as it is the best outwear against the cold season and is also comfortable and light to wear.

  66. Avatar
    iPhone contacts backup over 3 years later:

    It is really a good example that most of the programmer should think about this. If we want to do much better for the code. I should understand it. right? You are very good at this and show us good coding idea.

  67. Avatar
    pandora bracelets over 3 years later:

    In this modern and fashionable society, people are pursuing for Louis Vuitton outlet cool, unique, stylish and innovative. Whether it is borse louis vuitton or fashion accessories all means a lot for modern society of today.

  68. Avatar
    380352189@qq.com over 3 years later:

    At Monster we are correct audiophiles,getting researched audio tracks engineering for much more than 30 many years to produce the finest audio tracks cables,home theater speakers,and headphones.Now,we are proud to unveil Beats Tour featuring Monster’s newly produced driver design.contemplating how the ultra-fast response time,the Beats Tour driver can accurately reproduce the whole appear and particulars of today’s electronic audio tracks with precise clarity,organically produced vocals,and large bass punch.but lost “Hi-Fi” appropriate core-high fidelity reduction.Three,they’re washable which means you don’t need to sweat perspiring in them.Deep Bass Response and clean appear throughout the Spectrum,Beats professional utilizes no amplification or audio tracks cancellation circuitry that adds other frequencies and colours the sound.

  69. Avatar
    bladeless fans over 3 years later:

    What’s your favorite Kata? 68 good post66

  70. Avatar
    louboutin sales over 3 years later:

    What’s your favorite Kata? 69 hoo,good article!!I like the post!150

  71. Avatar
    data recovery ventura over 3 years later:

    Bob Martin of Object Mentor presents the first of his five principles of agile design. Beginning with an explanation of the real purpose of object-oriented design.

  72. Avatar
    http://www.resumecompanies.net/best-resume-companies/ over 3 years later:

    best resume writing companies Also, try doing other katas in the “Sanchin-style”. Very slow, hard breathing, total muscular tension. It is quite difficult, but it forces you to concentrate on form and balance, instead of speed and “style”. Even doing the simple katas like Seisan or Seiuchin can be a great workout when “Sanchin-ified.

Comments