Core Wars Kata
Implementing a very long kata in Ruby spending only 1 25-minute session every day.
On this page you can watch as I attempt to do a very long kata -- one pomodoro a day. If you are not familiar with the concept of a kata, it is a term taken from Japanese martial arts and refers to a form that one executes in order to practice. The term was coined by Dave Thomas here.
One of the downsides of doing a kata as practice is that it is necessarily limited. Usually it is a task that last 30 minutes or so. Trying to explore larger problems of requirements gathering and program design is much more difficult because ordinarily people don't have time to devote themselves to a large project for an extended period of time. Enter the pomodoro technique.
The pomodoro technique is a time management method for splitting up your task into small chunks of time (usually 25 minutes), separated by short breaks. The chunks of time are called pomodoros. My approach in this experiment is to try to do a very long kata (approximately 30-40 hours), doing an average of one pomodoro a day. Below you can follow my progress by watching the Asciinema animations of each pomodoro session.
Core Wars is a game devised by computer scientist A. K. Dewdney in 1984. It was first described in an article in Scientific American and became relatively popular in the late 1980s and early 1990s with computer programmers. From the original article:
Two computer programs in their native habitat -- the memory chips of a digital computer -- stalk each other from address to address. Sometimes they go scouting for the enemy; sometimes they lay down a barrage of numeric bombs; sometimes they copy themselves out of danger or stop to repair damage. This is the game I call Core War. It is unlike almost all other computer games in that people do not play at all! The contending programs are written by people, of course, but once a battle is under way the creator of a program can do nothing but watch helplessly as the product of hours spent in design and implementation either lives or dies on the screen. The outcome depends entirely on which program is hit first in a vulnerable area.
Core Wars is quite nostalgic for me as, after reading the original article, I rushed to write my own implementation of the game. I remember starting on a Friday evening and working every waking hour so that I could have it functional by Sunday night. It was a crude implementation with numerous bugs, but it was very fun to play.
I have often thought, "How long would it take me to write Core Wars now". It's been almost 30 years since I first implemented it and I hope I have improved a considerable amount. The old me probably edges the new me in raw mental horse power, but I should have a trick or two up my sleeve now.
I have recorded all of my programming sessions with Asciinema. Click on the play button of the desired session to see the session. If you want the video to go faster, you can press the ">" button. If you want it to go slower you can press the "< button.