You are here

Feed aggregator

Best of Email: A Bad Opportunity, Bad English, Bad Math & More!

The Daily WTF - Wed, 02/12/2014 - 12:15

Don't forget, The Daily WTF loves terrible emails. If you have some to share, mail in your mail!

Unique vacancy you say? (from Michael H.)

So, this recruiting email that I received looks an awful lot like an ad looking for someone who knows how to do the equivalent of a mail merge. By the looks of the email subject, they truly need that someone in a hurry.

________________________________________________________ From: To: Subject: Michael {Surnmae} A venture-funded company would like to let you know about a unique vacancy in the domain of mail forwarding. The position requires no special experience besides basic computer skills.Your main responsibilities are to process correspondence at the address available to you, sort it out and send it to customers. Completely suitable for stay-at-home parents, pensioners and business owners who reside in their personal office during standard working hours.


Apparently JAVA Math is Hard! (from Rob B.)

There is a right way and a wrong way to do math. This is a result of doing it the wrong way.



The Most Perfect Bug Report (from David S.)

On the subject of terrible emails, this one remains the greatest bug report that I have ever received - it was from a particularly problematic tester who (I promise) spoke English as a first language. This one fascinated my boss so much that he put it on his email signature for several weeks.

________________________________________________________ From: To: Subject: Bug Fixed David is this handled. It is on the list of JIRAs that might could stop upgrade to R5 because CLIENT no I cannot determine from what info is available that is no longer applies or manners or is to be concerned about?


Email Alert: Unable to Deliver Email! (from Kim)

Um...Wait a second. Does this mean I can receive emails from Wells Fargo, or that I can't?



Send it the Simple Way (from Jakub)

I booked weekend accommodations in Austria through a travel agency. They were kind enough to send me a map, and what a map! They could have sent a link, they could have sent a screen shot...but they didn't. Instead, for some reason, they printed the map, scanned it, and then sent me a 10MB e-mail with four images like this.



Sometimes, all it take is a single word (from John K.)

Hi J., I have has an erogenous amount come through on the EUR cash report for trade 665420/917517 EUR (256,450,000). This trade is a fee which paid correctly value 18th July and so I am confused as to why this EUR(256,450,000) has come through today. Would it be possible for you to trace this posting back and find out why it is showing on our report. Thanks, K.


Debugging Web Service (from Sam Hoover)

A client recently sent me an email trying to determine why a production web service called from my code was returning an error. I grabbed the SOAP/XML payload and e-mailed it to them (Note: the payload has a tag that contains an e-mail address).

After a day or so of investigating on their end they replied with this:

________________________________________________________ From: To: Subject: RE: API errors Well, we've looked over the xml you are sending and everything looks fine. The only thing we can see is that when we copy the xml from the e-mail and paste it into Word it underlines the e-mail address as a hyperlink. It looks like that's the problem, you need to send us the xml with no hyperlinks


!@FAVORABLEWORD@! Luck on your Job Search! (from Rick)



[Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
Categories: Fun/Other

CodeSOD: Total Recall: The Directory's Cut

The Daily WTF - Tue, 02/11/2014 - 12:15

By day, Curtis was a PHP developer for a small ISV. The people he worked with were enjoyable and the work itself was decently challenging. All in all, it was nothing special.

However, in the evening, Curtis changed. Well, not 'changed', so much as charged. His clients, that is. You see, Curtis moonlighted for a number of small, developer-challenged companies, helping them build and maintain their Internet presence.

This work was a little more interesting, in that Curtis could use (within reason) some of the newer frameworks and techniques that were available. But it did leave Curtis open to getting the occasional emergency phone call if something unexpected happened. Which is where we find Curtis at the moment.

The manager at Rekall, a relatively new client of Curtis', called him shortly after dinner. The company's web site displayed a number of images. These images were stored in a directory on the web server and the names of the files were formatted to allow for the web site to display a subset as the need arose. The result was that, given the necessary permissions, non-technical people could add or delete the images as needed. While this might not be the best possible architecture, it was decently workable and had been successful since Curtis started working with this client a few months ago.

But tonight was different. Tonight, only some of the images were being displayed on the site. Hence the call to Curtis.

The image gathering section of the web site had been written by Curtis' predecessor. So Curtis settled down for a consultant's favourite pastime: code spelunking. Where consultants looked into the nooks and crannies of an application, peering into crevices not visited since the dawn of time (that is 1/1/70). Not deeply enough in the bowels of the server code, this is what he found.

function getpictures($directoryurl=0, $local_id=0, $thumps=FALSE) { $fd = fopen($directoryurl, "r"); $newfield = array(); $counter = 0; $hlp = 1; while (!feof($fd)) { $buffer = fgets($fd, 4096); $ausgabe = strip_tags($buffer, "

"); $searcharray = explode(" ", $ausgabe); foreach ($searcharray as $element) { $upstr = strtoupper($element); // try{ // if (!empty($upstr) && isset($upstr)&&($upstr!="")) { if ((strlen($upstr) > 7) && (substr_count($upstr, strtoupper($local_id))) && (substr_count($upstr, strtoupper('t')))) { if (strpos($upstr, '.JPG')) { $rest = substr($element, 0, (strpos($upstr, '.JPG') + 4)); $newfield[$hlp] = $rest; $counter+=1; $hlp = $hlp + 1; } else if (strpos($upstr, '.JPEG')) { $rest = substr($upstr, 0, (strpos($upstr, '.JPEG') + 5)); $newfield[$hlp] = $rest; $hlp = $hlp + 1; $counter+=1; } else if (strpos($upstr, '.PNG')) { $rest = substr($upstr, 0, (strpos($upstr, '.PNG') + 4)); $newfield[$hlp] = $rest; $hlp = $hlp + 1; $counter+=1; } else if (strpos($upstr, '.GIF')) { $rest = substr($upstr, 0, (strpos($upstr, '.GIF') + 4)); $newfield[$hlp] = $rest; $hlp = $hlp + 1; $counter+=1; } } // } // }catch(Exception $e){ // return 'Error: exception '.get_class($e).', '.$e->getMessage().'.'; // } } } fclose($fd); return $newfield; }

The purpose of this method is to retrieve the file names that match a particular pattern found in the specified directory. Now PHP has a number of different ways to get a list of the files that are in a particular directory. opendir()/readdir() is one, fairly obvious, choice. scandir() is another. Or glob(). Or, if you prefer objects, there is a Directory class that wraps opendir()/readdir(). The options are there for the choosing. But I can pretty much guarantee that this function wouldn't be on your list.

The list of WTFs starts with the parameter list. Given that the function returns a list of items in a directory, it seems unlikely that the parameter that indicates the directory of interest should be optional. And the default value probably shouldn't be '0'. It's not nice to criticize the try/catch block that didn't seem to do much, because it has been commented out. However the $thumbs parameter isn't being used anywhere in the function. And that's a strike against any API.

But that's not all. Because the original developer seemed to be distrustful of basic O/S functions, they inadvertently introduce a particularly pernicious bug. If you look closely, you'll notice that the list of files is processed in 4K chunks. If an entry happens to cross over that 4K barrier, there is nothing in the code to pick up that entry. Which, by pure 'luck', is the reason why the entries weren't being retrieved properly in the first place.

For Curtis, the fix was easy and implementing it took less time than it did to figure out what this monstrosity was actually supposed to be doing. Curtis replaced the call with the appropriate opendir()/readdir() statements. And, for good measure, he added RegEx to find the correct files and life was good. On the bright side, since he was a consultant, he didn't have to remember the image files for them wholesale.

[Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
Categories: Fun/Other

The Customer is Always Right

The Daily WTF - Mon, 02/10/2014 - 12:15

E. T. wrote to tell us of a support tale from days long gone by at a company long since acquired by a much larger behemoth. A customer had called in, entered all of his information, but hung up before a human got on the line. The support system generated a nameless ticket which got randomly assigned to one of the support folks. Then the customer called back, entered all of his information again, and got E. T.

The customer wanted to delete slice 0 on his system. For those of you not familiar with this, in *nix, slice 0 is the root of the file system and basically points to where everything on the disk is located. Deleting slice 0 is the equivalent of deleting everything on the entire hard disk. While there are the occasional disk corruptions that require this action, they are exceedingly rare, and once done, you are forced to reinitialize and re-install the operating system.

E. T. told him that he didn't want to do that because it would wipe out the entire file system. The customer persisted, insisting that he wanted to free up the precious GB of disk space that this unnecessary file system was consuming. He insisted that he did not install whatever was on this file system, and that it didn't belong there, so he was going to delete it, and needed instructions on how to get it done.

Since E. T. was obligated to help the customer, he finally went over to the software guys, and asked one: Do you know how to delete slice 0? Naturally, the software guy replied: You don't want to do that... E. T. continued: I know, but this guy is insisting that he didn't install anything on that partition, and he wants to reclaim the space. I know it's stupid, but "The customer is always right" and all that; we're obligated to support him and answer his question! The software guy told E. T. to Talk to Bob.

E. T. hunted down Bob and asked: Hey, Bob, do you know how to delete slice 0? Of course, Bob replied: You don't want to do that...

This went on with several people, until finally E. T. got someone who told him how to do it.

As E. T. was headed back to his desk, the guy next to him asked: Hey is that F.P. Dingbat at XYZ company?

Yeah why?

Because when he originally called and hung up, his case was assigned to me; if you have him I'll just close it out.

E. T. decided there was a better way to handle this situation: No don't. He is about to do something above and beyond stupid (little did E. T. know the true scale of Epic Stupidity™ that the customer was about to commit). So let's give him 1/2 an hour to hang himself, then you call back so we can see what happened.

E. T. got back on the phone and told the guy how to delete the file system, but again, advised him that what he was about to do was evil, bad, would make his life Hell-on-Earth, and that he should absolutely, positively, not do it. Of course, the customer got all snooty at being told he was making a mistake, and barked back: See, you CAN do it!, and hung up.

A half hour later, the other support guy calls the customer back to see if he could help him with his original issue.

Did the guy delete slice 0? Yes but in a far more destructive way than one might imagine. It turned out that he had issued a command to SU on every machine in his company and execute the command sequence to remove slice 0. Then he executed the commands on his own box. He took the whole place down!

The customer asked the support guy: I only entered the one command; what the fsck did I just do?

[Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
Categories: Fun/Other

Error'd: While Supplies Last

The Daily WTF - Fri, 02/07/2014 - 11:45

"In the inventory section, it says they have 1 quadrillion units of crab rangoon in stock," writes Michael, "With that many, you'd think that crabs would be extinct."


"I can understand why Microsoft really wants me to renew," writes A. Patel, "After all, I only have over 100+ years until my license expires."


Mike wrote, "Nevermind what you want. GitHub on Windows has its own reasons for doing what it chooses."


Christian writes, "So, does WinSCP want me to click Cancel or OK to cancel?"


"Thank goodness that Facebook is so dedicated to looking out for its users' safety," wrote a relieved Bob Jonkman.


Vlad writes, "Apparently, there is new kind of math out in the great big world. For example, despite what I had been taught, it turns out that $153521 is more than $926533."


"As an employee of a large Midwestern university we have a large set of discount offers available," writes Ron, "I wonder if they'll let me buy this Samsung UN55F7500 at the undiscounted price?"


[Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
Categories: Fun/Other

CodeSOD: Date Formatting Done Right

The Daily WTF - Thu, 02/06/2014 - 12:15

Dates are complicated things. There are many different ways of storing them, and even more ways to present them. Converting them from one format to another always seems to challenge certain individuals. For this reason, the designers of most modern language libraries have taken it as part of their task to provide date handling utilities to deal with the nitty gritty of this task.

Most people appreciate the help and gladly use the built-in tools.

Most people.

In Java, if you wanted to print out the current date/time as: yyyymmddhhmmss, you could leverage the handy built-in utilities as follows:

SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhhmmss"); String yyyymmddhhmmss = sdf.format(new Date());

It's painless and simple. Perhaps too simple to work properly...

J. R. found this beautiful java date formatter to do the same formatting as above in their codebase:

String.format("%1$tY%1$tm%1$td%1$tH%1$tM%1$tS", cal);

But he was confused as to why they needed their own format in the first place. So he spelunked into the bowels of the third Circle of Hell ("dates"), and found out why:

class MyDateString { private static Calendar cal = Calendar.getInstance(); public MyDateString() {} public static final long getDateString(long currtime) { if (currtime < 1000000) return -1L; long rv = (currtime % 1000L); cal.setTimeInMillis(currtime); rv += 1000L*((long)cal.get(Calendar.SECOND)); rv += 100000L*((long)cal.get(Calendar.MINUTE)); rv += 10000000L*((long)cal.get(Calendar.HOUR_OF_DAY)); rv += 1000000000L*((long)cal.get(Calendar.DAY_OF_MONTH)); rv += 100000000000L*((long)(1+cal.get(Calendar.MONTH))); rv += 10000000000000L*((long)cal.get(Calendar.YEAR)); return rv; } }

This bit of ingenuity converts the decimal number of milliseconds since the dawn of Unix Time into a different decimal number with the layout:


...which can then be formatted by the String.format into a String with the same layout!

Pure genius!

[Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
Categories: Fun/Other

User Rejection Testing

The Daily WTF - Wed, 02/05/2014 - 12:15

The next feature confused Tim. After plucking all of the low-hanging fruit, the only requirements left were the ones that were difficult to understand or poorly specified in the functional documents. Right now, Tim had a fairly nice e-commerce system for handling most of the products and processes it needed to, but there was one requirement he didn’t understand: “System must calculate VAT appropriately.”

The system was complex, and served such a wide variety of products that there were several VAT calculations that could be correct. The specification didn’t define what “appropriately” meant in this case, and given the costs of being wrong, Tim didn’t want to guess. He rode the elevator all the way up to the lofty halls of the executive floor, where he found Reggie, the head of the finance department and primary customer contact for the e-commerce site.

Tim explained the situation, and concluded, “So, of one of these two VAT calculation methods is probably best, but which one is correct?”

Reggie didn’t reply right away. His BlackBerry bleated at him, and he spent a few minutes tapping away at its keyboard. When he finished, he placed the phone on the corner of his desk, and leaned forward, with his elbows on the table and his hands clasped together. “I’m sorry,” he said, “but I thought you were competent. Am I mistaken?”


Reggie’s phone bleated again, but he ignored it for a moment. He put on his most serious face, and said, “I assumed you were a competent developer. I mean, why would your manager put you on my project otherwise? But if you were competent, you’d know how to build this software. Since you’re asking me how to develop this software, that implies that you don’t know what you’re doing. I’m starting to believe that you haven’t got a clue.”

“What? No! It’s just that… well… the specification doesn’t say-”

Reggie raised a hand to stop Tim’s stammering. “The specification doesn’t say because it should go without saying. If you don’t know, then I’m certainly not going to tell you.”

“You’re not?”

“In fact,” Reggie continued, “I’ve been the customer for a large number of IT projects in my career, and not once has anyone asked such an obviously stupid question, nor have I ever given any detail in any specification about VAT.” Reggie picked up his phone, and ended the conversation by saying, “Now, go do you job, and do it correctly.”

Tim had plenty of time to weigh his options on the long elevator ride back to the basement. Of the two options for calculating VAT, his gut said one of them made more sense, so he went and implemented that. He checked it in and went on to the next task on the backlog.

As the sprint wound to a close, Tim decided he should be customer focused and keep Reggie engaged in the process, so he fired off a message: “Take a look at the VAT reports in test, and confirm that you like the calculations.”

Moments later came the reply:

I don’t need to test anything. There are only two options here: either you did your job and the application is correct, or you’re an incompetent and it’s wrong. In the first case, I don’t need to test it. In the second case, I still don’t need to test it- and you should be fired. So which one is it, Tim? Do I get to start using the application, or do I escalate this and get you fired?

Sent from my BlackBerry

Tim decided he wasn’t interested in getting fired. He closed the task and attached Reggie’s last email with the filename “Customer Signoff”. Months later, after the application had been in use for some time, it turned out that Tim’s choice was wrong- millions of dollars in sales had the wrong VAT applied. When the inevitable category-four blameicane blew ashore, looking for middle managers to wash away in the tide, the big question was, “Who signed off on this?”

Reggie’s objections to Tim’s “incompetence” didn’t gain him much traction. Tim was too insignificant to hold responsible, and Reggie’s position was too lofty for any consequences. In the end, fines were paid, partial refunds were given, and the Finance department paid for Tim to work overtime and rush through a fix to the VAT calculations.

Panel from this Dilbert comic

[Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
Categories: Fun/Other

CodeSOD: The Midnight Cowboy Coder

The Daily WTF - Tue, 02/04/2014 - 12:00

The ball had just dropped, and Eric was taking the stairs to the fifteenth floor two at a time. Initech's New Year's party was in full swing, but it Eric wasn't simply in a hurry to join the festivities. He'd been watching the support queue all night, and at midnight the new monitoring program lit up like Times Square. The program was supposed to be simple: The new security cameras Initech had installed in their headquarters dumped video files in a folder every hour, and the powers-that-be wanted to make sure they were working without being obliged to keep an obssessive eye on the filesystem. Eric's colleague Ted was put in charge of solving the problem before the party, and he'd dumped his solution onto a production server in the nick of time. All had been well... for the first hour.

Eric burst through the balcony doors, out of breath. Around him, fellow Initechnicians were pouring champagne and trying to remember the inscrutable lyrics to Auld Lang Syne. Ted had attached himself to a gaggle of salespeople in sharp blue suits, one of whom was handing around cigars. Before Ted could lay hands on a lighter, Eric clasped his shoulder.

"Ted," he panted, "something's wrong with your monitor."

"What? I turned it off before I came upstairs..."

"Not your display, the service you wrote to confirm that camera footage is getting saved."

"Oh," Ted said, eyes straying to his stogie. "Guess I'll... look into it on Tuesday?"

"No good. Mr. Petersen's already seen the failure email, and he isn't happy. We'd better get to the bottom of this before he cancels our contract with the camera company."

"Uh, well, the party's just getting started up here! Would you do me a solid and take a look?"

Eric narrowed his eyes, and muscled Ted towards the doors. "You didn't even check your code into source control, buddy. Time for a little pair programming."

Once Ted's workstation had warmed back up, it didn't take long to find the problem. Since the files were simply named with the format YYYYMMDDHH.avi, Ted had figured out what filename was sought like this:

string fileName = videoPath + "\" + utcNow.Year + utcNow.Month.ToString("00") + utcNow.Day.ToString("00") + (utcNow.Hour - 1).ToString("00") + "." + ConfigurationManager.AppSettings["VideosExtension"];

Ted was squinting at the code through a bit of a haze, so Eric pointed it out to him:

"The Hour property returns an int between zero and twenty-three. So midnight minus one is going to give you... minus one."

"Oh," Ted said. "I've got this. We'll be back at the party in no time."

He thought carefully for a minute, and then typed this:

string fileName = videoPath + "\" + utcNow.Year + utcNow.Month.ToString("00") + utcNow.Day.ToString("00") + (utcNow.AddHours(-1).Hour).ToString("00") + "." + ConfigurationManager.AppSettings["VideosExtension"];

Ted was about to commit his changes to production when Eric pushed him gently away from the keyboard.

"Close," he said, plucking the Macanudo from Ted's shirt pocket and putting it in his own. "But no cigar."

[Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
Categories: Fun/Other

The Killer Product

The Daily WTF - Mon, 02/03/2014 - 12:30

In the early 2000’s, Eric worked for a small music retailer transitioning to “e-business”. The dot-com bust crippled it, and it wasn’t long before a larger predator gobbled it up. Eric now found himself in the employ of an electronics and entertainment giant. Amongst their weaponry were a huge catalog of songs, a line of MP3 players, and ample cash reserves- more than enough to squander on an acquisition they didn’t need. Eric and his group found themselves twiddling their thumbs for months.

Then iTunes reared its head, and suddenly Apple was a dangerous new player in the music arena. iTunes had to be driven to irrelevance, and the best way to do that was to follow them to market with a frantic catch-up music player and storefront whose mediocrity and compromised functionality would dazzle the world.

Eric was tapped to work on this “iTunes Killer”. The project kick-off was centered in Los Angeles, with a video conference spanning the rest of the world. Eric was “asked” to fly down from San Francisco to meet the project manager, Mr. Vernon. The two of them would be working closely together.

Eric arrived at the LA office well ahead of time. A fellow developer named Brett was there to greet Eric, help him sign in, and take him to the right floor.

The elevator opened on a floor with a bright, contemporary look- the intersection of Ten Forward and Office Space. Brett led Eric around a corner just in time to see a large man in an expensive three-piece suit put his fist through the wall. His face was the bright red of alarm beacons. Curses and spittle flew from his mouth.

“Keep that [BLEEP]ing [BLEEP] at home, Bob!” the giant roared. “You [BLEEP]ing hear me?”

Like a Vietnam vet shepherding the FNG, Brett backed himself and Eric into a spot where they could observe safely. The cubicle rows in the vicinity were dotted with the wide eyes of cowering spectators, all wary of drawing attention to themselves. Bob stood alone against the onslaught, stooped and cowering. He clutched an external hard drive against his chest as though it were a shield.

The giant loomed over Bob. “MAKE IT WORK WITH WHAT WE [BLEEP]ING HAVE!” A moment passed, and then he stalked off, shaking plaster out of his French-cuffed sleeve.

The spectators vanished back into their cubes like spooked rodents. Bob remained frozen. When the coast was clear, Brett beckoned Eric around the corner, unfazed. “It’s still early, might as well get you set up on the network to check email and stuff.” He shot Bob a sympathetic glance before guiding Eric into an empty cube.

“Sorry you had to see that,” Brett muttered.

“What was that?” Eric asked.

“Bob brought in a spare drive from home as an emergency measure. Mr. Vernon doesn’t approve of that sort of thing.”

“Vernon?!” That crazy beast was his project manager for the foreseeable future? Eric fought off his own bevy of curses. “Well, uh… that’s it? What was the emergency?”

“We’re having issues with hard-disk space.” Brett paused for a moment’s deliberation, then logged into a server. “Here, let me show you something. Our online music catalog is Vernon’s baby. This’ll give you an idea of what you’re in for.”

You mean it gets worse? Eric held his silence as Brett stood and ceded control of the keyboard. Eric browsed a huge array of disk drives, all of them dangerously full… of large HTML files with familiar titles. Worse, there were historical versions of the document, like “Rick_Astley_Never_Gonna_Give_You_Up.old.html”, and “Rick_Astley_Never_Gonna_Give_You_Up.1.html”.

“Every single song has its own page?” Eric asked. “Why wasn’t this done dynamically? And are you storing a new copy every time somebody edits a file?”

“Vernon ‘doesn’t believe’ in generating HTML,” Brett said. “Crack one of those files open.”

Eric gaped. The HTML was designed with all of the grace and clarity that Front Page had to offer. The HTML included all of the page-level structure that needed to be repeated across pages- menus, headers, etc. Even more ugly, however, was the nearly incomprehensible block of XML code embedded before the HTML. “What’s this for?”

"Vernon insisted on using a third-party search engine. That XML is the only way we can make the stupid thing work. And it gets better.

“We serve these pages using J2EE, and the database we’re using only allows one connection. Two users redeem a coupon at the same time, the whole thing goes to hell.” Brett shrugged. “Anyway, I’ll let you settle in. Oh- want some coffee?”

What Eric wanted was some Dramamine and an early flight home, but he waited for the project kickoff.

As the meeting drew near, Eric, Brett and the rest of the team relocated to a fancy conference room and grabbed seats in plush leather chairs. The room filled up, and eventually Mr. Vernon sailed in, like an iceberg seeking a cruise-liner.

“Here’s our plan to beat iTunes,” he declared. “Just. Be. Better.”

That was it. For the next two hours, the words “just be better” were beaten out of comprehension.

After Vernon had enough of sharing his brilliant plan, he leaned forward and pressed both fists into the table. “All right, which one of you is Eric? I want YOUR ideas for how we can be better.” Despite the open invitation, his expression indicated that only a few narrow, backward ideas would spare Eric from decapitation.

Eric had already prepared a document. The implementation suggestions he had come up with prior to flying to LA now seemed like career cyanide capsules, but he summoned his courage and bit down anyway. “Well, for starters- I was thinking we could move to C++ for the standalone application…” Vernon nodded, warming to Eric, slightly. “… and a move to PHP and Perl for a dynamically generated web interface…”


Eric swallowed. The next few months were going to be very long.

[Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
Categories: Fun/Other

Error'd: Born on the 34th of Smarch

The Daily WTF - Fri, 01/31/2014 - 11:00

"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!"


Nathan Friedly wrote, "Huh! It turns out I live on the West Coast after all. Who knew?"


Roger writes, "I want to pick a color, but I'm not sure how...I mean, what? Is the site voice activated or something??"


While selecting a phone on EE (UK mobile phone company) and having selected 'Apple', the site gave me this choice," Dave L. wrote, "Should I choose one of the 11 '**DO NOT USE**' and risk a cease-and-desist letter from Samsung?"


Pontus writes, "Microsoft sure has some crazy logic."


"When running the setup program for a Brother printer, it asked me to select a language. The only options were "USA" and, well... that was the only option," writes Jacob Posner.


"My phone told me today there was 'insufficient storage available'," wrote Reinder Brouwer, "I'm not sure whether I should believe the graph or the numbers."


[Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
Categories: Fun/Other

CodeSOD: Thanks Bill!

The Daily WTF - Thu, 01/30/2014 - 11:45

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

“No, no, NO! You use VARCHAR, not TEXT! VARCHAR!”

“Who cares if the server needs to defrag every couple weeks? It’s not like I’m going anywhere!”

Sadly, Bill died suddenly of a heart attack. Unlike Gandalf, Bill did not return in white, and Alan was promoted to DBA.

Bill may have been no wizard, but the dozen or so database servers he oversaw had his fingerprints -- literal and figurative -- all over them. It took Alan a month to sort out how Bill had gone about his business. Believing the position might cause him to have a heart attack as well, Alan set about doing some housecleaning.

At the top of his list was a commonly-referenced table. So many queries ran against it that it was the single biggest bottleneck in the entire stack. A naive SELECT statement took five minutes, returning the following.


It took Alan the better part of the day to remove all references to the table before deleting it. Bill, despite his credentials, didn’t think to ask the front-end development team to convert cardinal words to numbers before inserting them into the database. The wizard hadn’t been all-knowing, after all.

[Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
Categories: Fun/Other

ASP Holes

The Daily WTF - Wed, 01/29/2014 - 12:15

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.

They were a reputable company with offices in Chicago’s Willis Sears Tower. On the long drive in, Dave imagined being a big-shot in the city, having face-to-face meetings with the clouds outside his office window. That wouldn’t be a bad start to his IT career.

The six hours of driving would be the shortest part of the day. They wanted Dave in for half a day of technical interviews, followed by lunch, and then “personality interviews” in the afternoon. Dave spent the week brushing up on his core strengths: Java, SQL, and UML. Plenty of people assured Dave he had a great personality.

After surviving the nerve-wracking experience of a country boy trying to find a place to park in a sprawling metropolis, Dave looked upwards as the Sears Tower loomed above him. His interview was on the 54th floor and each passing floor in the elevator seemed to take longer than the last as his nerves became ever-more jangled.

Finally, the doors opened to reveal the front desk of what Dave hoped would be his future employer. The administrative assistant escorted him to a room where a smug guy in a flashy suit waited. He introduced himself as Bob, and didn’t even wait for the handshake to finish before he fired off his first question: “So, explain to me how ASP.NET communicates with the server.”

Dave was stunned by the question. There was nothing about ASP.NET in his resumé, and they hadn’t mentioned anything about it over the phone. He knew C# was similar to Java, and had used Visual Studio once, but knew nothing about ASP.NET. He muddled through, deciding that ASP.NET couldn’t be that different from any other web application architecture, even if it was made by Microsoft. He grabbed a dry erase marker and drew a nifty diagram of how he thought ASP.NET worked. He was impressed with himself for handling such a curve-ball. Hopefully, the interviewer was just as impressed, and they could move onto Dave’s core skills.

Instead, what followed was another 30 minutes of ASP.NET questions. Dave’s responses were roundabout and with a large amount of educated guessing, but Dave felt pretty good about his responses. After thirty minutes, Bob stood up, shook Dave’s hand, and escorted him back to the waiting area.

Dave let out a sigh of relief, thinking the hard part was over. His stomach rumbled at the idea of the upcoming free lunch. If he could make it that far, the “teamwork” and “social” interviews in the afternoon would be a breeze. Bob returned a few minutes later. “I’m sorry, but we’re going to have to ask you to leave. You weren’t selected to move on.”

After the long commute and the harrowing interview, Dave’s hopes for a free lunch (and future employment) were dashed. He gathered his things, and Bob escorted him to the elevator, and climbed in with him. Mustering his courage, Dave asked, “So… what questions did I miss?”

Bob rolled his eyes, and smugly replied, “You pretty much got everything right, which was impressive. You just took too long. We want experienced programmers, y’know ten years in the industry, the usual. We’ll keep you on file, and maybe when you’re a big boy programmer, we’ll bring you back in.”

Dave resisted the urge to hit the elevator’s emergency stop button and bash Bob’s head against the elevator wall. It was obvious that neither Bob nor any of the other ASP holes he worked with had actually looked at Dave’s resumé.

As he stepped off the elevator, Dave’s belly roared, upset with not being awarded a free lunch. He crossed the street to enjoy some Chicago-style deep-dish pizza and ease his pain. The pizza was the only good thing that happened on this wasted trip.

[Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
Categories: Fun/Other

CodeSOD: But the Tests Prove it Works Correctly!

The Daily WTF - Tue, 01/28/2014 - 12:15

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:

public interface SomeDao { public List<String> getData( /* args here */ ); } public class SomeDaoImpl implements SomeDao { @Override public List<String> getData( /* args here */ ) { String sql = "select ... from ... where ..."; List<String> results = new ArrayList<String>(); Connection con = ...; PreparedStatement ps = con.prepareStatement(sql); // set args in query here ResultSet rs = ps.executeQuery(); while ( { results.add(rs.getString(1)); } // close stuff return results; } } public class SomeDaoTest { private final static String RESULT_ROW_1 = "String 1 data ..."; private final static String RESULT_ROW_2 = "String 2 data ..."; private final static String RESULT_ROW_3 = "String 3 data ..."; class SomeDaoImplTest implements SomeDao { @Override public List<String> getData( /* args here */ ) { List<String> results = new ArrayList<String>(); results.add(RESULT_ROW_1); results.add(RESULT_ROW_2); results.add(RESULT_ROW_3); return results; } } @Test public void testSomeDao() { SomeDao dao = new SomeDaoImplTest(); List<String> results = dao.getData( /* args here */ ); Assert.assertNotNull(results); Assert.assertEquals(3,results.size()); Assert.assertEquals(RESULT_ROW_1, results.get(0)); Assert.assertEquals(RESULT_ROW_2, results.get(1)); Assert.assertEquals(RESULT_ROW_3, results.get(2)); } }

When queried, the developers said that the tests took too long to run when they hit the database, so they created stub-DAO's to return canned data, because they assumed the SQL queries would be correct and didn't need testing.

[Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
Categories: Fun/Other

A Temporary Problem

The Daily WTF - Mon, 01/27/2014 - 12:15

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

Disaster averted, Andy finally took the bathroom break he had fortunately postponed during the beginning of the screen control session.

[Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
Categories: Fun/Other


Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer