Handling Mistakes as a Developer

This article is based on “A Pragmatic Philosophy” from the book: “The Pragmatic Programmer”.

Mistakes are Inevitable. It happens even in top-class projects, developed by top-class professionals having years of experience under their belt. Things can go wrong, unexpected errors can pop up in production, a minor change can break the build, the system can crash due to some unforeseen conditions. Being a professional, you are responsible for your work, even when it has gone wrong.

Here are some tips to handle mistakes professionally:

Think Before Commitment

Before making the commitment, analyze the situation, think about possible outcomes, what could go wrong? what has to be done? You are not necessarily in control of every aspect of the project, think about things which are beyond your control. Think about risk factors, worst scenarios, dependencies, timeline, the current status of the project. If the task is close to impossible or other Risks are too high, you have the right to say NO. Never commit anything which you know you can’t deliver.

Take Responsibility for Your Commitments

Once you make a commitment, it now your responsibility. It means you have actively agreed to ensure that something is done right and you are accountable for it. When something goes wrong, or you made a mistake, you must take responsibility for it. Never blame someone or something else. It is now on your shoulder. Never blame your tools, language, framework, technology or peers. You agreed to deliver something and you had a proper chance to think before the agreement.

Give Options, Not Excuses

When something goes wrong, take responsibility and escalate it to your team, manager or if necessary all stakeholders. Don’t play the blame game here, never give excuses like X.Y.Z framework had a bug in it, or code-base is messed up, or language is broken, etc. Instead, give possible options. Perhaps there is a workaround for that specific condition, or framework needs a replacement, or code needs some refactoring, etc. Give them options, discuss which one is better and work with them to resolve the issue.


Mistakes are part of the process, they will happen and should be dealt with professionally. Think before making a commitment and take responsibility for what you have committed. If something goes wrong, instead of giving excuses, give possible options. Discuss with stakeholder and resolve issues together.