All in the <head> – Ponderings and code by Drew McLellan –

Elegance

When I studied mathematics at school, aged 17, I had a really great teacher. As great as he was, he failed in impart the finer points of mathematics into my somewhat squishy teenage brain. He did, however, teach me an important lesson about elegance.

For the greater part of our two-hour long lessons, he would direct the enactment of equations across a whiteboard. We were the script writers, and as the story enfolded before us it would be constantly revised and refined until it was the best it could be. Every line was evaluated and re-evaluated until there was simply nothing to revise. No steps to simplify, not an iota of redundancy existing. It wasn’t a burden to work this way. It was a joy. And the driving factor behind this was never efficiency, never trying to obtain some pointless goal or standard enforced upon us, it was one word. Elegance.

Although my mathematics stinks, the ethos I picked up in that class was far more valuable than the equations. To be able to write code against a yard stick of elegance is somewhat liberating. Elegant code has qualities of efficiency, standards adherence, ingenuity, and aesthetic beauty, but the validator is a much easier taskmaster.

That’s not to say everything I write is as elegant as it can be, just like not everything I write is as valid or semantically rich as it can be, but that’s the goal I aim for. I’m happy with that.

I’m rambling, but I trying not to talk about my damn Mac. Damn.

btw, it’s FireSquirrel and ThunderBadger, ok?