Monday, December 31, 2018

The Squid Who Hid

A Cute Little Squid Hides Himself Get ready to watch an overwhelmingly cute video of a tiny little Bobtail Squid. A scuba diver was able to catch a tiny squid hiding himself beneath the sand. The little guy was on top of the sand when the diver begins to record, but almost immediately begins to […]

The post The Squid Who Hid appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Epic Ninja Training Fall

Guy Has An Epic Ninja Training Fall We have somewhat of a fail in today’s video. In the clip we see a guy from Chicago that seems to be doing some fitness training to participate in the televised competition known as Ninja Warrior. The video begins with the guy hanging from two rings tied to […]

The post Epic Ninja Training Fall appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

The Hazards of Being a Wildlife Photographer

An Example of the Hazards of Being a Wildlife Photographer What a funny wildlife video we have today. This video was taken by a married couple of photographers who were out taking some cool wildlife photographs in South Georgia. They were on a big gravel beach filled with king penguins and elephant seals. The video […]

The post The Hazards of Being a Wildlife Photographer appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Single-Celled Organism Dying

Single-Celled Organism Dying The microscopic world is one of the most interesting subjects you hear about in school. This video is a crazy good reminder of all those science classes we have had when we were young. This video shows the death process of a single celled organism. The clip is recorded at 1000x magnification […]

The post Single-Celled Organism Dying appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Best of…: 2018: The Wizard Algorithm

NIH syndrome causes untold suffering in the world, but for just a few pennies a day, you can help. Or maybe not, but not-invented-here meets password requirements in this story from June. --Remy

Password requirements can be complicated. Some minimum and maximum number of characters, alpha and numeric characters, special characters, upper and lower case, change frequency, uniqueness over the last n passwords and different rules for different systems. It's enough to make you revert to a PostIt in your desk drawer to keep track of it all. Some companies have brillant employees who feel that they can do better, and so they create a way to figure out the password for any given computer - so you need to neither remember nor even know it.

Kendall Mfg. Co. (estab. 1827) (3092720143)

History does not show who created the wizard algorithm, or when, or what they were smoking at the time.

Barry W. has the misfortune of being a Windows administrator at a company that believes in coming up with their own unique way of doing things, because they can make it better than the way that everyone else is doing it. It's a small organization, in a sleepy part of a small country. And yet, the IT department prides itself on its highly secure practices.

Take the password of the local administrator account, for instance. It's the Windows equivalent of root, so you'd better use a long and complex password. The IT team won't use software to automate and keep track of passwords, so to make things extremely secure, there's a different password for every server.

Here's where the wizard algorithm comes in.

To determine the password, all you need is the server's hostname and its IP address.

For example, take the server PRD-APP2-SERV4 which has the IP address 178.8.1.44.

Convert the hostname to upper case and discard any hyphens, yielding PRDAPP2SERV4.

Take the middle two octets of the IP address. If either is a single digit, pad it out to double digits. So 178.8.1.44 becomes 178.80.10.44 which yields 8010. Now take the last character of the host name; if that's a digit, discard it and take the last letter, otherwise just take the last letter, which gives us V. Now take the second and third letters of the hostname and concatenate them to the 8010 and then stick that V on the end. This gives us 8010RDV. Now take the fourth and fifth letters, and add them to the end, which makes 8010RDVAP. And there's your password! Easy.

It had been that way for as long as anyone could remember, until the day someone decided to enable password complexity on the domain. From then on, you had to do all of the above, and then add @!#%&$?@! to the end of the password. How would you know whether a server has a password using the old method or the new one? Why by a spreadsheet available on the firm-wide-accessible file system, of course! Oh, by the way, there is no server management software.

Critics might say the wizard algorithm has certain disadvantages. The fact that two people, given the same hostname and IP address, often come up with different results for the algorithm. Apparently, writing a script to figure it out for you never dawned on anyone.

Or the fact that when a server has lost contact with the domain and you're trying to log on locally and the phone's ringing and everyone's pressuring you to get it resolved, the last thing you want to be doing is math puzzles.

But at least it's better than the standard way people normally do it!

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!


To read the full article, please visit The Daily WTF

Dancing with Donald Duck

Dance Off With Donald Duck What a great video clip we have today. You need to see this nice and friendly dance off between a hyped up stranger and a Donald Duck dancing outside of a store. I believe this video falls under the category of friendly and cute, you’ll see why this is as […]

The post Dancing with Donald Duck appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Sunday, December 30, 2018

Goats Join Man for a Run

A Hurd of Goats Follow a Runner We have a somewhat random and also very funny video today. This video is shot by a man who was on a run on a lonely dirt road. He records himself talking to the camera letting the futer viewers know that he feels strange as he was just […]

The post Goats Join Man for a Run appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Grouchy Dog Breaks Up Harmless Puppy Fight

Mom Dog Breaks Up a Puppy Fight Have you ever seen a mama dog doing some serious parenting? Well don’t worry if not because we have a video for you showing you exactly this. I will admit I think this is another one of those priceless cute videos. I had never seen a mom actually […]

The post Grouchy Dog Breaks Up Harmless Puppy Fight appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Saturday, December 29, 2018

Opening a Pearl Filled Oyster

Opening a Pearl Filled Oyster Have you ever actually seen an oyster with a pearl in it? If not then today is your lucky day, but not as lucky as the guy who actually found an oyster with about a dozen real pearls inside of it! Apparently this fellow in China bought some oysters and […]

The post Opening a Pearl Filled Oyster appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Friday, December 28, 2018

Error'd: A Sour Currency Mix

"Lime bikes are finally in my city! Let's pay for it...So if my USD balance goes below GBP 0 it'll top up with ...AUD?" Ben writes.

 

"I tried to log in to a certain hotel chain's website and noticed this," wrote Gordon S., "I keep clicking the link and it keeps asking if I'm null...so maybe I really am?"

 

"Ths sndz intrstng bt i tnk ill pss. my cding iz gd bt tsting is nt," writes Mike S.

 

Holger K. wrote, "A net income of US $22.1 billion can only be achieved by rigid austerity, like limiting expensive download traffic."

 

"I'm not sure what version of Firefox I'm running, so I should meet these requirements," Jay B. writes.

 

"I was looking for the next train to Milan, but I guess I'll be going to some railway company's intranet instead," Michele.

 

[Advertisement] ProGet supports your applications, Docker containers, and third-party packages, allowing you to enforce quality standards across all components. Download and see how!


To read the full article, please visit The Daily WTF

Kitty Loves Keyboard

Kitty Loves playing With Keyboard a Little Too Much We got a very sweet video for the world today. Do you have a kitty in your family? After watching this video you might either decide that you really do want a cat or that you definitely don’t want one. This is an adorable video of […]

The post Kitty Loves Keyboard appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Thursday, December 27, 2018

Best of…: 2018: Shiny Side Up

It's been many, many years since I've suffered a helldesk gig, but I always get a tickle out of silly helpdesk stories like this one. Always look on the shiny side! -- Remy

CD-ROM

It feels as though disc-based media have always been with us, but the 1990s were when researchers first began harvesting these iridescent creatures from the wild in earnest, pressing data upon them to create the beast known as CD-ROM. Click-and-point adventure games, encyclopedias, choppy full-motion video ... in some cases, ambition far outweighed capability. Advances in technology made the media cheaper and more accessible, often for the worst. There are some US households that still burn America Online 7.0 CDs for fuel.

But we’re not here to delve into the late-90s CD marketing glut. We’re nestling comfortably into the mid-90s, when Internet was too slow and unreliable for anyone to upload installers onto a customer portal and call it a day. Software had to go out on physical media, and it had to be as bug-free as possible before shipping.

Chris, a developer fresh out of college, worked on product catalog database applications that were mailed to customers on CDs. It was a small shop with no Tech Support department, so he and the other developers had to take turns fielding calls from customers having issues with the admittedly awful VB4 installer. It was supposed to launch automatically, but if the auto-play feature was disabled in Windows 95, or the customer canceled the installer pop-up without bothering to read it, Chris or one of his colleagues was likely to hear about it.

And then came the caller who had no clue what Chris meant when he suggested, "Why don't we open up the CD through the file system and launch the installer manually?"

These were the days before remote desktop tools, and the caller wasn't the savviest computer user. Talking him through minimizing his open programs, double-clicking on My Computer, and browsing into the CD drive took Chris over half an hour.

"There's nothing here," the caller said.

So close to the finish line, and yet so far. Chris stifled his exasperation. "What do you mean?"

"I opened the CD like you said, and it's completely empty."

This was new. Chris frowned. "You're definitely looking at the right drive? The one with the shiny little disc icon?"

"Yes, that's the one. It's empty."

Chris' frown deepened. "Then I guess you got a bad copy of the CD. I'm sorry about that! Let me copy down your name and address, and I'll get a new one sent out to you."

The customer provided his mailing address accordingly. Chris finished scribbling it onto a Post-it square. "OK, lemme read that back to—"

"The shiny side is supposed to be turned upwards, right?" the customer blurted. "Like a gramophone record?"

Chris froze, then slapped the mute button before his laughter spilled out over the line. After composing himself, he returned to the call as the model of professionalism. "Actually, it should be shiny-side down."

"Really? Huh. The little icon's lying, then."

"Yeah, I guess it is," Chris replied. "Unfortunately, that's on Microsoft to fix. Let's turn the disc over and try again."

[Advertisement] Ensure your software is built only once and then deployed consistently across environments, by packaging your applications and components. Learn how today!


To read the full article, please visit The Daily WTF

Dwarf Goat Uses Cow as Personal Playground

Dwarf Goat Plays On Top of Cow Check this video out of a small cute goat using a big Scottish Highland cow as a full on playground. This is another one of those short but sweet videos. If you like cute animals then this is the video for you. Everything in it is cute, the […]

The post Dwarf Goat Uses Cow as Personal Playground appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Wednesday, December 26, 2018

Best of…: 2018: JavaScript Centipede

As we wind up for the new year, it's time to take stock and look back at some of our best articles for the year. We start with this horrid bit of code, which hopefully has devoured itself since we posted it. --Remy

Starting with the film Saw, in 2004, the “torture porn” genre started to seep into the horror market. Very quickly, filmmakers in that genre learned that they could abandon plot, tension, and common sense, so long as they produced the most disgusting concepts they could think of. The game of one-downsmanship arguably reached its nadir with the conclusion of The Human Centipede trilogy. Yes, they made three of those movies.

This aside into film critique is because Greg found the case of a “JavaScript Centipede”: the refuse from one block of code becomes the input to the next block.

function dynamicallyLoad(win, signature) {
    for (var i = 0; i < this.addList.length; i++) {
        if (window[this.addList[i].object] != null)
            continue;
        var object = win[this.addList[i].object];
        if (this.addList[i].type == 'function' || typeof (object) == 'function') {
            var o = String(object);
            var body = o.substring(o.indexOf('{') + 1, o.lastIndexOf('}'))
                .replace(/\\/g, "\\\\").replace(/\r/g, "\\n")
                .replace(/\n/g, "\\n").replace(/'/g, "\\'");
            var params = o.substring(o.indexOf('(') + 1, o.indexOf(')'))
                .replace(/,/g, "','");
            if (params != "")
                params += "','";
            window.eval(String(this.addList[i].object) +
                        "=new Function('" + String(params + body) + "')");
            var c = window[this.addList[i].object];
            if (this.addList[i].type == 'class') {
                for (var j in object.prototype) {
                    var o = String(object.prototype[j]);
                    var body = o.substring(o.indexOf('{') + 1, o.lastIndexOf('}'))
                        .replace(/\\/g, "\\\\").replace(/\r/g, "\\n")
                        .replace(/\n/g, "\\n").replace(/'/g, "\\'");
                    var params = o.substring(o.indexOf('(') + 1, o.indexOf(')'))
                        .replace(/,/g, "','");
                    if (params != "")
                        params += "','";
                    window.eval(String(this.addList[i].object) + ".prototype." + j +
                        "=new Function('" + String(params + body) + "')");
                }
                if (object.statics) {
                    window[this.addList[i].object].statics = new Object();
                    for (var j in object.statics) {
                        var obj = object.statics[j];
                        if (typeof (obj) == 'function') {
                            var o = String(obj);
                            var body = o.substring(o.indexOf('{') + 1, o.lastIndexOf('}'))
                                .replace(/\\/g, "\\\\").replace(/\r/g, "\\n")
                                .replace(/\n/g, "\\n").replace(/'/g, "\\'");
                            var params = o.substring(o.indexOf('(') + 1, o.indexOf(')'))
                                .replace(/,/g, "','");
                            if (params != "")
                                params += "','";
                            window.eval(String(this.addList[i].object) + ".statics." +
                                j + "=new Function('" + String(params + body) + "')");
                        } else
                            window[this.addList[i].object].statics[j] = obj;
                    }
                }
            }
        } else if (this.addList[i].type == 'image') {
            window[this.addList[i].object] = new Image();
            window[this.addList[i].object].src = object.src;
        } else
            window[this.addList[i].object] = object;
    }
    this.addList.length = 0;
    this.isLoadedArray[signature] = new Date().getTime();
}

I’m not going to explain what this code does, I’m not certain I could. Like a Human Centipede film, you’re best off just being disgusted at the concept on display. If you're not sure why it's bad, just note the eval calls. Don’t think too much about the details.

[Advertisement] Otter - Provision your servers automatically without ever needing to log-in to a command prompt. Get started today!


To read the full article, please visit The Daily WTF

Dog Helps Duck Reach New Heights

Duck Climbs Dog to Reach New Heights Do you feel like seeing a funny video? This one is sure to make you at least smile. We have a bit of a random act caught on camera. This video shows a duck that looks to be someone’s pet, that decided to climb a dog for whatever […]

The post Dog Helps Duck Reach New Heights appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Tuesday, December 25, 2018

A Lumpy Christmas

Every "enterprise" shop has that one system you hope you never need to touch. It's older than you are, "documentation" consists of whispers and rumors about its behavior, and it is absolutely 100% business critical. If it goes down, the business goes down.

Fortunately, you'll never have to touch that system, because there's an Ancient Wizard who has been sitting in the same cube since 1973, and knows its secrets. As long as the Wizard is around, you'll never touch it. Of course, if the system goes down when the Wizard is out of the office… well, fixing that would require a Christmas miracle.

Renee was a programmer-elf in Santa's Workshop. It was a huge organization with many layers of middle-elfagent, so 90% of her job was sitting in pointless meetings with no agenda. In the remaining 10%, she occasionally added features to their in-house legal invoice processing software. Since nearly every present they shipped was an elf-produced knockoff of a large company's trademarks, legal billing was one of the Workshop's largest line items.

There were other important IT systems. Supply chain was massive. All raw materials, aside from the naturally-occurring candy canes, had to be imported. Whether it was fabric for producing dolls, or ABS plastic and injection molds for producing dolls action figures. While shipping had a special organizational importance, IT rarely was engaged. The CEC (Chief Executive Claus) had learned to do pivot tables and VLOOKUPs in Excel, and did all his shipment planning himself.

The 100% business-critical mystery system was NNOSE: Naughty/Nice Observation and System Evaluator. It was the "source of truth" for the all important TPS reports: Total Presents Sacked. The Ancient Wizard who cared for it was literally an Ancient Wizard, Merlin. And yes, Merlin really was Santa's sidekick. NNOSE ran on a piece of NORAD surplus computer hardware and was programmed in a dialect of MUMPS nicknamed "Sugar LUMPS" or just "LUMPS". Merlin was the only one who knew how the system worked and what the system did, and Merlin was the only one who was ever supposed to touch it.

As the clock clicked closer to 12/24, the shipping deadline, the Workshop got busier and busier, while software developers got less and less busy. Since time was critical, no software changes went into production unless there was an absolute show-stopping bug. The software teams basically were on an extended break until the New Year, and no code releases would happen until mid-January at the earliest.

So, during the busiest, most critical time of the year, the development team mostly spent their vacation hours. Merlin was out in Avalon, trying to patch things up with his ex. The senior Project Elfagers were on a retreat in Cancun. All through the shop, not a developer was stirring, aside from Renee. Renee loved to work during the quietest time of the year, when no one scheduled any meetings. It was its own kind of vacation…

… at least until Hermie, the lead developer who really wanted to be an MBA, popped his head into her cube.

"NNOSE is down. The Big Guy just tried to pull the final TPS report for the year, and not only did it not have a cover sheet, it printed ten pages of errors instead of data. I've already tried to raise Merlin, but he's not on Slack, and there's no cell service in Avalon."

If the TPS report were wrong or unavailable, Santa couldn't accurately match kids up with presents. Naughty kids could get great gifts, nice ones might get useless garbage like an Amazon Echo or Google Home. He needed that report.

"Okay, but I know the report has been run previously," Renee said. "Can't they just run with an old version?"

"There aren't any old versions. TPSes get shredded after review, ever since GDPR went into effect."

Against her better judgment, Renee set down her hot cocoa and said, "I'll see what I can do."

Merlin didn't keep any digital documentation for NNOSE. Everything about the system was stored in binders full of parchment in his cube. Calling the contents "documentation" would be generous. Merlin had written most of it in High Enochian, and what little bits were in Elvish just seemed to be rants and raves about changes management had requested, and how wrong those changes were. The only system diagram was arranged into an Elder Sign. The most useful thing Renee found in her first pass were post-it notes with login credentials for the various bits.

Still, it was enough for Renee to start piecing together the system. The TPS report came from data managed by NNOSE, but the mainframe-based CLI interface had been abandoned circa 2002. At that point, someone had purchased an expensive mainframe integration package from Initech, which was basically a way of slapping XML/SOAP webservices on top of existing mainframe code. A few years later, someone had slapped together a VB.NET (framework version 1.0) UI which called into that webservice. The VB.NET program actually extracted and printed the report.

Great! Renee kind of knew Visual Basic, or at least could fake it. And it wasn't LUMPS. She started by testing the NNOSE XML interface- she sent a few SOAP requests manually and verified that she got correct output. Then she fired up the VB.NET app. It had a basic UI for setting filters and criteria, but once you hit "run report", everything—even the error messages—went to the printer. Worse, you couldn't tell it what printer to use. Every print went to one printer down in the reindeer stables.

Cue the testing cycle of "try running the report, ride the world's slowest elevator to the basement, walk through the reindeer stables, wait for the printer to finish running off its pages of error messages, drag the ream of paper back upstairs and try to match it to the code." Through this process, Renee learned a few important things. First, no matter how Christmas-y and magical reindeer were in spirit, in odor they were more Halloween Horror. Second, for some reason, there were SQL errors showing up in the stack traces. But everything was supposed to be webservices wrapped on mainframes, so why were there database calls?

Renee went back to Merlin's binders, and with the help of what little High Enochian she could remember from high school, Renee started to piece together what was happening.

Circa 2004, against Merlin's protests, there had been a project code-named RED. The goal of RED was to "upgrade" NNOSE to a full J2EE system with an Oracle backend. If Renee was reading the Enochian correctly, Merlin had banished the elf responsible for contracting the vendor to the Astral Plane, where they were surely captured by Githyanki.

"Well, that's got to be a violation of HR policies," Renee noted to herself.

The project never completed, but progressed to the point where the Oracle backend had been running in parallel with NNOSE ever since. That explained the SQL errors. The VB.NET app had functionality added to talk to the "upgraded" RED system. At some point in its history, the VB.NET app had been pointed to that backend, and had been querying it instead of the mainframe. Sure enough, when Renee logged into Oracle directly, most commands returned errors as something in this more-or-less unmaintained and unpatched Oracle instance was completely FUBAR.

Renee poked at the VB.NET app until she figured out how to resurrect the webservice-based data access layer. One more olfactory offense later, and Renee was holding a TPS report. Off it went to Santa, and off she went to give an after action to Hermie.

"Great work! You've saved Christmas!" Hermie said. "Shame about Merlin, though."

"What about Merlin?"

"Oh, the whole banishing poor Roger to be soulsucked on the Astral Plane. That is absolutely a firing offense, and we're going to have to let Merlin go. Don't worry, though. After this, I'm confident that you can fill in as our new NNOSE and LUMPS expert. You can think of it like a promotion, and maybe in a few years, it'll involve a salary increase!"

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!


To read the full article, please visit The Daily WTF

Car Sandwiched Between Semi and Concrete Barrier

Car Trapped Between Semi Truck and Concrete Barrier Car accidents are very common these days, but even though we hear about them all of the time we regularly forget to take the road very seriously. Once in a while a bad accident is caught on camera and even though this is a very unfortunate event […]

The post Car Sandwiched Between Semi and Concrete Barrier appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Monday, December 24, 2018

Classic WTF: Power Supply

It's Christmas Eve, and as per usual, we're taking the day off. As you're thinking about your gifts, think about unwrapping THIS present, from a few years back. Original. -- Remy

MRI scans, while neat, do leave something to be desired in the “fun” and “comfort” departments. After surrendering every sliver of metal and some percentage of clothing, the patient must sit or lie stock-still in a cold room for long stretches of time. As the giant magnets do their work, ear-splitting tones and rhythmic pulses fill the room. For those who lie down to enter the giant magnet-coffin, it’s easy to feel like the Frankenstein monster in some mad scientist’s German techno experiment.

The noise is so bad that most facilities issue earplugs to their patients- but some, as Evi relates, spring for $1,500 headsets, and $10,000 systems to play music through said headsets. Seem steep? No doubt the 1–3 year warranties, ranging from $1,500 to $3,500, raise eyebrows too- but it was well outside the warranty period that Evi learned the true extent of the fleecing.

The power supply for the headphone system had failed. When Evi called the company for help, they claimed they couldn’t possibly repair the system, but would be happy to send a new power supply- for $1,500. Taking matters into his own hands, Evi used a multimeter to determine that only the 9V voltage output was nonfunctional. He readied his soldering iron and opened up the case, expecting to replace a 7809 chip and call it a day. Instead, he found…

Four cheap Chinese power supplies- one for each voltage the power supply was supposed to output- hot-glued together.

Evi ordered a new power supply from Amazon, and hot-glued it into place. Total cost? $10.



To read the full article, please visit The Daily WTF

Malamute Pack Help Walk Owner

A Pack of Malamute Dogs Walk the Owner Have you ever seen a person walking more than 3 dogs at the same time? If you have then you’ve probably seen how it can get complicated real fast. How about a single person walking more than 3 big 60 pound dogs? Well if you’ve never seen […]

The post Malamute Pack Help Walk Owner appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Sunday, December 23, 2018

Enormous Newfoundland gives woman full body hug

Huge Dog Gives Woman Body Hug It’s time for a short and sweet video. This is a short clip of a huge black Newfoundland dog giving a woman a big old body hig. This big cute dog is said to weigh 180 pounds, so it’s no surprise to hear that some of the people at […]

The post Enormous Newfoundland gives woman full body hug appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Saturday, December 22, 2018

Bear Enjoys Snack on Blanket

Bear Enjoys Snack on Blanket Have you ever seen someone feed a bear with a spoon? If not that can change today if you watch this video. Today we have a clip of someone doing exactly that, feeding a huge bear with a spoon! This probably isn’t something that most people would do under normal […]

The post Bear Enjoys Snack on Blanket appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Friday, December 21, 2018

Error'd: A Generic Holiday Title Goes Here

"Sure, there's the obvious 'they didn't put any effort into the email subject,' but the placeholder kind of shows they didn't intend to in the first place," Chris wrote.

 

"I figure I had a 50/50 chance of downloading my driver from Xerox's site," writes Greg A., "I just hope they're not randomizing the order of the buttons on every reload."

 

"Obviously, there's a definition of 'California topography' out there that I'm not familiar with," Mike S. wrote.

 

Randal S. writes, "Yes, I would like to meet someone new in (null)! Thank you, match.com!"

 

"Ok Yelp - I guess if I knew pictures I didn't take were so popular, I'd not take any pictures more often?" wrote Roger G.

 

"First, I was having trouble ordering with any of my credit cards, and then I had trouble ordering anything with my timestamp," wrote Cameron H.

 

[Advertisement] Continuously monitor your servers for configuration changes, and report when there's configuration drift. Get started with Otter today!


To read the full article, please visit The Daily WTF

Three Car Literal Pile Up

Accident Ends with a Pile Up of Three Cars Today we have a pretty crazy video taken on thanksgiving. Here we get to see a car accident that somehow ends up with a pile up of three cars! This video will most likely leave you speechless for the first few seconds you watch it. The […]

The post Three Car Literal Pile Up appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Thursday, December 20, 2018

Representative Line: Explicitly True

Part of Python’s appeal is its rich class library. The old XKCD about import antigravity sometimes doesn’t feel that far off. Combined with a few third-party libraries, like NumPy, you can do a lot with very little code.

Of course, that feels a bit like magic. As Python gurus like to say, “Explicit is better than implicit”. One of Mark’s co-workers took this perhaps a bit too far, when they started adding this import to every file:

from __builtin__ import True

As you might imagine from a name like __builtin__, everything in that namespace, including True, is imported by default. Mark found this “among other useless stuff”.

[Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!


To read the full article, please visit The Daily WTF

Car Waiting At Railway Crossing Has Honk-Off With Train

Car Waiting At Railway Crossing Has Honk-Off With Train Traffic can be very boring, waiting for a long train to pass can be just as boring. So it really shouldn’t be too much of a surprise to see a train conductor and a driver having fun once in a while. In this video a car […]

The post Car Waiting At Railway Crossing Has Honk-Off With Train appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Wednesday, December 19, 2018

Assumptions are the Mother of all Bugs

A long time ago in my "C" programming days, I learned that when you code up anything that depends on any sort of external data, be it a file, database or socket, you should be paranoid and do it defensively. After all, you can't control those things and there's no guarantee that they will always work the way you hope. Sometimes you care about every possible error code; sometimes just success or failure. The point is to check the result of what you tried to do.

Fast forward through several years of C++ and ten years into Java, and our boss calls us into the office.

The Command Controller application is failing and nobody knows why. It runs fine for a while and then it starts throwing what appear to be random exceptions. The problem is happening on almost every single command that it's receiving, but only in production. We can not reproduce the issue in any of the other environments (DR, pre-prod, QA or Dev). The team that wrote it is dumbfounded and has asked for help. We have a pretty good reputation at solving tough issues, so you guys need to drop everything and figure this out.

Normally, the first step would be to attach a debugger and see where it's going ker-flooie. Nope: you aren't allowed to do that in production - ever, no exceptions!

Well if it can't be reproduced anywhere else, how are we going to do it? We will use truss, reasoning that we could capture the output, walk through it against the source code and try and match up all the I/O calls. It's painful, but doable.

As you might imagine, this generated quite a large log file. After fourteen long hours, we finally spotted the problem:

   try {
        byte []buffer = new byte[8192];
        bufferedInputStream.read(buffer);
        // Use buffer
    } catch (Exception e) {
        // ...
    }

Something clicked from decades in the past; make sure you got the number of bytes you intended to read!

But why would this suddenly start to fail? Something had to have changed! This code hadn't changed for several years, and nothing had been deployed for three months! After asking around the data center, it turned out that some SA had applied a routine OS-patch, which awakened this sleeping gremlin. To check it, we ran the unmodified binary on an unpatched machine and sure enough, the problem disappeared.

Since rolling back the OS patch in production was never going to happen at 3AM, we wound up grepping through every line of code of that application and replacing all of the single-line socket-reads with the proper loop, with appropriate error checking:

    int COMMAND_BUF_SIZE = 8192; // loaded from a property file
    byte []buffer = new byte[COMMAND_BUF_SIZE];
    int totalBytesRead = 0;
    try {
        while (totalBytesRead < buffer.length) {
            int numBytesReadThisTime = bufferedInputStream.read(buffer,totalBytesRead,buffer.length - totalBytesRead);
            if (numBytesReadThisTime == -1) {
                break; // Unexpected end-of-stream
            }
            totalBytesRead += numBytesReadThisTime;
        }
    } catch (final Exception e) {
        // Handle read-error
    }
    if (totalBytesRead < COMMAND_BUF_SIZE) {
        // throw exception for unexpected EOF
    }
    // Use buffer

Then all we had to do was the manual build and deployment at 5AM.

At 6AM, we all went out for breakfast. At 7:30, we came back to grab our stuff and go home. That's when the other managers in the department pointed out that there was work to do. That's when we pointed out that while they were in slumberland, we had been at it all night long and it was time for us to go nite-nite. Then we left.

[Advertisement] Ensure your software is built only once and then deployed consistently across environments, by packaging your applications and components. Learn how today!


To read the full article, please visit The Daily WTF

Cats Jump At The Same Time And Land Directly On Top Of Each Other

Cats Jump Up at the Same Time and Land On Each Other Today we have a very strange video to share. This will be one of the strangest videos you’ve seen in a long time. Someone seems to have randomly video taped a couple of cats that were just hanging out without expecting what happens […]

The post Cats Jump At The Same Time And Land Directly On Top Of Each Other appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Tuesday, December 18, 2018

CodeSOD: Trim the Tree

Tis the season to think of trees.

Our Anonymous submitter has a program with a tree in it, and it’s a relatively big one: 7 levels deep, with 200,000 leaf nodes. Oh, and it’s managed in client-side JavaScript. In other words, it’s the sort of thing you really want to make sure you’re accessing efficiently.

Since it’s a tree, and since in this case, all the nodes are doubly linked (each child contains a reference to its parent), it’s easy to get from any one node to any other, with a minimal number of steps. There’s never a good reason to traverse the entire tree.

Which is why Anonymous facepalmed when they found this code:

function matchWidget(root, widget, folder) {
  if (root.items) {
    root.items.forEach(item => {
      if (item.type === 'widget') {
        if (item.id === widget.id && item.parent.id === widget.parent.id ) {
          item.processed = true;
          updateParentCounters(item, folder);
        }
      }
      if (item.items) {
        return matchWidget(item, widget, folder);
      }
    });
    return matchWidget(root.items, widget, folder);
  }
  return root;
}

The purpose of this code is that as an item is “processed” in this application, the counter on all its ancestor nodes has to be incremented. There’s a handy method already written for doing that, called updateParentCounters, which walks up the tree to the root node following the parent reference on each node.

That’s not what this code does, of course. This code starts at the top of the tree. It looks at each possible root node (root is not a tree node, it’s an object with an items property, and each of those is a root node for a different tree). It’ll recursively walk down the tree, visiting every node. When it finds the node it’s looking for, the recursion stops and it then calls updateParentCounters.

The problem, of course, is that it already has the item it’s looking for- widget is the item it wants. So the entire tree search can be replaced with updateParentCounters(item, folder). Which is exactly what our anonymous submitter did, vastly improving the performance of the application.

[Advertisement] Forget logs. Next time you're struggling to replicate error, crash and performance issues in your apps - Think Raygun! Installs in minutes. Learn more.


To read the full article, please visit The Daily WTF

Kayak Sledding Down Huge Hill

Sliding a Kayak Down a Big Snowy Hill After watching this short clip I can guarantee you will want to take a nice winter vacation wherever there is snow. This is an awesome short video recorded by a guy who was enjoying the snowy hills of Asheville. And he is enjoying those hills in the […]

The post Kayak Sledding Down Huge Hill appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Monday, December 17, 2018

CodeSOD: A Short Leap

You know the story. A report is spitting out the wrong dates. Someone gets called in to investigate what’s wrong. After digging through piles of deeply nested SQL queries and views and trying to track down the problem, it turns out someone wrote their own date handling code which is wrong.

Darin P found the code this time.

SET @EDate = (SELECT CAST(CAST(CASE WHEN MONTH(GETDATE())-1 = 0 THEN 12 ELSE MONTH(GETDATE())-1 END AS NVARCHAR) 
        + '/' +
        CASE WHEN MONTH(GETDATE())-1 = 2 THEN '28'
        WHEN MONTH(GETDATE())-1 = 4 THEN '30'
        WHEN MONTH(GETDATE())-1 = 6 THEN '30'
        WHEN MONTH(GETDATE())-1 = 9 THEN '30'
        WHEN MONTH(GETDATE())-1 = 11 THEN '30'
        ELSE '31'
        END
        + '/' + CAST(CASE WHEN MONTH(GETDATE())-1 = 0 THEN YEAR(GETDATE())-1 ELSE YEAR(GETDATE()) END AS NVARCHAR(50)) AS DATETIME))

I don’t want to leap to any conclusions, but I think this code does a bad job of calculating how many days are in a given month. Hopefully they fix it before 2020.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!


To read the full article, please visit The Daily WTF

Wingsuit Pilot Jumps from Dragon’s Nest

Dragon’s Nest Wingsuit Jump Today we have an epic adrenaline pumping video. A guy in a wingsuit jumps and glides over a very sharp cliff! At first you look at the jump and easily think that the guy might not make it but according to the guy’s calculations he even had some margin to play […]

The post Wingsuit Pilot Jumps from Dragon’s Nest appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Sunday, December 16, 2018

Flash Flooding in Fire Ravaged California

Flash Flood in California California has suffered many natural disasters in the last few years, these have mostly taken on the form of wild fires. Because of this California skies have been filled with thick smoke for too long. But now, we see the complete opposite in this video. Here we see how a flash […]

The post Flash Flooding in Fire Ravaged California appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Saturday, December 15, 2018

Squirrel Says Hello to UPS Delivery Driver

Squirrel Jumps Onto a UPS Delivery Guy In this video we see how a UPS delivery guy gets a really cool surprise while doing his job. In the video we see how the guy walks up to a house door to deliver a package when suddenly he feels something jump on his back. At first […]

The post Squirrel Says Hello to UPS Delivery Driver appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Friday, December 14, 2018

Error'd: Trouble at the End of the World

"Normally, the solar face in Apple Watch, is supposed to show a single 24-hour period," writes Juan C. wrote, "It turns out that going to Ushuaia (the southernmost city in the world) makes it a bit confused, specifically stating that noon is midnight and showing more than one day."

 

Wow...Patreon is feeling VERY thankful thsi time of year," wrote Guillermo.

 

"I understand that XML parsing is not everyone's cup of tea but outright stating that it's not OK is a bit harsh.," writes Martin E.

 

"I went to the website and tried to prepay for next year, and the prepay price was exactly $58.26 more than twelve regular monthly payments!" Louise H. writes.

 

Tobias writes, "This is why they say "when you use undefined behaviour in C, the code can do anything"...Like making code that would require the death of many universes to finish running return the result almost instantly."

 

"I was trying to complain about some noise, but now I have a buzzing in my head," Jack B. wrote.

 

[Advertisement] Continuously monitor your servers for configuration changes, and report when there's configuration drift. Get started with Otter today!


To read the full article, please visit The Daily WTF