Recent Articles

Jan 2014

Born on the 34th of Smarch

by in Error'd on

"I encountered this security question when logging into my bank's website after they released a new version," Brendan writes, "I always knew that weird calendar we used growing up would pay off!"


Thanks Bill!

by in CodeSOD on

Alan’s coworker, Bill, had a bumper sticker on the back of his desk chair: Do not meddle in the affairs of wizards, for they are subtle and quick to anger. Bill acted the part, if all wizards looked homeless and didn’t shower for days on end. But Bill didn’t tolerate any criticism of his skills as a DBA, whether from Alan or anyone else at the company.

“Why would you use a stored procedure for that?” he’d storm. “Do you know how long that would take to execute?”


ASP Holes

by in Feature Articles on

Dave was closing in on the end of his college career and receiving a degree in IT. He hoped to get his name out into the “real world” ahead of time, so he sent his meager resumé to a few head-hunters in hopes that they would line something up shortly after his tossed mortarboard hit the ground.

The problem was that he had no relevant work experience, since he spent college focusing on extra-curriculars (see: Chess Club, Magic: The Gathering tournaments, Keg Stand Saturdays). This seemed to limit Dave’s job prospects, until a Chicago-based company came calling. When they asked for an interview, he set aside the challenge it posed: a 3 hour drive, each way, during the school week, through insane Chicago traffic.


But the Tests Prove it Works Correctly!

by in CodeSOD on

I. G. wrote about an incident that caused him to nearly give himself a concussion from a *headdesk* moment. A newly developed system was meticulously designed, coded and tested to obscene levels; all appeared well.

Unfortunately, upon deployment, it began acting erratically, returning incorrect results from numerous database queries. After many debugging sessions and code walkthroughs, it was discovered that the developers had used the following pattern for all the database DAO tests:


A Temporary Problem

by in Feature Articles on

Andy Dahl had suffered his share of delays at the hands of the NonLocal HelpDesk, but usually they were simply a matter of insurmountable language barriers or inexplicable delays. Today the threat was somewhat more sinister...

HelpDesk, NonLocal [14:13]: 
regarding your computer slowness issue
share the screen

**SCREEN SHARING INITIATED BY Dahl, Andy** [14:14]

HelpDesk, NonLocal [14:17]: 
give me control 

**SCREEN CONTROL INITIATED BY Dahl, Andy** [14:18] 

Dahl, Andy [14:23]: 
S%Topt
S%TOP
%

**SCREEN CONTROL TERMINATED BY Dahl, Andy** [14:23]

HelpDesk, NonLocal [14:24]: 
do shift+ delete
i am unable to do it form here

Dahl, Andy [14:25]: 
what are you trying to delete?

HelpDesk, NonLocal [14:25]: 
its a temporary files

Dahl, Andy [14:25]: 
You can't delete all those files you selected.
They are not all temp files.

HelpDesk, NonLocal [14:26]: 
they are

Dahl, Andy [14:26]: 
No. They are not all temp files. Just because something has the letters 'temp' in it does NOT mean it is a temp file.
MasterOrderTemplate.xml, CoreTemperatureController.cpp, and UpdateTemporaryJobPostings.SQL are resource that I NEED. They are NOT temp files.

HelpDesk, NonLocal [14:27]: 
while we run this search
(.*temp.*)
we will get only the temp files

Dahl, Andy [14:27]: 
No. You will get every file that has the letters 'temp' in the file name. Not all of those are temp files.

HelpDesk, NonLocal [14:27]: 
No
not like that
what happens is temp files are system generated it should not be the original file that you have on the folders in order to resolve the issue i need to delete it even the next level will do the same

Dahl, Andy [14:30]: 
With all due respect, I'm sorry but I can't allow you to delete those files. Not all of them are temp files.

HelpDesk, NonLocal [14:30]: 
alright
i will assign this ticket to next level


Welcome Back Ramesses II!

by in Error'd on

"I spotted this at the station in Nîmes," Dee Jakobsen remarked, "I had no idea that hieroglyphs were used in the south of France."


The Temporal Countdown Timer

by in CodeSOD on

Most modern languages have the concept of letting your code sleep for a specified period of time. This is useful when you want to perform a particular task at some point down the road. It's usually implemented such that your program requests to yield control for a certain number of milliseconds. The OS will usually guarantee that your code will remain in blissful slumber for at least that amount of time, plus whatever random delay is imposed by multitasking and OS overhead.

Some folks use sleep intervals to allow for periodic updating of some tally, or perhaps a clock. Of course, smart programmers check the actual time after being awakened so as not to allow the difference between requested and actual sleep time to skew things.


Call Me, Maybe

by in Feature Articles on

The problem with helpdesk ticketing systems is there's rarely anywhere to file a ticket about them, but that didn't stop the users of WTF U's incident management system from raising hell when their new staff cellphone numbers caused this error:

Like all diligent university procurement departments, WTF U's had carefully considered their approved list of Highly Paid Consultants and then hired two of their own Computing Science majors to develop the Integrated Departmental Incident Outcome Tracker, rolled out with slight customizations to all university departments. Being in Greater London, the values entered in the phone number field had always been ten digits long and in the 020 local exchange — the leading zero being dropped when interpreting the number as an integer. The campus IT department, pursuing their mandate of never leaving anything bloody well alone, had recently rolled out mobile phones to their technicians so they could be harassed by professors whilst on vacation. UK mobile numbers begin with 07 followed by nine digits, and as soon as a tech tried to enter his new number in the tracker, he was confronted by the foregoing error.


Income

by in CodeSOD on

While checking the local news, Sarat discovered an “income ranker” widget on a news site. He put in his monthly income, and discovered that he was in the top 0.08% richest households in India. Surprised to discover that he was a gazillionaire, Sarat took a look at the JavaScript code which ran the widget.

The function definition started with function submitmyform(), which already looked pretty bad. Sarat looked for the block responsible for calculating the result, and found this charming anti-pattern:


Security by Password

by in Feature Articles on

ISP's typically provide you a network login and password, and perhaps another pair for accessing the account management pages. After all, protecting access to your account, and potentially your data was, is and always should be important.

Phum S. patronized an ISP that took that security to the next level.


Discriminatory Savings

by in Error'd on

Stuart wrote, "If you go onto Costco's site, you'll find that it sucks to be Belgian."


GHOST Busted

by in Feature Articles on

Some developers look at a problem and say, “Let’s solve it. With code!” Then there are other developers, who say, “This specific problem is a subset of a general class of problem, which, if we solve the general class, will automatically solve the specific class.” The best programmers know when it’s time to keep it simple, and when they really should shoot for the stars.

Chris worked for a startup run by former academics. They wanted to shoot for the stars, some black holes, and maybe, if there was budget left over, the primordial galaxies that formed after the Big Bang. They had an idea for a product which would… well, Chris had no idea what it did.

The vision was codenamed SPRIT. Walter, the wizard behind it, couldn’t explain its purpose in terms anyone else understood. The only thing he could explain was that SPIRIT needed to be implemented in the in-house language, GHOST. “It’s a joke,” Walter explained once, “It stands for ‘Generic Hybrid Script for Transactional Objects’. The acronym is out of order because GHOST is all about parallel processing. It’s funny.”


Just Because It's Ruby, Doesn't Mean It's a Gem

by in CodeSOD on

There is no question that, in the right situation, Ruby on Rails is a great productivity multiplier. An anti-TDWTF, if you will. When used correctly, a highly-quality web site can be created with much great speed than more traditional coding methods.

Still, as Frederik was well aware, not every Ruby application is created equal. Frederik is a local Ruby expert and, as such, is frequently contacted by clients who were in just a little bit in over their head when it came to Rails. Much of Ruby's power comes from its use of convention over configuration. But just because there are reasonable defaults, does not mean that developers actually have to use them, right?


Process Communication Hell

by in Feature Articles on

Tariq learned on his first day at CyberPolitiburo about the Iron Curtain dividing the company.

"Here, downstairs, all the .NET developers work on the phone bank application," Simone, his new supervisor, told him. She wore a severe, Soviet-style pantsuit with red trim. "Upstairs, with their donor registry, it’s all C++ this, and GCC that. It’s practically the wild west there. There’s never been any reason to talk to each other, so it doesn’t happen."


Throttling Throughput

by in CodeSOD on

The folks at Big Corp Inc. like to do things in very formal ways. All code is officially peer reviewed. Important code for key aspects of the system is reviewed by a manager. Only blessed tools may be used. The environment is to be pristine - regardless of cost. Following the rules takes precedence over efficiency.

David R. reported that in one particular system, the data was coming in way too fast. The message consumer was spawning a background thread for each inbound message. As volume rose, the number of threads that got spawned exceeded the capacity of the system, and NullPointerExceptions got thrown around like siding in a hurricane. The Master Architect decided that this problem was so important that he would fix it himself. Of course, since he was the apex predator, nobody would (could) review his code:


You're Safe So Long as You Don't Eat it

by in Error'd on

"Just got a weather warning on my phone...I think I might stay indoors today," wrote Lianna.


Universal Login System

by in CodeSOD on

It wasn't every day at DroneDeliveries, as Antoine knew, that a user complained about having too much access to their e-commerce account.

"I swear, I'm not making this up!" she said over the phone. The user had logged in to check her recent order status. "My email address is [email protected], but when I typed [email protected], it logged me in!"


Web Services...The COBOL Way

by in Feature Articles on

In the beginning, you had to meticulously write out your assembly language computer program - instruction by instruction - and then flip switches to enter it into the computer. Fast forward a few years and FORTRAN made its entrance. It was highly useful, but not for business applications. A bit later, COBOL came along, and the business folks were off and running. With this miracle-language, they could design records that all looked alike so that they could be fed through a simple sieve and processed at the blazing speed of the day. The software wouldn't need to handle special cases because every record would be exactly the same.

Although many other languages came along in the 1970's and beyond, at Catastrophic Automation Inc., H. P. observed that everyone knew that COBOL was the only real choice for developing enterprise-class software.


Dropped Catch

by in CodeSOD on

Alex still has some VB6 code lurking in his environment. Like too much VB6 code, it’s littered with On Error Resume Next statements, which allow lazy programmers to simply ignore errors. It’s an easy way to make crash-proof applications in VB6.

One of their database programmers decided to compete with that anti-pattern . This programmer wrote a huge pile of database triggers which looked like this:


Balanced Registration

by in Feature Articles on

Peter was cautiously optimistic before the busiest part of open class enrollment season at his employer - Northeastern Institute of WTF. Peter and his team worked hard to implement a new user-friendly website for students to enroll in classes. Now, the brain-dead students who couldn’t figure out how to register should call the service-desk less. He even contracted a third-party datacenter with “state-of-the-art load balancing hardware” to handle the web traffic stress on the system. This would be the simplest enrollment season ever!

Three days before the enrollment deadline, all the procrastinating students (i.e. all the students) swarmed the website at once. Instead of being greeted with the shiny new enrollment site, they found the dreaded “Page Unavailable” screen - if they even got any response at all. This in turn loaded the IT support office’s phone lines with calls of “OMG I waited until the last minute to register for classes and now I can’t!!! I NEED Survey of Underwater Basket-Weaving or I won’t graduate!”

Peter and his staff of three got overwhelmed, so they flipped the switch on the phone system, activating the “We’re sorry, all lines are busy right now” prompt to stop the calls. With this chance to breathe and figure out the problem, Peter dug in to the network logs. There where myriad connection errors. The student traffic got to the remote load balancer but didn’t get a response.


Lightspeed is Too Slow for MY Luggage

by in Error'd on

"Apparently our luggage desperately wanted to arrive at Manchester airport ahead of our plane," Maciek O. writes, "So much so that it attempted to perform an illegal operation to achieve that."


Productive Testing

by in Representative Line on

Unit tests have many uses. Primarily, they’re the canary in the coal mine of our code, and alert us when changes are about to go horribly wrong. When Niels’s team saw a recent change broke their unit test, they instantly knew how to fix it.

In the DONE column of the kanban board, a post it reads 'Remove Failing Test'


New Year Daily WTF Resolutions

by in Feature Articles on

Happy 2014 everybody! Lots of people make terrible New Year Resolutions. The problem is that they all sound like really good ideas, but you never actually commit to executing them past the first week of January. Lose weight...save money...bathe... We here at The Daily WTF though only commit to important resolutions. Achievable goals that impact our daily lives.

Here are some of our goals for the coming year: