Article ZJ9K Don't Click That

Don't Click That

by
Maciej Stachowski
from The Daily WTF on (#ZJ9K)

256px-The_Big_Red_Button_%283085157011%2

The year was 2004, and Scott S. has just begun his internship at IniBank: an underdog financial institution that would, over the years, grow up to be one of the biggest players on the market. Despite being fresh out of college with little experience under his belt, he quickly found his way around the corporate culture and acclimated to the Application Development Department.

His first task was to assist in rewriting a simple, internal Classic ASP application into ASP.NET and WebForms. Eager to work with the then-new and shiny technology, he spent his days researching the documentation, asking questions, and learning the ropes, slowly producing useful code.

One day, as he was tweaking a simple grid, Tim-the project manager and his internship overseer-stepped into his cubicle. "Hi, how's it going?" he asked jovially. "Enjoying the company so far?"

"Sure!" Scott smiled. "The people are nice, the project is pretty cool, and all in all I'm having a good time here."

"Well, I'm glad to hear that, because I've discussed it with the management, and we're thinking of offering you a permanent position."

"Really?" Scott's eyes shone with glee. Straight out of college, and already getting a real job, how cool is that? he thought.

"And how's the rewrite?" Tim asked, taking a seat next to Scott. "Can I see your work?"

"Okay. Today I've been working on the customers view." Scott brought up the project, ran the application, and brought up a simple table. "It's almost done. You can add a person, you can edit their data, but you can't-"

"Hmm, let me see." Tim took the mouse and keyboard from Scott and started testing the application. After adding a few customers and playing with all the sorts and filters on the table, he spotted one more button. "Okay, so now, I click here, and it should delete the customer, right?"

"Um, don't-"

Scott tried to say something, but the cursor was already hovering over the red "Delete" button.

Click.

Now, these days, IniBank has all sorts of test environments and safeguards in place. Back in 2004, however ... to say it wasn't the case was an understatement. In fact, Scott's application was hooked directly to the production environment, running happily with database administrator permissions and ready to wreak havoc.

So when he heard the mouse clicking, his stomach instantly grew as heavy as an iron ball. Because he knew which part of the code he couldn't get to compile, and which part he'd commented out just a few minutes ago ...

"Uh, Scott?" Tim frowned. "Why is the grid empty?"

"I, I ... The WHERE clause ... I'm so sorry," Scott mumbled, his face pale as a sheet of paper, as he frantically tried to remove the filters and change the parameters. But the DELETE statement in his code did its work masterfully-and since it was only half-written, instead of removing the single customer marked for deletion, it simply wiped the whole table.

"You didn't ... oh God!" Tim put two and two together. "Quick, let's call some DBAs and hope there's a current backup!"

Luckily, after a few moments of downtime and a bit of angry shouting, the database was restored. Tim and Scott decided to share the blame and simply forget about this little incident. In the end, Scott got his position at IniBank-and a few years later, after Tim and a few other people left for greener pastures, he became the manager of the now-booming Application Development Department. And while Scott personally made sure a situation like this could never happen again by implementing best practices and proper testing regimes, he still enjoys spooking new developers with an occasional click on the "Delete" button.

scout%2050x50.png[Advertisement] Scout is the best way to monitor your critical server infrastructure. With over 90 open source plugins, robust alerting, beautiful dashboards and a 5 minute install - Scout saves youvaluable engineering time. Try the server monitoring you'll today.Your first 30 days are free on us. Learn more at Scout. TheDailyWtf?d=yIl2AUoC8zASz0rsQc0d3U
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