That first case is hideous (hope Linus agreed with me!) but does remind me of my favorite computer scientist joke:
===
The physicist is showing his friend the programmer a thermos.
"You see, you can put a hot drink inside, and then take it with you. It doesn't matter how cold it gets outside; when you pour the drink out it's still hot!"
The programmer is quite impressed.
The physicist continues, "Or you can put a cold drink inside, and then take it with you. It doesn't matter how hot it gets outside; when you pour the drink out it's still cold!"
Now the programmer is really dumbfounded.
He asks, "But how does it know?"
===
Unfortunately though I like the joke, I still see waaay too much code written by the programmer in the joke.