HACKER Q&A
📣 cucumberladybug

Trial&Error vs. Getting things right the first time


Senior developer here. This is kind of a weird question, hopefully somebody has experienced something like that and has any suggestion.

I realized that on my daily workflow I make a lot of simple mistakes, sometimes syntax errors, or entering the wrong value of a constant,... the kind of problems I cannot just catch by running a linter. That's never been a huge deal as I usually can test things locally and fail fast before sharing my work with other people, so I just got used to work in a tight trial and error loop.

Recently I started a new position at an organization where even deploying to dev environments requires an approval process and I can't test or reproduce things locally. In this scenario my silly mistakes are costly in terms of time and reputation, as I have to frequently resubmit the PR and start the process again.

So basically I'm looking at some ideas or tips for "getting things right at the first time".


  👤 _benj Accepted Answer ✓
That is def not a weird question.

I've noticed that I also make a bunch of silly mistakes when my brain is tired, like, after a long day of meetings or other things that are affecting me. If this is consistent I take it as an early sign of burnout and try to take some time off.

Something else that I do is let my code rest, like, open a draft PR and leave it there until the next day. Then the next day I'll just review it line by line. There's a lot of silly things I've caught that way!

Honestly Idk if there's a way to "get things right the first time" because of... Idk, being human? (at least in my case) but do check if there are any external factors that might be affecting you, and if you have a good manager that you feel comfortable talking to (this is rare... but there are some out there!) they can really help (maybe doing more system design and less coding for a while? mentoring? there's a bunch of things that seniors can do apart from coding)

Anyways, tons of luck!