T
2

My old college buddy told me my code was too messy and I got defensive but he was right

I was showing him this script I wrote for scraping our local weather data and he just said 'dude this is like a spaghetti monster threw up on my screen'. I was annoyed at first because I spent like 3 hours on it Sunday night. But then I looked at it again and realized I had like 12 nested if statements and no comments anywhere. He showed me how to break it into functions in like 10 minutes and now I can actually read what I wrote from last week. Has anyone else had a friend call them out on bad habits and it actually helped?
2 comments

Log in to join the discussion

Log In
2 Comments
kim191
kim19115d ago
Disagree a little here. I've had friends criticize my code too and sometimes it just comes down to style differences, not actual messiness. lol One guy told me my variable names were too long and descriptive, but honestly I'd rather read "temperature_fahrenheit" than "tmpF" when I'm debugging at 2am. Not saying your buddy was wrong about the 12 nested ifs because that's rough, but not every critique is gold. Some people just like things their own way and that's okay too.
7
the_lucas
the_lucas15d ago
Man, bad advice is everywhere but 12 nested ifs is not a style difference. That's a cry for help. Your buddy did you a solid.
1