Radio WTF Presents!
Today's episode: "Quantity of Service", adapted for radio by Lorne Kates, from a submission by Lyfe
James stood on the precipice of a significant upgrade to his company’s reporting capabilities. Purchasing had cut a deal with the vendor ÜberWarehouse to upgrade their warehouse inventory tracking system from a basic .NET application with limited functionality to a full-blown data warehousing system. He jokingly called it the “Warehousing the Warehouse Project”. He was the only one who found it funny.
ÜberWarehouse wasn’t about to give that upgrade away for free, though. They sent James an invoice that could have easily filled his Yoda piggy bank with all the change from the nickel-and-diming contained within. The total of the invoice was significantly over the budget of the project, and that was a problem. Of particular interest was something ÜberWarehouse called “Memory Database”. The line item listed it as a “required” component, and it came with a price tag of $5,500USD.
James wanted answers from ÛberWarehouse in person, with hopes that he could negotiate the price down to something more palatable. They agreed to send Spencer, their head architect and chief excitement-generator to give James a demo that would knock his socks off.
Our sponsor, Puppet Labs, wants to know what your DevOps needs look like. Take their survey, and be entered to win some valuable prizes.
One of the well-known rules of life is that the most straightforward solution is usually the best solution. Obviously it's not always possible to "keep it simple, stupid," but one should aim to make their creations as self-explanatory and to-the-point as possible- otherwise it's easy to end up with a nightmare in terms of both maintainability and performance.
Some people, however, have chosen to defy that rule. One of them was Rube Goldberg. This engineer turned cartoonist became famous for inventing ridiculously complex contraptions to achieve the simplest tasks. And while Mr. Goldberg passed away in 1970, the concept of a "Rube Goldberg machine" outlived him, showing up in hundreds of cartoons, events, and comedy movies.
Robert ran a web service used to store legal file data for a number of clients. One day, he received an email from his biggest client, Excédent, asking to meet about a new requirement.
"We've purchased new accounting software that requires us to track an additional piece of data," Philippe, Robert's contact from Excédent, explained over the conference call a few days later. "Each of our cases must now have a ‘cost center' associated with it. There are a lot of these cost centers, so when our employees enter case data, we'd like for them to be able to pick the one they need from a list."
PHP often gets a bad rap. A lot of the time, that’s because it’s used by developers that don’t know what they’re doing, just like there’s nothing inherently wrong with spandex, but there are times, places and people where it is inappropriate. And don’t get me wrong, the language has made big strides in recent years (good luck finding a web server hosting one of those versions, though). But there are just uses of PHP that reinforce that reputation. Robert Osswald provides this example from the contact-form editing code of a domain registrar database.
Let’s say you have some JSON data from an AJAX request, and it looks like this: