So Much Room
by in Representative Line on 2026-09-01Today's representative comment ran out of room.
int maxLen = getColumnSize(session, "audit", "text_value1") - 16; // Leave some room for
Today's representative comment ran out of room.
int maxLen = getColumnSize(session, "audit", "text_value1") - 16; // Leave some room for
All I can say in response to our anonymous submitter's story is, ALMOST?!
With the World Cup being hosted in North America this year, I remembered this story that happened back in 2014. At the time I was working in Brazil, for a company that builds software systems for public services. And, with the World Cup being hosted there, in came the opportunity for local agencies to invest in modernization, with pretty much a blank check to get new services, so long as it was deployed before the end of the World Cup. And so the sales people did what they did best, and went around trying to upsell whoever would be willing to buy — no matter our actual capacity for developing the things.
Some time ago, Charles shared with us some awful PHP, aka the most common sort. Today's code sample is maybe a little too big to sum up, but I'll let Charles take a crack at it.
It's so bad that even analyzing and laughing at it feels impossible. But it’s so bad, I couldn’t not share it.
Kevin sends us an exception handler from C++. Let's see if we can spot what's going wrong:
catch (Exception::Deadlock)
{
retry;
}
There are many cases where some sort of debugging block sneaks by, especially cases where we see preprocessors or templates working, which leave us with nonsense like if (true == false) running in production. But Codemonkey found a new twist on that sort of thing, in a SQL query being run in production.
WHERE (some conditions) AND (1 = 0 OR (1 = 1 AND (other conditions)))
The opposite of meritocracy is kakistocracy: the worst and least-qualified are the ones who rise to the top.
Get real familiar with that word, dear readers. I think you'll need it.