I’ve always felt a certain kinship to the character of Sherlock Holmes. Not for his ability to notice the most minute of details, or his reasoning skills, or his undeniable flair for disguise… admirable as those and many of his other traits may be, it’s his moods between cases that I’ve always identified with.
Holmes thrived on the challenge of solving interesting cases, or researching and writing monographs on subjects that fascinated him. When he didn’t have a case or a fascinating topic to study, he was subject to fits of the blackest depression, sometimes temporarily relieved by a “seven per-cent solution” of cocaine.
Similarly, I have always thrived on writing software and reading really well-written science fiction (for the science) and fantasy (for the glimpses of other cultures, real or imagined). When I couldn’t find a project or a book that interested me, I also paid long visits the pits of despair, temporarily relieved by buying computer parts or software and then spending a great deal of time digging into them.
Over the weekend I was in one of those periods of gloom, deeper than I’d been for a long time. Yesterday afternoon, having no interest or energy for anything else, I started a new C++ program, one that used several of the Boost libraries that I hadn’t previously had occasion to, and the gtkmm library as well (which I also hadn’t used before).
I started it simply to pass the time, because it was better to do something than to sit around doing nothing, but I found myself really getting into it. It was irritating, primarily due to things that my Windows programming experience insisted should be easy, but which worked subtly differently under Linux. I spent hours on the simplest things, figuring out why they didn’t work the way I thought they should and how to work around the limitations. The time flew by; it was 3am before I realized it, and I forced myself to go to bed, only to be up and working at it again four hours later. It was a kind of intense joy that I only get when working on a particularly interesting programming project.
This afternoon, while I was taking a break, I thought about the transformation in my attitudes and what it had in common with the other times that I’d felt it. I’d thought that it was simply designing and writing software that triggered it, but there have been a number of software projects that I’ve tried to write and abandoned because the magic, the thrill, simply wasn’t there.
Then I saw the connection: it was only projects where I was learning something that were interesting! I couldn’t believe that I hadn’t noticed it earlier. Suddenly a whole lot of puzzle pieces about human behavior (especially my own) fell into place. Why I’d enjoyed buying new computer hardware and software, and why the enjoyment had suddenly died some years ago (when innovation in computers gave way to price wars and commodity hardware). Why my Linux-using friend can rarely go more than a few weeks without reformatting his perfectly-working system and installing a new distribution. Why all of the best hackers learn so many different computer languages instead of concentrating on a handful of the best ones.
It’s all done in a constant search for improvement. Games become boring once you’ve mastered them; books are no longer interesting after you’ve read them a few times. It’s only when you feel that you’re learning or improving somehow that something remains fresh and exciting. You can see it in all the most popular computer games too: the ones that remain interesting the longest are the ones where you can constantly improve your skills or your character. Games where you just do the same thing repeatedly get poor reviews and are quickly abandoned. The books that I’ve always found most fascinating were the ones that taught me things about science or people, whether they’re things I could use or not.
And I now understand Sherlock Holmes a lot better as well.