🎙️
14

Hit 10,000 lines of Python in three months. Did not plan that.

3 comments

Log in to join the discussion

Log In
3 Comments
dakota_patel98
10,000 lines in three months is basically a full-time job on the side. I hit 8,000 lines in two months building a scraper that kept breaking every time the website updated its CSS classes. My advice is to go back and refactor the first 2,000 lines now because future you will HATE past you for not doing it. Also start adding comments for the functions you barely remember writing. I learned that the hard way when I could not figure out what a 300-line block was supposed to do.
2
verawhite
verawhite16d ago
Took me a solid month to realize my own 200 line "doEverything" function was making everything worse... Ended up just rewriting the whole thing from scratch because untangling it was giving me headaches. Those CSS class changes are the worst though, I remember spending a whole weekend fixing selectors that broke overnight. Comments are great and all but I still forget to add them half the time, then three weeks later I'm staring at my own code like I've never seen it before. Refactoring early is smart but nobody actually does it until they're stuck at 2am with a broken build...
9
hayden_nelson85
My buddy Mike ran into this exact same mess last year. He was building some kind of inventory tracker for a small shop and hit 6,000 lines in about two months. The first 1,500 lines were this tangled mess of if-else statements that he swore he'd clean up later. Well later came when the shop changed their product categories and his code just fell apart completely. He spent three full weekends rewriting everything from scratch and now he literally prints out his old code and hangs it on his wall as a warning to future himself. He still doesn't add comments though, some people just gotta learn the hard way I guess.
5