4 ms·
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
by stuff4ben 5y ago
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.
- kingcharles 5y agoI 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.
- scollet 5y agoI think you made the wrong call here.
- inquist 5y agoOn the plus side, why are they storing gender info in the first place?
- kingcharles 5y agoBecause 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.
- jaywalk 5y agoWhy would you jump to the assumption that they don't need to store gender?
- easrng 5y agoBecause there are very few situations where storing gender is nesecary.
- lostlogin 5y agoHaving 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.
- totony 5y agoWhy? Looks good to me
- drewzero1 5y agoRight, it may be a clever fix but it's not safe to assume a user's gender based on their name or honorific.
- jfrunyon 5y agoI'm not sure that you understand what the distinction between "Mr" and "Mrs" is.
- zarzavat 5y agoWhat did you do about 'Dr's?
- kingcharles 5y agoI can't remember if the system had Dr. as an option. Probably not, IIRC.
- jayzalowitz 5y agoDoctors arent people, they are student loan debt... not neccesary.
- bellyfullofbac 5y agoI 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.
- donohoe 5y agoYeah, 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.
- Igelau 5y agoThis 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.
- donohoe 5y agoVery true and in general I agree, but there are levels of mistakes and/or unprofessional decisions. This is in the higher end of that.
- Dudeman112 5y agoWhile 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.
- jaywalk 5y agoOh 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.
- jamil7 5y agoAh, that feeling of dread in your stomach as the realization hits.
- tintor 5y agoHow much damage did you cause to become a better developer because of it?
- stuff4ben 5y agoThat'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.