We all write Bad Code.

We all write insecure code.

We all can learn.

When I posted about bad code, a reader remarked he’d done those things when he was new. So did I! So does everyone. We learn by copy/paste and seeing “Oh! Hello World actually worked!” Those are wonderful moments where we high-five ourselves and feel like we’re learning something cool.

Everyone makes mistakes. Everyone writes bad code. Everyone misses something. These are all parts of the learning process. So

Bad Code Educates Us

When we write bad code, and someone calls us out on it, we learn something. Negative reinforcement is a terrible thing, but those lessons tend to stick with us better than the best positive ones. We remember the feeling and we do anything we can to avoid it again.

Bad Code Humbles Us

We’re not perfect. You’d think we don’t need a reminder, but our egos can get the better of us. We start to think we’re awesome and know everything and are always right. We’re not perfect. We’ll never be perfect. Don’t use this as an excuse to write sloppy code, but be aware of your inherent imperfections.

Bad Code Inspires Us

When I see bad code, it reminds me to be better and do better. It goes back to the education thing, but really it’s the desire not to be shitty that inspires us to do better. The positive feedback loop being what it is, we really want to be better and have that feeling.

Bad Code Entertains Us

I have a site where all that exists is code that ‘breaks’ your site. It’s funny in a way, to learn how to do things by doing it wrong. When I see how far off I was and how bad it was, I laugh. Because in being educated and humbled and inspired, I find the delight in the universe again and laugh.

What Do You Learn?

What do you learn from bad code?

Reader Interactions


  1. It is ridiculous that so many modern programmers have ignored the great tomes of programming, such as “The Art of Computer Programming” (Knuth), “A Discipline of Programming” (Dijkstra), “Algorithms + Data Structures = Programming” (Wirth), “The Elements of Programming Style” (Kernighan, Plauger), “The Mythical Man-month” (Brooks) …

    Bad code is no more acceptable than a bridge which collapses.

%d bloggers like this: