29
Heard a senior dev say "don't optimize until it hurts" and it clicked for me
I was listening to a stack overflow podcast while installing a fence in Naperville last week and heard this guy talk about how beginners always try to write perfect code from the start. He said to just get it working even if it's ugly, then fix what actually breaks. That really helped me stop stressing over my little python script for tracking fence materials, I was spending hours on stuff that didn't matter yet. Has anyone else found it hard to just let code be messy at first?
3 comments
Log in to join the discussion
Log In3 Comments
butler.mark2mo ago
The real question is how do you know when it actually HURTS though. Thats the part nobody ever explains. I spent 6 months on a project and by the time my loops were taking 45 seconds I had already built SO much stuff on top of that bad foundation. A simple refactor turned into a total rewrite because I let it go too long. Timing is everything.
3
lilychen2mo ago
yeah @butler.mark i feel that. but actually 45 seconds per loop is more than just "hurts" at that point, that's broken haha. you gotta catch it when it starts creeping up past like 2 or 3 seconds during development, not when it becomes a full on nightmare to run.
1
colemartinez1mo ago
Buddy of mine spent three months building a data scraper for his research project. Wrote it all clean and pretty from day one. Hit production and realized his database queries were so bad the whole thing froze after 200 entries. Had to rebuild the entire backend from scratch because he optimized the wrong stuff early.
3