Wednesday, October 31, 2018

Paper (Size), Please

Samsung SPP-2040

Terje worked for an IT firm that serviced the purchasing department of a global corporation. To manage purchases, the department used an enterprise shipping and warehousing system that shall be called BLA to protect the guilty. The system ran on a Citrix farm in Norway with all the most impressive resources at its command.

Just after a major upgrade of BLA, sporadic performance issues began cropping up in the Brazil and Perth offices. When users tried to generate new reports, BLA would hang for several minutes. In Norway, Terje and his colleagues couldn't reproduce the problem. They went through every reasonable troubleshooting step, but failed to isolate the root cause of the issue. The vendor of BLA, also based in Norway, couldn't duplicate the issue, either. Months passed with no resolution in sight.

Lest one should think that everything was sunshine and roses in Norway, the users there ran into their share of quirky issues as well. A common one was the "Printer not found" error message when a user tried to generate a report. Usually, this happened whenever a user removed or inserted their laptop into a docking station while logged into BLA. Simply rebooting Windows while the laptop was docked fixed the issue. The vendor explained that BLA had to have a default printer set within the local Windows environment so it could find out how big a piece of A4 paper was. This would ensure that BLA would always use the correct paper size for reports. This behavior seemed odd to Terje, but he kept it in mind.

One day, when he was fielding yet another performance issue from Brazil, the above tidbit occurred to Terje and bestowed a spark of inspiration.

"Try this for me," he told the user on the phone, sitting up straighter in his chair. "Log out of Citrix, then set your default printer to a PDF creator."

"What?" the user asked. "What does that have to do with anything?"

"I know it sounds weird, but can you just give it a try?" Terje pleaded. "If it doesn't help, you can change the setting right back."

"OK ..." the user replied, skeptical.

Sure enough, once the user made the change and logged back in to Citrix, he was able to generate a report almost instantly.

"How did that work?!" he asked.

"You're connecting to our Citrix server in Norway, opening BLA, and attempting to generate a report," Terje replied. "When you do that, BLA goes, 'How big is size A4 paper? I'd better ask the default printer.' In your case, the default printer was pointing to a device in your office in Brazil. So BLA was connecting from Norway to that printer halfway around the world, and was waiting for it to tell it how big A4 is. That's why everything was so slow!" Terje slapped a hand against his desk in triumph.

"How odd!" the user said. "I'm glad it works now, though!"

Terje was even happier to have cracked that enduring mystery. He got to work assembling a knowledge base document and compiling the evidence needed to file a change request with BLA's vendor.

[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

High Flying Circus Fall

High Flying Circus Fall “The incident occurred during the All-Russian festival’s competition of circus art, Under the arch of the old tent. A gymnast from the collective, Romashka, from Krasnoyarsk, performed an acrobatic number on canvases, but fell through and fell into the arena. After first aid treatment, the girl was hospitalized suffering a broken […]

The post High Flying Circus Fall appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Tuesday, October 30, 2018

It's a Little Stale

Megan K’s organization does the sane and reasonable thing: they cache all of their dependencies locally, and their CI/CD process pulls from the local cache. Since they’re in the Python world, this means pulling from PyPI using Bandersnatch.

Someone set up the Bandersnatch job. Someone linked it into their CI/CD process. No one wanted to claim credit when it started failing. Every five minutes, Bandersnatch tried to contact PyPI. Every five minutes, it got a StalePage error, specifically complaining about a “stale serial”, and sent an alert email to the entire dev team. Every five minutes, the entire dev team ignored the error. For ten days.

The office turned into a tense standoff. No one wanted to talk about the errors, since the first one to bring it up was going to be the one who had to fix it. Each day was could be underscored by Ennio Morricone.

Megan caved first. Instead of using rules to filter her inbox, she manually deleted each message. Eventually, sick of getting spammed, she did some research, and shared her findings with the developers.

Megan started where anyone would start debugging HTTP requests: with curl. The curled the failing URL, first from her machine, and when that worked, from the Bandersnatch machine. That also worked. Even as a Python script, running on the same machine, sending a very similar request, failed.

Megan fired up a Python REPL and imported the requests library, which is used for sending HTTP requests. She sent a request, and that failed. curl always got a fresh serial, requests always got a stale serial. Obviously, there was something different about the requests.

Megan checked the headers, and found two key differences: the User-Agent and the Accept-Encoding headers. Thinking the obvious, she tried setting curl to use the same User-Agent as requests- and it kept working. Changing the User-Agent in requests didn’t fix the problem.

But changing the Accept-Encoding did. If Megan sent a request with Accept-Encoding: gzip, deflate, the PyPI loadbalancer routed her to a stale cache server, every time. Accept-Encoding: '', on the other hand, always got a fresh server. By default, requests used gzip, deflate. Bandersnatch, in turn, used the default settings for requests.

That of course, wasn’t enough. Eventually, the cache server that Bandersnatch was getting routed to would also become stale, so Megan had to add an arbitrary (and highly variable) parameter to her requests- specifically, a URL parameter called cache-bust which was always set to the current timestamp.

An issue was raised with PyPI, which is still open at the time of this writing. Obviously, it’s some simple misconfiguration in the load balancing and caching, or perhaps an intentional configuration based on bad assumptions, but the moral of the story: Megan was glad they were caching all of their dependencies locally, just in case PyPI ever went really wrong.

[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

Tanning Addict Martina Big Gets Married

Tanning Addict Martina Big Gets Married | HOOKED ON THE LOOK MODEL Martina Big who is known for her giant breasts and ‘transitioning’ from a white woman to look ‘African’ has got married to her childhood sweetheart. Martina Big from Germany, famous for her big bust and controversial tan, has married her partner Michael, who […]

The post Tanning Addict Martina Big Gets Married appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Monday, October 29, 2018

CodeSOD: A Tern at the Build Process

Clever Dog Teaches Puppy How To Use Ramp

Dog Teaches Puppy To Use Ramp

Watch this clever dog teach a puppy how to use a ramp to get into this vehicle. Smart Dog Video – Dog Viral Video – Puppy Video

The post Clever Dog Teaches Puppy How To Use Ramp appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Sunday, October 28, 2018

Husband Spends 14 Years Painting Inside Of 3-Bedroom Home, the results…

Husband Paints Masterpiece In House

Husband Spends 14 Years Painting Something You Have To See Husband Spends 14 Years Painting Inside Of 3-Bedroom Home, the results…

The post Husband Spends 14 Years Painting Inside Of 3-Bedroom Home, the results… appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Saturday, October 27, 2018

List Of The Top 10 Most Anticipated Movies Of 2019

Top 10 Highly Anticipated Movies Of 2019

List Of The Top 10 Most Anticipated Movies Of 2019 #10 John Wick 3: Parabellum #9 The Lion King #8 Once Upon a Time in Hollywood # 7 How to Train Your Dragon: The Hidden […]

The post List Of The Top 10 Most Anticipated Movies Of 2019 appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Friday, October 26, 2018

Error'd: We Need a Windows Install CD in Aisle 7

"Encountered this one while attempting to weigh some vegetables and well...the scale crashed?" writes Sam.

 

Johnwrote, "Should I start binge drinking to fix this number?"

 

"Someone puked a UI all over my screen. The best part, although the video is buffering where it should be playing, the video behind the text is playing like this is normal." Steven B writes.

 

"Wow, Amazon is really angry about my promo code...which is particularly remarkable given that I hadn't entered one," wrote Kai J.

 

Ian W. wrote, "So, in Cyberpower's TOS, wouldn't 'Users of the Site must not monitor any content on this Website by using any manual process of any kind.' also include me (or anybody else) manually viewing it in a web browser?"

 

"Wouldn't 'less old' actually be 'new'?" wrote Michael P.

 

[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

Dog Decides To Play Tag With Wild Bear

Dog Plays With Wild Bear

Friendly Dog Decides Ro Play “Tag” With A Wild Bear No animals were hurt during this friendly game of tag! Filmed in Finland. – Crazy Dog Video With Wild Bear – Dog Decides To Play […]

The post Dog Decides To Play Tag With Wild Bear appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Thursday, October 25, 2018

Representative Line: Created Equal

Let's say you have an enum. You have an array of objects, where one of the fields is of that enum type. You want to filter the array of objects where the value of the enum is PAYMENTMETHOD.

You also hate equals signs.

Jacqueline found IntelliJ screaming out a litany of warnings, and while tracking down the reasons, she found this bit of Java:


.filter(e -> Arrays.asList(SRN.Type.PAYMENTMETHOD).contains(e.getTxfr().getSourceOrThrow().getType()))
 

Arrays.asList has an array-valued parameter, so it turns SRN.Type.PAYMENTMETHOD into a List object with one item in it, then checks to se if e.getTxfr()...getType()'s result happens to be in that list. With one object.

The list being filtered might contain many objects- this is part of a pretty large transaction processing system which is handling millions of records. And yes, this code creates a new list object with one item in it for every record.

Jacqueline was able to significantly increase throughput by taking the radical action of replacing this with a more straightforward equals comparison.

[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

China To Launch “Artificial Moons” Into Orbit By 2020

China Launching Fake Moons

In a move that could save hundreds of millions of dollars in annual electricity costs, the Chinese government is planning to launch a “fake moon” into space in 2020. – FAKE MOON VIDEO – CHINA […]

The post China To Launch “Artificial Moons” Into Orbit By 2020 appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Wednesday, October 24, 2018

The Hardcode to Success

Rodrigo was but a simple software development intern eager to prove himself. He would always volunteer for the menial tasks that nobody else wanted to do. "Nobody else" mainly consisted of Justin, Rodrigo's supervisor. Justin wasn't a big fan of doing stuff so he was glad to have an intern that was ready and willing.

Justin got a request from the network administrators to create a system status application to interface with their servers. They wanted to receive alert emails every hour on the hour if anything on the servers had a conniption. If everything was ok, maintain radio silence. To do this, a simple app would need to be created to pass system health check results to Pushbullet, which would take care of sending the alerts. Rodrigo didn't even wait for Justin to finish. "I'll do it!"

Rodrigo was excited to get his development environment set up with an instance of Pushbullet so he could start slinging emails. He spent the week coding and extensively testing his app and by Friday, his phone buzzed with an alert. Something about having his code send something out to his phone seemed super cool and futuristic.

Rodrigo wasn't exactly sure how to simulate a system failure so his phone only got emails saying everything was hunky-dory. All he had left to do was to add a condition to not actually send the hunky-dory alerts since the network admins didn't want their phones going off every hour.

Ready to proudly show off his handiwork, Rodrigo called Justin over for a demo. The demo consisted of Justin half paying attention, half texting on his phone, and saying "Yeah, ok" every couple minutes. When Rodrigo was done, Justin nonchalantly said, "Go ahead and throw it out on the production server whenever". Rodrigo wasn't expecting that but he was glad to finally have an app of his go to production.

He threw the code out on the production server, fired it up, sent an email letting the admins know to expect an alert in case of trouble, then checked out for the weekend. He bragged to his friends over several beers about how his code was working all weekend while he got to have fun.

Rodrigo strolled in Monday morning to find a red-faced Justin standing at his desk, arms crossed. "Rodrigo! We had a major system failure over the weekend!"

Confused, Rodrigo played an optimistic card, "So when that happened, my app notified everyone... right?"

"No, it didn't!" Justin shouted, banging his hands down on the desk. "Your app didn't do jack squat to alert anyone, now we've lost nearly 30 hours of production data! Have a seat and think about how we're going to fix this while I review your code."

Justin opened Rodrigo's source code at his computer and began scrolling through it. It didn't take long for him to find the offending line -


"Access-Token: " + accessToken + "\r\n" +
"Content-length: 99\r\n"
"Content-Type: application/json\r\n" +
"Connection: close\r\n\r\n" +

Justin called Rodrigo over to shove his nose in the code mess he made. "Why on earth did you hardcode the length??"

Rodrigo meekly replied, "I didn't want to create a function to count the bytes so I made a Python script to count the amount of characters in the response. I figured since it always returned 99 characters, I could hardcode it to that. Is that bad?"

Justin angrily explained how when the response was anything but a clean health check, it would return an error message. An error message would most definitely be more than 99 characters, but it would get truncated to 99, where the success message condition he added would think everything was great. Thus, no alert would be passed to Pushbullet.

In the aftermath, Rodrigo was relieved of his internship while Justin was left to explain why he allowed an inexperienced intern to push code that hadn't been reviewed to production. In the end, it was hard to say who learned more from the internship experience.

[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

CUTEST DANG DOG VIDEO PUPPY JOINS GREAT DANE

Puppy Joins Great Dane

Puppy Joins Great Dane For Precious Nap Time Ellie and Mikey the Great Danes love to play together and nap together. Watch and enjoy as the pooped puppies enjoy some quiet time together. We’re gonna […]

The post CUTEST DANG DOG VIDEO PUPPY JOINS GREAT DANE appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Tuesday, October 23, 2018

CodeSOD: We Tried Nothing

Initrode bought a UI widget library from Initech. Years passed, and eventually Initech went under. Initrode kept on keeping on, and kept using the library. Management shuffles happened, IT got downsized, and new development got outsourced.

Merlin B worked for the company that got the contract. Somehow, someone got the source code from Initech's GUI library.


public partial class SomeProcessUserControl : SomeSlightlyDifferentProcessUserControl { protected override void OnLoad(EventArgs e) { base.OnLoad(e); try { } catch (Exception ex) { string logGuid = LoggingService.LogError(ex.ToString(), string.Format("")); } } }
 

"I immediately thought of Linkin' Park's song 'In the End'," Merlin writes. "He tried so hard, and got so far, but in the end, it doesn't even matter."

It's pretty clear to me how this happened: company standards. One OnLoad somewhere threw an exception, and some pointy-haired-boss made a new standard: "All OnLoads must contain a try/catch and log the error out." It's also pretty clear what finally drove Initech under.

[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

Top 10 Most Searched Questions On Google

Top 10 Question Google

TOP 10 MOST SEARCHED QUESTIONS ON GOOGLE Dear internet… we need answers. For this list, we’ll be looking at some of the most common queries on Google, based on statistics provided by Mondovo.com. You’ll be […]

The post Top 10 Most Searched Questions On Google appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Monday, October 22, 2018

9 Year Old Rapper Corrine Foreign

We love the energy of 9 year old rapper Corrine Foreign and her school crew as they break down their day. The kid is crazy talented and we can’t wait to hear the rest of […]

The post 9 Year Old Rapper Corrine Foreign appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

CodeSOD: Longer Isn't Better

Andrew H writes “this is an interface for one of our Spring Data repositories”. If you’ve ever looked at Spring’s documentation, you know the punchline. Spring has certain naming conventions that have become a notorious.

Spring Data is an ORM, and among other things, it allows you to design interfaces which are translated into a series of queries based on the naming conventions. So, for example, a method named findDistinctByTenantId would turn into a query in the database. It’s a useful convenience for simple CRUD operations, but for more complex queries, you’re still better off writing your SQL in an @Query annotation. SQL is still the best way to build complicated RDBMS queries.

That doesn’t mean you have to use SQL. Andrew’s co-worker provided this method:

public Page<Ad> findDistinctByTenantIdAndTitleIgnoreCaseContainingAndFlagsNotNullAndFlagsResolutionTypeValueOrTenantIdAndDescriptionIgnoreCaseContainingAndFlagsNotNullAndFlagsResolutionTypeValueOrTenantIdAndEmailIgnoreCaseContainingAndFlagsNotNullAndFlagsResolutionTypeValueOrTenantIdAndContactNameIgnoreCaseContainingAndFlagsNotNullAndFlagsResolutionTypeValue
(Long tenantId, String title, String resolutionTypeValue, Long tenantId2, String description, String resolutionTypeValue2, Long tenantId3, String email, String resolutionTypeValue3, Long tenantId4, String contactName, String resolutionTypeValue4, Pageable pageable);

As an aside, this convention doesn’t let you reuse a parameter in multiple conditions, so those multiple tenantId, tenantId2, etc. parameters? They all need to get the same value. Ditto on all the resolutionTypeValue parameters. This may not be the longest method name ever, but it’s certainly a strong contender.

[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

I Bet You Watch This Video Twice!

Fighter Jet Viral Video

Watch it twice hell! I watched it at least 10 times. Awesome Viral Video About Planes!

The post I Bet You Watch This Video Twice! appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Saturday, October 20, 2018

Man Climbs Cell Phone Tower In Hialeah

Man Climbs Cell Phone Tower

Man Climbs Cell Phone Tower In Hialeah Floria Crews are clearing trees on the toxic Dunbar sludge site throughout the next week, according to the City of Fort Myers.

The post Man Climbs Cell Phone Tower In Hialeah appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Deadly Iced Tea Riddle That Is Too Challenging To Solve

Ice Tea Videos

Do you like brain teasers that will make you think? If so, take a minute to watch this video! It is definitely a head scratcher. Test your intelligence here by seeing if you can figure […]

The post Deadly Iced Tea Riddle That Is Too Challenging To Solve appeared first on Viral Viral Videos.



To read the full article, please visit Viral Viral Videos

Friday, October 19, 2018

Error'd: Real Formatting Advice

"VMware Team decided to send me some useful advice via e-mail," writes Antti T.

 

"Costco and Dell have teamed up to offer the latest in gaming storage technology...the Hard Frive?" wrote Scott H.

 

William K. wrote, "Yeah, more like City Faillines."

 

Sam writes, "They don't look so angry to me...or very bird-like for that matter either."

 

Mike S. writes, "Yeah, but what if I want to pay in GBP?

 

"Well, to be fair, they did not list graphing as an area of expertise," wrote Louis G.

 

[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

Thursday, October 18, 2018

The Theater of the Mind

Hamza has some friends in the theater business. These friends had an in-house developed Java application to manage seating arrangements, and they had some problems with it. They had lots of problems with it. So Hamza cut them a deal and agreed to take a look.

There were the usual litany of problems: performance was garbage, features bugged out if you didn’t precisely follow a certain path, it crashed all the time, etc. There was also an important missing feature.

Seats in a theater section lay out roughly in a grid. Roughly- not every row has exactly the same number of seats, sometimes there are gaps in the middle of the row to make way for the requirements of the theater itself, and the application could handle that- for one arrangement. Seats could be removed to create standing-room sections, seats could be added to rows, seats could be reserved for various purposes, and so on. None of this was supported by the application.

Hamza dug into the code which rendered the seating arrangements. Did it read from a database? Did it read from a config file? Did it have a hard-coded array?

for (int r = 0; r < NUMROWS; r++) {
  for (int c = 0; c < NUMCOLS; c++) {
    Rectangle rec = new Rectangle(24, 24, Color.rgb(204, 0, 0));
    fat[r][c] = new Seat();
    rec.setStroke(Color.BLACK);
    changeRecColor(rec, r, c);
    StackPane s = new StackPane();
    s.getChildren().add(rec);
    gridPane.add(s, c, r);
    if (
        r == 14 ||
            c == 0 ||
            c == 1 && r != 23 ||
            c == 2 && r != 23 ||
            c == 3 && (r != 22 && r != 23) ||
            c == 4 && (r != 20 && r != 21 && r != 22 && r != 23) ||
            c == 5 && (r != 12 && r != 13 && r != 18 && r != 19 && r != 20 && r != 21 && r != 22 && r != 23) ||
            c == 6 && (r != 10 && r != 11 && r != 12 && r != 13 && r != 16 && r != 17 && r != 18 && r != 19 && r != 20 && r != 21 && r != 22 && r != 23) ||
            c == 7 && (r != 8 && r != 9 && r != 10 && r != 11 && r != 12 && r != 13 && r != 16 && r != 17 && r != 18 && r != 19 && r != 20 && r != 21 && r != 22 && r != 23) ||
            c == 8 && (r == 0 || r == 1 || r == 2 || r == 3 || r == 4 || r == 5 || r == 24) ||
            c == 9 && (r == 0 || r == 1 || r == 2 || r == 3 || r == 24) ||
            c == 10 && (r == 1 || r == 24) ||
            (c == 11 || c == 12 || c == 13) && r == 24 ||
            (c == 14 || c == 15 || c == 16) && r == 24 ||
            c == 17 ||
            c == 18 ||
            c == 19 && (r != 0) ||
            c == 20 && (r == 15 || r == 23 || r == 24) ||
            c == 21 && (r == 23 || r == 24) ||
            (c == 22 || c == 23) && (r == 23 || r == 24) ||
            (c == 24 || c == 25 || c == 26 || c == 27 || c == 28 || c == 29 || c == 30) && (r == 23 || r == 24) ||
            (c == 31 || c == 32 || c == 33 || c == 34 || c == 35) && (r == 23 || r == 24) ||
            c == 36 && (r != 0 && r != 16 && r != 17 && r != 18 && r != 19 && r != 20 && r != 21 && r != 22) ||
            c == 37 && (r != 23) ||
            c == 38 && (r != 23) ||
            c == 39 && (r == 15 || r == 16 || r == 17 || r == 18 || r == 19 || r == 20 || r == 21 || r == 22 || r == 24) ||
            c == 40 && r == 24 ||
            (c == 41 || c == 42 || c == 43 || c == 44) && r == 24 ||
            c == 45 && (r == 1 || r == 24) ||
            c == 46 && (r < 14 && (r == 0 || r == 1 || r == 2 || r == 3) || r == 24) ||
            c == 47 && (r < 14 && (r == 0 || r == 1 || r == 2 || r == 3 || r == 4 || r == 5) || r == 24) ||
            c == 48 && (r != 8 && r != 9 && r != 10 && r != 11 && r != 12 && r != 13 && r != 15 && r != 16 && r != 17 && r != 18 && r != 19 && r != 20 && r != 21 && r != 22 && r != 23) ||
            c == 49 && (r != 10 && r != 11 && r != 12 && r != 13 && r != 16 && r != 17 && r != 18 && r != 19 && r != 20 && r != 21 && r != 22 && r != 23) ||
            c == 50 && (r != 12 && r != 13 && r != 16 && r != 17 && r != 18 && r != 19 && r != 20 && r != 21 && r != 22 && r != 23) ||
            c == 51 && (r < 14 || r > 14 && (r == 15 || r == 16 || r == 17 || r == 24)) ||
            c == 52 && (r != 20 && r != 21 && r != 22 && r != 23) ||
            c == 53 && (r != 22 && r != 23) ||
            c == 54 ||
            r > 24
    ) {
      rec.setFill(Color.WHITE);
      fat[r][c] = null;
    }
  }
}

No, it had a 37 line if condition.

Hamza writes: “Refactoring this application was fun. Not.”

[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