programming is terriblelessons learned from a life wasted

Reflections on Trusting Trust, by Ken Thompson

Reflections on Trusting Trust, by Ken Thompson (cm.bell-labs.com)

As a programmer, I write programs. I would like to present to you the cutest program I ever wrote.

This is a classic paper on programming and security, about self referential programs called Quines. A quine is a program that outputs its source code

There is a trick to writing quines, so if you’ve never tried to write one, you might want to give it a try before reading this paper.

Quines come in many forms, some are a series of programs which output the next in sequence, like this famous perl spiral. Others are written in multiple languages, like this python and ruby quine I wrote. What Thompson does with their Quine is rather insidious, but I won’t spoil the fun