My favorite Computer Science books, and why
The Art of Computer Programming by Donald E. Knuth is a highly cited yet rarely read book. Its depth is immense, with countless valuable insights embedded within its pages and exercises. Dense and time-consuming, one should not be deterred by the presence of assembly code, as the true essence lies in understanding algorithms. Robert Sedgewick and Kevin Wayne’s Algorithms, 4th Edition, is their best work, offering beautiful figures, numerous examples, and crystal clear Java code.
The companion website provides additional resources, making this edition particularly important. The Practice of Programming by Brian W. Kernighan and Rob Pike is a must-read, even for its last three pages that collect essential programming rules. Kernighan and Pike emphasize that the choice of programming language is not as critical as one might believe.
Computer Systems: A Programmer’s Perspective by Randal E. Bryant and David R. O’Hallaron provides essential knowledge about hardware, systems, and compilers, likely making it the only book where a chapter is dedicated to linking. Purely Functional Data Structures by Chris Okasaki beautifully explains purely functional data structures, their benefits, implementations, and complexity analysis, especially concerning amortization and lazy evaluation.
Profiling various structures, the book features elegant SML code explained line by line. Programming Pearls by Jon Bentley remains relevant even after more than three decades, offering valuable advice and perfect examples. Chapters such as Writing Correct Programs, The Back of the Envelope, Sorting, and Heaps are particularly noteworthy.
Similarly, Henry S. Warren’s Hacker’s Delight provides an abundance of arithmetic hacks, some for fun but many genuinely useful. For instance, it explains what your compiler does when you divide by a constant. Algorithms on Strings, Trees, and Sequences by Dan Gusfield primarily focuses on text algorithms, with well-explained and proven algorithms.
A significant portion is dedicated to suffix trees, including an excellent explanation of Ukkonen’s algorithm, which can be challenging to comprehend and code. Lastly, The Elements of Computing Systems by Noam Nisan and Shimon Schocken is the best way to understand computing by building everything oneself, from a machine to an operating system.
Though undertaking the construction may not be feasible, reading the book in its entirety remains worthwhile.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.