The lessons a young developer learned from a $10,000 mistake that almost cost him his job

Oh no.
Oh no.
Image: Reuters/Molly Riley
We may earn a commission from links on this page.

This question originally appeared on Quora: What are the programming mistakes most inexperienced programmers make? Answer by Ken Mazaika, CTO, co-founder, and mentor at theFirehoseProject.

I made a mistake that cost my company more than $10,000 dollars.

Let’s rewind.

I used to feel like an unstoppable programmer—I had a bit of an ego problem. I should have checked myself before I wrecked myself, but in the end, the mistake that I made helped me grow into a smarter and more humble developer.

I was on my first job as a Rails developer.

I was young, hungry, and eager to make a difference to prove my value. Like most developers, I joined a small team. Through sheer work ethic and long days, I gained responsibility for a small project, which quickly became a pretty significant money maker for the company.

Despite my inexperience, I would do my best to quickly and efficiently implement code changes whenever people asked for them. Things happened quickly, and given my limited experience with Ruby and the Rails framework, I had absolutely no idea how to do things the correct way.

The code was a bit of a disaster, but things worked. By coding like a cowboy, I could hack things together to allow our team to move very quickly. I didn’t have any test coverage, but my boss, who probably should have known better, didn’t seem to care.

Things were perfect. But then something catastrophic happened.

I shipped an experimental feature late on a Friday evening. Everyone at the company was eager to see early results of the experiment the following Tuesday (Monday was a holiday). Monday morning, I checked my email and noticed several strange email chains.

I started to piece everything together, and soon realized that I had completely broken an application for a large subset of users. Our company was very data-driven, so it didn’t take long for me to determine that my mistake had cost our company well over $10,000 dollars.

First thing the next morning, I apologized to my boss… then promptly asked if I was going to be fired. Without skipping a beat, he responded with a quote from a famous urban myth:

Why would we fire you? We just spent $10,000 teaching you a lesson.

So, what was the lesson?

Mistakes have consequences. They can cause companies to lose customers, money, and credibility. But the only thing worse than making a mistake is deciding to never put yourself in a position to make the mistake in the first place. The risk of stalling innovation and learning, and letting your competitors move faster than you is far more dangerous.

I’m pretty sure my boss knew that I would break something eventually. I was young, inexperienced, and had more responsibility than I was ready for. But operating in such a fast-and-loose manner allowed me and our team to move incredibly quickly—just at the risk of breaking things, which I ultimately did.

I learned more in the nine months that I worked for that company than at any other point in my career. In my biggest screw up, I learned the lessons that all senior developers figure out over time:

  • Don’t launch new features on a Friday (especially over a long weekend).
  • Always understand exactly what is at risk of breaking when you launch new features.
  • Always audit and verify that the code works as expected as soon as the code is launched.
  • But, most importantly, don’t ever be afraid to “move fast and break things.”

There’s a reason why this has been Facebook’s mantra for years. In most professions, mistakes indicate carelessness. But in software, calculated risks are acceptable. Senior developers have already made the same mistakes that you’re probably going to make.

Never be afraid to put yourself in a position to make mistakes as long as the risk is worth it. It’s the only way you’ll grow into becoming a better developer.

You can follow Quora—the knowledge sharing network where compelling questions are answered by people with unique insights on Twitter, Facebook, and Google+.

More from Quora:

What are some things that look easy but are difficult?

What are the most common lies told by programmers?

As a programmer, what is the coolest thing you have ever created alone?