The Rules of Contagion

(Greg DeLong) #1

individual level. The same is true of many trends on social media. If
you’ve ever seen a strange meme spreading and wondered how it
could have persisted for so long, it probably has more to do with the
network itself rather than the quality of the content.[34] Thanks to
their structure, online networks are giving infections an advantage
that they don’t have in other areas of life.


O 22 2017 , web developers around the world noticed that
their apps weren’t working properly. From Facebook to Spotify,
companies using the JavaScript programming language found
themselves unable to work parts of their software. User interfaces
were broken, visuals wouldn’t load, updates wouldn’t install.


The problem? Eleven lines of computer code – which many
people didn’t even know existed – had gone missing. The code in
question had been written by Azer Koçulu, a developer based in
Oakland, California. Those eleven lines formed a JavaScript
program called ‘left-pad’. The program itself wasn’t particularly
complicated; it just added some extra characters at the start of a
segment of text. It was the sort of thing most coders could have
created from scratch in a few minutes.[35]
Yet most coders don’t create everything from scratch. To save
time, they use tools that others have developed and shared. Many of
them do this by searching an online resource called ‘npm’, which
collects together handy bits of code like left-pad. In some cases,
people incorporate these existing tools into new programs, which
they subsequently share. Some of these programs then feed into
other new programs, creating a chain of dependency with each one
supporting the next. Whenever someone installs or updates a
program, they will also need to load everything in the dependency
chain, otherwise they’ll get an error message. Left-pad lay deep
within one of these chains. In the month before it disappeared, the
code had been downloaded over two million times.


On that day in March, Koçulu had pulled his code from npm after
a disagreement over a trademark. Npm had asked him to rename
one of his software packages after another company complained;

Free download pdf