Around 20 Meg

by in CodeSOD on

Michael was assigned a short, investigatory ticket. You see, their PHP application allowed file uploads. They had a rule: the files should never be larger than 20MB. But someone had uploaded files which were larger. Not much larger, but larger. Michael was tasked with figuring out what was wrong.

Given that the error was less than half a megabyte, Michael had a pretty good guess about why this was.


Movement Activated

by in Error'd on

England and the United States, according to the old witticism, are two countries separated by a common language. The first sample deposited in our inbox by Philip B. this week probably demonstrates the aphorism. "I'm all in favor of high-tech solutions but what happens if I only want (ahem) a Number One?" he asked. I read, and read again, and couldn't find the slightest thing funny about it. Then I realized that it must be a Brit thing.

We call it a Bowel MOVEMENT in North American English


Image Uploading

by in CodeSOD on

The startup life is difficult, at the best of times. It's extra hard when the startup's entire bundle of C-level executives are seniors in college. For the company Aniket Bhattacharyea worked for, they had a product, they had a plan, and they had funding from a Venture Capitalist. More than funding, the VC had their own irons in the fire, and they'd toss subcontracting work to Aniket's startup. It kept the lights on, but it also ate up their capacity to progress the startup's product.

One day, the VC had a new product to launch: a children's clothing store. The minimum viable product, in this case, was just a Magento demo with a Vue Storefront front-end. Strict tutorial-mode stuff, which the VC planned to present to stakeholders as an example of what their product could be.


Junior Reordering

by in CodeSOD on

"When inventory drops below the re-order level, we automatically order more," was how the product owner described the requirement to the junior developer. The junior toddled off to work, made their changes. They were not, however, given sufficient supervision, any additional guidance, or any code-reviews.

Dan found this in production:


The Contract Access Upgrade

by in Feature Articles on

Microsoft Access represents an "attractive nuisance". It's a powerful database and application development platform designed to enable end users to manage their own data. Empowering users is, in principle, good. But the negative side effect is that you get people who aren't application developers developing applications, which inevitably become business critical.

A small company developed an Access Database thirty years ago. It grew, it mutated, it got ported from each Access version to the next. Its tendrils extended outwards, taking over more and more of the business's processes. The ability to maintain and modify the database decayed, updates and bugfixes got slower to make, the whole system got slower. But it limped along roughly at the speed the business required… and then Larry, the user who developed, retired.


A Sniff

by in CodeSOD on

In November of 2020, the last IE release happened, and on June 15th of this year, the desktop app officially lost support on Windows 10. But IE never truly dies.

Eleanor inherited a web application for a news service. And, you won't be shocked that it's still doing user-agent sniffing to identify the browser. That's just plain bad, but by the standards of user-agent sniffing, it's not terrible code.


Poetry in Motion

by in Error'd on

So much cringe here today. Obviously, the first submission below just reeks of professional sycophantry on so many levels. I can't decide which is more offensive, the barefoot butcher or the grotesque attempt to humanize a vogon. To take the edge off, I'll start you out with a very old shaggy dog punchline. The actual setup for this groaner is pretty horrible, though someone on the internet has dutifully compiled the definitive collection of all known variants. Sparing you that misery, I'll cut straight to the chase: Rudolf the Red knows rain, dear. Now you can decide which gag is more worthy: that, or this.

My English vocabulary cannot convey the complexity of my feelings about Beatrix W. who shared a monstrosity, reporting innocently "I was just looking for a book about AppleScript by a Japanese author." Is there a Japanese word for "thank you for this gift but never do it again?"


Classical Solutions

by in CodeSOD on

CSS classes give us the ability to reuse styles in a meaningful way, by defining, well, classes of styling. A common anti-pattern is to misuse classes and define things like "redTextUnderlined" as a CSS class. Best practice is that a CSS class should define the role, not the appearance. So that class might be better named "validationError", for example. A class will frequently bundle together a bunch of stylesheet properties into a single, meaningful name. That's the ideal approach, anyway.

Now, Olivia's predecessor had an… interesting philosophy of how to use CSS classes.


Archives