How to spend time

I’ve got to the start where I’ve abandoned too many personal programming projects. Now I’m loathed to start any new ones unless it’s going to be really signficant.

I can think of three reasons for doing a project – to create something, to learn something, or because you’ve got nothing better to do.

Creating something is the raison d’etre of programming. Creating something new is great. Pushing the envelope, exploring new ground. Finding a more efficient, elegant or more general solution to an already solved problem is great. In contrast, reinventing the wheel is loathsome. Writing Yet Another Window Manager or Yet Another Text Editor should a hangable offence.

Having said that, writing programs for your own education is part of the ongoing process of improvement which any programmer should pursue. Writing a garbage collector yourself is probably the best way to learn about them. But I try hard to limit the scope of “learning programs” because otherwise you can spend weeks on irrelevant details.

The last reason – “because you’ve nothing else to do” – is the worst reason for sitting programming a computer. Directionless wandering will suck hours from your life, and at the end you’re only tired rather than wise.

So, I’ve written substantial, yet incomplete, portions of DTP programs, compiler backends. I’ve written too many raytracers, mostly as a way of learning a new language. They’re complex enough to explore the language and tools adequately, but I know how to write one from memory.