Writing code is also a life-threatening job: taking stock of the codes that change the world.
Almost Human
Selected from slate
Machine heart compilation
Participation: Echo Gao, zhangqian.
The anxious "like" button, the lost Mars climate orbiter, and the Boeing 737 Max air crash that killed hundreds of people … are all related to the code.

In 2009, Facebook launched a code that changed the world-click the "like" button. "Like" is the idea of several programmers and designers including Leah Pearlman and Justin Rosenstein. They think that Facebook users are often too busy to comment on friends’ posts, but if there is a simple button to use, it will be very popular. "Friends can praise and interact with each other more frequently and easily," Pearlman said.
This button worked, even a little beyond imagination. By 2012, the "Like" button had been clicked more than 1 trillion times. But it also has side effects. After we post a photo, we will fidget and refresh the page, waiting for more "likes". We want to know why there are more and more praises from others. Therefore, we began to "secretly exert ourselves" in social networks: to become more interesting, sharper, more charming and more extreme.
Code reconstructs our lives. As venture capitalist Marc Andreessen wrote, "Software is devouring the whole world", but it may be more accurate to say that software is digesting the world.
Therefore, Slate magazine in the United States made such a survey. In order to clarify the software that changed the world, editors conducted public opinion surveys among computer scientists, software developers, historians, politicians and journalists. They need to choose: which code has great influence? What has changed our lives? Seventy-five people put forward their own ideas, and Slate chose 36 of them. This is not a complete list, because there are too many influential codes. The list is designed to stimulate thoughts-to help us rethink how code affects our lives and how programmers’ decisions affect the future.
Binary Punched Card (1975)
The first code
Binary programming appeared earlier than computers. Basile Bouchon was the first person to punch holes in paper and use it to control machines: in 1725, he invented a loom, which weaves different patterns according to the punched paper. Punching is "1" and no punching is "0". Many changes have taken place in the machine since then, but the basic code composition has not changed. ——Elena Botella, Slate
The first modern code executed (1948)
It led to the use of computer codes and the emergence of computer models of nuclear disasters, laying the foundation for the arms race during the Cold War.
The electronic digital integration computer is the first programmable electronic computer. It was completed in 1945 and configured for each new problem by connecting many components. When one task (such as addition) is completed, a pulse will trigger the next task. But a few years later, Von Neumann and Nicholas Metropolis, a scientist in Los Alamos, improved ENIAC and ran the first modern code executed on a computer: executing hundreds of digital instructions from addressable read-only memory (menu switch of ENIAC). They used Monte Carlo technology to simulate the explosion process of several atomic bomb designs proposed in Los Alamos National Laboratory in New Mexico. By this method, they gradually simulated complex systems and plotted the probability distribution of possible results. Von Neumann and metropolis sent more than 20,000 cards to nuclear scientists in Los Alamos, and tracked the process of simulating neutrons by detonating warheads. Today, subsequent versions of this code are still used in Los Alamos. -Thomas Haigh, co-author of Eniac in Action: Making and Remaking the Modern Computer.
GRACE HOPPER’s compiler (1952)
Make it possible for computers to process words.
When Grace Hopper was programming an early computer, she decided to root the programming language in human language in order to simplify the whole process. Huo Po joined the US Navy Reserve during World War II. She knows that, like her military boss, people are trying to understand binary codes. If the programming language can be based on English, then this work will be less prone to mistakes and easier to understand for those who are not doctors of mathematics.
Some people didn’t agree with this idea, but in the early 1950s, she designed a compiler, that is, a set of instructions, to convert a more understandable code into low-level code directly processed by the machine. She and her lab used this tool to develop FLOW-MATIC, which is the first programming language to integrate English words into this process. ——Molly Olmstead, Slate
Space war! (1961)
The first distributed video game (Spacewar)

The Origin of E-mail (1965)
Come on, the e-mail is here!

Apollo 11 lunar module rescue code (1969)
Code to prevent the lunar module computer from running out of space in space

Hello, World! (1972 or earlier)
Code that leads generation after generation to open the door to programming
When you sit down to learn a new programming language, the first thing the tutorial requires you to do is to let the computer display "Hello, world! 」。 Perhaps the most famous early example comes from Bell Labs’ C-A Programming Course. The course was written in 1974, although an earlier language, B, was also found in the 1972 manual.
「Hello,world! This is an excellent teaching method. This is a small and achievable task, which can make students feel a sense of accomplishment. This is a standard that helps to explain the differences between different programming languages. This is also a quick and simple way for senior programmers to ensure that everything is normal after installing the new environment. Sometimes programmers use "time to’ hello world’" to compare the speed of languages and environments. ) Perhaps the most important thing is, "Hello, world! Can help you open the door to programming, it tells you that this is the new world. -Chris noessel, design director of IBM AI.
A string ending in a null character (1972)
The biggest catastrophic design mistake in computing history
In 1972, Dennis Ritchie made an important decision: to use a new language called "null-terminated string" to represent text. This concept appeared long ago, but he wrote it into his new language called C, and this decision has been affecting us until now.
There are two main ways for a programming language to represent a piece of text: first, it has a fixed and explicit length-"only contains 10 characters, no more" or it can end with a null value-"Here is a string of characters, keep trying until you see zero bytes! 」
There is a very common error in C code. When copying a long string into a shorter string, there will be an end overflow, that is, you destroy other data just nearby. It’s like scribbling on the edge of a whiteboard.
In addition to only causing the program to fail, you can also use such errors to change the behavior of the program by overwriting some content with specially designed data. These are buffer overflow attacks. Almost all the security vulnerabilities you have heard of began with Morris Worm in 1988.
You must code carefully in C language to avoid such mistakes, but such mistakes are still easy to happen. Almost every modern language, from routers to "smart" light bulbs, avoids empty character-ending strings, but C and C++ still dominate the language world. Therefore, nearly 50 years later, we are still suffering. -Jamie Zawinski, Netscape developer and founder of Mozilla.org.
Trading errors in Vancouver Stock Exchange (1982)
The inconspicuous decimal error caused great losses.
In early 1982, Vancouver Stock Exchange launched an electronic stock index, which was initially set at 1000 points. In two years, it fell by half, which seemed inconceivable in the bull market in the early 1980s. According to a survey, using floor () instead of round () will lead to the calculation error of the index. This command means that the value will be cut off directly instead of rounding off to three decimal places. (Digital computers must have limited resolution, so they need to be rounded off or cut off directly. Therefore, if the index is calculated as 532.7528, it will be stored as 532.752 instead of rounding to 532.753. In the process of thousands of calculations every day, this seemingly small difference-not rounding every time when rounding is necessary-leads to huge losses. This programming error was finally solved in November 1983, when the closing index on Friday was around 500 points. After the problem was solved, the stock reopened on Monday, and the index exceeded $1,000, and the lost value was restored. -Lav Varshney, Assistant Professor, University of Illinois at Urbana-Champaign
THRAC-25 (1985-1987)
Overconfidence is fatal.
When the truth surfaced, the headlines of major media warned about the modernization of machines. The Los Angeles Times declared: "In this complex era, software vulnerabilities become fatal. A machine used to treat cancer gave a large dose of excessive radiation to six patients in several medical institutions, killing at least three people.
The researchers found that the code of Therac-25 may bring fatal errors. The machine provides low-power and high-power therapy, which requires a metal device to filter the light beam. However, due to an error in the software, the operator may accidentally trigger the high-power mode without metal equipment.
Therac-25 was designed as an "improvement" of Therac-20, which was considered infallible at the time of design and did not require external safety inspection. Results: Several deaths were attributed to overconfident engineers, who did not consider the possibility of mistakes. ——Molly Olmstead
Internet Relay Chat (1988)
Initial online hang-up
Morris Worm Virus (1988)
I am shocked that the Internet has become so huge.

Robert Morris and the Internet itself are still young. Morris, a 23-year-old graduate student at Cornell University at that time, released the "Morris Worm", which was the so-called "first major attack on the Internet". Ten percent of nearly 60,000 computers connected to the Internet were damaged, resulting in millions of dollars in losses, which led to the first publication of the word "Internet" in The New York Times. Even people who are proficient in technology will be surprised by the wide range of influence of worms. Morris said that he never thought that there would be such a big loss, and he became the first person to be prosecuted under the Computer Fraud and Abuse Act. After being sentenced to three years’ probation, he became the co-founder of Y Combinator, a famous business incubator, and an assistant professor of computer science at MIT. ——Elena Botella
A virus with only one line of code (date: 1990s)
The function of single-line code and the amazing fragility of computers
The picture above shows a single-line virus called the fork bomb. It needs some specific conditions to be triggered (including older and vulnerable copies of Unix operating system). If you type this command in Bash, it will copy itself over and over again until it runs out of all available memory in the computer and causes a crash.
It is famous not because of its danger relative to its size, but because it uses a colon as the function name. Most functions (reusable lines of code) are named in a descriptive way, such as "Print" or "isThisEmailValid", but this is not required. In most computing languages, colons cannot be used as function names, but they can be used in Bash.
In 2002, I first saw this line of code as an exhibit in Angewandte Kunst Museum in Frankfurt, Germany. There are not many codes displayed in the museum. ——Chris Noessel
HTML hyperlinks (1990)
A tool to connect everything
JPEG(1992)
Changed our relationship with photography.

Mosaic browser (1993)
The first widely used web browser that can display pictures.

Tracking pixels (1993)
Modern data collection begins with these invisible images.
By tracking pixel downloads, they will know your identity and location and trigger a cookie to download to your browser. This cookie enables advertisers to track you on multiple websites.
The success of pixel tracking directly leads to the appearance of Facebook’s "like" button, which can be tracked on every embedded website. A large amount of data collection achieved a high degree of orientation, which also made Facebook advertising a great success. In the end, Facebook earned billions of dollars from the pockets of media companies.
Robots.txt(1994)
A small tool of great significance to search and other applications.

Wiki (1994)
Paved the way for Wikipedia.

The first pop-up advertisement (mid-1990s)
"Black sheep" of the Internet
Google’s PageRank algorithm (1996)
Innovate the way we organize knowledge.

Before PageRank, search engines searched for information according to whether our query words matched the words in the document. But for PageRank, Larry Page and sergey brin put forward a brilliant idea: knowledge is social, so should search. They created an algorithm to determine the level of a page through the vast hyperlink relationship of the network. The PageRank of a page is obtained by recursive algorithm from the importance of all pages linked to it, and a page with more links will have a higher rank. It is these two unique insights that make Google what it is today. ——Clive Thompson
Lost Mars Climate Orbiter (1999)
A task that failed because of a math mistake.
On September 23, 1999, NASA scientists lost contact with the $125 million Mars Climate Orbiter. Later investigation determined the reason: the contractor wrote the program for the orbiter in English units, which is standard in the United States, but the software of NASA used metric system. A simple communication error between the two codes caused the orbiter to fly to an unknown place.
It’s easy to think of this measurement error as an accident, but it shows how fragile the world of interconnected software is now. All interconnected technologies (telephone, spacecraft, robot juicer, etc.) rely on interfaces that define the way to communicate with others. The slightest difference can also lead to confusion. ——Charles Duan
Bitcoin (2008)
Code that inspires people’s confidence in a currency.

Like button (2009)
It catalyzes the surveillance economy.
The like button designed by Facebook enables us to show the world our favorite Simpsons or French fries. But in fact, it uses our cognitive prejudice and the power of design to induce us to share more information. They use the tracking pixels mentioned above to track us on the Internet and collect data about our browsing habits. Then, Facebook uses this information and sells its behavior location algorithm to advertisers. If an outdoor products company wants to advertise, Facebook can target those who "like" hiking information, visit camping websites and have outdoor friends. When these users praise the company’s advertisements, the information will be fed back to the positioning algorithm. Therefore, surveillance and commercial manipulation will form a cycle. It’s all because of a little blue thumb. -Ariezra Waldman, Professor, New York Law School
Boeing 737 Max(2017)
Software errors and corporate greed have killed hundreds of people and grounded a large number of planes.
In October 2018, lion air Flight 610 crashed into the sea shortly after taking off. Boeing assured the public that the plane was safe and said that more pilot training and "software upgrade" were needed. But just four months later, another plane of Ethiopian Airlines crashed. The pilot tried to lift the nose 20 times, but the automatic system of the plane pulled the nose down. Within minutes after take-off, the plane crashed and people died. Global aviation authorities should ground the plane soon. The investigation shows that the crash was caused by the design of 737 Max, especially the little-known software, which may force the plane to dive continuously. -Marhicks, technical historian, Programmed Inequality (http://www.amazon.com/dp/0262535181/? Tag = slatemaga-20).
Original link: https://slate.com/technology/2019/10/consensus-computer-code-software-history.html.
Original title: "Writing code is also a life-threatening job: taking stock of those codes that change the world"
Read the original text