Monday, December 17, 2012

Roman Numerals Kata with Commentary

* Interested in seeing an application being built with discussions at this level? Check out my video series: "Build an App with Corey Haines" on CleanCoders.com *

I recently participated in an awesome Kata Battle at 8th Light against the worthy adversary, Craig Demyanovitch. The kata was the wonderful Roman Numerals Kata, converting arabic numbers to their roman numeral equivalent.

While practicing the kata, I noticed a lot of interesting things around the decisions I made in the solution. So, I thought I would record a katacast and lay over some voice commentary around it.

I'm putting two videos here, with and without commentary. If you like these, then I have great news for you! Imagine this, except a WHOLE WEB APPLICATION. I'm finishing up the first episode in a series called "Build an App with Corey Haines." It should be available at the beginning January on cleancoders.com.


Here is the kata WITH commentary. It runs about 16 minutes and 40 seconds, so it isn't too bad to watch. I'd love to hear any constructive feedback in the comments. Version with no commentary is at the bottom of this post. I'd highly recommend watching it full-screen, so you can actually see it.



Resources:

* Interested in seeing an application being built with discussions at this level? Check out my video series: "Build an App with Corey Haines" on CleanCoders.com *

If you enjoyed this and want to say how much you did, why not send me a couple bucks? You can do it via paypal or flattr! I've even made it easy, just click one of the buttons below.

FLATTR

OR PAYPAL

Love Offerings!






Or A Different Amount of Your Own Choosing!


Here it is with no commentary, if you just want to see me run through it at a reasonable speed.




8 comments:

  1. Amazing katacast! It blew my mind. That's TDD at its best.

    ReplyDelete
  2. I really like watching the solution for the kata, thanks for making this.

    There is only a little of black magic in some steps like the one when you make it recursive. I think it happens because you know the problem and the solution pretty well. I think it's not a problem as the idea of learning from watching others solutions is covered.

    I think it would be great to have video responses to this one with some others :)

    ReplyDelete
  3. Really good! I like the way you convert the IV and such instead of calculating it.
    I agree with Sr. Javier that the step where you go to recursion is a bit of a leap.

    You talk about tpp, could you provide a link on more information?

    Some suggestions on the screencast:
    - Show test and production next to each other (two files) from the start. You started doing this in the end using a split, but I think it is less clear than using two files.
    - Why do you use reverse search every time (probably a habit) when running tests?
    - Personally I think a darker background is more readable for code in a screencasts. In this screencast the blue on white text in Vim and terminal is hard to read.

    ReplyDelete
  4. Thanks for this Corey, great commentary on a popular kata. I especially appreciate the references to the Transformation Priority Premise - a great reminder of this useful technique for considering the order of refactorings.

    ReplyDelete
  5. Thanks for this Corey, a great commentary on a popular kata. I especially appreciate the references to the Transformation Priority Premise (TPP) which I had forgotten about! It is a great way of deciding what refactorings are appropriate and when. For Robin above here's the link http://cleancoder.posterous.com/the-transformation-priority-premise

    ReplyDelete
    Replies
    1. I already got the same link from a colleague as well, but thanks for linking it though!

      Delete
    2. Have a look at this one too : http://blog.8thlight.com/micah-martin/2012/11/17/transformation-priority-premise-applied.html. It gives a simplified (shortened) version that is easier to apprehend.

      Delete
  6. Thanks for sharing this. Your demo shows pretty well how to proceed with baby steps and is easily understandable even when you don't know Ruby. Really pleased too to see a map-based solution, which is very often a elegant and efficient answer to complexity (one of my fav, as you can guess :))
    +1 to Robin "technical" suggestions, it's sometimes hard too see what changed in code because you switch too fast too tests results view.

    ReplyDelete

Please don't post anonymously; I won't use your name/url for anything insidious.
Comments by Anonymous are not guaranteed to make it through moderation.
Constructive comments are always appreciated.