One programmer almost broke the internet by deleting 11 lines of code
chainsaw
chainsaw

(Martin Hangen/Getty Images)

This week, one programmer broke a whole mess of the software the internet runs on by deleting one simple program consisting of 11 lines of code.

Everything is OK now. But it's a strange case that involves copyright lawyers, a petulant developer, and a behind-the-scenes look into how tech titans like Facebook, Spotify, and Netflix make the sausage.

It all starts with a developer named Azer Koçulu, who wrote a piece of code called Kik, an extension for the popular programming language Node.js. Koçulu put his Kik module up on NPM, essentially an App Store for Node.js programmers, as a free download for developers to work into their apps at their leisure.

The other Kik

Kik, the popular social network of the same name, took notice and sent Koçulu an email requesting that he change the name of his module. By Koçulu's own admission in a blog post, Kik's initial request was reasonable. Still, Koçulu wouldn't budge.

"When I started coding Kik, didn't know there is a company with same name. And I didn't want to let a company force me to change the name of it," Koçulu writes.

Koçulu also told Business Insider that Kik then "threatened" him after his initial refusal, sending him an email saying:

We don’t mean to be a dick about it, but it’s a registered Trademark in most countries around the world and if you actually release an open source project called kik, our trademark lawyers are going to be banging on your door and taking down your accounts and stuff like that

After Koçulu refused to change the name, Kik reached out to NPM, and Koçulu says that CEO Isaac Schlueter took away his ownership of the module in question without asking.

Then, Koçulu announced in that blog entry that he was removing his Kik from NPM entirely — as well as all of his other code.

Ted Livingston Kik
Ted Livingston Kik

(Michael Seto/Business Insider Ignition)
Kik creator Ted Livingston.

This might not have been a big deal in itself, except Koçulu is also the person who created a popular NPM module called "npm left-pad." It's 11 lines long and doesn't actually do anything complicated, but it's been downloaded over 575,000 times.

And when it vanished, developers on Reddit, Twitter, and elsewhere definitely took notice.

A house of cards

This is where things get sticky.

A module like npm left-pad is basically a shortcut so a developer doesn't have to write a whole bunch of basic code from scratch. If a developer calls on an NPM module, it's basically shorthand for "put this code in later," and a software compiler will just download the code when the time is right.

Most of the time, this works just fine. But sometimes, software ends up relying on what's essentially a house of cards: One Node.js module calls on another, calls on another, calls on another. Again, usually it works fine — right up until npm left-pad is taken offline.