Roundups
Best books for learning to program, by goal
Pick a programming book by goal: a first language, one language in depth, how interpreters work or software craft. Compare free online books with paid titles.
The right programming book depends on what you want to do next. The best programming books ranking sorts its books into three goals: learning a first language, understanding how languages and interpreters work, and building better software over a career. Several of the strongest titles can be read free online, so you can try one before you buy a print copy. The free-online status in this article follows each book's listing.
Start from zero
Think Python, 3rd edition, by Allen B. Downey is a short beginner's book. It teaches Python through chapters on functions, loops, lists and dictionaries, classes and debugging. The author offers it free to read online, and print copies are sold through retailers. It covers the basics only, so readers move on to larger texts after it.
Automate the Boring Stuff with Python, 3rd edition, by Al Sweigart teaches beginners to write scripts for files, spreadsheets, web scraping, PDFs and email. The author's site offers it free to read under a Creative Commons license. It is light on software design, and its print and ebook copies are paid.
Learn one language in depth
Eloquent JavaScript, 4th edition, by Marijn Haverbeke teaches programming from first principles, using JavaScript in the browser and in Node.js. The text is free to read online under a Creative Commons license, and it is also offered as PDF, EPUB and MOBI files. A paperback is sold separately. The ranking notes that the pace is slow for experienced developers.
The Rust Programming Language is the official book for Rust, written by Steve Klabnik, Carol Nichols and Chris Krycho. The online version is free and tracks current Rust releases, and it is also available offline with the Rust installation. It covers Rust only, so it fits readers who are learning Rust. Its topics include ownership and borrowing, traits and generics, and concurrency.
Understand how languages and interpreters work
Structure and Interpretation of Computer Programs, known as SICP, is by Harold Abelson, Gerald Jay Sussman and Julie Sussman. It teaches abstraction, data and interpreters through Scheme, and its companion site hosts the full text in HTML for free. The ranking calls it a deep, free introduction to abstraction that is demanding. Its exercises are dense, and Scheme is not a mainstream industry language.
Crafting Interpreters by Robert Nystrom walks readers through building a full scripting language, from scanning and parsing to a bytecode virtual machine. The complete web edition is free to read on the author's site. Print and ebook editions are sold separately. The book is long and asks for a lot of code.
Work as a developer
The Pragmatic Programmer, 20th Anniversary Edition, by David Thomas and Andrew Hunt, collects advice on code quality, debugging, testing, automation and career habits. The advice applies to any language. The publisher sells paperback and ebook editions, and the advice is general, with few code details.
Designing Data-Intensive Applications by Martin Kleppmann is an O'Reilly book about databases, replication, partitioning, transactions and stream processing. The author's site says it is available in print and ebook formats from bookstores. The ranking calls it dense, and suited to engineers who make design decisions rather than beginners.
The ranking also includes Software Engineering at Google (89.0), a free HTML edition on engineering practice for large codebases, drawn from one company's experience. It covers less programming technique than the craft books, and a print edition is available from O'Reilly.
Check the edition
Editions change what a book covers, so check the version before you start. The ranking lists the 4th edition of Eloquent JavaScript, dated 2024, and the 3rd edition of Think Python. Automate the Boring Stuff's 3rd edition was published by No Starch Press in April 2025, and the ranking names SICP's second edition. The Rust book's listing says it is updated for Rust 1.97, and the product entry notes that it is tied to the current Rust toolchain versions, so compare its version with the Rust release you install.
Free online or paid
Think Python, Automate the Boring Stuff, Eloquent JavaScript, the Rust book, SICP and Crafting Interpreters are free to read online. The Pragmatic Programmer and Designing Data-Intensive Applications are paid, and neither offers a free full text on its own site. Free to read online does not mean free in print. Where a print or ebook edition exists, it is sold separately.
A reasonable order
- Begin with Think Python or Eloquent JavaScript if you have never programmed. Automate the Boring Stuff suits readers who want scripts for everyday files and spreadsheets first.
- Read one language's guide from start to finish before you switch languages. The Rust book is the official guide for Rust.
- Move to SICP or Crafting Interpreters once you can write functions and read other people's code comfortably. The ranking calls these the most demanding of the free books.
- Read The Pragmatic Programmer or Designing Data-Intensive Applications after you have built real programs. The ranking says both suit experienced engineers.
Compare the books at a glance
| Book | Author | Level | Best for |
|---|---|---|---|
| Think Python | Allen B. Downey | Beginner | First Python book for beginners |
| Automate the Boring Stuff with Python | Al Sweigart | Beginner | Automating office and file tasks in Python |
| Eloquent JavaScript | Marijn Haverbeke | Beginner | Learning JavaScript and programming for free |
| The Rust Programming Language | Steve Klabnik, Carol Nichols, Chris Krycho | Beginner | Learning Rust with the official guide |
| Structure and Interpretation of Computer Programs | Harold Abelson, Gerald Jay Sussman, Julie Sussman | Advanced | Deep study of abstraction and interpreters |
| Crafting Interpreters | Robert Nystrom | Intermediate | Building a language interpreter from scratch |
| The Pragmatic Programmer | David Thomas, Andrew Hunt | Intermediate | Working developers who want craft habits |
| Designing Data-Intensive Applications | Martin Kleppmann | Intermediate | Designing reliable data systems |
Pick one book for your current goal rather than working through the whole table. For a method to hold what you read, see spaced repetition explained.
Compare head to head
Designing Data-Intensive Applicationsversus
The Pragmatic Programmer, 20th Anniversary Edition
Designing Data-Intensive Applicationsversus
Structure and Interpretation of Computer Programs
Structure and Interpretation of Computer Programsversus
The Pragmatic Programmer, 20th Anniversary Edition
Mentioned in this article
Think Python, 3rd EditionFree beginner's introduction to programming in Python by Allen B. Downey
Automate the Boring Stuff with Python, 3rd EditionPractical Python for automating files, spreadsheets, web tasks and email
Eloquent JavaScript, 4th EditionFree introduction to programming and JavaScript, 4th edition
The Rust Programming LanguageOfficial free book that teaches the Rust language from first steps
Structure and Interpretation of Computer ProgramsMIT programming classic on abstraction and interpreters, with free full text
Crafting InterpretersFree web book on writing a programming language interpreter
The Pragmatic Programmer, 20th Anniversary EditionPractical software craft advice from David Thomas and Andrew Hunt
Designing Data-Intensive ApplicationsMartin Kleppmann's book on reliable, scalable and maintainable data systems
Related lessons
Learning CenterKeep reading
All articles- Roundups · 6 min readBest books for learning machine learning, from math to practiceFollow a machine learning reading path from math and statistics to code, research and edge devices. See which books are free to read online and which are paid.
- Roundups · 5 min readBest books on reinforcement learning and edge MLChoose a reinforcement learning or edge ML book by level, free access and hardware focus. Compare Sutton and Barto, Bertsekas, TinyML and Fringe Learning.
- Roundups · 4 min readBest personal finance books compared by approachCompare personal finance books by approach: behavior, index investing, value investing and spending. See what each argues and which book fits your goal.









