Cut Short

Marcus worked on a small networking team responsible for keeping a series of UK-based garages interconnected with the world-wide web. Seymour, the Team Leader (in title only), knew far less about networking than Marcus, but that didn’t stop him from acting like the big shot. Seymour was working a cash register at the original garage several years ago when the owner asked him, “You’re a young guy, right? That means you know how the internet works. What can we do to make this place internet-friendly?” After taking a Networking 101 course, Seymour managed to get the garage online, when enabled it to monitor gas prices and perform credit card transactions. This made Seymour a hero to the owner, and earned him the title, “Networking Team Leader” before he even had a team.

Eventually the garage grew from a single location into a chain. When each new location opened, Seymour made it “internet-friendly”, using the same techniques he learned at the original store, which usually involved sloppy cable runs and the cheapest router he could buy. When it came time to do more than just have the ISP arrive to show where Seymour to plug in the network cable, he was completely lost. Having multiple locations networked together was really advanced stuff, so he convinced the owner to hire some help.

Enter Marcus, who was willing to be hired on as Seymour’s subordinate while realizing he would be the de facto brains of the networking team. It didn’t take long for Marcus to realize he had his work cut out for him to get things in order. There were several hack-y solutions put in place that Marcus was able to improve upon, but in the end he got no credit for it because Seymour was there to take the accolades.

People gawking at a cabling horror, which is just one of the stranger pictures I've stumbled across on Creative Commons
CC BY-SA 3.0, Link

Seymour’s technical knowledge was only matched by his work ethic. He enjoyed leaving their humble office two hours early to perform things like phantom “receipt printer connectivity troubleshooting” at an undisclosed garage location. Marcus knew he was really just heading to the pub but didn’t say anything because it was better without Seymour around.

One Friday, a call came in that a garage’s network connection kept dropping. Seymour surprisingly volunteered, leaving out the detail that it was next to his favorite watering hole, the “Bee and Barb”. “I’m on it!” he said, springing up and grabbing his coat. “Have a good weekend, Marcus. Don’t work too hard!”

Marcus rolled his eyes and went back to work. An hour later he got a frantic call from Seymour. “Marcus! I need you to get over here, stat! Bring the network cabling toolkit, I forgot it there. This place has some bad cabling, I don’t know who has been touching it, but it’s a disaster! Oh, and I won’t be here when you arrive. I, uhh, got another call, I need to go!”

Marcus knew Seymour volunteering to work on something on a Friday afternoon was too good to be true. On the way to the garage, he just happened to spot Seymour’s car outside the “Bee and Barb”. Maybe he could at least get a free pint out of Seymour after he fixed this network cable.

Marcus went in the front door and asked the clerk if someone fitting Seymour’s description had been working on the internet cabling and where to find it. “Sure was. It seemed like a struggle. He kept cutting bits of it off and using profanity. Eventually he stormed off and just left it hanging there,” the clerk motioned towards the back corner, where bits of blue cable were strewn around a disconnected router.

He followed the trail of shredded cabling to just behind a large, difficult to move store display. There he spotted a tiny 1.5cm nub of network cable sticking out from behind the display. Beside them was a forgotten crimping tool, and discarded 8P8C connectors. Obviously, Seymour had been screwing up with fixing the cable. With each failed crimp, he would cut off a section and start over. He had botched it so many times that this was all that was left for Marcus to work with.

Marcus knew he only had 1 shot to put a new end on this cable before it would become necessary to run a new one- alone, and with a gigantic store display to be moved. With the deliberate care one would use to disarm a bomb, Marcus managed to crimp a new end on to the cable and jam it in to the router as it hung close to the wall. The garage’s internet was restored. Marcus quickly packed up and walked on over to the pub, where he planned to confront Seymour over a few pints.

[Advertisement]
BuildMaster integrates with an ever-growing list of tools to automate and facilitate everything from continuous integration to database change scripts to production deployments. Interested? Learn more about BuildMaster!


Cut Short syndicated from http://ift.tt/2vUIuoR

Paul Bakaus from Google: The Illusion of Speed – Improving the Perceived Speed of Websites.

Paul Bakaus, Developer Advocate at Google who heads up outreach for AMP, DevTools and Games, explains why perceived performance matters much more than…
Paul Bakaus from Google: The Illusion of Speed – Improving the Perceived Speed of Websites. syndicated from http://ift.tt/2vUIuoR

CodeSOD: Attack of the “i” Creatures

Mrs S” works for a large software vendor. This vendor has a tendency to quickly increase staffing to hit arbitrary release targets, and thus relies heavily on contractors. Since they’re usually doing this during a time crunch, these contractors may have a… dubious skill set.

They also don’t care. There is no documentation, no tests, and no explanation. They are just paid tho write the code, not maintain it. They’ll be on another contract before long, so it’s some other schmuck’s problem.

Which is why “Mrs S” found this code, which takes a version number, as a pair of integers, and converts them to a string, but still couldn’t tell you why it does any of the things that it does.

void SetFileName(unsigned short FileID, unsigned short* VersionNumber)
{
    //...
    for (i = 0; i < 2; i++)
    {
        if (VersionNumber[i] > 89)
        {
            FilePutName[13 + (2 * i) + i] = '9';
            switch (VersionNumber[i])
            {
            case 91:
                FilePutName[14 + (2 * i) + i] = '1';
                break;
            case 92:
                FilePutName[14 + (2 * i) + i] = '2';
                break;
            case 93:
                FilePutName[14 + (2 * i) + i] = '3';
                break;
            case 94:
                FilePutName[14 + (2 * i) + i] = '4';
                break;
            case 95:
                FilePutName[14 + (2 * i) + i] = '5';
                break;
            case 96:
                FilePutName[14 + (2 * i) + i] = '6';
                break;
            case 97:
                FilePutName[14 + (2 * i) + i] = '7';
                break;
            case 98:
                FilePutName[14 + (2 * i) + i] = '8';
                break;
            case 99:
                FilePutName[14 + (2 * i) + i] = '9';
                break;
            }
        }
        else if (VersionNumber[i] > 79)
        {
            FilePutName[13 + (2 * i) + i] = '8';
            switch (VersionNumber[i])
            {
            case 81:
                FilePutName[14 + (2 * i) + i] = '1';
                break;
            case 82:
                FilePutName[14 + (2 * i) + i] = '2';
                break;
            case 83:
                FilePutName[14 + (2 * i) + i] = '3';
                break;
            case 84:
                FilePutName[14 + (2 * i) + i] = '4';
                break;
            case 85:
                FilePutName[14 + (2 * i) + i] = '5';
                break;
            case 86:
                FilePutName[14 + (2 * i) + i] = '6';
                break;
            case 87:
                FilePutName[14 + (2 * i) + i] = '7';
                break;
            case 88:
                FilePutName[14 + (2 * i) + i] = '8';
                break;
            case 89:
                FilePutName[14 + (2 * i) + i] = '9';
                break;
            }
        }
        else if (VersionNumber[i] > 69)
        {
            FilePutName[13 + (2 * i)] = '7';
            switch (VersionNumber[i])
            {
            case 71:
                FilePutName[14 + (2 * i) + i] = '1';
                break;
            case 72:
                FilePutName[14 + (2 * i) + i] = '2';
                break;
            case 73:
                FilePutName[14 + (2 * i) + i] = '3';
                break;
            case 74:
                FilePutName[14 + (2 * i) + i] = '4';
                break;
            case 75:
                FilePutName[14 + (2 * i) + i] = '5';
                break;
            case 76:
                FilePutName[14 + (2 * i) + i] = '6';
                break;
            case 77:
                FilePutName[14 + (2 * i) + i] = '7';
                break;
            case 78:
                FilePutName[14 + (2 * i) + i] = '8';
                break;
            case 79:
                FilePutName[14 + (2 * i) + i] = '9';
                break;
            }
        }
        else if (VersionNumber[i] > 59)
        {
            FilePutName[13 + (2 * i) + i] = '6';
            switch (VersionNumber[i])
            {
            case 61:
                FilePutName[14 + (2 * i) + i] = '1';
                break;
            case 62:
                FilePutName[14 + (2 * i) + i] = '2';
                break;
            case 63:
                FilePutName[14 + (2 * i) + i] = '3';
                break;
            case 64:
                FilePutName[14 + (2 * i) + i] = '4';
                break;
            case 65:
                FilePutName[14 + (2 * i) + i] = '5';
                break;
            case 66:
                FilePutName[14 + (2 * i) + i] = '6';
                break;
            case 67:
                FilePutName[14 + (2 * i) + i] = '7';
                break;
            case 68:
                FilePutName[14 + (2 * i) + i] = '8';
                break;
            case 69:
                FilePutName[14 + (2 * i) + i] = '9';
                break;
            }
        }
        else if (VersionNumber[i] > 49)
        {
            FilePutName[13 + (2 * i) + i] = '5';
            switch (VersionNumber[i])
            {
            case 51:
                FilePutName[14 + (2 * i) + i] = '1';
                break;
            case 52:
                FilePutName[14 + (2 * i) + i] = '2';
                break;
            case 53:
                FilePutName[14 + (2 * i) + i] = '3';
                break;
            case 54:
                FilePutName[14 + (2 * i) + i] = '4';
                break;
            case 55:
                FilePutName[14 + (2 * i) + i] = '5';
                break;
            case 56:
                FilePutName[14 + (2 * i) + i] = '6';
                break;
            case 57:
                FilePutName[14 + (2 * i) + i] = '7';
                break;
            case 58:
                FilePutName[14 + (2 * i) + i] = '8';
                break;
            case 59:
                FilePutName[14 + (2 * i) + i] = '9';
                break;
            }
        }
        else if (VersionNumber[i] > 39)
        {
            FilePutName[13 + (2 * i) + i] = '4';
            switch (VersionNumber[i])
            {
            case 41:
                FilePutName[14 + (2 * i) + i] = '1';
                break;
            case 42:
                FilePutName[14 + (2 * i) + i] = '2';
                break;
            case 43:
                FilePutName[14 + (2 * i) + i] = '3';
                break;
            case 44:
                FilePutName[14 + (2 * i) + i] = '4';
                break;
            case 45:
                FilePutName[14 + (2 * i) + i] = '5';
                break;
            case 46:
                FilePutName[14 + (2 * i) + i] = '6';
                break;
            case 47:
                FilePutName[14 + (2 * i) + i] = '7';
                break;
            case 48:
                FilePutName[14 + (2 * i) + i] = '8';
                break;
            case 49:
                FilePutName[14 + (2 * i) + i] = '9';
                break;
            }
        }
        else if (VersionNumber[i] > 29)
        {
            FilePutName[13 + (2 * i) + i] = '3';
            switch (VersionNumber[i])
            {
            case 31:
                FilePutName[14 + (2 * i) + i] = '1';
                break;
            case 32:
                FilePutName[14 + (2 * i) + i] = '2';
                break;
            case 33:
                FilePutName[14 + (2 * i) + i] = '3';
                break;
            case 34:
                FilePutName[14 + (2 * i) + i] = '4';
                break;
            case 35:
                FilePutName[14 + (2 * i) + i] = '5';
                break;
            case 36:
                FilePutName[14 + (2 * i) + i] = '6';
                break;
            case 37:
                FilePutName[14 + (2 * i) + i] = '7';
                break;
            case 38:
                FilePutName[14 + (2 * i) + i] = '8';
                break;
            case 39:
                FilePutName[14 + (2 * i) + i] = '9';
                break;
            }
        }
        else if (VersionNumber[i] > 19)
        {
            FilePutName[13 + (2 * i) + i] = '2';
            switch (VersionNumber[i])
            {
            case 21:
                FilePutName[14 + (2 * i) + i] = '1';
                break;
            case 22:
                FilePutName[14 + (2 * i) + i] = '2';
                break;
            case 23:
                FilePutName[14 + (2 * i) + i] = '3';
                break;
            case 24:
                FilePutName[14 + (2 * i) + i] = '4';
                break;
            case 25:
                FilePutName[14 + (2 * i) + i] = '5';
                break;
            case 26:
                FilePutName[14 + (2 * i) + i] = '6';
                break;
            case 27:
                FilePutName[14 + (2 * i) + i] = '7';
                break;
            case 28:
                FilePutName[14 + (2 * i) + i] = '8';
                break;
            case 29:
                FilePutName[14 + (2 * i) + i] = '9';
                break;
            }
        }
        else if (VersionNumber[i] > 9)
        {
            FilePutName[13 + (2 * i) + i] = '1';
            switch (VersionNumber[i])
            {
            case 11:
                FilePutName[14 + (2 * i) + i] = '1';
                break;
            case 12:
                FilePutName[14 + (2 * i) + i] = '2';
                break;
            case 13:
                FilePutName[14 + (2 * i) + i] = '3';
                break;
            case 14:
                FilePutName[14 + (2 * i) + i] = '4';
                break;
            case 15:
                FilePutName[14 + (2 * i) + i] = '5';
                break;
            case 16:
                FilePutName[14 + (2 * i) + i] = '6';
                break;
            case 17:
                FilePutName[14 + (2 * i) + i] = '7';
                break;
            case 18:
                FilePutName[14 + (2 * i) + i] = '8';
                break;
            case 19:
                FilePutName[14 + (2 * i) + i] = '9';
                break;
            }
        }
        else
        {
            switch (VersionNumber[i])
            {
            case 1:
                FilePutName[14 + (2 * i) + i] = '1';
                break;
            case 2:
                FilePutName[14 + (2 * i) + i] = '2';
                break;
            case 3:
                FilePutName[14 + (2 * i) + i] = '3';
                break;
            case 4:
                FilePutName[14 + (2 * i) + i] = '4';
                break;
            case 5:
                FilePutName[14 + (2 * i) + i] = '5';
                break;
            case 6:
                FilePutName[14 + (2 * i) + i] = '6';
                break;
            case 7:
                FilePutName[14 + (2 * i) + i] = '7';
                break;
            case 8:
                FilePutName[14 + (2 * i) + i] = '8';
                break;
            case 9:
                FilePutName[14 + (2 * i) + i] = '9';
                break;
            }
        }
    }
}

It puts me in mind of this sketch from the classic MST3K episode. They just didn’t care.

http://ift.tt/2w3ajvN

[Advertisement]
Incrementally adopt DevOps best practices with BuildMaster, ProGet and Otter, creating a robust, secure, scalable, and reliable DevOps toolchain.


CodeSOD: Attack of the “i” Creatures syndicated from http://ift.tt/2vUIuoR