Just for fun

Let me tell you about Sunday. Sunday was, among other things, uncomfortably warm here in Ithaca, NY. And a combination of being woken up much earlier than I wanted and skipping breakfast guaranteed that I was quite cranky all morning. But anyway, by 1pm I was decently well fed and had a mini-conversation with my advisor while standing in the sandwich line (which of course involved a good amount of programming language talk). Being in a considerably better mood I decided to avoid the heat by heading over to Starbucks and writing some code.

For most of last semester I had been working on an Actor library in Ruby to do some fun little concurrency experiments. I had been wanting to take my code (which has very rough in the way that only research projects can be) and turn it into a proper Ruby actor library. On Sunday I started down that path.

I had been aware of some prior art in this area, in particular the excellent Revactor library. Until yesterday I hadn’t actally taken the time to dig deep into it. When I did, I was devastated. Revactor is beautiful, well thought-out, flexible powerful, elegantly implemented. With the exception of a few aesthetic details it’s everythng I wanted my own library to be and more. It was devastating because it seemed like all I could do was reinvent the wheel. What’s the point of writing or making something if someone’s already done it before and better? It’s the kind of crushing hopelessness I feel sometimes as a language researcher: it seems like Lisp did everything, 30 years ago, and did it better.

So after banging my head against the table for the better part of an hour (and wondering why the girl sitting next to me had two straws in her iced tea) I decided to go for a walk. At almost 6pm it was still uncomfortably warm but after ten minutes I found myself at the steps of the computer science building (unsurprisingly). I walked in, claimed a couch and started writing some code.

My new project isn’t brilliant research, it’s not scalable and high-performance, it’s not an infinitely reusable library with unit and regression tests. It’s just a little hackish thing I threw together in an hour. It doesn’t do very much yet but offers the promise of many hours of fun hacking ahead. It’s a fun personal project that scratches a little itch and is a lot of fun to code up. I’m writing a combination of C and Ruby, I’m living in Emacs and my terminal and I’m having a lot of fun at it. After a long, long time I’m having fun writing code and remembering why I got into this gig in the first place.

The thing is, at the end of the day, I sling code because I like to. Because it’s fun. If it stops being fun I might as well just give it up and hang up the keyboard (or keep the keyboard and write words instead of code). As Andrew Appel says, not all of us want to be logicians, some of us just want to be hackers. I like math and logic and performance analysis as much as the next guy, but I also like just the pure, raw feeling of code. I remember the allure of the machine as a mysterious black box – a well of infinite potential if only you could figure out how to bend it to your will. I remember a time when we used to be explorers – poking and prodding our systems, seeing how they reacted, how they bent, how we could change them and restore them, how we could make them do what they weren’t meant to do. I remember that it used to be a whole lot of fun. Yesterday I remembered all that and had a lot of fun doing it.

I don’t know why you do what you do, but I hope it’s fun. I hope that when you go to work everyday it’s because you really, really want to, because you can’t see yourself doing anything else that’s as fun. Feel free to change the world, to make it a better place to live in, to support and help the people around you, but please have fun while doing it.

One thought on “Just for fun

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s