Apollo 11, JPEG, the first pop-up ad, and another 33 code segments that changed the world.

The Translation Bureau is a compilation team that focuses on technology, business, workplace, life and other fields, focusing on foreign new technologies, new ideas, and new trends.

Editor’s note: Marc Andreessen said that “software is eating the world” ten years ago is not only completely correct, but it seems to be more than just that: software is reshaping the world. The human world has been unable to leave the software. Which of these has played a key role in the vast software code? The Slate website invites people to vote on the code that changed everything. Here are 36 code snippets. If you have a better option, leave your comments in the comments section. The original author is Future Tense, titled: The Lines of Code That Changed Everything. In view of the length of the article, we will publish it in three parts, this is the third part.

The most important 36 code snippets in human history (3)

The most important 36 code snippets in human history (1)

The most important 36 code snippets in human history (2)

25, GeoCities mouse track

Age: Mid-1990s

It makes the most mundane elements of your website cool.

JSFX.FireSpark.prototype.changeColour = function()
{
var colour=””;

r2= Math.random()*255;
g2 = r2;
b2= 0;

if(!(r2 | g2 | b2))
{
r2=255;
g2=255;
b2= 0;
}

colour = “#” + dec2hex(r2) + dec2hex(g2) + dec2hex(b2);
this.setBgColor(colour);
}

Roy Whittle

Douglas Englebart and Bill English invented the mouse in the late 1960s to change the way we communicate with computers. Although it is intuitive to use the mouse, the display technology at the time is usually unable to keep up with the rapid movement of the mouse. The operating system developer then added a mouse track, which is a momentary shadow image, showing the cursor in the previous position, making it easier to track and find.

In the mid-1990s, GeoCities was the first company to offer free services that make it easy for users to create their own web content. The GeoCities WYSIWYG editor allows authors to easily drag and drop content and add custom code snippets, including code to customize the mouse track seen by visitors. On the GeoCities page, your cursor can leave traces of fairy-tale dust, bubbles or little Halloween bats. These brilliant pixels are the epitome of an era, indicating that we have been able to build our own “cyberspace” – Nikki Stevens, Ph.D., Arizona State University

26, RSS (simple information aggregation)

Age: 1999

Let everyone read the New York Times, Gizmodo, and Garfield Minus Garfield in one place.




RSS Title</ Title><br /> <description>This is an example of an RSS feed</description> <link>http://www.example.com/main.html</link><br /> <lastBuildDate>Mon, 06 Sep 2010 00:01:00 +0000 </lastBuildDate> <pubDate>Sun, 06 Sep 2009 16:20:00 +0000</pubDate> <ttl >1800</ttl></p> <p> <item><br /> <title>Example entry
Here is some text containing an interesting description.
< Link>http://www.example.com/blog/post/1 7bd204c6-1655-4c27-aeee-53f933c5395f Sun, 06 Sep 2009 16:20:00 +0000


Wikipedia

The RSS code allows you to consume a variety of sources in a simple, effective, and efficient way by publishing news stories, blogs, blawgs, podcasts, and other forms of web content into a standard format. At its peak, probably from the launch of Google Reader in 2005 to the unfortunate death of Aaron Swartz (Internet liberals working on RSS 1.0) in 2013, RSS is almost equivalent to publishing on a decentralized Internet. Synonymous with. Although Google Reader no longer exists, from news aggregators to podcast apps, RSS is still at the forefront of the available Internet. ——David S. Levine, Associate Professor, Elon University School of Law

27, the disappearing Martian climate trackTracker

Age: 1999

A math error caused a task to fail

On September 23, 1999, NASA scientists lost contact with the $125 million Mars climate orbiter. After investigation, the reason for the loss was determined: a contractor wrote the program to the orbiter in English units, but the NASA software used the metric system. Because of the simple communication error between the two pieces of code, the orbiter flew to an unknown place.

It is easy to write off this metric-inch error as an accidental error, but it illustrates how fragile the world of software interconnection today is. All connection technologies (telephones, spacecraft, robotic juicers, etc.) rely on interfaces to define how they communicate with others. Even the smallest mistake can lead to confusion. ——Charles Duan

28. Code for attaching Hellfire missiles to drones

Age: About 2000–2001

Opened the first of the drone wars.

The weaponization of the early versions of the Predator drone was an iconic moment, not only in the history of technology, but also in military and political history. Nowadays, unmanned systems have spread throughout the battlefield, reshaping the way soldiers fight, and even changing the source of soldiers. The weaponization of predators has also brought the United States into the era of “drone wars.” Moreover, with the problems caused by the increasing automation and weaponization of robots, we are just beginning. A simple procedure can lead to legal, moral, and even survivability issues. – PW Singer, “Connected War: The Robot Revolution and Conflict in the 21st Century” Author

29, Roomba’s guidance system

Age: 2002

A new way for technology (and cats) to move in the real world

(define-behavior (bounce
:start-when (or (bump?)
bounce-trigger? )
:abort-when (bump-edge?)
: Onetime? t
)
)

iRoBot

You will never forget your first Roomba: I was probably at a friend’s house 17 years ago. I was sitting on the couch and laughing as it turned around in the house and turned around by her own temper. This is the dawn of the robot revolution, a revolution that looks stupid but serious. (It’s amazing that robots with the same DNA as bomb cleaning machines are vacuuming millions of homes.) Since then, it has been difficult for others to replicate its success. Roomba proves that although our focus has begun to tilt toward hardware (such as Boston’s power-stricken knee-backed, robotic dog that opens the door), the widespread adoption of software for a product may be even more important. Asimov’s iRobot did not create the first vacuum cleaner, but Roomba became a must-have niche because it was good for vacuuming, but because it had good navigation in the room. Just like the video of thousands of kittens can prove that in the modern computing era, there is almost nothing more satisfying than watching Roomba hit the legs, turn around for a week and then move forward. ——Lowen Liu, Slate

30, Proportional Fair Scheduling of Wireless Networks

Age: About 2003

A solution that makes mobile networks possible

[~, b_user] = max(drc(i, :)/_avg_thruput(i, :));
avg_thruput(i+1, 🙂 = (i/(i+1)) *avg_thruput(i, :);
avg_thruput(i+1, b_user) = (i/(i+1))*avg_thruput(i, b_user)+drc(i, b_user)/(i+1);

“Directed Transmitter Multiple Receiver System Using Path Diversity to Maximize Throughput Fairly”, US Patent No. 6444990, September 10, 2002

The number of mobile phones is usually higher than the number of base stations at any time. Without mediation, all transmissions interfere with each other and prevent reliable reception of information. Therefore, the base station needs to address the priority issue: to ensure that all users can complete the call, but also to consider that users in noisy environments need to give more resources to get the same quality of service. solution? A compromise between individual user needs and overall network performance is required. Proportional fair scheduling ensures that all users enjoy at least the lowest level of service while maximizingTotal network throughput. This is achieved by giving lower priority to users who expect more resources. Only three lines of code allow all 3G and 4G wireless networks around the world to work. – Lav Varshney

31, Bitcoin

Age: 2008

A code that inspires everyone’s confidence in a currency. Without it there is no such currency

double AttackerSuccessProbability(double q, int z)
{
double p = 1.0 – q;
double lambda = z * (q / p);
double sum = 1.0 ;
int i, k;
for (k = 0; k <= z; k++)
{
double poisson = exp(-lambda);
for (i = 1; i <= k; i++)
poisson *= lambda / i;
sum -= poisson * (1 – pow(q / p, z – k));
}
return sum;
}

中本聪

Whether you are a bitcoin evangelist or a skeptic, or are not sure what it is, you probably know that this is a big deal. Bitcoin itself has already received hundreds of billions of dollars in direct investment, but perhaps more importantly, its underlying technical principle, the blockchain, seems to have endless applications, from ensuring democratic elections to ending involuntary sex. Contact and so on are all in its application.

It all started in 2008, when anonymous Nakamoto published a white paper announcing the launch of Bitcoin. The above code is part of the implementation, and the purpose of this code is to calculate the minimum probability that an attacker will take over the Bitcoin blockchain. The math here makes the world believe that systems made up of unreliable people can still be trusted, paving the way for the creation of at least 2,777 other cryptocurrencies. – Elena Botella

32, Conficker worm

Year: October 2008 to 2009

Infecting infected computers into malicious robots while protecting other computers

; BOOL __cdecl HasUkrainianLocale()
push ebx
mov ebx, ds:GetKeyboardLayoutList
push ebp
push esi
xor ebp, ebp
push ebp
push ebp
call ebx
mov esi, eax
cmp esi, ebp
jz short loc_37680A

This code was written by security researchers Tillmann Werner and Felix Leder, and later functional equivalence tests were conducted to understand and combat the Conficker worm.

Tillmann Werner and Felix Leder

A decade ago, the number of computers infected with Conficker was as many as 15 million. This is a virus that exploits vulnerabilities in the Windows operating system. Although this virus is frightening, it is also highly praised for its enthusiasm: it invites every computer to join the huge zombie army, wait for the order to be issued, and also prevent the infected computer from opening a security program or downloading it. Clear the virus patch. The earliest version also has a very interesting and very telling quirk: if you reside in any system that uses a Ukrainian keyboard or a Ukrainian IP address, it will self-destruct. Years later, the authorities and researchers who reverse engineered the virus concluded that the developers of Conficker were indeed Ukrainians who designed the virus to avoid violating the laws of their own country. Fortunately, these hackers have never used the zombie army to do evil.By 2018, an estimated 350,000 computers are still infected with this virus, which reminds us how easy it is for a skilled programmer to launch an international attack and selectively damage users. ——Jane C. Hu

33, like button

Year:2009

It spawned the surveillance economy.

{“__typename”:”PageLikeAction”,”action_type”:”LIKE”,”label”:{“text”:”Like”}

The Facebook.com website in September 2019

Facebook uses the “Like” button as a means of showing the world that we like the Simpsons or French fries. . But in fact, it takes advantage of our cognitive biases and the power of design to entice us to share more information. Thanks to the pixel tracking introduced by Sara Wachter-Boettcher, it tracks our whereabouts on the Internet and collects data about our browsing habits. Facebook takes this information and sells its behavioral targeting algorithm to advertisers. If an outdoor company wants to advertise, Facebook can target articles that have previously “liked” hiking, visited camping sites, and people with outdoor friends. When these users “like” the ads of related companies, this information will be fed back into the targeted advertising algorithm. As a result, surveillance and commercial manipulation have formed a cycle of recurring cycles. It’s all because of a little blue thumb. – Ari Ezra Waldman, Professor, New York Law School

34, HTTP Strict Transport Security (HSTS)

Age: Around 2009

Open secure channel by default to protect website security

Strict-Transport-Security: max-age=31536000; includeSubDomains

Mozilla Developer Guide

This is a leak when you send information to a website via the normal HTTP protocol – someone else might intercept this information and eavesdrop on your creditCard, health information and the name of the partner’s pet. HTTPS can encrypt your traffic and prevent others from snooping information, but for a long time, using this more advanced protocol has always been optional. So there is HTTP Strict Transport Security, a security measure that ensures that traffic to the site from the beginning is encrypted. If you want to visit http://google.com, it will automatically redirect you to https://google.com. This is the role of HSTS.

HSTS is not yet widely available: it is estimated that only 11.1% of websites use it. But in the spring of 2015, an important moment came, the US federal government and industry partners implemented HSTS in 19 government areas, including Whitehouse.gov, AIDS.gov and donotcall.gov. Shortly thereafter, all federal agencies required the adoption of the standard. — Rusty D. Pickens, former acting white media director of the Obama administration’s White House

35, Heartbleed vulnerability

Year: written in 2012, discovered in 2014

Calculating one of the most widely spread and most dangerous security vulnerabilities in history

buffer = OPENSSL_malloc(1 + 2 + payload + padding);
bp = buffer;

/* Enter response type, length and copy payload */
*bp++ = TLS1_HB_RESPONSE;
s2n(payload, bp);
memcpy(bp, pl, payload);
bp += payload;
/* Random padding */
RAND_pseudo_bytes(bp, padding) ;

From Naked Security

In 2014, security researchers discovered a vulnerability in OpenSSL (a very popular open source library) that was used by about two-thirds of sites (including DropBox, Twitter, Yahoo, and GitHub). Used to communicate online between two computers. Heartbleed allows criminals to steal unencrypted buffers that affect millions of devicesConfidential information, including credentials and encryption keys. This has led to the challenge of relying on open source software to implement critical security features and identifying code vulnerabilities that have been used for many years. In a more positive sense, Heartbleed’s findings have also led to a rapid and effective global response, including coordinated advocacy and remediation efforts on a global scale, far beyond the many previous similarities for early vulnerabilities. action. – Josephine Wolff, Assistant Professor at Tufts University

36, Boeing 737 Max

Year: Launched in 2017

Software errors, coupled with corporate greed, killed hundreds of people and dropped a large number of planes.

In October 2018, a very weird accident occurred shortly after the departure of Lion Air Flight 610, and then fell into the sea. Boeing assured the public that the aircraft was safe and said it needed more pilot training and “software upgrades.” But only four months later, a pilot of Ethiopian Airlines made 20 attempts to lift the nose, but the aircraft’s automatic system still pushed the nose down. Within minutes of taking off, all personnel on board were killed. In response to the accident, the global civil aviation authority of this type of aircraft has been grounded. The investigation revealed that the crash was caused by the design of the 737 Max, especially the little-known software that is not well understood, which may force the aircraft to repeatedly perform subduction. – Technical historian, “Inequalities in Writing Programs” by Mar Hicks

Translator: boxi.