DEV Community

Damien Cosset
Damien Cosset

Posted on

Handling repetitive mistakes

You make a mistake. Shit happens, nobody is perfect. Maybe your boss or client tells you that it is okay, just be careful next time.

Next time is right on the corner, and behold, you make another mistake... Things are told to you a little less nicely. You are doing your best, but you just keep making stupid mistakes. Mistakes you know you shouldn't be doing, but with the pressure, the stress, the rush... everything you do seems to be a major struggle.

I'm currently in this situation. I just can't seem to do anything right. I feel like I'm doing my best, but I just can't stop myself from fucking things up. People are losing money, or their patience, or their heads. I'm being quite pragmatic about it, as periods like that most likely happen to everyone.

Have you ever been in such a situation? Where you just have one of those days or weeks of being a terrible programmer? How do you deal with it?

Top comments (12)

Collapse
 
weswedding profile image
Weston Wedding • Edited

One thing I have had to learn to do over the years, when I'm in this situation or if I see someone else in this situation, is to try to take a moment to step back and assess the situation from an external perspective and look for answers other than "the individual making the mistakes is the problem."

I've been in jobs or seen other people in jobs where "stupid mistakes" or "the same mistakes" start to happen and when that happens it is often because someone has a work load that suddenly increased or is simply unfair to expect out of someone. Quite often an employer has done little to nothing to help them prepare for the increased workload and then gets grumpy when existing management approaches/systems break down.

It's easy to blame the individual (or yourself, in this case) but sometimes it's external factors. Sometimes it means the approach or systems you use to manage your chaos wasn't intended to handle the load you're dealing with now.

Collapse
 
damcosset profile image
Damien Cosset

I did find out that better communication with my hierarchy about the workload and my current abilities could have avoided a lot of problems indeed.

Collapse
 
pesse profile image
Samuel Nitsche • Edited

I chewed some days on that post now, but want to share my 2 cents.
It's hard to give you qualified advice without knowing your situation, but being in development for quite some time (and having taught apprentices most of that time) makes me want to share some thoughts:

First of all - what is a mistake? Most mistakes we face are due to unclear specification, unspecific vision, lack of communication. To analyze what's the cause of a mistake that happened is the most important part. And it's really, really rare that individual "misbehavior" is the root cause.

I once had an apprentice who repeatedly confused dev/prod database for updates. First I was very annoyed because that could have very serious consequences. But the problem was not that he was incapable to avoid "stupid mistakes", the problem was that I thought it would be as easy for him as for me to set up an environment where it's easy to distinct between dev and prod. So we went through his IDE/Environment and set up both a naming convention and colorization to distinct the connections. The mistake never happened again.
So, was it my apprentice's fault? No, in the end, it was my fault because I had wrong assumptions, leading to expectations which could not be fulfilled with the given circumstances (unstructured/unclear environment).

In my experience, mistakes are often caused by wrong assumptions.
One wrong assumption could be that it's easy for everyone to do the exact same steps in a defined sequence, even if there are months between. I know it's easy for some people, I know it's fucking hard for other people like me. I tend to forget things after a while.
The solution, in that case, can be automation, for example. By accepting my inability to remember strict sequences of action after some time I force myself to search for solutions - beyond changing myself (because I don't think I will be successful).

Another big problem in all quality-related terms is lack of time/amount of workload and pressure.
If you want to get quality results, you have to lower the pace. Otherwise, our brains tend to fall into panic/escape mode, means the limbic brain - responsible for emotions and instinctive behaviour - becomes more active. The problem hereby is, that the limbic brain suppresses the activity in the prefrontal cortex, which is necessary for analytic and logical thinking.
That means that high pressure anatomically leads to less analytic thinking and more instinctive behavior - something pretty suboptimal for programming tasks.

Good leaders will know about this and they will try to help you identify the root cause of your mistakes.
So - if you keep doing mistakes over mistakes, for me that sounds like a sure sign for lack of leadership/mentorship. That doesn't necessarily mean that you have bad managers. But it's something to be addressed and should be discussed.
You can, of course, try to find the root cause yourself by reflecting on all aspects of the workflow which lead to the mistake. You already started doing so, which is fantastic from my point of view.
Maybe you can also ask your manager/leader to help you with reflection - that requires a certain level of trust of course.
Or you can try to find someone outside your environment who you trust and reflect onto the specific details of your mistakes.

Whatever you do - I wish you much energy and confidence!

Cheers,
Sam

Collapse
 
damcosset profile image
Damien Cosset

Such a fantastic comment. My situation definitely falls into the workload and pressure category. I can clearly recall a time where I just couldn't think straight and every "simple" task became incredibly difficult.

Great stuff about the brain!

Thank you so much!

Collapse
 
pesse profile image
Samuel Nitsche

Glad my comment was helpful :)
You have now several options to deal with the pressure problem:

  • Increase your resilience toward stress. Structuring your tasks can help, as can set clear borders between work/non-work. Your company is not everything - and I say this as someone who has a burnout history, so I know it's pretty hard to really absorb that. Dev.to is a great resource for tips about mental health in dev. Having non-dev hobbies/friends/social contacts definitely helps, too. And having enough sleep (I'm guilty on this one, too, but working on it)
  • Decrease the amount of workload/stress you're exposed to. This can happen through speaking about your issues with your manager, but again this requires a high amount of trust and a competent leader. It can happen through requesting clear prioritization and making the actual effort needed to solve a task more transparent. If neither helps, thinking about changing your workplace might be a good option, too. You're too valuable to get burned by careless managers/company culture. Again: I have some personal experience in that area :)
  • If you have thoughts like "but I'm too bad/inexperienced to ever find a job somewhere outside my company" I would highly encourage you to start searching for a job pretty soon. Chances are very high that your company actively works on such a mean and toxic culture to prevent you from leaving. Good managers/leaders will encourage you to thrive and help you in growing personally. Things will not get better, but you will continue to suffer.
Collapse
 
kayis profile image
K

Somehow I often was the least bad person doing the job, haha. So yes I failed often, but other people around me failed more, so it didn't matter.

I got screamed at once for not doing something before going home early. I asked for early leave, my boss said yes but do XYZ first, I didn't, he got angry.

Anyway, to get back to your problem. I have the feeling that in software development, people think they know more than they actually do. They bite off more than they can chew, then they got too much complexity in their systems and fail until they get time for a rewrite or a major refactor. I saw this soooo many times. People smarter than me getting fired because they try to do things above their skills.

It helped me to admit what I don't know, be a bit less ambitious, and deliver value with a bit more boring systems.

Don't know if this is your problem or not, but it helped me to get better at what I do, at least in the eyes of people paying me, haha.

Collapse
 
damcosset profile image
Damien Cosset

Well, I can absolutely see a bit of myself in that description xD

I do have to admit to the people above me when I need more time to figure stuff out. I tend to take shortcuts when I'm under pressure, and I ALWAYS pay the price later on.

Thank you :)

Collapse
 
kayis profile image
K

The trick is to replace the shortcuts with simpler design up front.

Maybe this will involve a bit more repetitive coding, but at least you still got control.

Delivering "acceptable performance" with fewer bugs is often preferable to delivering "awesome performance" with many bugs.

Thread Thread
 
alainvanhout profile image
Alain Van Hout

Hear hear!

Collapse
 
ferricoxide profile image
Thomas H Jones II

To most rational people it's less a question of whether mistakes continue to happen (they will; it's inevitable - especially when not-exactly-reasonable deadlines are being applied), but whether the same mistakes continue to happen.

Of course, what's really fun is when you do something right and it exposes a mistake - usually made by someone else - that's laid dormant for a long period of time. Then you have the joy of proving that, not only did you not make the mistake but that your choices exposed a prior, latent flaw. Good times.

Collapse
 
jess profile image
Jess Lee

I just need to share that immediately after I read your post, I made a mistake twice in a row.

Collapse
 
federhico profile image
federhico

Today is "that" day... for many of us. My boss tell me no more than 30 minutes before i read this "same thing again? is necessary that put myself to do your job?"
Sad Wednesday