Recent Articles

Apr 2009

Serial Port Pit Bull

by in Feature Articles on

Woof.Shawn G. couldn't believe his eyes. A support ticket had just come in about a user who was having a problem with a DOS-based computer with a 286 processor!? Fresh out of college, Shaw was more used to working with PCs running Windows XP, and processor speeds and RAM amounts in the multi-"giga" ranges. Much to his surprise, he was getting ready to help a user with the equivalent of 1985's cutting-edge top model. Expecting the real problem to be a bug in their help desk software mis-reporting PC's default specs, Shawn gave the user a ring.

It turned out that yes indeed, the computer in question was based on the ancient yet venerable, 286 processor. But the kicker was that the PC wasn't a PC at all. Instead, it was a very expensive, mission critical, ruggedized "beige box" that was used by the engineers to calculate the efficiency of heat transfer for some very large and noisy piece of plant machinery. Despite feeling a little bit out of his element, Shawn figured he'd give a shot at troubleshooting and asked for a description of the problem.


An Easy Decision

by in Error'd on

"I saw this at on a local gas station's pump," wrote Ryan Neufeld. "Debit? Yes? Cashier? I don't get it."


Stupid Coding Tricks: XSLT Mandelbrot

by in CodeSOD on

Welcome to the third installment of stupid coding tricks! As we learned from the T-SQL Mandelbrot and A Batch of Pi, stupid coding tricks aren't really about obfuscation per se... just, well, stupid awesomeness. Kinda like a quine, except even more useless.Got a trick of your own? I'd love to see it, so send it on in.

If you were to use The Daily WTF as a guide, your impression of XSL Transformations (XSLT) would probably be fairly low. I mean, seeing article after article after article might have given the impression that XSLT is often not the right tool for the job... or, perhaps, maybe not even a right tool. Period.


Cracking your Fingers

by in Feature Articles on

Felix had an easier time making it to the gym five times a week than the average person, but that was probably because he worked there. It wasn't the ideal job, but it paid well enough for the summer between first and second year of university.

Each day Felix arrived to the familiar scent of sweat and chlorine; the faint smell had permeated throughout the gym, even into the office sections. Most days, when punching in, Felix's boss (who we'll call "Ross") would stop him and bounce off his latest and greatest idea for the gym.


Safe ASCII Love

by in Error'd on

"I wanted to treat Fluffy to some customized ASCII love with a <3 pet ID," Stacy wrote. "I'm glad Petsmart.com has protected her from XSS attacks!"


Fred Code

by in CodeSOD on

Bruce got an urgent phone call from the Boss: one of the Big Customers was having some trouble with a system Bruce's company built, and it needed to be fixed right away. The application in question was the back-end for a wireless inventory management system and was responsible for maintaining the status of each location in the store in a flat text file.

Over the years, the application had been maintained by a contract programmer named "Fred" who had quite a few "nonstandard approaches" to application development. Being a contractor, his income was dependent on getting more contracts when the current contracts expired. His didn't accomplish this by writing good-quality code as to get repeat work and recommendations. Instead, he wrote code so awful that his victims would have no choice but to call on him to fix up the mess. Fred also had a background in COBOL programming, and it showed in his C code.


Sponsor Appreciation, Cabling Confusion, Dividend Bling, & More

by in Feature Articles on

Please show your support for The Daily WTF by checking out the companies that have been kind enough to sponsor us. And, in doing so, I’m sure you’ll find some pretty cool products and services built by like-minded developers and IT professionals.

 

Microsoft/web   Microsoft/web - We teamed up with Microsoft/web to answer a burning question: with the dizzying array of languages, frameworks, tools, and technologies, what do you think about web development? Take the survey and let us know... there's a free TDWTF sticker in it for you!
Cushy CMS   Cushy CMS - a hosted CMS built from the ground up with ease of use in mind. It's incredibly simple to use: no PHP or ASP required. If you can add CSS classes to HTML tags then you can implement CushyCMS. And best of all, it's free. Spend a few minutes and try it out!
New Relic   New Relic - makers of RPM, a pretty impressive Ruby on Rails application monitoring product that helps you keep your app humming. You get deep, real-time visibility into your app, so you always know what's up. Use it on as many applications and hosts as you like. For as long as you like. And they even offer a free version.
Data Springs   Data Springs - offers a whole bunch of DotNetNuke modules and SharePoint WebParts. In addition to their ever-growing list of complementary products, they can also help with just about any of your other DotNetNuke needs or integrations.
Splunk   Splunk - Search, navigate, alert and report on all your IT data in real time. Logs, configurations, messages, traps and alerts, script, code, metrics and more. If a machine can generate it -- Splunk can eat it.
Discount ASP.NET   DiscountASP.NET - award-winning, developer-ready, and enterprise-class ASP.NET web hosting. They support all versions of ASP.NET (including MVC) and have a whole bunch of cool components you can use. Plans start for just $10/month.
Rails Kit   Rails Kit - developers of the Software as a Service Rails Kit, which includes well-tested modules, controllers, and utilities to handle all the billing/account/merchant legwork for your RoR application.
Tall Components   Tall Components - makers of PDFKit.NET, a 100% managed .NET component for, reading, creating and manipulating PDF documents and PDF forms on the fly. You can also split, append, stamp, and encrypt PDF documents and forms. If you have to do anything with PDF, you should definitely download the free trial.
Peer 1   Peer 1 - provides award-winning Managed Hosting, Dedicated Hosting, Co-location, and Network services offered through 15 data center across North America. With over 10,000 businesses hosted on their legendary SuperNetwork™backbone, PEER 1 delivers one of the highest server performance and network outputs in the industry.
Mindfusion   MindFusion - a great source for flow-charting and diagramming components for a variety of platforms including .NET, WPF, ActiveX and Swing
A Sane Approach to Database Design   A Sane Approach to Database Design - the book that tells you how to build a smart database, with lots of examples of people who did it wrong. And although the irish girl has nothing to do with database design, I certainly appreciate keeping up the tradition.
Software Verification   Software Verification - software engineering tools for memory leak detection, code coverage, performance profiling, thread lock contention analysis and thread deadlock detection, flow tracing and application replay on the Windows Vista, 2003, XP, 2000 and NT platforms.
SlickEdit   SlickEdit - makers of that very-impressive code editor and some pretty neat Eclipse and VisualStudio.NET tools and add-ins, some of which (Gadgets) are free. Check out this short video highlighting just one of SlickEdit's Visual Studio integration features.
SoftLayer   SoftLayer - serious hosting provider with datacenters in three cities (Dallas, Seattle, DC) that has plans designed to scale from a single, dedicated server to your own virtual data center (complete with racks and all)

The Mod Out System

by in Feature Articles on

When Gary was first hired at an aircraft component repair company, one of his first duties was to add functionality to their Oracle 11i based application that would "automatically add mods" to the system.

As Gary soon learned, a "mod" referred to the work that needed to be performed on particular piece of equipment for maintenance or repair. Because the company specialized in a fairly specific type of components (multimedia), the steps to perform the work were fairly consistent: 1) Remove any certifications or other affixed notices; 2) Remove field-serviceable access panels 3) Remove factory-serviceable panels; ...; 18) Replace joints with new silicone glue; etc. This worked out well as, due to federal regulations, all modification steps taken needed to be recorded in the equipment's recertification file.


Circular Logic

by in Error'd on

"Well that's an easy fix," Clemens noted, "all I have to do is open the— hey, waitaminute!"


zzGeneralFunctions

by in CodeSOD on

A codefile whose name is prefixed with “zz” can be one of two things. It's either a file that someone wanted to get rid of but was afraid to delete, or it's an intentional naming scheme to keep the file at the bottom as part of some crude code-organization technique. There used to be a third option - the file's a part of an application commissioned by a certain American rock trio known for their beards and cheap sunglasses - but the band dropped that requirement a long time ago.

However, when Mark Arnott stumbled across "zzGeneralFunctions.asp" as part of a maintenance project he was assigned, it was pretty clear why the file existed. Its first line contained the following comment:


An Unlikely Network Outage

by in Feature Articles on

Dario sighed, placing the call on hold to answer another. "Network support, Dario speaking."

"Hi, this is Seth," the caller began, as though Dario knew who this "Seth" was. "My computer isn't working today. All morning, nothing." Specificity clearly wasn't one of the caller's strengths.


Headline Across Here

by in Error'd on

"I didn't realise 'The Chronicle' (Canberra) had become a 'do it yourself' newspaper," Kevin Rudd commented.


Self-Documenting

by in CodeSOD on

Robert W and the rest of the peons in the COGS application group didn't have their own Architecture Team. Their break room wasn't stocked with an endless supply of snacks. In fact, they didn't even have the budget for quarterly "developer retreats". All they had was a CVS repository, a few servers, and a dedication to their client, the COGS group.

For years, everything ran smoothly: they delivered in full, on time, and had a very satisfied client. That is, until the elite developers from Central IT got wind of their rinky dink operation. After a week-long assessment, they determined that Robert’s team had a number of “serious trouble points”, the worst of which was JavaDoc compliance. Apparently, only 53.8% of their code was fully and properly documented.


What the Ad? - Blatent Theft

by in Feature Articles on

Tsk tsk 80's software companies! When you're not out there making grandiose, larger than life promises to sell your product, you're playing right into your readers' knowledge of popular culture.

First, for shame Atron.  You give us this wall o' text where you quote the President of Borland singing your praises, but what's this?  "Bugbusters keep you from getting slimed"?  Oooh, if I were Dan Ackroyd or Harold Ramis, I'd circle "Cease and Desist" on my Customer Inquiry Card!


eTeller Horror

by in Feature Articles on

Most large applications are designed with multiple, autonomous interacting components. In very high level terms, they look like this:


To Pay or Not To Pay

by in Error'd on

Tian van Heerden wrote, "this message came up on the automated parking pay-station at Cavendish Square here in Cape Town."


The Developers' Book Club

by in Feature Articles on

Pretty bad, Tal M thought to himself on his first day on the new job. Pretty, pretty, pretty bad.

In all reality, the code and development practices at Tal’s company weren’t that bad. At least, not when compared with some of the monstrosities we’ve all see published here. Sure, they had the base class to end all base classes (basically an IObject), plenty of does-it-all-and-then-some classes (a good old ISwissArmyKnife), and a seemingly endless supply of wrappers and wrapper wrappers, but there was nothing that went completely over the top.


Well, at least it compiles...

by in CodeSOD on

Working on a team that is uplifting a legacy application into a newer technology, Neil K. is responsible for ensuring that the new application is working the same as the one being replaced.


How to Tempt Fate

by in Feature Articles on

"No, it's not write 'click', it's right click, like click the button on the right-hand side." John R. realized his mistake as he said it.

"I already am holding the mouse with my right han-"


It's Started

by in Error'd on

"Hyperinflation. It's started," writes Luke Heidelberger. "$1800 for a family-sized bottle of cheap white wine."


That Kind of Security

by in CodeSOD on

Alexandre Hetu was thrilled to not only be out of college, but to land a job at a small development company. He was even happier when he was given his first assignment: develop a shiny, brand-new application.

"I'm surprised they don't have any software to do this now," Alexandre told his boss after learning the business requirements, "or, were they using some vendor product?"


Spaced Out

by in CodeSOD on

"While going through some old code," John Preston writes, "I found this interesting set of global variables."

Private space1, space2, space3, space4, space5, _
        space6, space7, space8, space9, space10, _
        space100 As String

Throw Some Hardware at it!

by in Feature Articles on

Thank you and please come again.The Sohcnum Family Convenience store chain knew two things about their fax-based price distribution process: it was extremely time consuming and completely un-cool. Managers at their twenty-eight locations absolutely hated having to write out, by hand and with a big marker, the hundreds of new price signs that came through every morning. It all seemed so unnecessary, especially considering that it was 1997 and "hi tech" was officially in. Plus, with their aspirations to grow the chain by impressing and attracting big investors, a whiz-bang price distribution system was a must-have.

Enter the Automated Sign System. With a shiny new UI on the frontend and a hulking Oracle server running on the backend, it would send data across the Internet to the individual stores for automated, overnight printing. In the morning, the managers would take the large stack of signs and hang them up around the store. All told, the corporate developers had created a system that generated consistently-formatted signage for all stores and saved a ton on labor costs. The managers also appreciated not having to arrive at 4:30am to write out a day's worth of signs.


#NO DATA

by in Error'd on

"While walking around Baltimore," Neal notes, "I came across a ticker that had one news story that didn't seem complete."


The SQL Guru

by in Feature Articles on

“Really!?” Warren was stunned. “They went with us? What’s wrong with them? Why on earth would they have done that!?”

Warren had a good reason to be skeptical. While his employer, Aderrific, was one of the region’s top advertising agencies, they weren’t exactly known for building Customer Relationship Management systems. Yet, their largest client – a major soft drink company famous for a certain challenge – had retained Aderrific to do just that.


Well-Intentioned Destruction

by in Feature Articles on

The custom-built PHP-based content management system suffered from the classic problem of too many cooks in the kitchen. Every code file had conflicting naming conventions and coding styles, structures and duplicate methods all over the place; a Big Ball of Mud. And Dan S. was thrown head first into it.

Dan was trudging through the usual drudgery of low-to-medium priority tickets, when suddenly the heavens cracked open and a Very High priority ticket descended from the sky; the first he'd ever seen. A Very High priority ticket was an all-hands-on-deck, drop everything ticket. You could step in a bear trap, but still be on the hook for hobbling over to your workstation and fixing the ticket before you were allowed to gnaw your leg off. The issue was as vague as it was alarming: One of the clients that used the BBoM CMS system had all of their pages vanish.


No More Messages

by in Error'd on

"Not only did the ATM run out of ink," wrote Tim A, "but it would appear that the marketing department has finally run out of messages!"


The Complicator's Email Address Parser

by in CodeSOD on

A builder sits you down at a table. "I want to show you something," he says, setting a rolled-up sheet of worn leather on the table in front of you. He reaches into his pocket, producing a single screw.

"I keep seeing these," he says, "and they're so hard to work with! I use my hammer to drive them in, but they don't work as well as nails. And once I finally get them in, the claw can't get under the head if I have to remove them." You start to feel embarrassed for the builder.


Foolproof Future-Proofing

by in CodeSOD on

"We had a coder for our project named Clyde," Robert B. writes, "who would have been much happier coding in C, but we had good reasons for choosing VB instead. To make up for the ease of coding in VB, Clyde would eschew the simple way of doing things. No calls to well-defined common routines for him; no, he would code deeply inscrutable functions to accomplish even the simplest tasks.

"Eventually, it came time to move the application to a new, web-based platform. We weren't porting the code – after a decade of Rapid Application Development, it was an unholy amalgamation of conflicting 'common' routines and wildly divergent programming styles. But we did have to document the functionality behind the existing system.


A Statistical Anomaly

by in Feature Articles on

It started simply.

Hi

I get this problem when I push this button.

Blaming XP

by in Error'd on

"I got this on my Vista machine recently," Jing Zhang writes. "I guess Vista is now blaming XP for failure?"


Missing the Point

by in Feature Articles on

Darren's coworker: "I understood your point about minimum privileges. So, now service user need be in only one group: Administrators."

 


Rly, Rly, Rly Tru

by in CodeSOD on

A.C. found this in a project:

public override bool IsActive() {
  return true && true && true; 
}

The Disgruntled Printer

by in Feature Articles on

"What did you just do?" Russ asks janitor. Confused, he says "turned off light in mop closet." It explained the mysterious printer outages.

 


A Common C Dilemma

by in CodeSOD on

How to prevent for-loops from boundary overrun?

Gordon's c/w came up w/ this cunning solution: