Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
TeachMeCode3602280dEverything about this pile of shit is wrong, but the wrongest of all the wrongs in this crap is what he’s putting in account.isDeleted
Oktokolo10151280dThat snippet is a piece of art illustrating the concept of a brainfart using what at first glance just looks like a kitbashed StackOverflow answer.
I really like the application of multipass overwriting, which was useful thirty years ago for securely erasing data on magnetic hard drives, floppy disks and tapes to a database record highly likely to not end up at the same physical place on HDD or SSD on each write.
He also uses his frankencode randomness generator to make the record look like it hasn't been deleted to non-human actors only for no apparent reason.
This might verry well be a timebomb as we don't see the actual deletion, which could be guarded with an obscure condition...
If you see such code in your company, you seriously need to consider upgrading the employee health plans ASAP. Having well-maintained teeth is nice and all, but mental health matters too.