Why Do We Write Code?

Building Great Code

I had a somewhat heated discussion with a co-worker this morning and he's been at The Shop for a number of years while I've only been here a little over one. He's adapted to how this place measures success, and I can't blame him for it. He's tried to write code to the best of his ability, and when he thought he was being successful, he's been told it was a failure. He is reacting to the measurements of success and failure that he's seen, and in that sense, it's completely understandable why he sees things the way he does.

But that's harder for me to deal with. Much harder.

All the time I was talking to this guy I was thinking How can I tell him why I write code without coming off as a jerk? Which lead me to this post. I can't really tell him, but I can tell you, and maybe you'll understand.

Writing code isn't just about a paycheck for me. In fact, I'd say that if it ever becomes just about a paycheck, I think I'd get out of it. Coding is about the creation of beautiful, functional, code that fulfills a specific need in an elegant and awe-inspiring way. I'm not niece enough to think that all code will be this wonderful an experience, but that's the goal. When code is being written, it ought to have all of these factors in mind: simplicity, clarity, style, function, and design.

So why do I go through all the headaches? Why put in all the hours? I believe it's because when I get the opportunity to create software, I will create something I'm proud to have my name on. It'll be something that has a good number of those idealistic qualities, and I'll be glad I put forth all the effort.

So when I hear a good developer talk about essentially "looking on the bright side", I get a little worried because I think I've lost a fellow Creator. He's become a worker - happy to deliver whatever it is that management asks for - no matter how outrageous, and unrealistic. It makes me sad.

Everyone has bills. Everyone needs a paycheck, and I'm no different. But I think there's a way to pay those bills and do something that's aligned with your moral compass. And as extreme as that sounds, I think it is a moral issue. Someone can ask me to deliver them something that's unreasonable, but if I let them believe that it's OK and reasonable, then that's my fault. If, after I tell them it's unreasonable, and I'll try, but won't write junk, they still want me to do this, then I'll give it a try. But we all have to live with ourselves, and thankfully, I've been given a set of talents that allows me to be a little picky in the work I choose to do.

I have to feel that my life has been something good. I'm almost 50 years old. If I don't do that now, when will I?