Christoph Gockel

Watching yourself code...

08 Jul 2014

…is nearly as odd as hearing your own voice on tape.

Today I finished recording my Roman Numerals Kata in Ruby.

For a quite a time I couldn’t get it done under 10 minutes. After watching the recordings of yourself code, you often come up with new ideas and different approaches.

It kinda feels like pairing with yourself – even though I prefer having a “real” pair.

A big time saver was a different approach on the order of the test cases. I switched from the implementation of the test cases for 1, 2, 3, 4 ,5 and so on to first implement all “single letter” numerals, and then adding the repetition handling like 2 converts to II.

A new input mode mapping for vim helped me as well. To insert a hash rocket (=>) I can press just <c-l> now, and can reduce the finger movement of my right hand a bit. I came accross this mapping by chance when looking at Gary Bernhardt’s .vimrc.

The result has been uploaded to YouTube. It’s not a flawless recording, as I made some typos. But overall, I’m happy that I ended up with a 6:20 version now.