Essay: On the Cruelty of Really Teaching Computing Science
Overview
Edsger Dijkstra argues that computing science must be taught as a rigorous, mathematical discipline concerned with the derivation of correct programs from precise specifications. The subject is not about machines, tools, or fashions, but about the formal structures of thought that make reliable programming possible. The “cruelty” in the title names a principled refusal to indulge comforting misconceptions: educators must strip away intuitive habits that make reasoning about programs impossible, and resist pressures to equate education with training in current technologies.
Thesis and Rationale
Programs are mathematical objects, and their meanings should be handled with the same precision as theorems. Because software’s central difficulty is complexity, the only lasting remedy is abstraction, specification, and proof. Testing and debugging are empirically useful, but logically inadequate: they can reveal flaws without establishing correctness. The curriculum should therefore cultivate mental discipline in specification and derivation, so students learn to design programs whose correctness follows from construction rather than verification after the fact.
The Meaning of “Cruelty”
Teaching “really” requires denying students shortcuts that gratify but mislead. Many arrive with a tinkerer’s mindset, encouraged by interactive systems that reward trial-and-error. The educator’s obligation is to wean them from operational intuitions and ad hoc metaphors, insisting instead on precise reasoning. This feels cruel because it withholds the immediate pleasures of running code and because it demands unlearning: abandoning folklore, anthropomorphic language about machines, and the habit of outsourcing rigor to compilers and tests. It is also cruel because not everyone will enjoy or succeed at this mode of thought, yet the discipline must not be diluted to accommodate that fact.
Pedagogy and Method
Dijkstra prescribes pencil-and-paper programming grounded in logic. Students should begin with specifications expressed as predicates, then derive programs by calculational steps that maintain truth, using invariants, variants, and weakest preconditions. Notation matters: clarity of symbols and structure shapes clarity of thought. The problems should be tiny in size yet deep in reasoning, chosen to expose essential issues of control and data without drowning in accidental complexity. Only after students can justify each construct should any language or machine enter the picture, and then only insofar as it preserves the reasoning discipline already learned.
Against Fashion, Tools, and “Practicality”
He rejects the idea that education should mirror industry’s toolchain. Teaching a current language or platform is neither necessary nor sufficient for intellectual formation, and quickly becomes obsolete. The notion that “realism” requires large projects or immediate execution is misguided; realism in computing science is exactness of thought. Tools are acceptable only as servants of formality; otherwise they seduce students into confusing artifacts with their meaning. A university’s duty is long-term understanding, not short-term employability metrics.
Aims and Ethos
The goal is mastery of abstraction: separating specification from implementation, essence from mechanism, and proof from intuition. Students should learn to value simplicity, sufficiency, and elegance, recognizing that small, well-understood constructs compose into reliable systems. Humility is central: the programmer’s imagination is the source of both power and error, so disciplines that constrain it are virtues, not constraints to be evaded. By teaching computing science as formal reasoning, educators prepare students to confront software’s inherent complexity with methods that scale, endure, and generalize beyond any particular language or machine.
Edsger Dijkstra argues that computing science must be taught as a rigorous, mathematical discipline concerned with the derivation of correct programs from precise specifications. The subject is not about machines, tools, or fashions, but about the formal structures of thought that make reliable programming possible. The “cruelty” in the title names a principled refusal to indulge comforting misconceptions: educators must strip away intuitive habits that make reasoning about programs impossible, and resist pressures to equate education with training in current technologies.
Thesis and Rationale
Programs are mathematical objects, and their meanings should be handled with the same precision as theorems. Because software’s central difficulty is complexity, the only lasting remedy is abstraction, specification, and proof. Testing and debugging are empirically useful, but logically inadequate: they can reveal flaws without establishing correctness. The curriculum should therefore cultivate mental discipline in specification and derivation, so students learn to design programs whose correctness follows from construction rather than verification after the fact.
The Meaning of “Cruelty”
Teaching “really” requires denying students shortcuts that gratify but mislead. Many arrive with a tinkerer’s mindset, encouraged by interactive systems that reward trial-and-error. The educator’s obligation is to wean them from operational intuitions and ad hoc metaphors, insisting instead on precise reasoning. This feels cruel because it withholds the immediate pleasures of running code and because it demands unlearning: abandoning folklore, anthropomorphic language about machines, and the habit of outsourcing rigor to compilers and tests. It is also cruel because not everyone will enjoy or succeed at this mode of thought, yet the discipline must not be diluted to accommodate that fact.
Pedagogy and Method
Dijkstra prescribes pencil-and-paper programming grounded in logic. Students should begin with specifications expressed as predicates, then derive programs by calculational steps that maintain truth, using invariants, variants, and weakest preconditions. Notation matters: clarity of symbols and structure shapes clarity of thought. The problems should be tiny in size yet deep in reasoning, chosen to expose essential issues of control and data without drowning in accidental complexity. Only after students can justify each construct should any language or machine enter the picture, and then only insofar as it preserves the reasoning discipline already learned.
Against Fashion, Tools, and “Practicality”
He rejects the idea that education should mirror industry’s toolchain. Teaching a current language or platform is neither necessary nor sufficient for intellectual formation, and quickly becomes obsolete. The notion that “realism” requires large projects or immediate execution is misguided; realism in computing science is exactness of thought. Tools are acceptable only as servants of formality; otherwise they seduce students into confusing artifacts with their meaning. A university’s duty is long-term understanding, not short-term employability metrics.
Aims and Ethos
The goal is mastery of abstraction: separating specification from implementation, essence from mechanism, and proof from intuition. Students should learn to value simplicity, sufficiency, and elegance, recognizing that small, well-understood constructs compose into reliable systems. Humility is central: the programmer’s imagination is the source of both power and error, so disciplines that constrain it are virtues, not constraints to be evaded. By teaching computing science as formal reasoning, educators prepare students to confront software’s inherent complexity with methods that scale, endure, and generalize beyond any particular language or machine.
On the Cruelty of Really Teaching Computing Science
A critical essay on computing education arguing for rigorous, mathematical foundations in teaching computer science and warning against superficial approaches that fail to instill deep understanding.
- Publication Year: 1989
- Type: Essay
- Genre: Computer Science, Education, Philosophy of computing
- Language: en
- View all works by Edsger Dijkstra on Amazon
Author: Edsger Dijkstra
Edsger Dijkstra, a pioneer in computer science known for his algorithms, programming languages, and academic contributions.
More about Edsger Dijkstra
- Occup.: Scientist
- From: Netherland
- Other works:
- A Note on Two Problems in Connexion with Graphs (1959 Essay)
- Solution of a Problem in Concurrent Programming Control (1965 Essay)
- Go To Statement Considered Harmful (1968 Essay)
- The Structure of the 'THE' Multiprogramming System (1968 Essay)
- Notes on Structured Programming (1970 Essay)
- The Humble Programmer (1972 Essay)
- Self-stabilizing Systems in Spite of Distributed Control (1974 Essay)
- Guarded Commands, Nondeterminacy and Formal Derivation of Programs (1975 Essay)
- A Discipline of Programming (1976 Book)
- Selected Writings on Computing: A Personal Perspective (1982 Collection)