Tiny Snippets of Code That Changed The World | by Clive Thompson | Nov, 2022

Just a few short lines can have a massive, global impact

picture of computer screen with multicolored computer code on it
photo by chris reed Feather unsplash

In 1997, Ethan Zuckerman broke the Internet by inventing the pop-up ad.

He was working for Tripod.com, an online service that lets people create small web pages for free. To make money, Tripod sold advertisements that ran alongside the pages. The problem was, the ads would run next to lewd content — a user’s page devoted to anal sex, say — and the advertisers did. No hence.

Zuckerman’s boss asked him to come up with some solutions. Was there no way to set up the ads so that they weren’t right next to the SexyTime user-generated content?

That’s when Zuckerman came up with a weird, hacky solution: When you visited a tripod page, it would generate an entirely new pop-up page with just the ad. This way the ad wouldn’t technically be related any Special User Page. It’ll just be there floating on the screen.

Here’s the thing, though: A little JavaScript from Zuckerman, Who Created the Popup Ad? It was incredibly short – one line of code:

window.open('http://tripod.com/navbar.html'
"width=200, height=400, toolbar=no, scrollbars=no, resizable=no, target=_top");

Basically, JavaScript tells the browser to open a new window that is 200 pixels wide and 400 pixels tall, with no scrollbars or toolbars at the top, which is positioned on top of other web pages that are currently open. Is.

Simple, but harmful! Very soon, commercial websites had copied Zuckerman’s innovation, and the Internet was positively infused with pop-up ads. A coder I knew in the early 2000s who worked for a download site told me that the bulk of their revenue comes from pornographic pop-up ads.

You’ve no doubt seen pop-up ads. Of course you hate them. Luckily you use a browser that suppresses them now.

As Zuckerman put it, he wrote a line of code “that made the world an measurably worse place.”

I saw Zuckerman’s story in an essay he wrote for You are not expected to understand: How 26 lines of code changed the world. This is an incredibly fun little collection of short essays, edited by Tory Bosch, that mirrors the pieces of code that tilt the world on its axis.

how charmed me Short Most of these are snippets. This runs neatly against many pop-cultural notions about coding, which typically suggest that important code is massive and spread out. Hollywood likes to paint “programmers programming” with their fingers in a complete blur, pouring out a niagara of code. Used to mention the story of Google’s dominance its “2 billion lines of code”as if she sheer weight He was responsible for the success of the firm.

It is often quite the opposite. In fact, Google’s original innovation—the piece of code that lifted Google above its search-engine counterparts in the ’90s—was its “PageRank” algorithm, which calculated the value of a web page based on how many other pages linked to, and the quality of those linking pages. it is Not a very long piece of code; People have done their own versions in Python, and it’s only a few dozen lines.

Sure, Google’s Altogether Operations – like any large tech firm – involve thousands of processes to keep things running. That’s why their total code base has grown so much. But some of the code with the biggest impact can be very abstract.

you should Read the Whole Book (Or Buy It as a Holiday Gift for Nerds), because the examples are engaging and comprehensive. Charlton McIlwain has a chapter on the “police beat algorithm” developed in the late 1960s, which tried to predict where crime was likely to occur, so law-enforcement agencies could send more police that way. This, of course, wound up creating a racist feedback loop: Since poverty-stricken black neighborhoods already outnumbered white ones, the algorithm directed more policing there, which led to more arrests, which allowed the algorithm to do just that. assured to send to More police; Wash and repeat.

The police-beat algorithm doesn’t take very long; In you are not expected to understandArtist Kelly Chudler has drawn this…

About 25 lines of code containing several mathematical formulas.  Alas, it's hard to edit it here in plain text, as it uses mathematical notation

And here’s another little piece of code that changed the world: the “tracking pixel”.

As Lily Hay Newman notes in her chapter on Tracking Pixels, you probably interact with this code every day without even realizing it. Basically, it’s a tiny bit of HTML that embeds a tiny pixel inside an email, so tiny you won’t see it. But if someone sends me an email with that tracking code, it spies on me. It works like this: The code requires my browser to request that single-pixel image as soon as I open the message. The person who sent me the email looks to see, Hey, has Clive’s browser asked for that pixel yet? So effectively, the person who sent me the email can tell right away that I opened the email.

It’s incredibly easy to insert a tracking pixel into an email — it’s one line:

URL LINKING TO THE PIXEL ONLINE Tiny Snippets of Code That Changed The World | by Clive Thompson | Nov, 2022

And here’s one last, old example! The book contains a chapter (written by Ellen R. Stofan and Nick Partridge) on the “bailout” code for the lunar module of the Apollo 11 lunar-landing mission. That “bailout” code ran on the tiny little on-board computer of the lunar module, and was designed to help prioritize things: If the computer became overloaded, it would shut down all but the most important tasks. Will give

This turned out to be incredibly important when the Lunar Module was approaching the Moon because, sure enough, the computer got Way Work load The “bailout” code jumped into action, not entirely critical of the module landing which shut everything down. It also shut down some of the display systems inside the lunar module, which scared the astronauts. But it worked: The module landed safely.

Here is that code – only 22 lines…

POODOO    INHINT
CA Q
TS ALMCADR

TC BANKCALL
CADR VAC5STOR # STORE ERASABLES FOR DEBUGGING PURPOSES.

INDEX ALMCADR
CAF 0
ABORT2 TC BORTENT

OCT77770 OCT 77770 # DONT MOVE
CA V37FLBIT # IS AVERAGE G ON
MASK FLAGWRD7
CCS A
TC WHIMPER -1 # YES. DONT DO POODOO. DO BAILOUT.

TC DOWNFLAG
ADRES STATEFLG

TC DOWNFLAG
ADRES REINTFLG

TC DOWNFLAG
ADRES NODOFLAG

TC BANKCALL
CADR MR.KLEAN
TC WHIMPER

This book is really a blast – Worth checking out!

Leave a Reply