Recent Articles

Nov 2015

Databases Done Fresh

by in CodeSOD on

Wrapped by Aluminum foil and clear tape- other view

Nobody knew how Carl kept his job. Some said he was the boss' boss' nephew, or perhaps knew some dirt on the CEO. Some said he had been threatened with termination before, but his lawyer had advised the company it was cheaper to keep him than to get rid of him. Whatever the case, Carl's eccentricities were legendary.


Classic WTF: Who Needs Connectivity? I Have Service!

by in Feature Articles on
Today is traditionally the day in which Americans go into debt to sate the appetite of their economy. Let's go back to a simpler time- 2013- with this classic WTF about dial-up Internet service. Originally written by Kirby F.

Jim worked in the IT department of a university and one of his many jobs was maintaining the dial-up system.

Yes, that's right. Dial-up.


Be Thankful for Good Requirements

by in Representative Line on

In the US, today’s the Thanksgiving holiday. As I learned from A Charlie Brown Thanksgiving, it’s supposed to be about friendship, family, and being grateful for what you have. In common practice, it’s more about gorging yourself.

While I was perusing our inbox, I saw that Matthew sent me a “flow chart” that represented a set of requirements from his sales team. Immediately upon opening it, I said, “Thank goodness I don’t have to work on this.”


Mid-Stream Switch

by in CodeSOD on

Submitter James writes: "I'm working on a project that has as one of its components a Microsoft App for Excel 2013. My team lead wrote most of the app up to this point, and I'm adding features. While exploring her code, I ran into this little gem (in JavaScript):"


function ClearData() {
    var spn = document.getElementById("spntest");
    spn.innerHTML = "";
    var def = $.Deferred();

    var arBlankMiddle = new Array();
    var arNull = new Array();
    arNull.push(0);
    spn.innerHTML = "";
    for (var i = 1; i <= 50; i++) {
        arBlankMiddle.push([0]);
    }
    spn.innerHTML = "";
    var arBlank = new Array();
   // arBlank.push(arBlankMiddle);

    arBlank = [[""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""]];
    spn.innerHTML = "";
    $.when(writeData("A1:A50", arBlank), writeData("B1:B50", arBlank), writeData("C1:C50", arBlank), writeData("D1:D50", arBlank), writeData("E1:E50", arBlank), writeData("F1:F50", arBlank), writeData("G1:G50", arBlank), writeData("H1:H50", arBlank), writeData("I1:I50", arBlank), writeData("J1:J50", arBlank), writeData("K1:K50", arBlank), writeData("L1:L50", arBlank), writeData("M1:M50", arBlank), writeData("N1:N50", arBlank)).done(function (res1, res2, res3, res4, res5, res6, res7, res8, res9, res10, res11, res12, res13, res14) {
        spn.innerHTML = "";
        def.resolve();
    });

    //$.when(writeData("A1:A50", arBlank)).done(function (res1) {
    //    def.resolve();
    //});

    return def.promise();
}


The Guru and The Code

by in Feature Articles on

A logistics company isn’t the kind of company that invests heavily in IT, no matter how vital IT is for their business. That’s why Rich spent several years as the only developer. Most of his code was built to pick up data from one siloed turn-key system and dump it into a different one, or to integrate two in-house developed applications. On a bad day, he had to touch up the VBA macros in home-grown Excel spreadsheet someone in accounting had hacked together and had suddenly become “business critical”.

Guru teg bahadur.jpg
What a Guru might look like


Confession: The Coin-Flip Hash

by in CodeSOD on

There are certain problems in computing that you generally shouldn’t tackle unless you’re planning to make it your life’s work. Don’t write your own date handling logic. Don’t write your own encryption. If you do, you’ll probably screw it up, so use something developed by someone who knows what they are doing.

Handling passwords is a subset of encryption, in many ways. Samuel sends this to us as a confession- he hopes to unburden himself of his sins. It’s bad enough that he’s passing passwords in the clear, but he goes a step farther:


End User Experience May Vary by Region

by in Error'd on

"I guess eight of the ports are English-only," Andrew G. wrote.


The Cleaner

by in CodeSOD on

In software development, there are people who get the unenviable task of being the cleaner. Somebody makes a mess, and the cleaner comes in to take care of it. And that brings us to Tina.

I'm Winston Wolf. I solve problems.

Tina was brought in as a cleaner. There was an application that was a mess , and the powers-that-be wanted it taken care of. Tina took a look, and she noticed that there were a lot of round trips to the database. In fact, after profiling, it almost looked like every query ran at least twice. She saw code following this pattern everywhere:


The Enterprise Axe

by in Feature Articles on

If a piece of software is described in any way, shape or form with the word “enterprise” it’s a piece of garbage.

-Remy’s Law of Enterprise Software

“Enterprise” software products live in an uncomfortable space. They need to fulfill the needs of a business, without being specific to any one business. They’re a one-size fits all solution, and companies like Oracle or SAP compete on their feature-set and the customizability of their inner platform.


A Hardware Switch

by in CodeSOD on

Michele S. had recently worked on code for an engine-controlled device. Since the device had physically-moving parts operated by servos, the software had to be careful to not move anything out of bounds because it could actually break a physical piece of equipment.

Michele had written the low-level function which sets the position of a component.


Quality Overhaul

by in Feature Articles on

Road-under-construction

"Hey, did you see the email? They're remaking our website!"


Who Stole the Search Box?!

by in Error'd on

"Why, thank you, Microsoft, I do need assistance with... wait a minute!" Steve L. writes.


Your Recommended Virus

by in Feature Articles on

Stoned-virus-hexacode

In the early 2000s, Fernando was the Network Operations Manager for a wireless ISP known for its comprehensive customer support. They had techs who’d install the necessary gear, and consultants who’d arrive onsite to reconfigure computers, routers, firewalls, and everything else, until the customer was completely up and running. A small team of developers could even custom-build any small software apps a customer might ask for.


Confession: rect.Contains(point)

by in CodeSOD on

A few years ago, Josip M decided to try his hand at building games using C# and the XNA framework. He started implementing the classic board game, Nine Men’s Morris, but like most side projects, he lost interest and mostly forgot about it…

…until a few months ago, when he started cleaning up his hard drive, and found the code again. Then he remembered why he lost interest and abandoned the project:


Single-User Mode

by in Feature Articles on

It was a common occurrence for Jarosław F.’s brother, Andrzej, to call him for help. Andrzej worked as a data-entry specialist for the Polish Ministry of Employment, while Jarosław was part of the ministry’s IT department and moonlighted as a Python programmer.

One day, Jarosław answered another call from Andrzej. “No sane person can do this job,” Andrzej started. “There just aren’t enough hours in the day.”


Bonus WTF: Karmic Cascade

by in Announcements on

Our sponsors at Infragistics have a special treat over on their blog: an extra feature for today. It's a story of teamwork and "teamwork", and of course- disaster.

Infragistics Check it out.


All Wrapped Up

by in CodeSOD on

PHP has a lot of warts, and one of those warts is its approach to database interactions. If you want to talk to a MySQL database, every function for doing it is prefixed mysql_, and for say, Postgres, you’d use functions prefixed pg_. On the other hand, it uses an object oriented approach for talking to SQLite3, while Oracle not only has a set of oci_ prefixed functions, but has to add a bunch of important functions that make it just different enough as to be difficult to switch to.

It’s a bit of a mess, is the point, and the result is that a lot of developers will write some wrapper functions to make it easier to write generic code that’s not tied to a specific database engine. That is, presumably, what Scott’s co-worker had in mind when building this library of wrapper functions:


In Memoriam

by in Error'd on

"I went to get my stuff off the printer at work but it appeared to have passed," writes Kelly B..


Featurette: Puppet Labs

by in Feature Articles on

As we announced a few months back, Puppet Labs is one of our sponsors. As part of that arrangement, I got to go behind the scenes and learn a little bit about how things work at Puppet Labs.

Puppet Logo


Circle Space

by in CodeSOD on

Are you satisfied with your service today?

Answer a brief survey and enter to win a New* IPAD!!!!**

AFT-v2-CallToAction-Survey


Self Service

by in Feature Articles on

Anna’s employer made billing software for energy companies, and they had just entered into an exciting time: the Dutch utility market was loosening its regulations, and that meant a flood of startups were looking for a cheap way to bill their customers. Of course, their product was designed for the US market, not the Dutch market, but the CEO didn’t see that as a problem. “No worries,” he would say, “Anna’s our top notch configurator, and she’ll customize it for you in no time.”

Electrical Hazard (wiring)


Bonus WTF: Happy Birthday, George Boole

by in CodeSOD on
Today is George Boole's 200th Birthday. We've rerun this classic many times, but I can't think of a better time to reshare it! - Remy

The problem with "logic" is that it makes things out to be nothing but simple dualities. Proponents of logic want us to believe that everything is true or false, black or white, yes or no, paper or plastic, etc. Thankfully, there are some among us, like Mark Harrison's colleague, who are not afraid to stand up to these logic advocates and shout "no, I will not succumb to your false dichotomies!" Today, I think we all should salute those few brave people ...


Shadow Over XML

by in CodeSOD on

Halloween may be over, but it’s always a good time for a horror story.

Like many horror stories, Nick’s starts with a mysterious inheritance from a long-gone predecessor. This tool manages student data, and it needs to pull data from documents in Microsoft Word XML, using C#.