r/learnprogramming • u/Total-Subject2763 • 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
13
u/mysticreddit Mar 07 '23
Also using a better text editor that lets you have a branching history / undo can help — that way you can go forward/backwards to narrow down the change(s) that caused the issue.
Even if you only have a linear undo history saving every N changes to unique files will let you do a visual difference to spot the bug.
Save foo.100
Undo 25 times, save foo.75
Undo 25 times, save foo.50
Undo 25 times, save foo.25
Undo 25 times, save foo.0
Now you can do diff foo.25 foo.50, compile a specific version, etc.