The Magic Array
by in CodeSOD on 2025-12-08Betsy writes:
I found this snippet recently in a 20-year-old RPG program.
Betsy writes:
I found this snippet recently in a 20-year-old RPG program.
It feels like ages ago, when document databases like Mongo were all the rage. That isn't to say that they haven't stuck around and don't deliver value, but gone is the faddish "RDBMSes are dead, bro." The "advantage" they offer is that they turn data management problems into serialization problems.
And that's where today's anonymous submission takes us. Our submitter has a long list of bugs around managing lists of usernames. These bugs largely exist because the contract developer who wrote the code didn't write anything, and instead "vibe coded too close to the sun", according to our submitter.
Darren is supporting a Delphi application in the current decade. Which is certainly a situation to be in. He writes:
I keep trying to get out of doing maintenance on legacy Delphi applications, but they keep pulling me back in.
Remy's Law of Requirements Gathering states "No matter what the requirements document says, what your users really wanted was Excel." This has a corrolary: "Any sufficiently advanced Excel file is indistingushable from software."
Given enough time, any Excel file whipped up by any user can transition from "useful" to "mission critical software" before anyone notices. That's why Nemecsek was tasked with taking a pile of Excel spreadsheets and converting them into "real" software, which could be maintained and supported by software engineers.
As we enter into the latter portion of the year, folks are traveling to visit family, logging off of work in hopes that everything can look after itself for a month, and somewhere, someone, is going to make the choice "yes, I can push to prod on Christmas Eve, and it'll totally work out for me!"
Over the next few weeks, I'm hoping to get a chance to get some holiday support horrors up on the site, in keeping with the season. Whether it's the absurd challenges of providing family tech support, the last minute pushes to production, the five alarm fires caused by a pointy-haired-bosses's incompetence, we want your tales of holiday IT woe.
Today, Reginald approaches us for a confession.
He writes:
Part of the "fun" of JavaScript is dealing with code which comes from before sensible features existed. For example, if you wanted to clone an object in JavaScript, circa 2013, that was a wheel you needed to invent for yourself, as this StackOverflow thread highlights.
There are now better options, and you'd think that people would use them. However, the only thing more "fun" than dealing with code that hasn't caught up with the times is dealing with developers who haven't, and still insist on writing their own versions of standard methods.
Someone wanted to make sure that invalid routes logged an error in their Go web application. Artem found this when looking at production code.
if (requestUriPath != "/config:system") &&
(requestUriPath != "/config:system/ntp") &&
(requestUriPath != "/config:system/ntp/servers") &&
(requestUriPath != "/config:system/ntp/servers/server") &&
(requestUriPath != "/config:system/ntp/servers/server/config") &&
(requestUriPath != "/config:system/ntp/servers/server/config/address") &&
(requestUriPath != "/config:system/ntp/servers/server/config/key-id") &&
(requestUriPath != "/config:system/ntp/servers/server/config/minpoll") &&
(requestUriPath != "/config:system/ntp/servers/server/config/maxpoll") &&
(requestUriPath != "/config:system/ntp/servers/server/config/version") &&
(requestUriPath != "/config:system/ntp/servers/server/state") &&
(requestUriPath != "/config:system/ntp/servers/server/state/address") &&
(requestUriPath != "/config:system/ntp/servers/server/state/key-id") &&
(requestUriPath != "/config:system/ntp/servers/server/state/minpoll") &&
(requestUriPath != "/config:system/ntp/servers/server/state/maxpoll") &&
(requestUriPath != "/config:system/ntp/servers/server/state/version") {
log.Info("ProcessGetNtpServer: no return of ntp server state for ", requestUriPath)
return nil
}