image

How one programmer broke the internet by deleting a tiny piece of code

In March 2016, a big part of the internet stopped working—for a surprising reason. Major websites like Facebook, Netflix, and thousands of others suddenly had errors. The cause? A single programmer deleted just 11 lines of code.

Here’s what happened.

The Building Blocks of Code

When developers build websites or apps, they don’t write everything from scratch. They often use bits of code called packages that others have written. These packages are like Lego blocks—they help you build faster by reusing code that’s already been tested and shared.

In the world of JavaScript (a popular programming language for websites), there’s a huge collection of these packages called npm. Developers download and use these packages through npm every day.

A Tiny Package, A Big Impact

One developer, Azer Koçulu, created several small packages that were available on npm. One of them was called left-pad. It was extremely simple—just 11 lines of code—and its job was to add spaces or zeroes to the beginning of text to make it a certain length. For example, turning “5” into “005” if you need three characters.

Sounds small and harmless, right? But left-pad was being used by tons of other packages and apps without most people realizing it.

A Dispute and a Decision

Azer had named one of his packages “kik.” But a messaging company called Kik said they owned that name and asked npm to remove Azer’s package. Azer didn’t agree and got frustrated. So, he decided to delete all of his packages from npm—including left-pad.

That’s when things broke.

Since so many websites and apps depended on left-pad, deleting it caused a chain reaction. Programs couldn’t run, apps failed to load, and developers around the world scrambled to figure out what was wrong.

The Fix

npm quickly stepped in. They restored the deleted left-pad code and made changes so that popular packages couldn’t be removed so easily in the future.

The Bigger Lesson

This event showed just how fragile modern software can be. Even the tiniest pieces of code can cause massive problems if they’re widely used. It also raised questions about who controls code on the internet and how we should handle shared tools that millions rely on.