Article 31EF1 CodeSOD: Never Bother the Customer

CodeSOD: Never Bother the Customer

by
Remy Porter
from The Daily WTF on (#31EF1)

Matthew H was given a pretty basic task: save some data as a blob. This task was made more complicated by their boss's core philosophy, though.

Never. Bother. The. Customer..

"Right, but if the operation fails and we can't continue?"

Never. Bother. The. Customer.

"Okay, sure, but what if they gave us bad input?"

Never. Bother. The. Customer.

"Okay, sure, but what if, by hitting okay, we're going to format their entire hard drive?"

Never. Bother. The. Customer.

As such, for every method that Matthew wrote, he was compelled to write a "safe" version, like this:

protected void SaveToBlobStorageSafe(){ try { SaveToBlobStorage(); } catch (Exception ex) { }}

No errors, no matter what the cause, were ever to be allowed to be seen by the user.

otter-icon.png [Advertisement] Otter enables DevOps best practices by providing a visual, dynamic, and intuitive UI that shows, at-a-glance, the configuration state of all your servers. Find out more and download today! TheDailyWtf?d=yIl2AUoC8zACoQhOY1VXi8
External Content
Source RSS or Atom Feed
Feed Location http://syndication.thedailywtf.com/TheDailyWtf
Feed Title The Daily WTF
Feed Link http://thedailywtf.com/
Reply 0 comments