addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwchatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgoogleimageimagesinstagramlinklocation-pinmagnifying-glassmailminusmoremuplabelShape 3 + Rectangle 1outlookpersonplusprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

Code Kata meetup

We will meetup and split up in groups and work on a simple code problem together and learn from each other.

Join or login to comment.

  • Jonas N.

    Did anyone forget a pair of white urban ears earphones at our office?

    October 24, 2012

    • Louisa L.

      Yes! I did not read this until now, but I left them and have been procrastinating to ask. Are they safe? =)

      November 7, 2012

    • Jonas N.

      I will check tomorrow :)

      November 7, 2012

  • A former member
    A former member

    Thanks for a well-organized meetup.

    Reflecting on the event, it bothered me that nobody (hope I remember correctly here) was able to solve the problem in 2x30 mins. It cannot have been for lack of skills - the task did not seem too hard.

    I decided to do the exercise at home. I had a first version in about 30 mins, passing all but the last test case, which thrashed until it ran out of memory. I then put some work into a more efficient representation, and a final optimization which brought the runtime down to a few seconds.

    The code is at
    https://github.com/marcusb/kata_potter
    but what I really would like to discuss is this: how did I and others fail to solve the problem at the meetup?

    1 · October 30, 2012

    • Magnus G.

      Here is my solution, which takes another approach: https://docs.google.co...­

      November 2, 2012

    • Magnus G.

      This solution was born out of the tests, it's not a general as Marcuses, but it's probably faster. It took quite a while to implement. (more than 30 minutes... )

      November 2, 2012

  • A former member
    A former member

    Continuing the previous comment...

    I would suggest that the TDD-inspired approach of the kata format is not a good fit for problems of this sort, which are all about designing a non-trivial algorithm.

    Following a TDD method, we would try to make the first simple test cases succeed, and then successively try to implement the more complex ones. But this is just silly - we will not get any closer to a full algorithm by solving a trivial case.

    Instead, finding the solution requires thinking "globally" about the entire problem, choosing among possible types of solutions, techniques, known algorithms etc... usually best done using a whiteboard, or pencil and paper.

    Note that some proponents of TDD claim that TDD is a good methodology for algorithm design:
    http://blog.objectmentor.com/articles/2009/10/06/echoes-from-the-stone-age
    For me, this claim is clearly disproved by our experience.

    1 · October 30, 2012

    • Jonas N.

      … (accidental post). I think that most people who have extensive experience with TDD will tend to move in and out of TDD-mode depending on the type and scope of the problem they are trying to solve.

      It's easy to take an experience like this and turn it into an argument against TDD as a whole. Not to say that you, Marcus, did that in this case. TDD can have immense value in my opinion, but in this case it clearly didn't.

      I still think that we derived a lot of value from having the tests written upfront and from having tests in the first place. There are definitely situations where not having tests is the better choice as well, but I think those are far rarer than occasions where strict application of the TDD pattern isn't optimal.

      October 30, 2012

    • A former member
      A former member

      Well, I personally found the test-cases valuable.

      On the first 30-min we misunderstood an important part, so we failed miserable. But by the time we realized our mistake, it was already to late.

      On the second round we were just about to implement the last test-case when the time ran out. Without the test-case we wouldn't even have had any idea what to code.

      If you manually calculate a few examples this would take more time. In essence you are hand-coding a test-case then....

      I personally learned a lot and it was nice meeting you all!

      October 31, 2012

  • Mattias Petter J.

    Link to the kata?

    October 23, 2012

  • A former member
    A former member

    Nearly solved it on the second go ...

    October 24, 2012

  • A former member
    A former member

    1 · October 23, 2012

  • Suren

    all in english ?

    1 · October 22, 2012

    • Jonas N.

      There aren't going to be any presentation and I'm sure no one will mind speaking English. So you're very welcome even if you don't speak any swedish.

      October 22, 2012

18 went

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy