Saturday, December 6, 2008

Coding for the Weekend

Sometimes I feel like I'm not living up to my potential as a programmer. All too often I find myself wishing that I were in a situation where I would be expected to write better code. I feel like there is still so much for me to learn, but I've somehow missed the boat.

I've got a pretty good job. I'm glad to have it and I've got some terrific co-workers. The trouble comes in two flavors. Our company has deep seated custom of doing what is needed at the moment without planning ahead. Being flexible is one thing, but we spend days and days resolving problems which could have been fixed by planning and writing the right code in the first place.

The other trouble I find is a bloated Frankenstein's monster which we dubiously call our legacy code. It is patched together into a terrible tapestry. Some pieces are wonderful gems of ideas and well-written code. But for every pleasing morsel there are seemingly dozens of fetid carcasses. And they are all tied together. Nothing is separated, all is unclean. I cringe at some of the security issues that are just glossed over.

I realize that this scenario isn't exactly uncommon. But the combination of the two problems (at least from my perspective) leaves me in a place I do not want to be. I find myself doing a lot of mediocre work just to get the job done. I never feel like I'm taking ownership of my code, as the kids say. But I can't justify taking the time to fix many of these problems. Those kind of decisions are not part of my job description.

But there are a few rays of light that peek through the dark clouds from time to time. We have a relatively new manager who seems to value most of the software practices that I do. I'm hoping that eventually he will be able to change things. And I always look for little places where I can write better code.

I'm trying to keep abreast of many best practices and new ideas, but it can be difficult. One issue that I worry about is that I have little to no work experience with things such as:

  • Unit testing (let alone having a testing group / phase!)
  • Development life-cycles (Agile, XP, Waterfall, etc.)
  • Design and documentation
  • Code reviews

So I'm trying to learn on my own and incorporate things into my work as best as I can. But my recurring lament is the lack of time for working on my own projects. I'd like to participate in some open source projects and work on my own projects. But they always get pushed to the back-burner.

So I guess for now I'll just keep plugging along like good ol' Charlie Brown. I'll try to do the best I can, but I know that there will still be many days where I'm still coding for the weekend.