DEV Community

Cover image for Trivia #4: Who invented copy+paste?
Sylwia Vargas
Sylwia Vargas

Posted on

Trivia #4: Who invented copy+paste?

Welcome to my little CS trivia series. Every week I post a new trivia piece.

Today's question is...


Who invented copy+paste?

Can you imagine coding without being able to copy/paste from stackoverflow? Or, having to retype out long code blocks as you refactor a growing app? Coding would definitely be a test of patience. We take copy/paste for granted but imagine that it wasn't a feature until someone created it.

We owe the pleasure to Larry Tesler, one of the first computer scientists who worked at Apple, who actually passed away two weeks ago at the age of 74. Besides copy/paste, he created Smalltalk, the first dynamic object-oriented language, or the first graphical user interface word processor for the Xerox Alto (which you can see in this video).

Copy + paste invention

From IEEE's Spectrum article on Tesler:

In 1969 Tesler volunteered to help create a catalog for the Bay Area’s Mid-Peninsula Free University. He and Jim Warren, founder of the West Coast Computer Faire, did the paste-up for that catalog. Around the same time, Tesler saw a demo of a computer command that allowed you to bring back something that you had deleted. The command was called “Escape P Semicolon” (or something similarly arcane). Several years later, when Tesler was at Xerox PARC writing a white paper about the future of computing, he drew on the memory of those two experiences to predict that you would be able to “cut and paste” within computer documents.

How does copy + paste work under the hood?

At the very low level, each letter and each file is just a stream of bytes — or, a stream of ones and zeros. It's the software that translates these bytes into e.g. ASCII and then, into their visual representation of letters, or RGB, and their visual representation of colors.
A fun fact: the contents of a file are all scattered around the hard drive, or, are not stored together. It's the file metadata that ties all these scattered blocks into a file. You can read more about it in this StackOverflow thread.

When copy is invoked, the space in the clipboard (memory) is allocated and as the metadata of the original file (or e.g. sentence) is being evaluated, its contents are being populated to the clipboard. This happens one block at a time, which is why sometimes this may take a while. When paste is invoked, the location of the data changes from the clipboard.

Top comments (1)

Collapse
 
mxmzb profile image
Maxim

Rest in peace.