L
12

I finally understood why my code kept breaking after a talk with a senior dev at a meetup

I was at a Python meetup in Austin last month, and this guy with 15 years experience looked at my messy script and said 'you're trying to solve everything at once.' He showed me how breaking it into smaller functions cut my debugging time from 3 hours to 20 minutes. Has anyone else had a random conversation like that totally shift how you approach coding?
2 comments

Log in to join the discussion

Log In
2 Comments
ryanh77
ryanh773d ago
Right, because who needs sleep when you can have one giant function that does all the stuff badly, right? That "break it up" advice is honestly the closest thing to free therapy we get in this field.
6
the_barbara
Trying to solve everything at once" - man that hit me right in the chest reading that. I had almost the same thing happen at a JavaScript meetup a couple years back. A senior dev looked at my monolithic function and just said "you're trying to do too much in one place" and walked me through splitting it out. It was like a light bulb went off. Now I write small functions that each do one thing and it's so much easier to find bugs when they pop up. That one conversation totally changed how I structure everything even now.
5