23
A coworker showed me their "final" Python script and it was just 400 lines of if statements strung together
I walked over to help them debug a loop error and realized they had copy-pasted the same block of code 30 times with different numbers instead of using a list, which I guess technically works but took me a full 10 minutes to even figure out what they were trying to do - has anyone else seen someone reinvent the wheel in the most painful way possible?
2 comments
Log in to join the discussion
Log In2 Comments
tessa_kim312d ago
Did they at least add comments so future you could trace those copy-pasted numbers?
5
richard_mason12d ago
Last time I skipped comments on some hardcoded config values, the guy who had to update them 6 months later was me, and I spent 2 hours tracing which numbers came from where. @tessa_kim3 honestly, comments get stale fast when people copy-paste without updating them, and by the time you need them they're either wrong or missing. In my experience, a quick grep or a simple function name beats a paragraph of text that nobody bothers to maintain.
2