F
10
c/coding-for-beginnersjamieb80jamieb801mo agoMost Upvoted

Hit 1000 lines of code on my first project and felt like a fraud

I've been learning Python for 3 months and finally finished my first little app to track my dog's walks. When I checked the line count it was 1,024 lines and I freaked out thinking that's way too much for something simple. Did any of you feel weird when you hit a big number like that for the first time?
3 comments

Log in to join the discussion

Log In
3 Comments
claire872
claire8721mo ago
Tore mine down completely and started over from scratch actually. I had this todo list app that hit like 800 lines and when I looked at it I realized half of it was just me repeating the same stuff over and over. So I sat down and really thought about what I needed it to do and rewrote it in like 300 lines. It felt way better and I learned more from deleting code than writing it. The line count thing is just a number honestly, sometimes you need those extra lines just to figure out what you're doing. Once you get comfortable you'll naturally find yourself writing tighter code. But don't stress about it, everyone's first project is a bit of a mess.
8
gray_morgan
Nah man, 1000 lines just means you're efficient... wait, that's not right.
6
sean_green44
Start by looking at what claire872 said about repetition... that's usually the biggest hidden problem in newbie code. You'll find yourself writing the same ten lines three times before you realize a loop or function would do it all in five. The cleaner your code gets, the less those big numbers matter because you're focusing on making it work instead of just making it long.
5