A CodeSOD article on The Daily WTF, dated 2026-07-15 and written by Remy Porter, discusses a pattern in a largely C project that a developer named Stevie submitted.
In that codebase, functions return a BOOL to indicate success or failure: TRUE means the call succeeded, and FALSE means it failed. The normal way to detect failure is `BOOL success = someFunc(); if (!success) { ... }`.
One long-time developer, however, used the opposite form: `BOOL error = someFunc();` followed by `if (error == FALSE) { ... }`. Inside that block the code handles the failure, often calling `errorCode = GetLastError();`. The variable name suggests that a true value signals an error, but it actually stores the success status.
Because this developer has enough seniority and the existing code has mass, the pattern has become the de facto convention in much of the project, even though it was never written down. Newcomers start with the clearer style, but the volume of existing code exerts stronger pull, gradually forcing them into the same confusing idiom. The author calls it less a genuine WTF than a persistent annoyance.
Comments
No comments yet — be the first.
Open the discussion
No account or password needed — just enter your e-mail and we’ll send you a one-time sign-in link. First time here? You’re set up automatically.
Your rating will be applied automatically after you sign in.
Check your inbox
We’ve sent a sign-in link to …. Open it on this device — this tab will sign you in automatically.
Nothing arrived? Check your spam folder — and mark the mail as "Not spam" so it lands in your inbox next time.