- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Maybe there was a saving grace: at some point, there was a
isNullOrNull()and someone thought: "great idea, we should also have the AND case".Maybe when they tried to reach their brains, it went not even 404 but Connection Reset, who knows.
Edit Admin
More likely ETIMEDOUT. Connection Reset (ECONNRESET) would indicate the connection reached the lump of nerve tissue(1), but was rejected with a TCP RST packet.
(1) I hesitate to call it a brain, frankly.
Admin
Oh, an LLM could certainly have made this mistake. Because this is a don't-care-don't-test level mistake, and LLMs are trained on the collective output of the 'web, which is 90% don't-care-don't-test.
Admin
isTrueAndFalseAndFileNotFound()
Edit Admin
"Let's say I have a database that's been poorly normalized and maintained."
They are all poorly normalized and maintained. Trust me.
Edit Admin
The first function should probably be called
isEmpty, that's a better name for testing for null or all-whitespace. But I've heard empty strings called null strings before, soisNullisn't so bad.Edit Admin
Edit Admin
And I, have become, ... comfortably null.
Admin
That's why I'm always surprised at how good (relatively) the quality of the code it generates is. I'd have expected the average of all code on the internet to be way lower.
Admin
Ha ha, that Jennifer Null link has this gem: "I feel like I still have to do things the old-fashioned way – Jennifer Null"
Not sure if that is an intentional joke on the part of the BBC, but I kinda doubt it is which is what makes it even funnier.
Edit Admin
Oh yes. Yes, you win The Interwebs for today.
Edit Admin
Oh yes. Yes, you win The Interwebs for today.
Addendum 2026-05-05 22:49: Ugh ... no way to delete the duplicate ...
Admin
Logical bug aside, I've definitely seen that stupid "null" check before... we have something similar in our product, because something in the distant past was coercing literal nulls into the string "null". Thankfully we've never had problems with that being a valid value in the data... someone's login name, etc.