Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you haven't killed some production environment in your career, can you really call yourself a programmer? I kid of course, but I've been there, done that. It's lessons learned the hard way and I became a better developer because of it.


I once ran a query on a live production web site thinking I was doing a SELECT but somehow ran an UPDATE which set all the millions of users' gender to 'M', regardless of their selection.

Restoring from backups would have been a nightmare. And telling my supervisor would have been a nightmare.

So I used everyone's selected title (Mr, Ms, Mrs etc) to reset their gender setting, and then put the keyboard down and went to bed.


I think you made the wrong call here.


On the plus side, why are they storing gender info in the first place?


Because zero thought went into the account signup form. It just asked for whatever the coder who wrote it thought it needed. Shit, it might even have been me who wrote the signup. I don't remember. This was back in 1999. Now I try to ask for the absolute bare minimum of information to onboard someone. No information at all if I can! Times have changed. Damn, I don't even identify as a binary gender myself anymore and hate forms that ask me.


Why would you jump to the assumption that they don't need to store gender?


Because there are very few situations where storing gender is nesecary.


Having worked in a healthcare setting and having had a patient come through who had undergone gender reassignment surgery, it turns out to be easier get the surgery than to get their gender and name changed in the healthcare database.

I said I’d help them get it fixed, but I couldn’t get this done.


Why? Looks good to me


Right, it may be a clever fix but it's not safe to assume a user's gender based on their name or honorific.


I'm not sure that you understand what the distinction between "Mr" and "Mrs" is.


What did you do about 'Dr's?


Doctors arent people, they are student loan debt... not neccesary.


I wonder if the few Dr's could be fixed manually by checking their names, e.g. if they're Steven or Maria, the gender should be clear enough.

At least that was the case when I was young, but don't tell anyone I said this, the rage machine might knock on my door.


I can't remember if the system had Dr. as an option. Probably not, IIRC.


Yeah, but this one is particularly bad with a lot of real world consequences.

If I were that developer I would have never have blogged about it publicly. It is admitting to gross negligence IMHO.


This case study had a lot of valuable insights cooked into it, so I'm glad this developer blogged about it.

The myth of the developer who knows everything and never makes huge mistakes is a lie that needs to perish. I'd much rather work with someone who is upfront about their mistakes, the gaps in their knowledge, and can speak directly on serious issues of overwork, managerial incompetence, bad clients, and systemic fragility.


While I agree with the overall point of your reply, it would also be nice if we stopped normalizing some of these fuck ups.

Some errors actually happen due to professional negligence, and we should hold ourselves to better standards than "oopsie, updated a whole column in a table".

Assuming no exceptional circumstances, of course.


Very true and in general I agree, but there are levels of mistakes and/or unprofessional decisions.

This is in the higher end of that.


Oh yes. I've accidentally run a SQL UPDATE command without a WHERE clause and blew away everyone's password. Our process to restore a backup was very manual and time consuming back then, so it was fun sitting around and waiting for that to happen while everybody was locked out of the application.


Ah, that feeling of dread in your stomach as the realization hits.


How much damage did you cause to become a better developer because of it?


That's a fair question. Loss of a couple hundred thousand US dollars during an 8 hour window where a poorly performing SQL query during the payment pipeline caused purchases to hang. Indexes are great things... if you use them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: