
The Science of Programming
by David Gries · first published 1989
15mentions
9recommended by
13HN commenters
2009–2024first – last mentioned
69% recommend31% neutral
Why HN recommends it
Introduces programming through mathematical logic and proof, following Dijkstra and Hoare's techniques. Its easy-to-follow, example-driven treatment of correctness reasoning suits readers seeking rigor.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








…and others, specially in the silver "Texts and Monographs In Computer Science" books (the entire series is a feast of delight that should be devoured, and washed down with heirloom, stolen wine): The Science of Programming, Gries. The Design of Well-Structured and Correct Programs, Alagic and Arbib. The selection Programming Methodology edited by Gries has various approaches to the structured method, with contributions…
on “Lisp has too many parentheses...” ↗The book 'The science of programming' of David Gries is also a nice introduction to writing programs using mathematical logic and reasoning. The book is inspired by the techniques of Dijkstra and Hoare, and written in a way that's easy to…
on “What Is Abstract Algebra? [video]” ↗…he had in hindsight. (Which almost always makes for an interesting read, cf. Niklaus Wirth: "Good ideas through the looking glass".) [1]: Interested readers might want to check out the excellent "The Science of Programming" by David Gries.
on “Retrospective: An Axiomatic Basis for Computer Programming” ↗Anything by EWDijkstra or CAR Hoare or David Gries. The Science of Programming by David Gries was very good, it covered some maths needed for programming such as set theory and then it used its own programming language (based on Dijkstra's) to discuss programming language concepts…
on “Ask HN: Programming books that are more like math books?” ↗You might also want to check out David Gries, the science of programming: https://www.springer.com/gp/book/9780387964805
on “Collected Papers of Alexander A. Stepanov” ↗1) "The Science of Programming", by David Gries, is an excellent book dealing with mathematical proof based approach to programming. 2) "The Book of Numbers", by John H. Conway and Richard Guy is a beautiful book which discusses…
on “Ask HN: Recommend a maths book for a teenager?” ↗If interested in a comprehensive treatment of this kind of imperative program design: The Science of Programming by David Gries.
on “Binary search with confidence” ↗…you will learn much more than just the syntax. I would consider this to be a very demanding book for a complete beginner. Available online: https://mitpress.mit.edu/sicp/full-text/book/book.html 2) The Science of Programming (1981), by David Gries. This book and the smaller, but equally difficult monograph The Discipline of Programming (1976), by Dijkstra are great books but too hard and mathematical for many readers. They…
on “How to Design Programs, Second Edition” ↗Check out The Science of Programming Matrix Computations by Robert A. van de Geijn and Enrique S. Quintana-Ort. Chapter 5 walks through how to write an optimized GEMM. It involves clever use of block multiplication, choosing block sizes…
on “LLaMA now goes faster on CPUs” ↗…I found to be an excellent introduction to the subject. Since that time I've been interested in the idea of proving programs correct. On weekends I'm currently making my way through David Gries's The Science of Programming. Similar books include - A Discipline of Programming by Dijkstra - The Evolution of Programs by N. Dershowitz [1] http://mitpress.mit.edu/algorithms/ [2] http://www.cs.au.dk/dADS1/daimi-fn64.pdf
on “Dijkstra on the cruelty of really teaching computing science (1988)” ↗I assume it means "science" in the older sense of systematized knowledge, like in "the art and science of painting" or Gries's "The Science of Programming". Not in the sense of the scientific method.
on “The Science of Functional Programming [pdf]” ↗…result but not knowing what established mathematicians have done on the problem. [1] https://math.ucr.edu/home/baez/crackpot.html Edit: The second link has a scanned advert at the end from 1983 for “The Science of Programming” by David Gries: the title of the book amuses me.
on “What I learned as a hired consultant to autodidact physicists (2016)” ↗…to verify at least certain properties. and last but not least, while i think that axiomatic semantics are important, i think it is almost always too time consuming to write hoare triples. i have "the science of programming" by david gries, which should help my incompetent brain to speed up here, but the truth is: it's non-trivial for many programs. this is why i feel that many things are going the "interactive theorem proving"-way.…
on “Edsger W. Dijkstra: Answers to questions from students of Software Engineering” ↗I recently read the free Kindle chapter of David Gries' book The Science of Programming, recommended at a previous discussion of this essay: http://news.ycombinator.com/item?id=1667081 My impression of his thesis so far: unit tests are great, but the challenge is figuring out exactly what…
on “On the cruelty of really teaching computing science ” ↗Some of us learned this approach to imperative programming from The Science of Programming by David Gries: https://www.amazon.com/Science-Programming-Monographs-Comput...
on “Algorithms and Data Structures – Transition systems (2004) [pdf]” ↗