Recent Articles

Nov 2013

Gone Phishing

by in Feature Articles on

Juan's job wouldn't have been so bad if not for the rampart stupidity. Stupidity was responsible for deciding a 25k+ employee corporation only needed a skeleton-crewed IT department. And that same level of stupidity was spreading across the entire C-level of the org chart.

The IT office, such as it was-- a single converted room in the basement-- was its usual sparsely populated self, made up of just Juan, and his few remaining coworkers. Everyone else had either been caught by the last swing of the budget axe, or had seen it coming and had bailed. The team that remained was a tight mix of competent enough to be seen as valuable; hard-working enough to be taken advantage enough; and skilled enough to leave, but too lazy to do so.


A Privacy Monstrosity on Top of a Coding Monstrosity

by in CodeSOD on

I don't think that this will come as much of a surprise, but websites capture the details of your visit.

We here at TDWTF use Google Analytics to see who visits our site, but don't panic - it's not in some creepy, quasi-legal, three (or four) letter government agency way - really we just want to have an idea of who our readers are. Interpreting the collected browser and GeoIP data can take some time, so thank goodness installing the hook to collect site stats is a breeze. Just copy/paste some JavaScript that Google tells you to add into the page you want to monitor, and you're good to go.


Record Setting Performance

by in Feature Articles on

It was Friday, but the atmosphere at Andy’s firm was far from celebratory. The launch for their new product line was a flop, with long website outages resulting in customer complaints and slumping sales. The cause was easy to pinpoint: the ETL job for the new product line’s database took upwards of 30 minutes to run each time, causing timeouts and locks from which the rest of the infrastructure couldn’t bounce back.

Development and rollout had been entrusted to a consulting firm, and their CEO received an irate phone call. “Not to worry”, he said. Their expert would fix this.


Obviously!

by in CodeSOD on

T. L. has a co-worker, Taran, who was obviously the best there was, is, and ever will be. Taran had a penchant for using the word obviously. In almost every sentence. Of every paragraph. Of everything he ever wrote and said. Even in his comments. Most folks tried to ignore it, but after hearing it umpteen-thousand times, it began to wear a bit thin.

To his credit, Taran was a fairly bright person. This made their boss think that the other team members were obviously less than adequate, what with them needing obvious things explained to them all the time. To rectify this, he started replacing the lay-folk with people that Taran felt were obviously more qualified. After about a year, most of the team had been rotated out for people who were obviously better suited to their assigned tasks.


C++ is Bad!

by in Error'd on

"I tried to commit to SVN but unfortunately, this C++ is bad. Bad, bad, bad C++ this!," writes Alex.


A Method Gone Too Far

by in Representative Line on

The submitter of the below code, who chooses to remain Anonymous, recently started a job at a social media company as a software engineer. Seeing that they had never had anyone dedicated to their iOS product before, apparently they were quite excited.

Unfortunately for our submitter, the codebase is the stuff of nightmares - ternary operators stacked five deep on a single line, etc. There are no model objects, so they just pass around lots of dictionaries and strings thusly:


Jumping the Resigna-gun

by in Tales from the Interview on

A large bank is one of those places where bureaucracy tends to rule supreme. While that makes it easy to goof off while waiting for other people to make decisions, it can also leave you exposed in the middle of a storm of bad decision-making. That's just what happened to Paul when his team had to hire a new Windows sysadmin. One of the recruitment firms they partnered with - Human Solutioneering - put them in touch with Bob. Bob was very strong in administration and Active Directory, and he already lived in Iowa, where the bank was headquartered.

Paul and his H.S. contact had been through several hires that quarter, and they both knew the drill: since the team had given Bob the green light, they just had to wait for management sign-off. Paul said they would most likely extend a formal offer by the end of the week. When Friday came around, though, Paul received a no-go email from his boss:


Breaking Delphi

by in CodeSOD on

Delphi, like all languages and tools, has its uses. Some folks use it for good. Others use it for evil. Still others somehow manage to break the language itself.

Oliver T. has been using Delphi 7 for the last decade. In particular, he has a DLL that has worked quite well during that time to produce a variety of MS Word document for his clients to send to their clients. With the advent of new requirements, he imported the Word Type Library for Office 2007, and compilation failed. Puzzled, he clicked "Find Declaration" on break, and saw this:


Control

by in Feature Articles on

“It’s about control,” said Mr. Martinet. “We are a large organization- a Fortune 500 company- and large organizations cannot operate without strong controls.”

Luigi nodded. “I understand the need for checkpoints in such a large team.”

“Yes, well, you’re very smart- you wouldn’t be here if you weren’t. We hire only the smartest people we can, Luigi, but it doesn’t matter how smart people are if you don’t have control.”


Never Mix Sushi with DML

by in Error'd on

Ross wrote, "My local Japanese restaurant has some pretty strict rules about working with databases while you eat."


Printer Futility

by in Feature Articles on

Like a ninja in the night, Hanz M., AKA Hanzo, stalks across Hesse University’s Dresden campus. The go-to man in the IT department, he fixes the messes that others leave behind. This is one of his stories.

"This is why we can’t have nice things," Gertrude said. She and her subordinate, Hanzo, sat near the IT office phone, on speaker and on hold. "The administration picked the one manufacturer without on-site tech support."


Best atoi() Implementation Ever

by in CodeSOD on

Most people know atoi() - it's been in C since before it was ANSI C... but here's a little Objective-C nugget from some sample code that was sent to "help" Joseph H. implement a client for a web API.


-(char) atoi:(char) a{
    if (a >= '0' && a <= '9') {
        return a - '0';
    } else if (a >= 'a' && a <= 'z') {
        return a - 'a' + 10;
    } else if (a >= 'A' && a <= 'Z') {
        return a - 'A' + 10;
    } else {
        return 0;
    }
}

Recursive Recruiting

by in Feature Articles on

After being burned by The Old Switch n’ Bait, RJ was at his wit’s end with the recruiting firm his company forced him to use. The recruiter he had to work with, Brandon, was the HR Director’s brother-in-law. She insisted Brandon did a great job and he deserved another shot after such an honest mistake. “Brandon can be a little scatterbrained but he knows how to find good people! LOL!” she sent him in an email. “He wants to pass along some more resumes for you and apologizes profusely for the Jiang ordeal.”

They now had two senior .NET developer positions open. RJ needed them filled, so he decided to see what Brandon had to offer. As it turned out, Brandon had lots of email messages, but no resumes. Brandon’s email didn’t have any attachments on it. RJ decided to give Brandon a call directly to ensure he did something right for once.


The Nephew Way

by in CodeSOD on

Who among us hasn't had to scan a list looking for particular items? Sometimes, as you discover more and more items of interest, you need to explicitly resize the target list to hold them.

From the Bible of MSDN:

Array.Resize
"This method allocates a new array with the specified size, copies elements from the old array to the new one, and then replaces the old array with the new one."

Can't YouTube and Google Get Along?

by in Error'd on

"Trying to get training on the new Google Apps console layout, I attempted to watch a video," writes Ari Sitnik, "Unfortunately, the owners of YouTube were not asked by Google to allow a higher number of views per day. If only the two companies would coordinate better!"


I Love the Smell of Popcorn in the Morning

by in Feature Articles on

Years ago, Movietech Solutions created ticketing and management software for movie theatres. The DOS version of their flagship app had been quite popular with smaller and mid-sized chains throughout North America for years, so it was no surprise that when the Windows 95 version was announced - with its integration with front-line touch screens, self-service kiosks, and boatloads of management reporting - that it was quickly adopted. For the most part, the upgrades happened without issue. New hardware would be ordered and installed by a local IT person, data migrated and business carried on as usual. Except for when it didn't. When this happened, corporate sent out James. A.K.A. 'The Cleaner'.

While there is definitely a Bad @$$ sound to the title, being a cleaner is just a combination of trainer, installer and jack-of-all-trades. James would spend a few days on-site putting the pieces together, followed by a couple of days training the staff on the new system, handling any hardware issues that arose and basically getting the software through the teething stage.


Fourth Time's the Charm

by in CodeSOD on

For those who aren't familiar, the script below is a wrapper to fsck.xfs - a script that is supposed to repair an XFS journaling filesystem upon boot-up of a Linux server.

Out of the box, it does nothing, thus leaving many admins to author their own hacked-together solutions, often in response to an immediate, urgent need. Usually, these type of quick fixes are kept under wraps from the powers that be, or rather, anyone who might be in any way the slightest bit script-literate.


The New Line in Performance

by in Feature Articles on

In any development shop, there are always a few projects that become notorious. Resources are piled on them until failure is unavoidable. Deadlines slip, skid, and careen into the abyss. Deliverables are rejected again and again.

Carl had managed to avoid working on any of those projects, but he watched them. Each was a slow-motion train-wreck, in Gantt chart form.


Interesting Year Length Logic

by in CodeSOD on

Glidder’s associate Anastasia, one of the resident DBAs at Big Blue Box, perpetually ran on Anastasia Time. She always seemed to work late, rushing away for coffee or other, White Rabbit-esque errands.

Eventually, Anastasia moved on, and Glidder got promoted to DBA. His first assignment was a year-old bug filed by Accounting: two reports showed different age groups for the same file.


I Am Error

by in Error'd on

"Some faculty members have a reputation for being scatterbrained, but Professor Error takes the cake," writes Matt E..