Base of the Hash

by in CodeSOD on

Jamie Kitson followed the instructions to integrate their software with a new payment provider. The payment API was fairly straight forward, mostly a straightforward call to a web endpoint. As an error check, the request required an base-64 encoded, MD5 hash of its contents appended to the end of it.

Jamie did just that, in C#. And the payment processor balked: the hash was wrong. There was no information beyond that, just "bad hash".


The Set Up

by in CodeSOD on

My heretical opinion on object-oriented programming is that I don't like getters and setters. They're often trivial boilerplate (boilerplate is a code smell), or they're hiding behavior where behavior probably doesn't belong.

Yes, yes, I understand the importance of encapsulation, but in a lot of ways, trivial getters/setters break encapsulation. void setFoo(T foo) { this.foo = foo; } does nothing to protect foo against unauthorized modifications.


The Apex of Development

by in CodeSOD on

David S writes: "I'm undertaking a refactor and facelift of an Oracle APEX application."

That, already, is the real WTF. Oracle Application Express, or APEX (formerly ApEx, formerly HTML DB) is Oracle's offering in the low-code business application space. Using a WYSISYG designer, you build pages and bind them to SQL queries, stored procedures, etc., allowing users with little to no programming experience to design data driven applications.


Only the Beginning

by in Error'd on

I have been surprised to find that some people who are in technology fields don't have a clear grasp on the difference between RAM and "disk" storage. Or perhaps more accurately these days, "Direct Access Storage Devices." I've eventually become accustomed to it from ordinary folks, but PC World?

An anonymous reader sent in this one, explaining "Yep. According to PC World Starfield will require 125 GB of available RAM so you'll need at least 128 GB or more RAM installed to play. The Steam page correctly list the item as Storage: 125 GB available space so this is completely on PC World. To add insult to injury the post is titled Bethesda’s Starfield PC system requirements: An SSD is mandatory so you'd expect at the very least to get the storage requirements right. Rush to print, trip and fall flat on your face. Thanks for the WTF, PC World!"


Paging the Bean

by in CodeSOD on

Today's an interesting case of code that seems perfectly reasonable at first glance. Sent to us from FinalGuy, this Java code caused no end of problems for him due to its rather unexpected behavior:

public void setCurrentPage(int currentPage) {
    if ( currentPage < 1 ) {
        currentPage = 1;
    }
    if ( currentPage > maxPages ) {
        currentPage = maxPages;
    }
    this.currentPage = currentPage;
}

Evaluating Tax Burdens

by in CodeSOD on

Many years ago, Westie's employer got hired to help a client rebuild their tax advice website. The current version was… not in good shape, didn't provide a good user experience, and was incredibly unmaintainable. Westie's mission? Rewrite it from scratch.

As these projects go, however, the requirements were ill documented, and basically were "Uh, just make it do all the same things, but it shouldn't suck anymore."


Universal Stream

by in CodeSOD on

Twenty years ago, Stefano Z worked with some Very Smart Very Senior Engineers. These Very Smart Senior Engineers liked to find all sorts of "interesting" solutions to common problems.

For example, they had a module in C++ that needed to send data to other systems. To formalize this messaging, they needed a set of Data Transfer Objects (DTOs). Now, there are many libraries that might make generating these kinds of objects easier, but the Very Smart Very Senior Engineers didn't want to use a library. So they started out with just large piles of hand coded:


DXL

by in Feature Articles on

Managing requirements for even a simple project is a nightmare. As projects get more complicated, "requirements management" mutates into "systems engineering". The requirements for, say, an entire IT migration, or an automobile, or a lunar lander turn into a tree of requirements, where each implementation step is traced back to an overall master requirement at the root of the tree. Five to one, your average project isn't this complicated, but you don't want to ship a product missing features and have to say "it slipped my mind".

Enter a certain large vendor's Dynamic Object Oriented Requirements System (DOORS). Doors allows the requirements for a large, complicated product, to be organized into objects which are further organized into modules, where each object is a requirement, paragraph, section, table, figure, or anything that explains the nature of requirements.


Archives