G
22

Took me 6 months to figure out why my code kept breaking

I used to write all my JavaScript functions in one giant file, like a 500 line mess. Then around March I finally tried splitting them into separate modules, one per job. My debugging time dropped from 3 hours to maybe 30 minutes on average. What made you finally break down and organize your code better?
2 comments

Log in to join the discussion

Log In
2 Comments
paige_west
paige_west26d ago
Wait, you mean I wasn't supposed to just dump everything into one file and hope for the best? Six months is honestly impressive, I probably would've just renamed it "final_v2.js" and called it a day.
3
milesrobinson
I used to be a "throw it all in one file" type too, but watching someone clean that mess up for six months really changed my mind about organization.
7