I thought it was self evident, but two of my more respected programer friends missed the point or, rather, took notice with one aspect.

So let me rephrase what I meant when I said it was okay to write bad code.

Write all the bad code you can. Learn from it. Make it better. But the code you publish should be the goddamned best damn code you’re capable of writing at that moment in time.

The point I was trying to make was not to let the fear of ‘This code is shit’ stop you from learning and improving. That’s like saying if you can’t play a piece of music the first time out, you should quit. That’s stupid! Few people can do that! The rest of us have to practice and learn and keep going.

And yes. That means sometimes when we give a public performance we screw up. That doesn’t mean we shouldn’t perform. That doesn’t mean we shouldn’t fail.

You’re going to fail, okay? Just give up on that wish. Everyone fails. We fail more times than we succeed, and that failure hurts more than the success feels good.

When you do a thing, do it to the best of your abilities and no less. If you’ve left a comment of “Come back and fix this.” then you damn well go fix it before you release the code. Writing bad code is no excuse to slack off, it’s an acceptance that not everyone gets it right from the start and you’re going to have to learn from it.

So learn.

Reader Interactions


  1. And when someone explains how to make your published code better, try to take their advice (assuming they explain it well enough).

    It’s a little frightening how many times I’ve politely pointed out huge security flaws in bits of their code, and they just flapped it off by saying “meh, it’s just an an edge case”, or even worse “nahh, no one will find that”, or “Why? No one is going to be interested in hacking my code.”.

    • @Ryan Hellyer: And to back that up! If you do tell someone “This is a security issue…” and they reply “I don’t see how that can work…” please take the time to explain why and how it is πŸ™‚ I was shit at nonces until a few people explained how they worked and why. They were just a black box to me.

  2. I agree 😎

    I follow Pippin’s words – β€œcoding everyday keeps the bugs away.” πŸ˜›

%d bloggers like this: