Thursday, June 1, 2017

White Water Turtles

I haven’t seen much animals as cute, pure and innocent as these white water turtles!

The post White Water Turtles appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Food Emoji Come To Life

Ever wondered what those food emojis look like in real life? Well, no more, this video shows that the real deal is just as good as the delicious-looking pixel food.

The post Food Emoji Come To Life appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Achievement Unlocked

When your PS4 takes over. Who else games like this?

The post Achievement Unlocked appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

I Love My Baby

Don’t you just love a car with lots of space in the trunk.

The post I Love My Baby appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

CodeSOD: Switched Over

Twelve years ago, a company decided they needed a website. They didn’t have any web developers, and they didn’t want to hire any, so they threw a PHP manual at the new hire who happened to “be good with computers”, and called it a day.

Ms. “Good With Computers” actually learned something from the experience, and moved on to a lucrative career in web development. Unfortunately, she left behind the code she learned by doing, and now Bert has been brought in to clean up the code.

Take this block, which translates an airport code into a location name…

    switch ($v) {
        case "EIN": $ori = "Eindhoven";
            break;
        case "EIN": $ori = "Eindhoven";
            break;
        case "EIN": $ori = "Eindhoven";
            break;
        case "EIN": $ori = "Eindhoven";
            break;
        case "EIN": $ori = "Eindhoven";
            break;
        case "EIN": $ori = "Eindhoven";
            break;
        default: break;
    }

    switch ($b) {
        case "WRO": $des = "Wroclaw";
            break;
        case "WRO": $des = "Wroclaw";
            break;
        case "WRO": $des = "Wroclaw";
            break;
        case "WRO": $des = "Wroclaw";
            break;
        case "WRO": $des = "Wroclaw";
            break;
        case "WRO": $des = "Wroclaw";
            break;
        case "WRO": $des = "Wroclaw";
            break;
        case "WRO": $des = "Wroclaw";
            break;
        case "WRO": $des = "Wroclaw";
            break;
        case "WRO": $des = "Wroclaw";
            break;
        case "WRO": $des = "Wroclaw";
            break;
        case "WRO": $des = "Wroclaw";
            break;
        default: break;
    }

There’s hundreds of lines of this, following the same pattern- one switch block with the same condition repeated many times for each possible airport code. These blocks don’t exist in a function, either- they’re slapped right into the global namespace.

[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!


To read the full article, please visit The Daily WTF