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

Mental Clarity

For me, every project goes through a number of steps of mental clarity. The first step is coming to the code completely fresh and having to just read through it and grok how it all fits together and functions. After you’ve been doing that for a while, you have got your head around it all and it’s nice a clear. You understand how everything fits together, know how to best utilise the framework you have to write new code and make changes. This is the point where all the useful programming gets done.

Eventually this second stage comes to an end and you move onto the third stage of devastatingly complete and utter confusion. You end up holding so much in your head that there’s no room left to work with any of it, and you have to start paging stuff out to disk. Except you don’t have a disk. So instead you begin muttering $account_id, $account_id, $account_id under your breath in some vague hope that if your brain can’t hold it perhaps your mouth will. At this point a fixed glare and a facial expression somewhere between concentration and sheer terror helps.

By the time your mutterings have expanded into a primitive chant of variable names, object properties and loop positions, a rapid tapping of the foot is added to help keep it all together. The primary concern is momentum. Success is completely reliant on blindly pressing forward. It’s like that point in a egg and spoon race where your forward lean is moving you a little quicker than your legs can reliably propel you. It’s inevitable that you’re going to fall, but if you can just make it across the line first none of that matters. Must make it across the line. Must make it across the line.

And then you do. And it’s great. And the whole ordeal is worthwhile, despite the odd looks you’re now getting from across the office. I am a web developer. I may be insane, but I like it.