Recent CodeSOD

Code Snippet Of the Day (CodeSOD) features interesting and usually incorrect code snippets taken from actual production code in a commercial and/or open source software projects.

Jan 2026

No Yes

by in CodeSOD on

It's common to see code in the form of if (false == true). We get a fair bit of it in our inbox, and we generally don't post it often, because, well, it's usually just a sign that someone generated the code. There's a WTF in that, somewhere, but there's not much to say about the code, beyond, "Don't generate code, pass data from backend to frontend instead."

But Nicholas sends us one that shows a little more of interest in it.


The Utils

by in CodeSOD on

We know 2026 is not a leap year. But how do we know that? We need to call some function to find out.

Steve sends us a bit of representative code; on it's own, it's not so bad, but with the broader context, it's horrifying: