Fetching Transactions

by in CodeSOD on

When companies reinvent their own accounting software, they usually start from the (reasonable) position of just mirroring basic accounting processes. You have transactions, for an amount, and then tagged with information about what the transaction actually represents. So, for example, if you wanted to find all the transactions which represent tax paid, you'd need to filter on some metadata and then sum up the amounts.

It quickly gets more complicated. In some organizations, that complexity keeps growing, as it turns out that each department uses slightly different codes, the rules change over time, this central accounting database gradually eats older databases which had wildly different rules. Before long, you end up with a database so krufty that it's a miracle SQL Server doesn't just up and quit.


Annotated Private Members

by in CodeSOD on

Shery sends us perfectly innocent looking Java class, marked up with some annotations. The goal of this class is to have an object which contains a list of names that is definitely not null. Let's see how we did.

@Data @Builder @NoArgsConstructor @AllArgsConstructor public class NamesHolder { @NotNull private List<String> names; }

Time is Time in Time and Your Time

by in Error'd on

Shocked sharer Rob J. blurts "I feel like that voltage is a tad high."


Counting References

by in CodeSOD on

If you're working in a research field, references matter- specifically, the citations made by your paper and the citations eventually made against yours. But when programming, references can be hard.
Dorothy is a scientist, and understands that code itself is a valuable artifact- it's not enough to just to get the solution, but the code itself needs to be maintanable and readable. So when her peers get into trouble, they frequently come to Dorothy to figure out why.

This Java code is one such example:


Never Don't Stop Not Doing This

by in CodeSOD on

It's not nothing to never write confusing English. And it doesn't never influence the code that we write. Don't fail to look at this anti-pattern from today's un-named submitter.

If Not port Is Nothing Then portUnAvailable = False End If

A Slice of Spam

by in Feature Articles on

In addition to being a developer, Beatrix W manages a few small email servers, which means she sometimes needs to evaluate the kinds of messages arriving and their origins, especially when they're suspicious. One such suspicious message arrived, complete with a few malicious links, and some hints of possibly being the start of a spear-phishing attack.

That was concerning, and as it turns out, the email came through a vendor who specializes in sending marketing emails- but the requested sort (or at least the sort where you got confused about which box to uncheck at checkout and accidentially signed yourself up for a newsletter). So Beatrix tracked down the contact form on the company website.


Confessions of a Deep Copy

by in CodeSOD on

While JavaScript (and TypeScript) may have conquered the world, those languages have… unusual conventions relative to some lower level languages you might encounter. I recently was having a debate with a C-guru, who lamented all the abstractions and promised that well written C-code would forever be faster, more compact, and easier to read that the equivalent code in a higher level language.

That may or may not be true (it's not), but I understand his point of view.


Horned Megafauna

by in Error'd on

While we don't know the precise taxonomy of the fabled dilemma, this week's submissions include a few wild examples.

Jon has captured a classic sample of the anticancelling cancel, reporting "While bulk-deleting files from an S3 bucket, Amazon dangled a carrot in front of me only to cruelly whip it away at the last moment."


Archives