ThinkRoost
Technology and AI

Software engineering · 5 min

Eleven lines that broke the internet

Learn about dependencies.

ReflectText size
Source reading

What the sources describe

Modern software often depends on small packages of code written by others, shared through online registries. For JavaScript, a major registry is npm. Programs may depend on hundreds or thousands of packages, including tiny ones.

In March 2016, developer Azer Koçulu had a dispute with the company Kik over a package he had named kik. npm sided with the company and transferred the name. In protest, Koçulu removed all his packages from npm, about 270 of them.

One was left-pad, about 11 lines of code that added spaces or characters to the start of text. Many widely used tools, including ones used to build popular websites, depended on it indirectly. When it disappeared, builds around the world failed with errors.

npm restored the package within hours and changed its rules to make it harder to remove packages that others depend on. JavaScript later added a built-in way to pad text. The incident showed how fragile software supply chains can be.

Our interpretation

Connecting the ideas

In March 2016, a developer removed about 270 packages from npm after a naming dispute, including the 11-line left-pad, breaking builds worldwide until npm restored it.

The idea, in plain language

The big idea

Small dependencies can become single points of failure.

Use it in real life

Use it in real life

List five services or tools you depend on daily, such as a phone app, website or delivery service. For each, write down what you would do if it disappeared tomorrow. Choose one and set up a backup, such as saving important files elsewhere or noting an alternative service.

Practice scenario (made up for this lesson)

Try it

Made-up example: Why did removing left-pad break so many programs?

A good answer: many widely used tools depended on it indirectly.

Quick quiz

1. Why did Koçulu remove his packages?

2. What did npm change after the incident?

3. What does the incident show about software supply chains?

Finished reading?

Make this the next Doom video?

Vote for the lessons you'd most like to see turned into a short animated story.

How was this lesson?

No ratings yet — be the first.

Sign in to rate

Sources

Limitations

Checked against npm's own account; other details rely on Wikipedia.

Voice: Debby — Soft and soothing (tap to change)

Debby narration · part 1 of 15