Be Thankful for Good Requirements

by Remy Porter in Representative Line on 2015-11-26

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.”

34 Comments - Last Comment @ 09:12

Mid-Stream Switch

by Ellis Morning in CodeSOD on 2015-11-25

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();
    spn.innerHTML = "";
    for (var i = 1; i <= 50; i++) {
    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 = "";

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

    return def.promise();

20 Comments - Last Comment @ 04:05

Confession: The Coin-Flip Hash

by Remy Porter in CodeSOD on 2015-11-23

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:

50 Comments - Last Comment @ 2015-11-26

End User Experience May Vary by Region

by Mark Bowytz in Error'd on 2015-11-20

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

54 Comments - Last Comment @ 2015-11-23

The Cleaner

by Remy Porter in CodeSOD on 2015-11-19

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:

57 Comments - Last Comment @ 2015-11-26

A Hardware Switch

by TJ Mott in CodeSOD on 2015-11-17

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.

145 Comments - Last Comment @ 2015-11-25
View Article Archives »