
# Write bad code
Table of Contents
I don’t know about you, but I’ve been beating myself up over being unable to write good code. Working on a team convinced me that I should write code that will never cause bugs. I was exhausted from breaking and fixing the project every week under tight deadlines. What started as wanting to write good code became an obsession with perfect code that could never break, never confuse anyone, never need fixing.
In pursuit of “good code”.
Imagine a piece of code that once written, will never need to be rewritten. It follows all good practices, clean code, DRY, SOLID, etc. And, in fact, you can write code like this, but it comes with a serious drawback: I ended up being able to tackle any problem that seemed impossible but became unable to finish easy tasks. I became a “10x developer”, by taking 10x the time to finish my job.
I tortured myself over the simplest task. Every line of code felt like a potential disaster waiting to happen. What if this breaks in production? What if my teammate can’t understand it? What if there’s a better way I don’t know about? I’d spend hours second-guessing working solutions, convinced that my approach revealed how inadequate I was for the job. The paranoia was exhausting. I was debugging problems that didn’t exist while creating real problems by never finishing anything.
The breakthrough
Eventually I just stopped caring. Maybe it was exhaustion, maybe I finally hit my limit with the paranoia and second-guessing. I had something that worked and I shipped it. The variable names were terrible, the functions did too many things, there was probably a more elegant solution somewhere. I didn’t care anymore. The outcome didn’t matter because people didn’t see my code anyway. But even if they had, it worked. It solved the problem. And for the first time in months, maybe years, I felt liberated instead of exhausted.
All that time I’d spent crafting “perfect” code, no one was looking. No one cared about my variable names or design patterns. They just wanted something that worked. I’d been performing for an audience that didn’t exist.
Code quality matters. You should clean up your mess, refactor when needed, think about your teammates. But perfect code on day one? That was the trap. I could always improve it later, after it was working and solving real problems.
Do your worst
Perfectionism never ships. While you’re debating variable names and researching design patterns, someone else is solving the actual problem with messy code that works. And here’s the weird part: once you give yourself permission to write bad code, you often end up writing better code than when you were trying to be perfect. The pressure disappears. You stop performing for imaginary audiences and start solving real problems.
Start today
Pick something you’ve been avoiding because it won’t be perfect. Write the messiest version that works: terrible names, copied code, whatever gets it running. Ship it. You’ll learn more from bad code that solves real problems than perfect code that never leaves your head.
I’m still not completely satisfied with this post. There are probably better examples I could use, cleaner ways to make my point. But that’s exactly the trap I’m writing about. So I’m shipping it anyway, I’m starting today.