Recent Articles

May 2010

33 33 33 33 33

by in Error'd on

"Just my luck," Q.M. writes, "I picked all 32's."


It's Business Critical!

by in Feature Articles on

"Let me guess" started Justin with a wry smile, "Mr. Van Halen is on 'strike' because he found a brown M&M, right?"

With a beleaguered look, Brian glared back over the rim of his glasses "If only - check your email."


ArticleTypeCodeSOD

by in CodeSOD on

Code generation can be an effective tool for strongly-typing your custom domains if the given domain is constrained to a specific set of values. Acceptable examples would include color names, statuses, and U.S. states, among several others.

In some scenarios it is completely redundant to do so, for example, if you are strongly-typing the alphabet:


Code Refuse

by in Feature Articles on

Jeff was excited by his new project. His company wanted to add an ASP.NET interface to the same database used by one of their Windows Forms applications. For this company, "application integration" meant that two programs looked at the same database. Any change to a database and every application using it had to be updated, individually.

Since Jeff's first day at the company, he had been frustrated by the lack of code reuse, and this was a text-book example of where code reuse should work. He could grab the Windows team's DAL and business layer, slap a web front end, get the project done in a fraction of the time allotted for it, and make sure future maintenance helped both applications. Optimistically, it could be a model for future applications in his company.


The Homegrown CMS

by in CodeSOD on

Several years ago, Mike M’s company decided that they needed to build an in-house Content Management System portal application. Well, actually, the lead developer made the decision… and the recommendation… largely because writing applications are boring. But writing platforms upon which you can write applications… now that’s exciting!

Two years and several failed “proof of concepts” later, and the company had portal driven by a VB6 application with a SQL Server database behind it. If one were to create a list of adjectives to describe this monstrosity, “stable,” “reliable,” and “accurate” would be strikingly absent. However “stillborn” would probably make the top of the list. When Mike took over, the application had 200 forms, one auxiliary code module, and zero classes.


Unmanageably Manageable

by in Error'd on

"I can't argue with that logic," wrote John Noble.


Astigmatism

by in Feature Articles on

Greg bought the promises of the startup. They wanted him to step in and take a mentoring role on a cutting edge, object oriented, SaaS project that was promised to be "a game changer". There would be stock options, a friendly workplace, and a savvy CEO that was deeply involved in the design process. Despite the buzzword-bingo, it sounded promising, and the interviews went well.

The small office was laid out like a Starbucks, complete with eye-strain inducing dim lighting. The core developers sat around a long table, clacking away at their laptops and cracking in-jokes over coffee. It was very chummy, and Greg wasn't part of the crowd yet; they'd need to sniff each other's posteriors and decide who was the alpha in this pack.


Convoluted toString, Interesting Comments, and More

by in Coded Smorgasbord on

"Everyone knows that Russians are the best programmers, and the guy we recently hired is no exception," Kip DeMane wrote, "though his English is a little... off. Here are his comments from a recent commit."

r22795 | t-------- | 2010-05-10 16:06:35 -0400  | 1 line

cleaned code, modified function format_for_rtf . no more 
numbered key to access video array elements, renamed all 
camel toe vars, applied consistent coding formating

Pipe Dreams

by in CodeSOD on

When digging into a newly inherited codebase, most experienced developers have a preferred way to break the system down into understandable pieces. Most of course start with the documentation, but since there rarely is any, that leaves one of two approaches: back-end to front-end or front-end to back-end. John, a Java and SQL developer, generally likes to start in the database and work his way to the front-end.

Recently, he drew the short straw and was tasked with making a few changes to a legacy Swing application that everyone was afraid to touch. Having never seen the innards of the app, he dove straight to the database and noticed a rather interest querying pattern.


Sponsor Appreciation, Binary Abacus, Overpriced Null, and More!

by in Feature Articles on

It's that time again! Please take a moment to check out the companies that sponsor us. Without them, there'd be no Daily WTF.

 

TDWTF Sponsors

BuildMaster   BuildMaster - an easy way to automate your build, deploy, and configuration process all the way through production. Basically, it's application lifecycle management the way it should be: platform neutral, process neutral, and tool neutral.
Comic Reader Mobi   Comic Reader Mobi - a mobile comic book reader for iPhone/Windows/Blackberry with smarts; the app can automatically detect the size of the text bubble and magnify only that text without needing to zoom in and out.
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)
Mindfusion   MindFusion - a great source for flow-charting and diagramming components for a variety of platforms including .NET, WPF, ActiveX and Swing
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.
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.
SPN_NAME   StrataScale - their world-class Data Center is engineered to provide 99.999% availability of power, cooling, and network connectivity, and has N+2 redundancy. That's some serious business.

A Terminal Condition

by in Feature Articles on

Yeah, it's the Apple terminal icon, how observant of you.In the late nineties, Eric started on his journey from being an engineer to being a programmer.

As part of the transition, Eric was assigned to work on an application that he and many of his fellow engineers were very familiar with - a program that created thermodynamic models used to design heat exchangers. Born and raised completely in-house, it was used in the design process of all of their company's products.


The Power of True

by in CodeSOD on

Most computer scientists could rattle off their powers of 2 just as easily as their powers of 10.

Unfortunately in this instance, Daniel has discovered that possessing such "power"ful knowledge could prove dangerous when it comes to validation:


The Daily WTF: Now With Audio!

by in Feature Articles on

 

A couple months ago, I got an email from Daniel Magliola asking me if I’d like Hear a Blog to narrate The Daily WTF. I almost immediately replied “no thanks”, thinking that the last thing anyone wanted was TDWTF’s articles read by some Cylon-sounding program. But to my surprise, they don’t use text-to-speech software; they use real, professional narrators. Go ahead, give it a listen.


The Raybinator, Copy & Paste Error, and Yes I Do

by in Tales from the Interview on

Got tales from your own interview? Then share them, why don'tcha!


The Raybinator (from Ray Smith)
My first interview after university was with a small local finance company applying for the position of "database engineer". Having only a little experience with Access, SQL Server and MySQL, I wasn't too hopeful of getting the job, but figured that the both the general interview experience and getting an idea of what would be expected from database work in the workplace would be worthwhile anyway.


The Tautology Type

by in CodeSOD on

Consider the tautology: an unnecessary construct that adds no meaning, context, or understanding and may as not exist. In linguistics, it can come in the form of superfluous modifiers such as adequate enough and true fact. In procedural code, it’s simply wrapping code in an “if (true) {…}” block. But in a database table, representing the tautology can be especially tricky.

Fortunately, John’s has solved this problem by inventing a new SQL data type that can be used when a BIT column would allow too much variation in the data. Simply add a BIT column to your table along with a CHECK constraint enforcing that column to be zero.


Make Sure That You

by in Error'd on

"I received this on my mobile phone bill," notes Sandor Arendse, "now I finally know what to do in an emergency... oh wait!"


Missing Something

by in Feature Articles on

With Zach's technical knowledge and an excellent track record of handling large projects within the corporation, it was of little surprise when he received the task of estimating the amount of effort to create, in-house, the company's new web portal.

You see, in Zach's workplace, whenever an outside vendor was being considered to develop any in-house app, a "second opinion" would be obtained to see what it would cost to perform the same task using the company's existing available resources. The reasoning was simple - whichever side was the cheapest go the task.


Krypto and 24

by in Bring Your Own Code on

As a kid, I was never a fan gambling away my hard-earned allowance. Heck, even playing poker with M&M’s meant that maybe — just maybe — I’ll walk away with less chocolate than I came to the table with, and that was an anxiety worth not experiencing. Fortunately, I’ve since come to my senses, but I’ll never forget the game my risk-averse friends and I would play when we came across a deck of playing cards.

While most kids reached in their pockets for coins to ante up, we’d pulled the face and joker cards out of the deck, shuffle the rest, and deal out six cards, face-up, in the middle of the table with one of the cards a few inches from the rest.


Minefield

by in Feature Articles on

Peter watched the Newton's Cradle clack away on his desk while contemplating this most recent problem. HR had just handed him a resume for a C# developer named Bobbie. The resume was stellar, her references glowing, And thanks to the negotiations with the placement company, she could start on Monday. Bobbie wasn't just qualified, she was over-qualified. She could do Peter's job in a snap.

He tossed the resume in the trash and stepped out into the row of cubes dedicated to his small staff. "Hey guys, circle up," he said. His three staff shuffled to their cube entrances and stared blankly in his general direction. "This tardiness problem is getting out of hand. The day starts at 8AM, not 8:05. And don't think I haven't noticed the long lunches. If this keeps up, there may have to be some changes around here."


A Real Tri-State

by in CodeSOD on

Everyone knows that a real Boolean has three states: True, False, and FileNotFound.

This naming conundrum has left many to wonder, if Booleans have three states, what does that make a Tri-State? It's a good question, and one that Peter Bronk has had the unfortunate pleasure of being able to answer. Found deep within the bowels of a big, contrived, and clumsy legacy product, he found a real Tri-State.