Archive for November, 2026

Real Good Code

Saturday, November 28th, 2026

I’ve jotted down these lists before, but this time I came up with ten. I suppose I should merge them all together and in retirement, if I get one, maybe I’ll do something like that.

But the important thing is that there are more than one of these criteria. People just people off with that remark “That’s real good code” or “This code is better than that code” or “AI can write code faster than you and better too.” And that could mean…

1. Does lots and lots of stuff in very few lines.

2. The code is easy to read; take one swift glance at it and you can tell what it does, for sure. No confusion no ambiguity. Two experienced programmers will look at the same code and draw the same conclusion, reliably.

3. The code is modular. Change the requirements a bit, and you modify the code — a bit. Within an interconnecting but encapsulated module. The changes are confined to that one, or to very few. You haven’t had to ripple a change throughout your architecture and you can still meet the requirements.

4. Got written really really quickly.

5. Runs really really fast.

6. Hire a new coder, and you can bring him up to speed on how to read it and how to add to it, with a short, sweet, straight, level learning curve.

7. Few to no dependencies. No BOOST.

8. Okay, it has dependencies. But they don’t cost any money.

9. Easily ported to another platform.

10. Minimal testing covering maximum function and all the edge cases.

Others disagree with me about this, and they have good reasons for doing so, but to me code is a financial asset. You put time into it and from investing that time, you get back this asset. Sometimes this requires reams and reams of test scripts and hours and hours of this testing and some people call that “bad code.” To me, the testing is part of the investment; if it involves many hours and it isn’t possible to economize those hours any further, that could actually be a case of good code, not bad code. As long as you don’t have to keep doing it over and over again whenever there’s a minuscule change to the requirements.

I’m also skipping over this entire debate about exception handling. I don’t mean to trivialize that; all builders of systems should be thinking about the use of time put in by those who will be triaging and repairing the system. Errors and exceptions are the weak point in that arrangement. Lousy error reporting can burn off day after day, week after week of even the most talented triage-repair experts. If the error message is something like “Something Went Wrong,” you’ve blown it. That’s not good code.