Back to Home

Curious Perversions from the IT World - 3

curious perversions · tales · crutches and bicycles · daily wtf

Curious Perversions from the IT World - 3

Original author: http://thedailywtf.com
  • Transfer
Site The Daily WTF for 14 years collecting a funny, wild and / or the sad stories of the IT world. I translated several stories that seemed interesting to me. All company names and names have been changed. Previous issues can be found under the label " curious perversions ."

image

The first story: “Not just brilliant”


[ Original ]

We all had colleagues who were unable to do our job. Jarad was lucky too.

He worked at Initech in a small group of developers who created a Windows client for customers who used it to interact with their server. The company decided to port the application from .NET to Java. The most important guide recommended the highly respected leading Java developer Kisha from Intelligenuity as the project manager . “Don't worry,” management said. "Intelligenuity only hires the most brilliant programmers."

At the first project meeting, the manager announced that they would use Eclipse for the Java project. Kisha said: “I do not have Eclipse. Can someone send? ” Jarad sent her a link. At the next meeting, he asked her if she installed Eclipse. She replied that she could not download the medium, so she waited for the next meeting to ask for help. The manager ran to her car and solved the problem by clicking on the download link.

Fast forward to the next meeting: Kisha said she couldn’t continue working, because “Eclipse has some problems with the JDK, can someone send it to me?” Jarad sent her the link again. A few days later, at the next meeting, she said: “Eclipse is not working because it needs a jar file, can someone send it?” And after that, “Can someone send me code for creating classes, because Eclipse is constantly reporting about NullPointerException?”

Finally, the manager changed the structure of the meetings. They continued their regular Windows client meetings, but added a separate dedicated meeting for Kishi only. Over time, it turned out that she and her husband were friends of a very high-ranking leader and his wife. A separate meeting was held to “ensure its successful work”; this meant that the team manager wrote code for her.

Kisha once told the manager that the client had a critical problem with the web portal, and that a meeting with the client should be held as soon as possible to solve his problem.

The manager organized a meeting with the client, himself, Kishi, Jarad and the project manager, to solve the problem once and for all. On the day of the meeting, the client was surprised at the number of technical support staff and managers. He explained: “Um ... the“ problem with the portal ”was that I asked Kisha for the URL of the web portal. It was enough to send him a letter. "

Sometimes justice happens in this world, and Kisha as a result lost her job.

The second story: "Three-month itch"


[ Original ]


In March 2016, Ian needed a job. Almost immediately after the start of the search, he was lucky: he found a tiny startup that needed a worker with knowledge of Python architecture and design skills. “Tiny” because besides Ian, the company had only three developers under the leadership of its founder Jack.

The interview with Ian was conducted by Jack himself. After a technical test, he learned more about the company's project: an almost complete prototype of the iOS app. The user synchronizes his phone with a wrist heart rate monitor, after which the phone should play music that matches the user's current activities. The main objective of the application was to help achieve the necessary pulse during training. The app also used the phone’s accelerometers to track the user's pace while driving. These data, according to Jack, should have been useful for studies of Parkinson's disease. He supported his statement with scientific articles from the best universities. Jack wanted Ian to develop a new backend system for data storage and query processing.

Jack was friendly and charismatic, and his enthusiasm infected others. Ian immediately accepted the offer, and set to work the next day. His office was cramped, but still belonged to him alone. His task was to create the backend necessary for the application.

Two weeks passed. One early sleepy Monday morning, Jack invited his development team to the meeting room. The glare from his Powerpoint presentation burned the retina.

“I thought it over carefully. We are a completely new startup. Nobody knows about us, right? We need to do something to increase brand awareness. So, I decided: we will get rid of the music part of the application and focus solely on data collection. "

Ian instinctively almost said "What ?!"They will have to throw out the results of two weeks of work. In addition, the data collection part was previously completely optional.

Jack switched to another slide, which showed the metrics that he now wanted to track for each user. There were so many of them that I had to use the smallest font. To read, Ian had to squint.

“If you put together a large enough haystack, a needle will certainly appear in it!” Jack said. “We will make the application free, and work with it will imply mandatory registration. The real income for us will be the data collected. ”

Investor capital was spent on a luxurious office in the business center of the city; free app developers deserve only the best. Jack hired a second iOS developer, data science and intern.

“But don't give the intern any important work,” Jack told full-time employees.

Having mastered the new situation, Ian began to develop the architecture of a new system that will record all the necessary data.

Three months later, Jack threw everything in the bin. “No applications! We need a new direction of development! ”

Jack's new vision was to create a website on which people would have to indicate the compositions they listen to in a dream, during training and other activities.

“People like to talk about themselves,” Jack said. “We should not pay them for the fact that they give us their data!”

A front-end developer was hired to create the website. Shortly after launching the site, Jack boasted to investors that he had reached a million unique visitors. In fact, there were only about 300 registrations, half of which were created by one person.

You can already guess what happened three months later. Jack abandoned the slowly developing website in favor of the Slack bot, which was supposed to respond to the team "Play ${song} by ${artist}"by finding the track in Spotify and linking to it. A Spotify widget would play a 30 second preview or, if the user has a Spotify Premium account, the entire song.

"And it's all? How will we make money? ”, - by this time, the developers were no longer restraining themselves in their claims.

“The subscription will be paid,” Jack replied boldly.

“For the chat bot?” "Ian objected. “For it to work fully, the user already needs Spotify Premium. If we want people to pay beyond this, we need to give them more opportunities! ”

“We'll deal with this later,” Jack replied.

Jack commissioned the intern to develop the company's new core product, violating Jack’s requirements six months ago. Intern put maximum effort, but was soon forced to return to school; incomplete code without ceremony was thrown to the front-end developer for revision. With the help of one of the iOS developers, he finished it. What was Ian doing? He created a dashboard and logging, because Jack insisted that they attract enough users to justify the effort.

Three more months passed. Many “features” were added, for example, the bot obsessively asked users on the Slack channel to use it. This behavior violated the terms of use of Slack, so the application was not allowed into the store; Jack himself had to send out links to interested people, so that they installed it manually. At first, the product was transferred to 50 “very friendly" companies that Jack knew personally; of these, only a few installed it, and even less continued to use it the next day. Then Jack expanded the advertisement to 300 “friendly” companies, but with the same result.

The turning point came for Ian when Jack began to insist on additional working time, despite the fact that Ian could not help other developers in their tasks. However, Jack forced him to stay late until late to "show solidarity." This was the last straw: Ian wrote a letter of resignation two weeks later. His last day at work coincided with the release of the Slack bot, during which he observed very straight lines on the dashboard. When he finally left the luxurious office, the startup still didn't earn his first cent.

Fortunately, Jack had a plan. After Ian left, he started from scratch and was about to create a new product. No, he won’t bring any money, but they need to first know about the brand.

Third story: "Backup conveyor"


[ Original ]

"Um ... can you look at something for me?"

Pat broke away from programming new features, and saw Milton’s cube standing near her.

“I think I'm having problems,” added Milton.

One of the company's main internal systems was the data processing pipeline. Perhaps the word "pipeline" can be considered an exaggeration, because in practice it’s just a few shell scripts and Python programs that extract data from files, perform operations with this data and dump the results to other files, which are then read by other scripts. In the process of work, people usually took the latest version of scripts from the version control system, modified and adjusted them so that they gave an answer to a specific question related to the data. If it seemed that this particular process could have value, then they cleaned up the code and added it to the version control system again. If they thought that they no longer needed the code, then they simply reset to HEAD.

However, some, such as Milton, basically kept their own copy of all the scripts. Or, as is the case with Milton, a few copies. Milton knew the data processing pipeline best of all, but the bulk of this knowledge was contained in his personal library of scripts.

“I thought it was worth making my changes to the version control system,” Milton said. “I had a script called by a script that was called by the script, and it all depended on a bunch of created shell variables, for example $SETUP_DIR.”

Pat nodded.

“So I wanted to reorganize all this into an argument so that other people could use the code. I did so ... but before testing, I forgot to change the calling scripts so that they pass an argument. "

In particular, Milton’s script contained this line:

#!/bin/sh

rm -rf $SETUP_DIR/*/


He refactored it into this line: Shell scripts do not care about the existence of these variables. Milton had an environment that provided a permanent existence . But - this is the first argument, and if you do not pass the argument, then it will be empty. Therefore, a new Milton script, when launched without arguments, was deployed to , deleting everything that his account had access to. Basically, this led to numerous attempts to delete files to which he did not have rights. In addition, this meant the disappearance of his home directory with a whole bunch of spaghetti scripts that were completely impossible to recreate because they never got into version control. “Can this be somehow fixed?” Milton asked.

#!/bin/sh

rm -rf $1/*/


$SETUP_DIR$1rm -rf /*/





"Yes of course. Everything can be restored from your last backup, ”Pat said.

Although an automated backup tool was launched on all Windows systems, it was not configured on any Linux system. The support department considered that if you are technically competent enough to work with Linux and write shell scripts, then you will have enough knowledge to configure your own backup system. Especially for this purpose, there was an accessible SAN for all.

“Oh, and I ... never set up a backup,” Milton whispered. “Well ... at least I didn't push?”

Pat hoped Milton would learn the right lesson from this mistake.

Fourth story: "What is a floating point?"


[ Original ]

image

There are many pitfalls for novice programmers: the difference between declaring a variable and initializing it, sometimes using semicolons to complete lines, offset errors by one ... We all met in our industry ingenious self-taught programmers who can create large-scale applications with the right architecture even a dream, but we saw self-taught juniors, who had barely mastered the basics and thought that was all they needed. In the end, diplomas and formal education are needed for a reason.

This story began when Olafjust graduated from the university and worked at his first real job as a “programmer-trainee”. The company has set itself the goal of improving governance in the state healthcare system: anyone who has the dubious pleasure of communicating with healthcare systems will say that this is a noble task. However, the company was founded by a doctor who had only superficial knowledge in PHP, which he studied independently when time was given.

Olaf set to work, intending to apply his knowledge of design patterns. PHP is easy to learn, but hard to master; many examples written in PHP software use god objects, and the code is mixed with presentation - two serious errors, which, however, are not mentioned in most online tutorials. Olaf began to separate the function from the form, create objects that can be used repeatedly to minimize copy-paste, and was engaged in other similar tasks, happily turning the chaos of the code passed to him into order.

And so he found himself in the office of the chief, who arranged for him to wash himself.

“Other programmers will not understand this!” Shouted the boss. “The code is too complicated. Why are you changing it? It works, you had to leave it! ”

Discouraged, Olaf returned to work and uploaded a clean version to his main branch without any changes. Trying to avoid a collision with bad practices, he began to work on a bug in the accounting system, which has high priority and urgency, because it related to billing. Users could upload CSV files to the server with information about their spending, and the system summarized the values ​​by category and created billing reports. However, somewhere inside, a rounding error crept in, leading in some important boundary cases to incorrect amounts.

Olaf studied more than his colleagues, but no training is comprehensive. He quickly managed to determine that it was a mathematical error with a floating point. Since decimal numbers cannot be represented in binary form with full accuracy, in boundary cases calculation errors arose. He started looking for the right ways to handle decimal values ​​in PHP. Unlike Node or C #, external libraries in PHP are quite difficult to connect, because this language does not have built-in support for package management. He could not figure out how to add a library capable of correctly performing mathematical operations. Since the software calculated only the sums, Olaf decided to use integer math: read the value, get rid of the decimal point (so that the value of 10.50 $ would be represented as 1050), perform the calculations

Another junior liked the idea. The senior developer approved it, but the chief flatly refused the offer. How did he argue for this? “This is not a floating point error. It arises due to weak typing of PHP, the program tries to sum the values ​​as strings, not as numbers. "

(For those who are curious: PHP does not use the "+" operator to concatenate strings. Instead, it uses the ".". The result "hello " . "world"will be "hello world".)

As a result, the senior developer implemented this solution: separate the integer part from the fractional one so that $ 10.50 turns into 10.00 $ and 0.50 $, and then summarize each part separately.

Olaf did not linger, waiting for them to find out that the bug was still in place, because the program still processed the fractional part with cents as a floating-point number. He found a better job with a better language, and left the company.

image

Fifth Story: “Calculated Security”


[ Original ]

In the late 80s, Carl worked for some time in a software development firm that dealt with avionics and global positioning systems for military and civilian customers. On business, he often visited Schlockdeed Corp, a customer with a contract to develop a new generation of fighter jets for the US Army. Due to the strict secrecy of their work, it was very important to ensure safety.

Each time Carl entered or left the enterprise, he had to go through the security department. There he carefully checked his briefcase, jacket, lunch box and almost everything except a complete study of body cavities. Despite the meticulous daily checks at Schlockdeed, some of their “security measures” bordered on the absurd.

In this era of information transfer via floppinet"programmers often took work with them and took boxes with floppy disks from it. Schlockdeed had a rather relaxed policy of moving disks, despite the fact that it was the easiest way to steal their secrets. Contractors like Karl were given a pass on media. ”It was a card that allowed them to carry out and bring any number of floppy disks into the building without question.

Karl’s work wasn’t overshadowed until he decided to bring his favorite HP-41CX calculator to the office. They worked over complex algorithms, and writing equations on the board took too much time, so Karl hoped to speed things up. ”During a morning inspection, security guard Bill pulled out the HP-41CX and a worried expression immediately appeared on his face.

Bill reached for the walkie-talkie on his shoulder: “Paulie, we need you. We have a difficult situation here. ” Karl was very confused. Has the 41CX ever been used in bombs? Or maybe this is a draw on the first of April? “Sir, we need to send you to our CIO. Come here, ”Bill said.

Karl’s face flashed, he was trying to understand what problems he had, because these “problems” could easily result in handcuffs and imprisonment. He also did not understand why the Chief Information Officer should conduct an additional inspection. Bill brought him to the office of Paulie, in which there was a burly man with a mustache in the style of the 80s. A sign on his desk said it was a Calculator Inspection Officer.

“Buddy, I will need to look at your machine for addition,” said Paulie, holding out his hand. Bill handed him the HP-41CX. Paulie carefully examined him and said: “I have to confiscate him. You see, it has internal memory, so it can potentially be used to steal secrets. "At the end of the day, I will return it to you, but don’t even think about falling for it again ! Bill took Carl back to the main security department, already without a calculator.

Along the way, Bill explained that programmable calculators are strictly prohibited in the building. Paulie had to monitor the implementation of this policy and took his work very seriously. If Karl needed to bring a calculator, then the simplest models were allowed. After Paul’s approval, an AC (Approved Calculator) label was stuck on him, which allowed him to enter the calculator. Discouraged by the loss of his HP-41CX, he resigned himself to the fact that he would have to breathe chalk dust for the entire life of Schlockdeed. But at least he has a “media pass” for free entry and removal of floppy disks.

Read Next