24
PSA: My coworker said my code looked like 'spaghetti' and I got mad until I looked again
I was showing my new dashboard project to a senior dev at lunch and he just said 'this is some real spaghetti code.' I got defensive for a minute, told him it worked fine. But then I actually opened up the file and counted 7 nested if statements in one function. He was right. It felt bad but it made me rewrite the whole thing cleaner. Has anyone else had a moment where criticism stung but actually helped you level up?
2 comments
Log in to join the discussion
Log In2 Comments
josephf1012h ago
Tbh I had almost the exact same thing happen to me like two weeks ago. A senior called my function a "trainwreck" and I was ready to fight until I actually looked at it and saw I had like 60 lines of pure chaos with no comments. One function was doing data validation, formatting the output, AND sending an email all at once. I rewrote it into 4 small functions and honestly it felt so much better to read after. That sting in the moment turned into one of the best lessons I've had so far.
1
green.mason8h ago
Close buddy of mine went through this same thing last month. His senior told him his code looked like "spaghetti thrown at a wall" and he was fuming until he actually read it back. He split it into smaller parts too and said it was the most useful feedback he ever got, even if it stung at first.
10