Those of you that do not know me personally probably do not know that one of my biggest passions is running. And when I mean running, I mean running *a lot*. I have been into endurance sports since I was a kid, and since a few years ago I am a passionate ultrarunner, that meaning that I enjoy a 20 km run, but I have real fun when I get out of home early in the morning and come back home several hours later in the evening with 60-70 km [~43 miles for those not used to the International System] on my legs.
To run such long distances, a fair amount of physical endurance is needed but, more that that, a great psychological endurance is the key. As the classic ultrarunning mantra goes: "pain is inevitable, suffering is optional", and each ultrarunner has his own strategy for ignoring the pain and turning a long run into a rewarding (albeit painful) journey. Some like to listen to music, others simply think about their life. Dean Karnazes, by far the most popular ultrarunner around, wrote most of his best-seller "Ultramarathon man, confessions of an all-night runner" while running, recording his thoughts into a portable recorder and later transcribing them.
Now you must be wondering why I am writing this in this blog about GIS, SEXTANTE and programming. Well, there is a link between SEXTANTE and running, and I would even dare to say that SEXTANTE would not be the same if it were not for my long weekend runs. I do not like to listen to music while I run, and I definitely do not feel like bringing a recorder with me when I go running, but there is something that I love to do when I run. Guess it? That's right: programming. (Another thing that I usually do is to practice scales...but I have a blog about music to talk about that, so I will not bore you here with the details ;-) )
As the great Edsger Dijkstra said, "computer science is not more about computers than astronomy is about telescopes". In other words, you do not need a computer to program. Of course I do not do actual coding while running, but programming is much more that just typing code. Design and optimization are two of the things that can be done without having a computer in front of you. In fact, I have realized that I tend to code too much and think less than I should if I am sitting in front of a computer, so it is better for me to spend sometime "working" without a computer. Staying away from the computer lets me concentrate on details that I might overlook if I am typing code.
Also, running for several hours to the edge of exhaustion gives you an extremely clear thought once you get past the point where your mind and your body separate (and believe me, this happens sooner or later in every long run...otherwise your body would say no and stop), so, somehow, you get "cleverer" as you run. That makes it an ideal situation for thinking about such abstract problems, and for finding optimal solutions to them.
I am writing this here because, as I mentioned in some of my latest posts, there have been some important new functionalities added to SEXTANTE in the last weeks. Most of these new functionalities involve changes in the architecture of SEXTANTE and, thus, require not just coding, but also rethinking part of its design. And, as you might have probably figured out, I did a big part of that while running. The feeling of arriving home, eating something, having a shower (or, better, a freezing ice bath) and sitting in front of the computer to put your ideas to practice is just great, letting your thoughts flow and turn into code. Definitely, much better that sitting in my office at the university (although I usually go for a short early morning 10-15km run before going to work), and by far much more productive.
Now a question to all programmers around: Do you have any preferred moment of the day to work? Anything you like to do to get ready or boost your productivity and/or creativity?
By the way, I thought about this post and "wrote" most of it a few days ago on my mind during a long and beautiful 190+ km (half of them under pouring rain...) bike ride on the almost-abandoned roads around my town. Also, whenever I have a presentation or talk, I usually rehearse it while on the run, so I guess that SEXTANTE owes more than just code to my running/cycling sessions :-)