m
message has been deleted
😄 1
😆 6
d
It didn't 🙂 Got one of those now actually...
❤️ 1
t
7. Oh, it never did. How did no one notice this for 14 years?!
👍 2
😂 2
d
8. How did anyone look at that code for more than 2 seconds and think it would? Much less write it?
j
After stages 7/8 has anyone else ever experienced finding out that the customer did know about the problem but they found their own workaround a decade ago and never communicated that there was an issue?
t
I just had a call like this 3 weeks ago... We've had a feature since the software's inception in 2005. It's been mildly broken forever. It was finally reported as a bug about a year ago. And 3 weeks ago, I was on a call with a client that was literally, "oh, year, we've been doing this to work around it since 2009."
😂 2
d
🎉
j
Ha! Oh man does that make me feel better. Thanks for that.
t
(fwiw, this one i do understand how it would "work" for so long -- we had a query that assumed a value was unique - and it is, for everyone that has a value. The issue is the hundreds of people where where the value is blank...)
j
Oh that old chestnut? Always a fun one. 😜
d
NULLs are a trap
While we're talking about bogus code, it turns out that DELETE FROM xxx WHERE someID in (SELECT invalidColumnName FROM yyy) doesn't throw an error, it deletes ALL records from xxx. Ask me how I know :)
😱 2
m
message has been deleted
d
Actually not as awful as it could be. Small number of records, that are actually the current versions of records we have all history for. After I finish putting up the fix for the code that did that, I need to recover that deleted data from the history records. In 5 tables. Not looking forward to that, just fiddly stuff. And also work I made for myself, yay.
Also a cautionary tale about testing. There are a ton of paths through this code, and rather than constantly retest everything while trying to track this down, only a few common patterns were tested. Those happened to work, of course. And yes there should be a core api you can test procedurally, and do. Yes on 1, kinda, no on 2.
g
A long time ago _ I did : update table set all patients to dead... No where clause... that was a fun morning!
👀 1
d
We've all had (at least) one of those no where clause moments. Good times.
j
Yep. We've all been there.