Ask HN: What's your biggest programming mistake?
https://news.ycombinator.com/item?id=2170812After reading Flickr's accident deleting user's photos, it got me thinking of my own mistakes running a startup.
About 5 years ago I created my first startup, it was my first time building a application for users and didn't expect it to gain any traction. After the first month it received about 5,000 users. Naturally, I decided to focus on security a bit more and convert all user's passwords to a encrypted version in the database. As I was re-building one of the components (reset password page) I was preparing all the needed queries when I accidentally wrote a MySQL UPDATE query and forgot to put a 'LIMIT 1' at the end. =x Yep, I reset all 5k passwords to the same thing. I remember having a panic attack shortly after as I struggled to think of a remedy. It was a pretty low point in my career as a programmer but I learned quite a few lessons that day (like the importance of backups for starters). In the end, I ended up emailing all our users asking them to update their password via secure link to their email and no harm was done.
What was your biggest mistake as a programmer?