O
30

That week I wrote 500 lines of code that all broke on Friday

I'm a total beginner, been learning Python for like 3 months. Last Tuesday I got on a roll and wrote this big script to organize my music files. Felt like a genius, 500 lines, no errors. Showed it to my buddy who codes for a living. He actually laughed out loud. Turns out I had 17 syntax errors hidden behind bad indentation. Spent all Friday night fixing it line by line. Really dumb mistake, I used spaces and tabs mixed together the whole time. Finally got it working at 2am. Has anyone else made a total mess of their first real project like this?
2 comments

Log in to join the discussion

Log In
2 Comments
the_lucas
the_lucas16d ago
Dude I did the exact same thing with my first project mixed tabs and spaces all over the place.
7
hill.troy
hill.troy16d ago
@the_lucas you ever stare at your own code and wonder if you accidentally wrote it in a fugue state? Because that's where I was at 3am on a Tuesday. Mixing tabs and spaces is a special kind of chaos, like building a concrete foundation with both metric and imperial measurements. It works until it absolutely doesn't. I still catch myself hitting tab out of muscle memory and then backspacing like a madman. Real talk though, spending a whole afternoon fixing it taught me more about formatting than any tutorial ever did. That pain stays with you.
8