25
My first real program broke after 6 months and I had no idea why
I made this little script to track my plant watering schedule back in January. It worked fine for months. Then last week it just stopped. Wouldn't run. I spent 3 hours staring at it before I realized I hardcoded a date in the logic and it expired. Totally forgot I did that. Now I'm going back through all my beginner projects to check for stuff like that. Has anyone else found old code doing something dumb like this?
3 comments
Log in to join the discussion
Log In3 Comments
rowan_thomas847d ago
Hardcoded an expiration date?? That is actually hilarious.
4
hill.margaret7d ago
Hard coding an expiration date is amateur hour, yeah, but what really gets me is that nobody questioned the logic behind it. Did they just think users would throw away perfectly good hardware once the clock ran out? It makes you wonder what other shortcuts they took behind the scenes if this was their idea of a clever plan. I bet the person who wrote that line is still working there too, probably got a promotion for all we know. Sometimes I think companies treat their customers like they're too stupid to notice, but this one is so bad it almost feels like a prank. Exactly how long did they expect people to not look at the code or talk to each other about it?
4
grantp146d ago
75 cents was the actual cost savings per unit by hardcoding that date instead of a proper firmware update system. I get why people laugh, but this is actually standard practice in budget hardware - they ship thousands of units with the same chip, same code, same everything, and the expiration is basically a lazy way to force replacement cycles. It's sloppy, sure, but I bet the engineer who wrote it was told "make it stop working after 18 months" and just did what they were asked. The real joke is management thinking nobody would notice or care, not the coder themselves.
2