aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About
  • Computing
  • Programming

Tiny Snippets Of Code That Changed The World

  • Aelia Vita
  • January 23, 2023
  • 4 minute read

Only a few short lines can have a massive, global impact.

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


Partner with aster.cloud
for your next big idea.
Let us know here.


cyberpogo

He was working for Tripod.com, an online service that let people make little web pages for free. To make money, Tripod sold ads that ran alongside the pages. The problem was, ads would wind up running next to racy content — a user’s page devoted to anal sex, say — and advertisers did not like this.

Zuckerman’s boss asked him to figure out some solution. Wasn’t there some way to position the ads so they weren’t right next to sexytime user-generated stuff?

That’s when Zuckerman figured out a weird, hacky solution: When you visited a Tripod page, it would spawn an entirely new pop-up page with just the ad. That way the ad would not be, technically, associated with any particular user page. It’d just be floating there onscreen.

Here’s the thing, though: Zuckerman’s bit of Javascript, that created the popup ad? It was incredibly short — a single line of code:

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

Basically, the Javascript tells the browser to open a new window that’s 200 pixels wide and 400 pixels tall, with no scrollbar or toolbar on the top, positioned on top of whatever other web pages are currently open.

Simple, but pernicious! Pretty soon, commercial websites had copied Zuckerman’s innovation, and the Internet was positively infested with pop-up ads. A coder I knew in the early 00s who worked for a download site told me that the absolute vast majority of their revenue came from porn pop-up ads.

Read More  How To Provision And Manage A Redis Memorystore Instance In GCP

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

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

A photo of the cover of “You Are Not Expected To Understand This”; it is blue and lying on its side, with the spine facing the viewer. The editor’s name, Torie Bosch, is in a green monospaced font; the title is in a white monospaced font

I ran across Zuckerman’s story in an essay he wrote for You Are Not Expected To Understand This: How 26 Lines of Code Changed the World. It’s an incredibly fun little collection of short essays, edited by Torie Bosch, that reflects on pieces of code that tilted the world on its axis.

What fascinated me is how brief most of these snippets are. This runs neatly counter to many pop-cultural assumptions about coding, which typically suggest that important code is massive and sprawling. Hollywood loves to depict “programmers programming” with their fingers in an absolute blur, pouring out a Niagara of code. Tales of Google’s dominance used to refer to its “2 billion lines of code”, as if that sheer heft were responsible for the firm’s success.

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

Sure, Google’s overall operations — like those of any big tech firm — involve thousands of processes to keep things running. That’s why their total code base grows so huge. But some of the code with the biggest impact can be pretty pithy.

Read More  How To Create Ephemeral Environments Using Crossplane And ArgoCD?

You should read the whole book (or buy it for nerds as a holiday gift), because the examples are fascinating and wide-ranging. There’s a chapter by Charlton McIlwain on the “police beat algorithm” developed in the late 1960s, which tried to predict where crime was mostly 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 were already overpoliced compared to white ones, the algorithm directed more policing there, producing more arrests, which convinced the algorithm to send yet more police; rinse and repeat.

The police-beat algorithm isn’t terribly lengthy; in You Are Not Expected To Understand This, the artist Kelly Chudler draws it out …

About 25 lines of code that includes several mathematical formula. Alas, it’s hard to redact it in plain text here, since it uses mathematical notation

And here’s another, even shorter piece of code that changed the world: The “tracking pixel”.

You probably interact with this code every day, without realizing it, as Lily Hay Newman notes in her chapter on tracking pixels. Basically, it’s a little bit of HTML that embeds a single tiny pixel inside an email, so small 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 instant I open the message, the code requires my browser to request that single-pixel image. The person who sent the email to me watches to see, hey, has Clive’s browser asked for that pixel yet? So effectively, the person who sent me the email can tell the instant I’ve opened the email.

Putting a tracking pixel into an email is incredibly easy — it’s this single line:

<img src="URL LINKING TO THE PIXEL ONLINE" width="0" height="0">

And here’s one final, older example! The book has a chapter (written by Ellen R. Stofan and Nick Partridge) on the “bailout” code for the lunar module of the Apollo 11 moon-landing mission. That “bailout” code ran on the lunar module’s tiny little on-board computer, and was designed to help prioritize things: If the computer got overloaded, it would toss aside all but the most important work.

Read More  A Flexible Simulation Framework For Modeling Cyber Attacks

This turned out to be incredibly important when the lunar module was approaching the moon, because sure enough, the computer got way overloaded with work. The “bailout” code jumped into action, shutting down everything that wasn’t utterly crucial to landing the module. It even shut down some of the display systems inside the lunar module, which scared the crap out of the astronauts. But it worked: The module landed safely.

Here’s 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 quite a blast — very worth checking out!

Source: Medium


Our humans need coffee too! Your support is highly appreciated, thank you!

Aelia Vita

Related Topics
  • Code
  • Coding
  • Developers
  • Programming
  • Zuckerman
You May Also Like
View Post
  • Computing
  • Design
  • Engineering
  • Multi-Cloud

Amazing Federated Multicloud Apps

  • June 2, 2023
View Post
  • Automation
  • Computing
  • Data

IBM To Help Automate Cloud Data Protection With Acquisition Of Polar Security

  • May 25, 2023
View Post
  • Programming
  • Software Engineering
  • Technology

Build a Python App to Alert You When Asteroids Are Close to Earth

  • May 22, 2023
View Post
  • Computing
  • Platforms

Oracle Cloud Infrastructure Adds To Growing List Of Government Approved Cloud Services

  • May 22, 2023
View Post
  • Programming

Illuminating Interactions: Visual State In Jetpack Compose

  • May 20, 2023
View Post
  • Computing
  • Technology

Huawei And Partners Announce Yucatan Wildlife Conservation Findings

  • May 18, 2023
View Post
  • Computing
  • Tools

New Relic Launches AWS Systems Manager Distributor Integration

  • May 17, 2023
View Post
  • Computing
  • Engineering

Component-Based Development Has Been A Long Time Coming

  • May 16, 2023

Stay Connected!
LATEST
  • 1
    Building A Kubernetes Platform: How And Why To Apply Governance And Policy
    • June 4, 2023
  • 2
    Leave, This “United” “Kingdom”, This “Great” “Britain”
    • June 4, 2023
  • 3
    Amazing Federated Multicloud Apps
    • June 2, 2023
  • 4
    What’s The Future Of DevOps? You Tell Us. Take The 2023 Accelerate State Of DevOps Survey
    • June 2, 2023
  • 5
    Resolving Deployment Issues With Ts-node And Azure Development Pipelines
    • June 1, 2023
  • 6
    What To Expect From Apple’s WWDC 2023
    • June 1, 2023
  • 7
    What Is Platform Engineering And Why Adopt It In Your Company?
    • June 1, 2023
  • 8
    Four Steps To Managing Your Cloud Logging Costs On A Budget
    • May 31, 2023
  • 9
    Red Hat Puts Podman Container Management On The Desktop
    • May 30, 2023
  • 10
    The Agile Mindset: A Path to Personal Fulfillment and Growth
    • May 30, 2023
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • 1
    Huawei ICT Competition 2022-2023 Global Final Held In Shenzhen — 146 Teams From 36 Countries And Regions Win Awards
    • May 27, 2023
  • 2
    Huawei OceanStor Pacific Scale-Out Storage Tops IO500 Rankings
    • May 26, 2023
  • 3
    MongoDB And Alibaba Cloud Extend Global Partnership
    • May 25, 2023
  • 4
    Tricentis Launches Quality Engineering Community ShiftSync
    • May 23, 2023
  • 5
    G7 2023: The Real Threat To The World Order Is Hypocrisy.
    • May 27, 2023
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.