Topic: “maintenance”

Two (absurd) anti-patterns

A pair of anti-patterns I’ve run into recently in my software development work, both of which are absolutely awful, though in completely different (and quite distinct) ways. I thought I’d share The Empty If and Wash, Rinse, Repeat, just so the world can share a bit of my pain. Read on, intrepid explorer →

Good Programming in 3 Simple Rules

In the last few years, I have seen a little great code, some good code, a lot of mediocre code, and overwhelming amounts of bad code. (A shocking amount of my own code from previous years – especially when I was just starting – goes in the last two categories, alas.) The longer I have been at it and the more I have read (whether random articles on the web or the excellent Code Complete), the more I have concluded that good programming is simple. Incredibly hard, but simple. In fact, it is so simple, that you can sum it up in three short, easy to remember rules:

  1. Write code for people, not for computers.
  2. Don’t repeat yourself.
  3. Only do one thing at a time.

Read on, intrepid explorer →

You’ll pay more tomorrow

I’ve spent a fair bit of time recently working on a project that, all things considered, really shouldn’t be that difficult. A client wanted a change made to his web application, a change that is simple in concept and – in theory, at least – should be equally simple in execution.

But it isn’t, and it’s not because of any hidden complexity in the task itself. Rather, the problem is that the code base for the web application is, to put it bluntly and without a hint of hyperbole, awful. I’ve worked on a fair amount of legacy code on various projects, in various languages, over the last few years. This one is the worst.

Individual functions hundreds (perhaps thousands) of lines long. No comments. No object orientation to speak of. Hackish solutions to problems all over the place.

But this isn’t a complaint post. It’s a request to the thousands of people in the world who are tempted to say, “Well, this will work for now…” Some of you are developers yourselves; others are simply dabblers. Whoever you are, whatever your context, whatever your project: there is a problem with “This will work for now,” and that problem is called tomorrow. Read on, intrepid explorer →