Museum of Programming
Welcome.
Open daily. Admission free.
Lobby
Code, framed.
23 works in 5 rooms, 1843 to the present, shown exactly as they were written. Take the tour in order, or pick a room from the plan.
Floor plan
Rooms
Room I
Before the Machine
Room II
The First Languages
Room III
The Hacker Era
Room IV
The Open Age
Room V
The Present
Today's pick
- Note G 1843
No. Operation Receiving Statement of results 1 ¹V₂ × ¹V₃ ¹V₄, ¹V₅, ¹V₆ = 2n 2 ¹V₄ − ¹V₁ ²V₄ = 2n − 1 3 ¹V₅ + ¹V₁ ²V₅ = 2n + 1 4 ²V₅ ÷ ²V₄ ¹V₁₁ (the operands are reversed; the note intends (2n−1)/(2n+1)) - apply 1960
apply[fn;x;a] = [atom[fn] → [eq[fn;CAR] → caar[x]; eq[fn;CDR] → cdar[x]; eq[fn;CONS] → cons[car[x];cadr[x]]; eq[fn;ATOM] → atom[car[x]]; eq[fn;EQ] → eq[car[x];cadr[x]]; - Algorithm 64: Quicksort 1961
procedure quicksort (A,M,N); value M,N; array A; integer M,N; begin integer I,J; if M < N then begin partition(A,M,N,I,J); quicksort(A,M,J); quicksort(A,I,N); - Line 1965
void line(int x0, int y0, int x1, int y1) /* first octant: 0 <= dy <= dx */ { int dx = x1 - x0, dy = y1 - y0; int e = 2 * dy - dx; int x, y = y0; - hello, world 1978
#include <stdio.h> main() { printf("hello, world\n"); } - strcpy 1988
void strcpy(char *s, char *t) { while (*s++ = *t++) ; } - Duff's Device 1983
send(to, from, count) register short *to, *from; register count; { register n=(count+7)/8; switch(count%8){ - 86-DOS, revision history 1982
; 86-DOS High-performance operating system for the 8086 version 1.25 ; by Tim Paterson ; ****************** Revision History ************************* ; >> EVERY change must noted below!! << - anonymous.c 1984
int i;main(){for(;i["]<i;++i){--i;}"];read('-'-'-',i+++"hell\ o, world!\n",'/'/'/'));}read(j,i,p){write(j/p+p,i---j,i/i);} - Word frequencies 1986
tr -cs A-Za-z '\n' | tr A-Z a-z | sort | uniq -c | sort -rn | sed ${1}q - Photoshop 1.0.1 1990
Not on display. The Computer History Museum released the Photoshop 1.0.1 source in 2013 for study, under terms that do not permit reproducing it elsewhere. Follow the source link to read it. - Black Perl 1990
BEFOREHAND: close door, each window & exit; wait until time. open spellbook, study, read (scan, select, tell us); write it, print the hex while each watches, reverse its length, write again; kill spiders, pop them, chop, split, kill them. unlink arms, shift, wait & listen (listening, wait), - hello.b 1993
>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-]<.#>+++++++++++[<+++++>-]<.>++++++++[<+++>-]<.+++.------.--------.[-]>++++++++[<++++>-]<+.[-]++++++++++. - rndtable 1993
unsigned char rndtable[256] = { 0, 8, 109, 220, 222, 241, 149, 107, 75, 248, 254, 140, 16, 66 , 74, 21, 211, 47, 80, 242, 154, 27, 205, 128, 161, 89, 77, 36 , 95, 110, 85, 48, 212, 140, 211, 249, 22, 79, 200, 50, 28, 188 , 52, 140, 202, 120, 68, 145, 62, 70, 184, 190, 91, 197, 152, 224 , 149, 104, 25, 178, 252, 182, 202, 182, 141, 197, 4, 81, 181, 242 , - Quine traditional
s='s=%r;print(s%%s)';print(s%s) - Q_rsqrt 1999
float Q_rsqrt( float number ) { long i; float x2, y; const float threehalfs = 1.5F; - GIT - the stupid content tracker 2005
GIT - the stupid content tracker "git" can mean anything, depending on your mood. - random three-letter combination that is pronounceable, and not actually used by any common UNIX command. The fact that it is a - donut.c 2006
k;double sin() ,cos();main(){float A= 0,B=0,i,j,z[1760];char b[ 1760];printf("\x1b[2J");for(;; ){memset(b,32,1760);memset(z,0,7040) ;for(j=0;6.28>j;j+=0.07)for(i=0;6.28 - Spelling corrector 2007
import re from collections import Counter def words(text): return re.findall(r'\w+', text.lower()) WORDS = Counter(words(open('big.txt').read())) - Conway's Game of Life, in one line 2009
Life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵} - Genesis block 2009
// Genesis block char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"; CTransaction txNew; txNew.vin.resize(1); txNew.vout.resize(1); txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(4) << vector<unsigned char>((unsigned char*)pszTimestamp, (unsigned char*)pszTimestamp + strlen(pszTimestamp)); - Example 2018
import React, { useState } from 'react'; function Example() { // Declare a new state variable, which we'll call "count" const [count, setCount] = useState(0); - Let's think step by step 2022
Let's think step by step.
Information desk
- Reading a placard
- Under each work: the title, the author, the year, and the medium, which here means the language, and the edition or file the text was taken from. The curator's note says what problem the code solved, why it is worth looking at, and what it led to.
- Rights
- Code belongs to its authors. Each placard states the licence or, where a work is quoted under fair use for commentary, says so and shows only what commentary needs.
- Flags
- A work marked reconstructed is a faithful rendering where the original is prose or a diagram. Excerpt means a passage from a longer work; the source link has the rest.
- The tour
- Every work has a Previous and Next; following Next from Room I walks the whole collection in chronological order.