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.

By listme.name 5 min read Share

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

  1. 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.
  2. Read one language's guide from start to finish before you switch languages. The Rust book is the official guide for Rust.
  3. 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.
  4. 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

Mentioned in this article