ylliX - Online Advertising Network

Contact Us

Charles is supporting a PHP based application. One feature of the application is a standard “Contact Us” form. I’ll let Charles take on the introduction: While it looks fine on the outside, the code is a complete mess. The entire site is built with bad practices, redundant variables, poor validation, insecure cookie checks, and zero […]

Plugin Acrobatics

Once upon a time, web browsers weren’t the one-stop-shop for all kinds of possible content that they are today. Aside from the most basic media types, your browser depended on content plugins to display different media types. Yes, there was an era where, if you wanted to watch a video in a web browser, you […]

Recursive Search

Sometimes, there’s code so bad you simply know it’s unused and never called. Bernard sends us one such method, in Java: public static GroupEntity find(String group) { return GroupEntity.find(group); } This is a static method on the GroupEntity class called find, which calls a static method on the GroupEntity class called find, which calls a […]

Objectified

Simon recently found himself working alongside a "very senior" developer- who had a whopping 5 years of experience. This developer was also aggrieved that in recent years, Object Oriented programming had developed a bad reputation. "Functional this, functional that, people really just don't understand how clean and clear objects make your code." For example, here […]

Secondary Waits

ArSo works at a small company. It's the kind of place that has one software developer, and ArSo isn't it. But ArSo is curious about programming, and has enough of a technical background that small tasks should be achievable. After some conversations with management, an arrangement was made: Kurt, their developer, would identify a few […]

The First 10,000

Alicia recently inherited a whole suite of home-grown enterprise applications. Like a lot of these kinds of systems, it needs to do batch processing. She went tracking down a mysterious IllegalStateException only to find this query causing the problem: select * from data_import where id > 10000 The query itself is fine, but the code […]

Pay for this Later

Ross needed to write software to integrate with a credit card payment gateway. The one his company chose was relatively small, and only served a handful of countries- but it covered the markets they cared about and the transaction fees were cheap. They used XML for data interchange, and while they had no published schema […]

Uniquely Validated

There's the potential for endless installments of "programmers not understanding how UUIDs work." Frankly, I think the fact that we represent them as human readable strings is part of the problem; sure, it's readable, but conceals the fact that it's just a large integer. Which brings us to this snippet, from Capybara James. if (!StringUtils.hasLength(uuid) […]

Counting it All

Since it’s election day in the US, many people are thinking about counting today. We frequently discuss counting here, and how to do it wrong, so let’s look at some code from RK. This code may not be counting votes, but whatever it’s counting, we’re not going to enjoy it: case LogMode.Row_limit: if (File.Exists(personalFolder + […]

A Matter of Understanding

For years, Victoria had a co-worker who "programmed by Google Search"; they didn't understand how anything worked, they simply plugged their problem into Google search and then copy/pasted and edited until they got code that worked. For this developer, I'm sure ChatGPT has been a godsend, but this code predates its wide use. It's pure […]