G
28

Hit 1000 lines of code in my first project and felt nothing

I spent three weekends building a simple to-do list app in Python and when I finally crossed 1000 lines, I expected some big moment of pride. Instead, I realized half of it was copy-paste and bad logic that I had to rewrite later. Did anyone else hit a milestone like this and find out it didn't mean what you thought?
2 comments

Log in to join the discussion

Log In
2 Comments
robinson.paul
Had the exact same thing happen with my first Flask project. Hit 800 lines and realized I had written this huge function that was basically a mess of if-else statements checking for every possible user input case. I scrapped 400 lines and replaced it with a simple dictionary lookup and a loop. Felt way better after that because the code actually made sense and was half the size. Sometimes the real milestone is figuring out what to delete, not what to add.
3
the_morgan
the_morgan21d ago
Yeah, "simple dictionary lookup and a loop" really is the unsung hero of refactoring, isn't it @robinson.paul? Though I'd argue that feeling of clarity comes more from deleting the junk code than any actual cleverness in the replacement.
7