r/learnprogramming • • Mar 07 '23

Is it normal as a junior programmer..

To spend hours looking over the same block of code, trying to sort out ‘why the f*ck isn’t this working!?’, only to realize the error you made is so monumentally, and stupidly obvious that it leaves you feeling like a completely useless moron? Lol

1.6k Upvotes

297 comments sorted by

View all comments

195

u/insertAlias Mar 07 '23

Last week, I spent almost an hour debugging a particular error. I could not, for the life of me, understand why a particular bug I was working on just wasn't being fixed with the code I just submitted. It was doing things that it shouldn't have been able to do with the edits I made.

My error? I forgot to save the file before running the "deploy to dev" script. I was debugging the previous version of my code.

Another common issue: I'll bash my head against something for hours. Then call in another dev to look at my issue, only to realize exactly what the problem is while describing it to them. It's called Rubber Duck Debugging, and it's normal, but damned if it doesn't happen to me practically every time. I even try to do it without the other person, but for whatever reason, it still happens.

I've been doing this professionally for 16 years. We all make dumb mistakes and miss obvious issues. You just try to do better in the future.

28

u/[deleted] Mar 07 '23

I find it so embarrassing when you explain the issue and you come up with the solution

46

u/EspacioBlanq Mar 07 '23

That's why you explain it to the rubber duck first.

The rubber duck doesn't judge

15

u/nopethis Mar 08 '23

I need a new duck. Mine has gotten snarky

8

u/EspacioBlanq Mar 08 '23

Every so often you gotta replace the duck, because the old one knows too much about your flaws

8

u/Pantzzzzless Mar 07 '23

I always try type questions out in really great detail, because 9/10 I answer my own question.

23

u/Total-Subject2763 Mar 07 '23

Thanks for the insight!

11

u/[deleted] Mar 07 '23

Another common issue: I'll bash my head against something for hours. Then call in another dev to look at my issue, only to realize exactly what the problem is while describing it to them.

Oh man, this happens to me SO often. When I finally can't take it anymore and reach out for help, just the process of walking someone else through the problem causes me to finally notice it!

3

u/dysprog Mar 08 '23

Trying to serialize your mental graph of the problem forces you to touch the node that you've been ignoring.

2

u/PanopDev Mar 08 '23

My god,the amount of times I have had unsaved files in my folder causing shit to not work 🤬🤬🤬

I almost always look to see if save all is grayed out in vscode before checking my code now, but I do it so religiously that I forget to look for that for a while if I do forget.

1

u/Praying_Lotus Mar 08 '23

I brought my PG Unicorn to work and use that as my rubber duck lol

1

u/PhilipJayFry1077 Mar 08 '23

I do this shit alll the time lol

1

u/sunrrat Mar 08 '23

bash.sh

1

u/stratcat22 Mar 08 '23

I’ve figured out so many solutions to issues while typing up a question with multiple screenshots and detailed examples to my senior dev, it’s been a useful rendition of rubber ducking for me.