Recent Articles

Mar 2015

The Upgrade

by in Feature Articles on

James stood on the precipice of a significant upgrade to his company’s reporting capabilities. Purchasing had cut a deal with the vendor ÜberWarehouse to upgrade their warehouse inventory tracking system from a basic .NET application with limited functionality to a full-blown data warehousing system. He jokingly called it the “Warehousing the Warehouse Project”. He was the only one who found it funny.

ÜberWarehouse wasn’t about to give that upgrade away for free, though. They sent James an invoice that could have easily filled his Yoda piggy bank with all the change from the nickel-and-diming contained within. The total of the invoice was significantly over the budget of the project, and that was a problem. Of particular interest was something ÜberWarehouse called “Memory Database”. The line item listed it as a “required” component, and it came with a price tag of $5,500USD.

James wanted answers from ÛberWarehouse in person, with hopes that he could negotiate the price down to something more palatable. They agreed to send Spencer, their head architect and chief excitement-generator to give James a demo that would knock his socks off.


Another Tokyo Meet-up: Sakura Edition

by in Announcements on

I'll be in Japan once again, and figured it'd be the perfect opportunity to celebrate Hanami with Tokyo-area TDWTF readers:


Would You Like to Take a Survey?

by in Announcements on

Our sponsor, Puppet Labs, wants to know what your DevOps needs look like. Take their survey, and be entered to win some valuable prizes.


Rube Goldberg's Password Generator

by in CodeSOD on

One of the well-known rules of life is that the most straightforward solution is usually the best solution. Obviously it's not always possible to "keep it simple, stupid," but one should aim to make their creations as self-explanatory and to-the-point as possible- otherwise it's easy to end up with a nightmare in terms of both maintainability and performance.

Photo of the Week- More than One Way to Hammer a Nail (8722944827)

Some people, however, have chosen to defy that rule. One of them was Rube Goldberg. This engineer turned cartoonist became famous for inventing ridiculously complex contraptions to achieve the simplest tasks. And while Mr. Goldberg passed away in 1970, the concept of a "Rube Goldberg machine" outlived him, showing up in hundreds of cartoons, events, and comedy movies.


We'll Take All the Help We Can Get

by in Error'd on

"I was casually browsing Bingo games and this one asked me to finish developing their site for them," writes Steven W.


A Petite Change Request

by in Feature Articles on

Robert ran a web service used to store legal file data for a number of clients. One day, he received an email from his biggest client, Excédent, asking to meet about a new requirement.

"We've purchased new accounting software that requires us to track an additional piece of data," Philippe, Robert's contact from Excédent, explained over the conference call a few days later. "Each of our cases must now have a ‘cost center' associated with it. There are a lot of these cost centers, so when our employees enter case data, we'd like for them to be able to pick the one they need from a list."


Are You Down With PHP?

by in CodeSOD on

Who’s Down With PHP?

PHP often gets a bad rap. A lot of the time, that’s because it’s used by developers that don’t know what they’re doing, just like there’s nothing inherently wrong with spandex, but there are times, places and people where it is inappropriate. And don’t get me wrong, the language has made big strides in recent years (good luck finding a web server hosting one of those versions, though). But there are just uses of PHP that reinforce that reputation. Robert Osswald provides this example from the contact-form editing code of a domain registrar database.

Let’s say you have some JSON data from an AJAX request, and it looks like this:


The A(nti)-Team

by in Feature Articles on

In the 1980’s, there was a TV show called The A-Team. There was the scrounger, who could scam anyone out of anything. He would make promises that were sort of true to get what he wanted (sound like marketing?) There was the tough guy who could intimidate anyone into doing anything. He knew how to get things done, but underneath it all, was a nice guy. There was the leader, who could always come up with a plan to save the day. And there was the one guy who was a little crazy (the good kind of crazy), but who you could count on in a pinch. There was also the occasional outside helper who would run interference and recon. This was a group of folks who worked as a well-oiled machine to get the job done. Failure was not an option! They were a team!

The A-Team never filed a project methodology document. No wonder they were wanted criminals.

Alex had taken a job on a new greenfield development effort to replace an aging and unsupportable birds-nest-o-wtf™. Naturally, the position was advertised as “we intend to do things right!” The project is fully funded. We will have the proper equipment and team personnel to get this job done. We have the full support of six layers of management plus all of the users. Alex was optimistic.


Regularly Expressing Hate

by in CodeSOD on

Perl is jokingly referred to as a “write-only language”. This is because Perl’s primary solution to any problem is to throw a regular expression at it. Regexes are powerful, but cryptic.

Metamucil

Imagine RJ’s joy at starting a new contract for an OCR/document-management system that makes heavy use of regexes. Even better, the system doesn’t use widely implemented “Perl-compatible regular expressions” syntax, but instead, uses its own, slightly tweaked version.


Pretty Please?

by in Error'd on

"Hey, may I get your permission...quickly? I'm about to leave for a world tour and I have a LOT of ground to cover," writes John


The Record Setting Score

by in Feature Articles on

A few years ago, Joel Spolsky wrote his simple, 12-point test to measure how “good” a software team is. Stan was thinking about this test quite a bit, when he started a new job at a company which set a new record for failure.


The Daily WTF: LIVE!

by in Announcements on

You’ve read the posts. You’ve submitted your own WTFs. Now it’s time to take it to the next level: The Daily WTF: Live is coming to Pittsburgh, PA.

In the style of The Moth or Risk! podcasts, we’re getting our fellow IT drones up on stage, to share their tales of their worst WTFs, their successes, and true tales of life in the IT trenches.


A Deeply Nested Mystery

by in CodeSOD on

As any competent developer knows, not all Web browsers were created equal. In a stew of standards, drafts, vendor extensions, and JavaScript engine quirks, each of them can behave a little differently under various circumstances. Many people tried to resolve this situation, but "creative" coders are always one step ahead, finding new and amusing ways to mandate the dreaded "runs only under Internet Explorer 6" popup on their webpages.

This time, our submitter found out that his bus timetable was working just fine on Safari:


Dynamic Tables

by in Feature Articles on

We've all learned to write programs a bit more generically than the immediate problem requires. We use interfaces in our code and include concrete implementation classes via some language-appropriate mechanism. We use factories to produce the object we want, rather than hard code them. We use code generators to spew forth mountains of code from configurable templates. Sometimes, we even generate SQL on-the-fly. It provides more flexibility that way; instead of having to write a separate query for every permutation of question, we can write something that can dynamically create the query, execute it and return the results.

Drop Leaf Table

At Initech, Ian was assigned an interesting JIRA ticket: Investigate errors regarding column length. Since that was all the information written in the ticket, Ian hunted down the author of the ticket to pry out a tad more information. Apparently, the part of Initech's intranet website that was used by the sales agents was suddenly throwing errors about some kind of maximum-size error, and he needed to find out what it was, why it was happening and how to fix it.


Free (New) TDWTF Mug Day - Time's Running Out

by in Announcements on

There's only so much time left to get your free TDWTF mug, with the new logo and everything. Be the first kid on your block to have one.

Last year around this time, we did a Free T-Shirt Day. You all gave some great feedback, so I thought we'd try it again with a Free Mug Day!


Negative Creativity

by in CodeSOD on

Pop quiz: how do you ensure that a number is negative? You could do something like:

Big Ben Negative


Merry Christmss

by in Error'd on

"I'm not sure what happened...maybe they ran out of vowels?" Mitch wrote.


The Awesome Optimization

by in Feature Articles on

Dave liked to think that he was a responsible, thorough application developer. He always tried to understand a problem before tackling it, to think through all ways a change could affect things, and to gather information before making decisions. So when he received complaints about the speed of the custom web application used by his work’s health department, he decided to do a little research to gather all the facts before reporting the issue to his boss.

Do not throw in trash


Waiting for File IO…

by in CodeSOD on

Trisha had the misfortune to inherit some old Cold Fusion code. One particular block needed to see if a file existed before it continued, and apparently the original developer really wanted to be patient and make sure the file was there, so they wrote this:


            

The Lockdown

by in Feature Articles on

2014 was waning, and Stacy’s team was struggling to deliver all the projects the director wanted before year-end. Insuracorp was a small, and that meant IT had a minuscule head-count. This meant they needed to bring on a Highly Paid Consultant for the last project, Codename: Lockport.

Star Trek Thumbdrives


Dating Woes

by in Coded Smorgasbord on

As we all know- especially those of us who just "sprung ahead" this weekend with Daylight Saving Time- dates, times, and time zones are complicated beasts. Handling them programmatically is even harder. Computerphile put together a great video on this topic, which is worth watching to understand why we receive so many Error’d submissions regarding downloads that claim they won’t finish until after the heat death of the universe.

Here are some examples of mind-bending code attempting to wrangle with an already mind-bending topic...


Spoiler Alert

by in Error'd on

"The following image contains spoiler information. Due to the fact the material in this image will spoil upcoming errors, we have removed the excerpt so you must click the image to view the image contents," writes Jay M.


Spared No Expense

by in Feature Articles on

Renee’s company was a Silicon Valley managed services company. They needed the best data-center they could find to house their infrastructure, and cost was not an object. They loaded up a dump truck full of money and went shopping for the most expensive hosting they could find.


SearchGuard

by in CodeSOD on

In a professional situation, an incorrectly selected record can result in a mortifying loss of data. Therefore, it behooves one to select the proper row carefully in one's stored procedure. That's why Charles's development team uses SearchGuard, the premier design pattern for selecting just the right row:


DELETE FROM [dbo].[tbl_employee] WHERE ((
	[employee_id] = @Original_employee_id) 
	AND ([salesperson_flag] = @Original_salesperson_flag) 
	AND ([first_name] = @Original_first_name) 
	AND ([last_name] = @Original_last_name) 
	AND ((@IsNull_job_title_type_id = 1 
	AND [job_title_type_id] IS NULL) OR ([job_title_type_id] = @Original_job_title_type_id)) 
	AND ((@IsNull_address_id = 1 AND [address_id] IS NULL) OR ([address_id] = @Original_address_id)) 
	AND ((@IsNull_work_extension = 1 AND [work_extension] IS NULL) OR ([work_extension] = @Original_work_extension)) 
	AND ((@IsNull_home_phone_number = 1 AND [home_phone_number] IS NULL) OR ([home_phone_number] = @Original_home_phone_number)) 
	AND ((@IsNull_alternate_phone_number = 1 AND [alternate_phone_number] IS NULL) OR ([alternate_phone_number] = @Original_alternate_phone_number)) 
	AND ((@IsNull_relative_name = 1 AND [relative_name] IS NULL) OR ([relative_name] = @Original_relative_name)) 
	AND ((@IsNull_relative_phone_number = 1 AND [relative_phone_number] IS NULL) OR ([relative_phone_number] = @Original_relative_phone_number)) 
	AND ((@IsNull_hire_date = 1 AND [hire_date] IS NULL) OR ([hire_date] = @Original_hire_date)) 
	AND ((@IsNull_termination_date = 1 AND [termination_date] IS NULL) OR ([termination_date] = @Original_termination_date)) 
	AND ((@IsNull_team_type_id = 1 AND [team_type_id] IS NULL) OR ([team_type_id] = @Original_team_type_id)) 
	AND ((@IsNull_comment = 1 AND [comment] IS NULL) OR ([comment] = @Original_comment)) 
	AND ((@IsNull_social_security_number = 1 AND [social_security_number] IS NULL) OR ([social_security_number] = @Original_social_security_number)) 
	AND ((@IsNull_drivers_license_number = 1 AND [drivers_license_number] IS NULL) OR ([drivers_license_number] = @Original_drivers_license_number)) 
	AND ((@IsNull_badge_number = 1 AND [badge_number] IS NULL) OR ([badge_number] = @Original_badge_number)) 
	AND ((@IsNull_hourly_wages = 1 AND [hourly_wages] IS NULL) OR ([hourly_wages] = @Original_hourly_wages)) 
	AND ((@IsNull_w2_claim = 1 AND [w2_claim] IS NULL) OR ([w2_claim] = @Original_w2_claim)) 
	AND ((@IsNull_insurance_start_date = 1 AND [insurance_start_date] IS NULL) OR ([insurance_start_date] = @Original_insurance_start_date)) 
	AND ((@IsNull_date_of_birth = 1 AND [date_of_birth] IS NULL) OR ([date_of_birth] = @Original_date_of_birth)) 
	AND ((@IsNull_shirt_size_type_id = 1 AND [shirt_size_type_id] IS NULL) OR ([shirt_size_type_id] = @Original_shirt_size_type_id)) 
	AND ([active_flag] = @Original_active_flag) AND ([network_userid] = @Original_network_userid) 
	AND ((@IsNull_vacation_days = 1 AND [vacation_days] IS NULL) OR ([vacation_days] = @Original_vacation_days)) 
	AND ((@IsNull_sick_days = 1 AND [sick_days] IS NULL) OR ([sick_days] = @Original_sick_days)) 
	AND ((@IsNull_last_vacation_update = 1 AND [last_vacation_update] IS NULL) OR ([last_vacation_update] = @Original_last_vacation_update)) 
	AND ([part_time_flag] = @Original_part_time_flag) 
	AND ((@IsNull_part_time_hours = 1 AND [part_time_hours] IS NULL) OR ([part_time_hours] = @Original_part_time_hours)) 
	AND ([first_eligible_bonus_received] = @Original_first_eligible_bonus_received) AND ((@IsNull_first_eligible_bonus_received_date = 1 AND [first_eligible_bonus_received_date] IS NULL) OR ([first_eligible_bonus_received_date] = @Original_first_eligible_bonus_received_date)) 
	AND ([awa_location_id] = @Original_awa_location_id) 
	AND ([rowguid] = @Original_rowguid) 
	AND ((@IsNull_bonus_view_date = 1 AND [bonus_view_date] IS NULL) OR ([bonus_view_date] = @Original_bonus_view_date)) 
	AND ((@IsNull_ceiva_flag = 1 AND [ceiva_flag] IS NULL) OR ([ceiva_flag] = @Original_ceiva_flag)) 
	AND ([ethnicity_id] = @Original_ethnicity_id) 
	AND ((@IsNull_sex = 1 AND [sex] IS NULL) OR ([sex] = @Original_sex)))


Codename: Cloudy Viper

by in Feature Articles on

In the interview, Initech seemed nice enough. The managers seemed like nice, normal people, and the company’s vibe seemed quite good. When Terrence was extended an offer, he accepted and joined.

The Viper rollercoaster
by Jeremy Thompson


Polish Elections

by in CodeSOD on

Far away across the Atlantic, in the mythical land of Eastern Europe, where the sun don't shine and wild beasts roam the roads, lies a little country called Poland. Known in the world for its cheap manual labor and fondness for strong alcohol, it has for years been the butt of every national joke in almost all parts of the globe. But people here (or at least those who haven't run away yet) have been working hard to combat those pesky Eastern Bloc stereotypes, and as such, the country has in recent years seen a lot of social and technological progress. That last one, of course, comes with one notable exception: the government sector.

2010 Poland elections round 2 ballot box