Alex Papadimoulis

Founder, The Daily WTF

Apr 2009

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.


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)

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:


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.


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.


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

#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.


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


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: