Babette's errant email cripples German parliament (Reuters)

Reuters - The German parliament's email system was hampered for several hours for more than 4,000 staffers and deputies when hundreds of workers responded to an errant email sent by one staffer named "Babette" to all 4,032 co-workers.

Categories: Funny News | Humor | News | Odd News | Yahoo News | Yahoo News Oddly Enough
CodeSOD: The Percent Conversion

"Lucky me," writes Joe from the Submit-To-WTF Visual Studio Add-In, "I just inherited a home-grown system information application."

"Judging from the code the previous programmer wrote, this is sadly one of the better pieces."

Public ReadOnly Property BatteryPercent()
    ' This code will retrieve the BatteryLifePercent property and convert it to a percent.
    Get
        If SystemInformation.PowerStatus.BatteryLifePercent.ToString = "1" Then
            Return "100%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.99" Then
            Return "99%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.98" Then
            Return "98%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.97" Then
            Return "97%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.96" Then
            Return "96%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.95" Then
            Return "95%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.94" Then
            Return "94%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.93" Then
            Return "93%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.92" Then
            Return "92%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.91" Then
            Return "91%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.9" Then
            Return "90%"
        '...
        'snip
        '...
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.2" Then
            Return "20%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.19" Then
            Return "19%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.18" Then
            Return "18%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.17" Then
            Return "17%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.16" Then
            Return "16%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.15" Then
            Return "15%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.14" Then
            Return "14%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.13" Then
            Return "13%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.12" Then
            Return "12%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.11" Then
            Return "11%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.1" Then
            Return "10%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.09" Then
            Return "9%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.08" Then
            Return "8%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.07" Then
            Return "7%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.06" Then
            Return "6%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.05" Then
            Return "5%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.04" Then
            Return "4%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.03" Then
            Return "3%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.02" Then
            Return "2%"
        ElseIf SystemInformation.PowerStatus.BatteryLifePercent.ToString = "0.01" Then
            Return "1%"
        Else
            Return "NA"
        End If
    End Get
End Property




Categories: Computer Humor | Computers | Humor | Programming | Technology | The Daily WTF
German beer drinking slide stopped by warm weather (Reuters)

Reuters - A steady slide in beer consumption in Germany was stopped cold last year thanks to warmer weather, the federal statistics office said on Monday.

Categories: Funny News | Humor | News | Odd News | Yahoo News | Yahoo News Oddly Enough
CodeSOD: Globally Coupled

"I work on a team maintaining a large and enterprisey PHP system," writes Amber, "and as such, my job mostly involves doing enhancements and fixing bugs."

"It sounds normal enough, if not for the fact that almost all variables are globals and each of them might or might not be initialized in the same way, or the same place, as seen in this screenshot."

"That's tolerable, but the real problem arises when I need to reuse a function in a different location. I've added line breaks and formatting to make some sense of things..."

global $dbCon;
  $dbCon->InitOpen($cf_db, 'db1');

.... snip a few hundred lines ....

function getRanking () {

  global $dbCon, $dbCon_test, $dbCon2, $cf_db;
  include '../rtuser/rtutil.php';
  $dbCon_test->
  InitOpen($cf_db, 'db2'); 

  ..... snip ....

  /* rt_rank() requires $dbCon as db connection to testdb
   * in this context, $dbCon currently points to Db1 thus
   * temporarily pointing $dbCon to testdb is necessary (fred)
   */

  $tempdbConDb1 = $dbCon;
  //assign $dbCon_test to $dbCon to have testdb connection
  $dbCon = $dbCon_test;       
  
  $memcacheKey = 'hof_ranking_' . $cntr . ':' . $offset;
  
  //call rtutil.php's getrtRank()
  // cache db r in memcache for 5 minutes
  $r = unserialize(getMemCache($dbCon2, $memcacheKey, '5 minute', 'getrtRank', $args));                                                      

  //swap back $dbCon so that the code relying on $dbCon pointing to Db1 won't be affected
  $dbCon = $tempdbConDb1;      

  include '../rateuser/rateutil.php';

  ... snip ...

  /* rate_rank() requires $sql as db connection to testdb
   * in this context, $sql currently points to gm thus
   * temporarily pointing $sql to testdb is necessary (fred)
   */

  $tempSqlGm = $sql;

  //assign $sql_test to $sql to have testdb connection
  $sql = $sql_test;       
  $memcacheKey = 'hof_ranking_' . $cntr . ':' . $offset;
  
  //call rateutil.php's getRateRank()
  $result = unserialize(getCacheInfo($sql2, $memcacheKey, '5 minute', 'getRateRank', $args));
  list($uidlist, $nicks, $votes, $imageIds, $genders) = $result;                                                      

  //swap back $sql so that the code relying on $sql pointing to gm won't be affected
  $sql = $tempSqlGm;      
//....
}

Amber continues, "what happened here was that, in file A, a global database link identifier pointed to database 1 but in the include file B, the same variable was supposed to point to database 2. What I did was to swap out the link identifier whenever a function in file B was involved, then swap back whenever a function in file A was involved. Injection was not an option as the Globals were so deeply and variably coupled that decoupling them needs to be done on a case-by-case basis. And that was just one place...




Categories: Computer Humor | Computers | Humor | Programming | Technology | The Daily WTF
Irishman makes "billion-euro home" of shredded notes (Reuters)

Reuters - An unemployed Irish artist has built a home from the shredded remains of 1.4 billion euros ($1.82 billion), a monument to the "madness" he says has been wrought on Ireland by the single currency, from a spectacular construction boom to a wrenching bust.

Categories: Funny News | Humor | News | Odd News | Yahoo News | Yahoo News Oddly Enough
Wanted: Retirees to live in Ecuador for a month free (Reuters)

Reuters - Interested in adventure and exploring new places? An international magazine is looking for volunteers to spend a month in Cuenca, Ecuador to test its potential as a retirement destination.

Categories: Funny News | Humor | News | Odd News | Yahoo News | Yahoo News Oddly Enough
WIN!: Mother Nature FTW: Blue Ice Cave, Iceland

epic win photos - WIN!: Mother Nature FTW: Blue Ice Cave, Iceland

Categories: Fail | FAIL Blog Epic Failures | Humor
Parenting Fails: Kids Really Do Say the Darndest Things

crazy parenting fails - Parenting Fails: Kids Really Do Say the Darndest Things

Categories: Fail | FAIL Blog Epic Failures | Humor
Failbook: Escaping a Cult

funny facebook fails - Failbook: Escaping a Cult

Categories: Fail | FAIL Blog Epic Failures | Humor
Greece publishes tax dodger list to name and shame (Reuters)

Reuters - A famous singer and a retired basketball star were on a list of 4,000 top tax dodgers released by the Greek government as part of a name-and-shame policy to get evaders to pay up.

Categories: Funny News | Humor | News | Odd News | Yahoo News | Yahoo News Oddly Enough
Poorly Dressed: Bra Cat Sunglasses FTW

fashion fail - Poorly Dressed: Bra Cat Sunglasses FTW

Categories: Fail | FAIL Blog Epic Failures | Humor
Classic WTF: Rutherford, Price, Atkinson, Strickland, and Associates Dentistry, Inc

I'm at CodeMash today (stop by the Inedo booth if you're there!), so I thought it'd be a great time for this classic. Rutherford, Price, Atkinson, Strickland, and Associates Dentistry, Inc was originally published on January 30th, 2008.


Dr. Rutherford July 19th, 2004 marked a new chapter in New Portlandopolis’s rich dentistry history. It was on that day that the bitter rivalry between Dr. Rutherford, DDS; Dr. Price, DMD, DDS; Dr. Atkinson, DMD; and Dr. Strickland, DDS/DDS-PhD, had finally come to an end. Though there’s much debate on what exactly started the feud, everyone knows what brought the dentists together: the nationwide “denta-corps” that can out-price, out-service, and out-anything their small, family dental practices.

Although the partnership talks had begun years before, July 19th was their agreed-upon D-Day, wherein the four separate practices would officially combine to be Rutherford, Price, Atkinson, Strickland, and Associates Dentistry, Inc. In the months leading up to D-Day, and after much bickering and debate, the four dentists got everything ready from new signage to new logoed toothbrushes. The only thing that remained was combining their computer systems. That task was left to Aaron B, an IT consultant who had the pleasure of working with each office through many of the “ugly years.”

Fortunately for Aaron, each of the dentists used the same practice management system: Beaglesoft’s Practice EnterprisePlus. It certainly wasn’t the best software, but it was among the most expensive. Perhaps more-importantly, Beaglesoft offered all sorts of outrageously-priced add-ons that the dentists could buy to one-up one another. For example, a wand-shaped oral camera required a $7,000-per-site “camera driver,” in addition to the ungodly amount the camera cost in the first place. When Aaron plugged the camera into his laptop (which didn’t have any Beaglesoft software running), it was recognized as a plug-and-play camera and immediately started streaming video. Not that it mattered though; as soon as Dr. Price had his installed, the other three dentists had to get one as well. 

“While our prices might seem high,” a Beaglesoft rep once told Aaron, “keep in mind that you’re paying for quality. Our products are rigorously tested to work in today’s and tomorrow’s high-tech dental office.”

And for that reason, Aaron wasn’t too worried about Beaglesoft’s portion of the D-Day migration. They assured him on several occasions that their latest and greatest – Beaglesoft Practice EnterprisePlus Elite with Networking – could network a “virtually unlimited” number of practices. The four Aaron was linking together was “chump change” compared to what the system could do.

When Friday, July 16th – the weekend before D-Day – had finally come, the dentists were ready. They closed their offices at noon and, per Beaglesoft’s instructions, initiated the migration process. Over the next twelve hours, so the plan went, each practice’s system would upload its data to the Central Server at Dr. Strickland’s office. Naturally, none of the other dentists were too thrilled about having a “Central Server”, especially one at Dr. Strickland’s.

Aaron arrived at Dr. Strickland’s office early Saturday morning to find a surprising message on the server: “Migration Completed Successfully.” He ran through some initial smoke tests and it appeared that the migration did, in fact, complete successfully. After a trip to the other three dentist offices, Aaron verified that he could access any patient’s file from any office. He called up the four dentists to share the good news: come Monday, they should be in business.

Monday came and, shortly thereafter, the four offices were out of business. The system had completely grinded to a halt. Every click of the mouse was met with a several-minute delay, and every delayed response was met with more clicking. Aaron, who happened to be on-site “just in case,” immediately suspected the newly-installed T1 lines.

Aaron called up the phone company. They ran a few diagnostics on their end, only to find that each office’s T1 line was completely pegged. Most certainly, the technician claimed, the problem was on their end. Perhaps a router gone haywire?

Aaron checked and rechecked the switches, the hardware, the ports, and the routers. He rebooted once, twice, and thrice. Everything seemed functional, aside from the fact that the Central Server was firing packets off non-stop.

Not sure what else to do, Aaron bridged his laptop between the Central Server and its switch. Within seconds, he logged hundreds of megabytes of data, far too much for anyone to go through in the middle of such a crisis. He had no choice but to take the “satellite” dentists offline to investigate the problem. They grew suspicious of this and, of course, Dr. Strickland, and demanded that there was foul-play involved.

With only a couple users accessing the Beaglesoft system, Aaron was able to get a handle on the traffic. As he assuaged the other dentists over the phone, Aaron noticed that a lot of the data seemed to be coming from SQL Server. Specifically, it was from queries like this:

 SELECT * FROM Patients

Digging further, Aaron figured out that, whenever a user wanted to look up a patient, the program would run “SELECT * FROM Patients” query, returning the entire Patients table to the client computer.

What’s worse, the query would run any time a character was typed in the patient search box. Searching for just his first name – A-A-R-O-N – resulted in five SELECT * queries.

What’s still worse, the same method of client-side filtering was used for appointments. It wouldn’t just get, say, today’s appointments. Or this week’s. Or, say, any that haven’t happened yet. It would query for every appointment that they ever had or would have in the future. That’s about 100,000 rows.

And since each appointment involved a patient, it’d have to fire off queries for each appointment to download and filter information about the patient.

It was apparent that Beaglesoft’s “rigorous testing” of “Practice EnterprisePlus Elite with Networking” involved, perhaps, a single computer and two, maybe three patient records. He immediately called Beaglesoft to report their issues and a demand a resolution.


(an actual screenshot from Beaglesoft’s install directory)

Within a few hours, three of Beaglesoft’s finest were on a plane to New Portlandopolis. When they arrived, two of them split off to work on “de-migrating” the system into the original four databases. The other Beaglesoftie, a product manager, worked on “damage control” – and boy did she have a lot of damage to control.

By that time – ten hours into Rutherford, Price, Atkinson, Strickland, and Associates Dentistry, Inc’s first day – the dentists were at each other’s throats. Dr. Price blamed the mess on Dr. Strickland who was “online the entire time, ” while Dr. Strickland was convinced that Dr. Atkinson had somehow “spiked the T1s,” while Dr. Rutherford believed that Dr. Price “wanted to retire, and was bringing everyone else down.” Eventually, Dr. Atkinson stormed out and tore down the new "Rutherford, Price, Atkinson, Strickland, and Associates Dentistry, Inc" sign. As he stomped the sign into pieces, he vowed never to work together again. Things pretty much went downhill from there.

After things cooled down a bit with the dentists, the product manager met with Aaron. Angered that his future prospects looked like a repeat of the “ugly years”, he lambasted Beaglesoft’s latest and greatest, and asked why, oh why, they couldn’t have done some client-side caching. Or, at the very least, use the magical WHERE clause.

She was astonished by Aaron’s technical knowledge and eagerly asked more questions on “WHERE clauses and other optimization techniques.” Near the end of their conversation, she actually offered Aaron a job as a Lead Developer at Beaglesoft.

Aaron ended up declining the position. He figured that they’d never be willing to tar and feather the existing development staff. That, and after the Beaglesoft Fiasco of 2004 (as it’s called today), he’d have a lot of cleaning up and intra-dentist diplomacy to do. Besides, how could he miss taking part in the latest exciting chapter in the dentistry history of New Portlandopolis?




Categories: Computer Humor | Computers | Humor | Programming | Technology | The Daily WTF
Ugliest Tattoos: I Say!

funny tattoos - Ugliest Tattoos: I Say!

Categories: Fail | FAIL Blog Epic Failures | Humor
Failbook: DTF

funny facebook fails - Failbook: DTF

Categories: Fail | FAIL Blog Epic Failures | Humor
U.S. border cops nab go-kart hauling Mexican pot (Reuters)

Reuters - U.S. border cops in far-west Arizona have seized an off-road go-kart and trailer packed with marijuana, in the latest bizarre attempt by Mexican smugglers to beat beefed up border security.

Categories: Funny News | Humor | News | Odd News | Yahoo News | Yahoo News Oddly Enough
Failbook: Fun With Salesmen

funny facebook fails - Failbook: Fun With Salesmen

Categories: Fail | FAIL Blog Epic Failures | Humor
Italy's "Get back on board, damn it!" T-shirts a hit (Reuters)

Reuters - A coast guard officer's "Get back on board damn it!" order to the fleeing captain of the capsized Costa Concordia liner is being printed on T-shirts by a company hoping to inspire Italians to rescue their country from economic crisis.

Categories: Funny News | Humor | News | Odd News | Yahoo News | Yahoo News Oddly Enough
Error'd: Sponsor Appreciation, SQL Scourge, and More Error'd

We've got some great companies that sponsor The Daily WTF. And all they ask in return... just take a moment or two to check out what they do. It's some pretty cool stuff.

TDWTF Sponsors

Singlehop Logo   SingleHop Cloud Instances 98% off - Design, deploy and manage your cloud instance on the public cloud for only $1 for your 1st month (normally $50/month!) Use your Cloud Instnace to test new code, experiment with new software or gain extra development time...it's your choice! Try it today with coupon code "CLOUD1".
New Relic   New Relic is basically a magical, real-time performance and user monitoring tool that works on virtually any web platform: Java, Ruby, PHP, .net, Python, Ruby on Rails. I'm not sure how it works (magic?), but it's incredibly easy to use and is pretty inexpensive. Remember: performance is a must-have feature!
New Relic   Monetate - their testing, targeting and personalization platform for online retailers is used on leading websites like Best Buy, Sports Authority and Urban Outfitters. If you’re a problem-solver who is passionate about rich web applications, scaling Internet applications to billions of page views, and working with big data, then you’re a perfect fit for our close-knit and agile team.!
BuildMaster   Inedo - the makers of BuildMaster, the free, and easy-to-use, web-based deployment and release management tool. Going far beyond Continuous Integration, BuildMaster delivers a series of robust features unparalleled by other build-promote-deploy-distribute tools. Oh, did I mention it's free?
Singlehop Logo   Amazon DynamoDB - is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. With a few clicks in the AWS Management Console, you can launch a new Amazon DynamoDB database table, scale up or down request capacity for the table without downtime or performance degradation, and gain visibility into resource utilization and performance metrics.

And now for our regularly scheduled program...


"When filling out a web health assessment, I'm pretty sure I didn't mention the scourge of %_SQL_TEXT that runs in my family," writes Josh Ward, "it's an embarrassing condition, to be sure!"

 

"I knew Ikea carried a lot of stuff, but a Petabyte is bigger than I expected," Nero Imhard, "still, I waited until I was within WiFi reach before proceeding."

 

"I got this while trying to start DBArtisan," writes Willy, "is it telling me or asking me?"

 

"I read that the HTC Thunderbolt has great download speeds but poor battery life," Andrew writes, "but I noticed that the clocks are a little out of sync. Maybe I can find an app that syncs both clocks to the correct time."

 

Erkki Laite found this in his local paper, the Finnish Turun Sanomat on 02.11.2011.

 

Jim Moyle spotted this on the front page of booking.com.

 

"I guess if someone at the mall searched to find where multi(0)disk(0)rdisk(0)partition(1) was, the directory would have been correct," writes Darin Rousseau.

 




Categories: Computer Humor | Computers | Humor | Programming | Technology | The Daily WTF
German city's parking fines are just the ticket (Reuters)

Reuters - German authorities are giving parking violators in one city an unexpected break by issuing tickets without fines.

Categories: Funny News | Humor | News | Odd News | Yahoo News | Yahoo News Oddly Enough