24
case when horror then omg else jfc end fml
(programming.dev)
I can only pray that that's some (bad) ORM-generated code because that's the only way I can bear to keep breathing.
The only explanation is that this was written on a TV.
that's exactly why I'm not a fan of automatically generated DB backends data frameworks. the abstraction often can't handle edge cases and looking under the hood is often a horror
What idiot wrote that one by hand
Welcome to Programming Horror!
This is a place to share strange or terrible code you come across.
For more general memes about programming there's also Programmer Humor.
Looking for mods. If youre interested in moderating the community feel free to dm @Ategon@programming.dev