Coding in the Clink

It’s 5:15 AM on a Saturday—a precious Saturday—and I wake up, late. My alarm was set for 4:30. I get ready in a hurry, trying not to wake anyone up, and get out the door. It’s cold and dark, and it’s still cold and dark an hour later when I fill up my car with coworkers and a friend.

The four of us drive another 150 minutes or so, across the state border and into Ohio, to the Marion Correctional Institute, where we will spend the day pair programming with inmates in Java. This might sound crazy to you—taking a day off to go do more programming, and to do so in a medium-security prison, no less! Despite the cold, the drive, and the fact that we were behind several layers of gates and fences and very large doors, as soon as we started coding, that all melted away.

To call me inexperienced in Java is to make the understatement of the year, so leading up to the event I did some simple TDD exercises on my own in Eclipse to try to get my brain thinking more in Java than in C. This would prove invaluable, as one thing we didn’t have in prison was Google. Think about that for a minute: right now I effectively know any programming language, since it’s easy enough to pop over to a browser and type “how to make a hash map in x” where x is your language of choice. In prison, we had no Internet connection; just a browser pointed at a local copy of the language reference.

We were doing the EverCraft kata, which involves creating a D&D-style game, complete with HP, AC, attacks, rolling for damage, you name it. It was a fun problem domain, and one that I may come back to if I need a kata for learning a language. All told, we had six 40-minute rounds of pairing, and though we never got very far in any of the sessions, we had a good time, I learned a lot about Java, and (hopefully) I helped my partners learn as well.

I’ll leave the minutia of who all was there to the novel-length post on the JavaGuys site, but one of the highlights was a special guest appearance by Uncle Bob Martin. Any time he’s in the room you’re bound to learn, as if by osmosis. Between each coding session, we had a quick retro to talk about it, and in those it was clear that, in prison or not, a developer is a developer. We’re all just people, and some of us happened to be staying past 4:00.

So, why did I do it? What could possibly get me out of my warm bed at a stupid hour on a Saturday morning? On a superficial level, my co-worker Amber suggested it to me at work one day, and I try to keep an open mind about saying yes to things: speaking at user groups and conferences, appearing on podcasts, or going to lunch with functional programmers. I find that, more often than not, these opportunities to grow as a developer and a person are a great use of one’s time. I’ve never regretted spending my time in the community, and a lot of significant opportunities in my life (my current (amazing) job included) have been a direct result of saying yes.

There’s another, deeper reason to code in the clink. It can make an actual difference in someone’s life. Finding a job isn’t particularly easy for anybody these days, and much less so for people who have been incarcerated. Programming, whether it’s selling your own app in the App Store, picking up some freelance work online, or even just contributing to open source and trying to make a name for yourself, is one of those careers that requires no qualifications. You don’t have to fill out a résumé to send a pull request. To teach programming to someone in prison, therefore, is to give them a fair shot at a decent job when they’re out. That’s why I was there, and that’s why I’d love to go back next time.