Repeat Inspiration
I write code. I don’t write every day, especially in the last two years since having been promoted deeper into management, but I still can and do code. To me writing code is a creative exercise. It’s like painting. I don’t think everyone feels that way. I think some people who have gotten into programming do so because it’s a well paying job, not because they like the creative aspects of it.
Every time you write there is some problem to overcome. Some challenge you’re facing that you are going to write an application to solve. Usually it’s a fairly straightforward process. Just like a painter would pick up frequently used brushes I pick up reusable code and get to work.
Every now and then though I get stuck on some challenging problem. In my case it usually involves some system API that doesn’t work entirely as advertised, or provides results which aren’t what I required. Usually getting through that challenge is an exercise in scouring documentation, searching the internet, or contacting the vendor.
Once in a while though I solve the problem in what feels like a stroke of genius. A flash of brilliant inspiration that guides me to the right solution. When this happens it’s like the work takes on a new life. It’s not just a carefully crafted application anymore. It becomes my baby. I love my baby. I get mad when you call it ugly or find it’s flaws.
(This is one good reason coders should never QA their own code)
Once in an even more rare while one of those babies gets deleted. It’s always a total accident. I don’t mean to delete it, it just happens once in a while. Anyone that has worked with computers and works with a revision-heavy product has done this. You’re writing a word doc and accidentally overwrite the last 15 pages of your thesis. Same thing.
So the code has to be rewritten.
This is where it gets interesting to me.
You see that part of the code which was the product of genius inspiration has to be reproduced. Some of the times during the rewriting that same genius feeling strikes and the baby is recreated. Some of the times though the rewriting just produces cardboard code. It’s not alive. It’s still functionally the same though. The application works… but it doesn’t feel inspired.
So the question I have… is it the same code? It obviously works. The problem which the original stroke of genius solved is still solved in the new lifeless code… but it doesn’t feel the same.
What is that?
Is the new lifeless code inferior? It still solves the same problem!
Weird.
Filed under Thoughts and tagged as
Posted on Sat, 17 May 2008 at 10:16 am

