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

Show parent comments

3

u/lordheart Mar 08 '23

If I start having to nest to many loops I’ll pull out the inner loop into a function, and repeat till it’s cleared up.

1

u/patternboy Mar 08 '23

That sounds like a really good solution. I've just recently started writing functions so it didn't occur to me. Come to think of it, a reusable function could be hugely useful for processing subprocess outputs more quickly going forward. Thanks for sharing!