YouTube Summaries

← All summaries

Dijkstra beyond the shortest path

2026-08-11 Tue ⏱ 18 min theprimeagen

A tribute to Edsger Dijkstra that argues his best-known result, the shortest path algorithm, is the least of what he gave computing. The video walks through his career from Rotterdam to Amsterdam's Mathematical Centre, Eindhoven and finally Austin, and pulls out the contributions that quietly underpin operating systems, concurrency and modern language design: semaphores, deadlock, and the campaign against the go-to statement. It closes with his sharpest quotes and speculates about how he would have judged today's LLM-generated code.

Early life and the accidental turn to computing

Dijkstra was born in Rotterdam in 1930, son of a chemist who headed the Dutch Chemical Society and a mathematician mother who never held a job. In 1951 his father suggested a three-week programming course in Cambridge, which pulled him off a physics track and into computing. From 1952 to 1962 he worked at the Mathematical Centre, defending his PhD in 1959.

The shortest path as a twenty-minute aside

The algorithm dates to 1956, three years before publication. By his own account he was shopping in Amsterdam with his fiancee, sat down tired at a cafe terrace for coffee, and designed it there while thinking about the shortest route from Rotterdam to Groningen. He called it roughly a twenty-minute invention and noted that the resulting paper is still readable. The presenter's point is the sheer leverage: no whiteboard, no tooling, and the result underwrites both game pathfinding and network routing.

ALGOL 60 and a first sign of independence

Around the time of his thesis Dijkstra worked with Jaap Zonneveld on an ALGOL 60 compiler, one of the earliest high-level languages. The target machine, the Dutch Electrologica X1, had only 4,096 words of memory at 27 bits per word - present-day laptops are larger by a factor of about a million, and the era had not even settled on powers of two. After roughly eight months he parted ways with the effort. ALGOL 60 was designed by an international committee; although he attended design meetings, his name is absent from the thirteen editors of the final report because he disagreed with majority opinions and withdrew. The video reads this as the first public display of his fierce independence.

Eindhoven: the invention of practical concurrency

Moving to Eindhoven University of Technology in 1962, Dijkstra worked on a multiprogramming operating system. The 87-page report "Cooperating Sequential Processes" (EWD123 - EWD being his initials and the number his place in a handwritten series of notes circulated to other academics, essentially a pre-internet blog) introduced the first known synchronization primitive, the semaphore. A semaphore is a counter attached to a lock: arriving threads atomically decrement it, and when it hits zero further threads must wait; each departing thread increments it again, so only a bounded number of participants touch the shared value at once. A semaphore with a count of one is a mutex, the ancestor of today's richer locking primitives.

In the same body of work he identified deadlock, which he named the deadly embrace: thread A waits on a resource B holds while B waits on a result from A, and neither can move. The presenter prefers the original name. Mutual exclusion, deadlock detection and deadlock prevention are now mandatory material in operating systems and parallel programming courses, which makes Dijkstra effectively the father of parallel computing.

The lineage continues outward: Tony Hoare's "Communicating Sequential Processes", drawing on Dijkstra's work, became the foundation for Go's concurrency model.

The go-to war and structured programming

The 1968 article everyone knows as "Go To Statement Considered Harmful" was originally submitted as "A Case Against the Go To Statement"; editor Niklaus Wirth supplied the famous title. Context matters: the largest program of the era was an IBM operating system of roughly 1.7 million lines, laced with goto jumps to arbitrary labels. Gotos were not irrational - an if statement is fundamentally a conditional jump - but at that scale they were unmanageable, and it took about a decade for the argument to win. The campaign broadened into structured programming: use if statements, loops and other high-level constructs so a program can actually be understood. The counterfactual joke is a JavaScript with gotos, React server components jumping between client and server code by label.

Turing Award and the correctness obsession

Dijkstra received the ACM Turing Award in 1972, cited for treating programming as a high intellectual challenge, for insisting and demonstrating that programs should be composed correctly rather than debugged into correctness, and for illuminating foundational problems of program design. That phrase - composed correctly, not debugged into correctness - defined the rest of his career. After leaving Eindhoven in 1984 for Austin, Texas, where he stayed until retiring in 1999, he worked mostly on formal proofs, holding that programs should be provably correct rather than merely believed correct on the strength of passing tests.

Would he approve of LLMs?

The video poses the question honestly rather than answering it. On one hand, the Turing citation and the aphorism that testing shows the presence of bugs but never their absence read as a direct indictment of shipping generated code behind a thin layer of guidelines - you cannot enumerate the outcomes, so sinister bugs slip through. On the other hand, speaking English and getting a working program out is genuinely magical, and machines that appear to reason about whether a program halts sit oddly against the presenter's assumption that this is undecidable.

Quotes and closing facts

The selected one-liners include his verdicts that prior exposure to BASIC leaves students mentally mutilated beyond regeneration, that teaching COBOL should be a criminal offense, that APL is a mistake carried through to perfection, and that object-oriented programming is an exceptionally bad idea that could only have come from California. The one the presenter dwells on is about accountability: in physics you can blame the uncharted depths of nature, but if your program does not work, there is nobody to hide behind - you messed up. Another notes that using machines to mimic the human mind is silly when they could mimic something better, which the presenter backs with Stockfish outplaying all of humanity at chess.

Two closing facts: Dijkstra never purchased a computer, and when he stated "programmer" as his profession on his Dutch marriage paperwork, the Amsterdam municipal authorities rejected it on the grounds that no such profession existed.

The video credits an article by Krzysztof Apt, "The Man Who Carried Computer Science on His Shoulders", as its main source and recommends reading it in full.