I am currently reading Mind Matters by James P. Hogan, which I picked up at the public library. For those of you who don't know me, I am a compulsive reader. I read a book of some sort at all spare hours of the day, even if I have read the book before since I usually get something new out of it and I have just a bad enough of a memory that I am reading it for the first time again. I can't fall asleep unless I read, it is that bad.
The chapter I am currently reading talks about the research of Herbert Simon. One statement that jumped out at me was "The process of searching for a solution has an associated cost of its own that has to be taken into account...". Basically people make decisions that are good enough instead of attempting to find the optimal or perfect solution to a problem because we live in a world with real time constraints. The other statement that resonated with me was "...individuals and departments of an organization don't relate to the remote, overall purpose of the organization as a whole but to their own immediate aims and objectives...". People are naturally selfish and adjust their world view accordingly.
So as coders when we are given a problem it should follow that we dip into our prior experiences and design a solution that solves the problem, but may not be the most optimal solution. Lately I have been doing some coding involving web content syndication in my spare time, and I have found I actually tend to do the opposite. I have some sort of innate masochistic tendency to spend a lot of time trying to design a perfect solution/implementation.
Looking at my past experiences, I find the following tends to be true:
- If it is a personal project or a work project that I am passionate about, I want it to be perfect and spend a lot of time attempting to make it so.
- If it is "making license plates", I tend to design a solution that works but may not be as close to perfect as I can make it.
I guess I am falling prey to my own immediate aims and objectives, where ego is driving the quality of the work. This worries me, as I would like to believe I try to do my best regardless of personal interest when it comes to coding, but I may just be lying to myself. Community projects where people take a strong personal interest or expect to gain some recognition from their peers will tend to be a showcase for peoples best work and creativity. Projects where you are just another drone and are lost in the white noise of the organization will not provide as much motivation.
In some ways I think learning to program actually reinforces the desire to pay a higher price when searching for the solution to a problem. Today's interactive languages and environments allow us to get immediate feedback on the decisions we make, where we can tangibly see that an elegant solution tends to run faster and be more maintainable and flexible. In contrast, many decisions in the real world don't come back to bite us in the ass until well after the decision has been acted upon. As computer programming is in some ways the most egotistical activity ever invented by human beings where you truly are lord and master over your own digital world, it reinforces our ego and drives programmers to make that digital reality perfect.
In the future I am going to try to do a better job of evaluating the associated costs of searching for solutions, but I know in my heart I will still end up staying up into the wee hours of the morning writing/improving code. I guess you can't change human nature.