The best computer programming books

6 authors have picked their favorite books about computer programming and why they recommend each book.

Soon, you will be able to filter by genre, age group, and more. Sign up here to follow our story as we build a better way to explore books.

Shepherd is reader supported. When you buy through links on our website, we may earn an affiliate commission (learn more).

The Art of Computer Programming

By Donald Knuth,

Book cover of The Art of Computer Programming: Volume 3: Sorting and Searching

Knuth’s unique mix of playfulness and rigor came to define computer science as an intellectual discipline: computer science didn’t really have anything to do with computers, but everything to do with a particular way of seeing the world.  Just browse and wonder at the beauty and precision achieved in these books.   

Volume 3 (Sorting and Searching) is my personal favorite, and I encourage you to start there. During the pandemic, I finally got around to reading Volume 4A (Combinatorial Algorithms), which was published thirty plus years after Volume 3. It was the same feeling I had watching the movie The Phantom Menace years after growing up with the original Star Wars trilogy. I had forgotten just how unique and distinctive Knuth’s Art of Computer Programming is.


Who am I?

I am Professor of Computer Science at Stony Brook University, and have spent the past thirty years thinking/teaching/writing about algorithms. Algorithms are the really cool thing about computer science, for they form the ideas behind any interesting computer program. And algorithms turn out to be the ideas behind many interesting aspects of life that have nothing to do with computers. I have written six books on algorithms, programming, gambling, and history –including the ranking of the historical significance of all the people in Wikipedia.


I wrote...

The Algorithm Design Manual

By Steven S. Skiena,

Book cover of The Algorithm Design Manual

What is my book about?

This newly expanded and updated third edition of the bestselling classic continues to take the "mystery" out of designing algorithms and analyzing their efficacy and efficiency. It serves as the primary text of choice for algorithm design courses while maintaining its status as the premier practical reference guide to algorithms for programmers, researchers, and students.

The reader-friendly The Algorithm Design Manual provides straightforward access to combinatorial algorithms technology, stressing design over-analysis. The first part, "Techniques", provides accessible instruction on methods for designing and analyzing computer algorithms. The second part, "Resources", is intended for browsing and reference, and comprises the catalog of algorithmic resources, implementations, and an extensive bibliography.

The Pragmatic Programmer

By David Thomas, Andrew Hunt,

Book cover of The Pragmatic Programmer: Your Journey to Mastery

A full collection of self-reflecting ideas about how to approach coding from a strategic point of view. While some of it can be a bit obvious for the experienced developer, it can be invaluable for the newcomer and it’s always great to solidify knowledge in a more consistent way. The kind of book that you can read again after a few years and keep learning.


Who am I?

Since I was a kid, I’ve been passionate about technology and had a clear vocation to work with computers. I’ve been a developer for more than 20 years now, spending half of them mainly in the Python environment, and I’ve always been interested in improving my skills. While it’s true that software development is a field that changes constantly and technology evolves at great speed, there are some elements that remain relatively unchanged and can be used to compound knowledge and ability. In particular, the elements that are closer to the human element, teamwork, coordination, etc. are quite stable over time.


I wrote...

Python Automation Cookbook

By Jaime Buelta,

Book cover of Python Automation Cookbook

What is my book about?

Python Automation Cookbook is a collection of recipes that aim to present the power of the Python programming language as a way of making a computer do the heavy lifting in a lot of repetitive tasks. Some examples present in the book include dealing with files, creating graphs, working with emails, web scrapping, sending SMSs, or marketing examples.

Python is a great language because is easy to learn and to use, and at the same time is powerful and extensive, having a great community. While a bit of knowledge of Python is assumed, the book is aimed at non-experts and casual users that can learn how to automate their own tasks.

JavaScript

By Douglas Crockford,

Book cover of JavaScript: The Good Parts: The Good Parts

During my first few weeks of JavaScript coding, I encountered what seemed to be an endless number of head-scratching moments: "I'm slowly reading the few lines of code I just wrote, it seems fine, so why isn't it doing what it looks like it should be doing?" Even more insidious at times than C++, JavaScript contains a number of fairly clever constructs, including things like hoisting, duck typing, and a loosey-goosey argument passing mechanism. This concise tome of fewer than 175 pages helped get me past those first few months, and as an author-stated goal, it helped me "learn to think in JavaScript."


Who am I?

I love computer programming books almost as much as I love computer programming. As a high school student in 1980 I remember typing in really frustrating source code from the book BASIC Computer Games. Was programming meant to be a black art? Was code supposed to be an impenetrable mess of buried intent? When I started getting paid to program, I was happy to see that the answer to both questions was "no." I began to seek and enjoy books that espoused the "right" way to code in a given language. Here is a handful of books that have helped me and countless others learn to produce correct, clear, and maintainable code.


I wrote...

Modern C++ Programming with Test-Driven Development: Code Better, Sleep Better

By Jeff Langr,

Book cover of Modern C++ Programming with Test-Driven Development: Code Better, Sleep Better

What is my book about?

Test-driven development is but a simple concept: write a small amount of test code to describe a desired outcome; craft just enough code to reach that outcome; and use the resulting tests to your advantage, and by ensuring that the code is as clear and concise as possible before moving on.

I strove to create a book that captured the best possible way to grow a system incrementally and to provide the most comprehensive treatment of TDD to that point in time. It shows how to "do TDD right" and sustainably, as well as how to enjoy it. It also demonstrates to C++ developers that there's no reason they too can't practice TDD.

The Nature of Code

By Daniel Shiffman,

Book cover of The Nature of Code

If you want your interactive graphics to feel like they are real objects—real things moving around on the screen—then you have to learn how to mimic the natural world. For an object to feel like it has weight, you have to mimic gravity. For a flock of birds to feel real, you have to mimic how real birds swarm in the sky. Yes, this does involve little math. But fortunately, Dan is a superstar teacher, and he will gently walk you through (a) the math and (b) how to translate that math into code.

Speaking of code, this book uses Processing.js, which is an older adaptation of original Processing to JavaScript. That said, the techniques are all equally applicable to modern-day Processing and p5.js.


Who am I?

I’ve been making web pages since the World Wide Web began in the mid-1990s. Back then, the web was visually quite sparse. It wasn’t until the late 2000s that new browser capabilities let the web get visually interesting and an exciting place for interactive graphics. Graphics are great: they can be informational (like charts and maps) or purely aesthetic. My personal journey of learning to code interactive graphics has been so rewarding that I’ve shared the love with others through teaching creative coding workshops and undergraduate courses. If you’re new to coding or computer graphics, I hope you’ll give one of these books a try!


I wrote...

Unstuck: Javascript

By Scott Murray,

Book cover of Unstuck: Javascript

What is my book about?

Everyone who codes on the web has one thing in common: We get stuck! That’s normal; we’re only human, after all! But proficient coders get unstuck more quickly than the rest. Unstuck: JavaScript gets you moving again—quickly—with three simple steps that point you to directly to your best next step.

ADA Lovelace

By Christopher Hollings, Ursula Martin, Adrian Rice

Book cover of ADA Lovelace: The Making of a Computer Scientist

Written by mathematicians with a great literary flair, and beautifully illustrated with archival materials, this most recent Lovelace book is a comprehensive and lively recounting of her genius and its consummation in her collaboration with Charles Babbage.  It should banish any lingering doubts about Lovelace’s ability to interpret Babbage’s invention (even better than he did, at times) and to envision the potential that could only be realized nearly 100 years after her tragically early death. 

If just one book is to be read about Ada (other than my own), this is it!


Who am I?

I’ve enjoyed a long career as an author-illustrator of picture books for children. I search for stories of girls and women whose greatness has been overlooked: - Caroline Herschel, pioneering astronomer, - Oney Judge, the slave who escaped from George and Martha Washington, - Margaret Knight, the inventor who fought the man who tried to steal her idea and won in court - and Lizzie Murphy, the big-league baseball star. Every one of them had to overcome centuries of fierce resistance to female empowerment. A few of my biographies began as picture books, but their subjects quickly outgrew that format.


I wrote...

Ida M. Tarbell: The Woman Who Challenged Big Business - And Won!

By Emily Arnold McCully,

Book cover of Ida M. Tarbell: The Woman Who Challenged Big Business - And Won!

What is my book about?

Tarbell’s brave, scrupulous, serial expose of Rockefeller in McClure’s Magazine riveted the nation and led to the breakup of the Standard Oil monopoly. Her work made her the most famous woman in America. The only female Muckraker, Tarbell was born in Western Pennsylvania just as oil was discovered there. During her early years, Oil came to dominate the industry and seep into every other aspect of modern life. Using predatory and illegal tactics, John D Rockefeller came to dominate Oil.

As a single woman in a hyper-masculine age, Tarbell found a way to be one of the boys, and was uniquely respected for her views on issues of the day. She is a complex, flawed, but admirable model for girls and young women drawn to journalism, or the history of ascendancies over a world stubbornly shaped by male entitlement.

Programming Pearls

By Jon Bentley,

Book cover of Programming Pearls

Even though this book is a bit older, I had a ton of fun doing the programming problems in this book. This book really makes you think outside the box as a programmer and try to solve various problems in different ways depending on what you are trying to optimize for.

I really learned a lot about not just solving a problem, but solving a problem for a specific set of goals. Overall it made me a better programmer and made me think more deeply about programming problems.

If you want to improve your problem-solving skills and have fun doing it, I would definitely recommend this book.


Who am I?

I love to expand my knowledge and learn not just about new technologies, but how things work. I find it fascinating to dig deep into computer programming, technology concepts, and really geek out on things. That’s why I love software development or programming books that aren’t just about some technology and how to do something, but rather books that really make you think and teach you not just programming skills but critical thinking about problem-solving skills. As a software developer for over 15 years and a person who teaches software developers, I have learned that if someone isn’t entertained, they aren’t learning. That’s why I put together a list of fun, entertaining and useful books.


I wrote...

Soft Skills: The Software Developer's Life Manual

By John Z. Sonmez,

Book cover of Soft Skills: The Software Developer's Life Manual

What is my book about?

For most software developers, coding is the fun part. The hard bits are dealing with clients, peers, and managers, staying productive, achieving financial security, keeping yourself in shape, and finding true love. This book is here to help.

Soft Skills: The software developer's life manual is a guide to a well-rounded, satisfying life as a technology professional. In it, developer and life coach John Sonmez offers advice to developers on important "soft" subjects like career and productivity, personal finance and investing, and even fitness and relationships. Arranged as a collection of 71 short chapters, this fun-to-read book invites you to dip in wherever you like. Soft Skills will help make you a better programmer, a more valuable employee, and a happier, healthier person.

Beyond the Basic Stuff with Python

By Al Sweigart,

Book cover of Beyond the Basic Stuff with Python: Best Practices for Writing Clean Code

Al is one of the clearest writers on Python that I know. Here he distills his experience as both a working software engineer and a successful author to take coders from advanced beginner/intermediate level on to all of the “extra” knowledge one needs to write good code for practical use. When I read this book I find myself wishing I could write with such simplicity.


Who am I?

I’ve been teaching and writing Python code (and managing others while they write Python code) for over 20 years. After all that time Python is still my tool of choice, and many times Python is the key part of how I explore and think about problems. My experience as a teacher also has prompted me to dig in and look for the simplest way of understanding and explaining the elegant way that Python features fit together. 


I wrote...

The Quick Python Book

By Naomi R. Ceder,

Book cover of The Quick Python Book

What is my book about?

This third revision of Manning's popular The Quick Python Book offers a clear, crisp updated introduction to the elegant Python programming language and its famously easy-to-read syntax. Written for programmers new to Python, this latest edition includes new exercises throughout. It covers features common to other languages concisely, while introducing Python's comprehensive standard functions library and unique features in detail.

Practices of the Python Pro

By Dane Hillard,

Book cover of Practices of the Python Pro

Dane covers the more advanced topics a programmer needs to be successful as a professional. In particular, he has good discussions of the basics of software design – things like separation of concerns, encapsulation, testing, and performance, as well as some of the issues involved with creating and maintaining large-scale systems. This is the book that I wish I’d had early in my coding career. 


Who am I?

I’ve been teaching and writing Python code (and managing others while they write Python code) for over 20 years. After all that time Python is still my tool of choice, and many times Python is the key part of how I explore and think about problems. My experience as a teacher also has prompted me to dig in and look for the simplest way of understanding and explaining the elegant way that Python features fit together. 


I wrote...

The Quick Python Book

By Naomi R. Ceder,

Book cover of The Quick Python Book

What is my book about?

This third revision of Manning's popular The Quick Python Book offers a clear, crisp updated introduction to the elegant Python programming language and its famously easy-to-read syntax. Written for programmers new to Python, this latest edition includes new exercises throughout. It covers features common to other languages concisely, while introducing Python's comprehensive standard functions library and unique features in detail.

Hello World! A Complete Python-Based Computer Programming Tutorial with Fun Illustrations, Examples, and Hand-On Exercises.

By Warren Sande, Carter Sande,

Book cover of Hello World! A Complete Python-Based Computer Programming Tutorial with Fun Illustrations, Examples, and Hand-On Exercises.

I’m a kid at heart. (My favourite book genre is middle grade fiction.) Don’t be put off by a book with "kids" in the subtitle. And what an ebullient book this is! I unapologetically laugh at this book’s humour. I like the short chapters with measurable progress in each one; I like the easy GUI programming to get us started; I like the computational study of probability and randomness. I could quibble over the order that some topics are introduced, and some of the forward references… but, you know what? I won’t. This author duo gets it. Bonus feature: that sneaky way of introducing mutability in Chapter 2. Bonus feature #2: SkiFree.


Who am I?

Some programmers learn through online articles, videos, and blog posts. Not me. I need a throughline—a consistent, expert distillation of the material to take me from where I am to where I want to be. I am not good at patching together information from disparate sources. I need a great book. I have a PhD in computer science education, and I want to know what helps people learn. More importantly, I want to know how we can use such discoveries to write more effective books. The books I appreciate most are those that demonstrate not only mastery of the subject matter but also mastery of teaching.


I wrote...

Learn to Code by Solving Problems: A Python Programming Primer

By Daniel Zingaro,

Book cover of Learn to Code by Solving Problems: A Python Programming Primer

What is my book about?

You want your slippers to be fuzzy – not your grasp of Python programming. Build a rock solid Python programming foundation from an author who has built their career studying how students learn. Solve problems all the way through. Check your progress with Test Your Understanding questions. Practice solving new problems with full sample solutions. Wanna master Python power features like lists, dictionaries, and sets? Wanna know how to write code that’s fast? Wanna develop the skills that will help you become not only a Python expert but an expert in whatever programming language you want to learn next? It’s all here. Let’s roll!

Get Programming

By Ana Bell,

Book cover of Get Programming: Learn to Code with Python

Bell is an expert teacher. I like the order of topics; the breakdown of topics into units; the short, targeted lessons in each unit; the varied capstone projects to tie things together; the explicit learning goals; the structured approach to solving problems. The first bit of code that you’ll write is on page 30. Your first complete program is on page 60. What’s up with those first 59 pages, then? Motivation, comparisons to daily life, setup, and building blocks. Things that other authors tend to skip but that may be important for some learners. Bonus feature: “I try not to forget what it’s like to start learning to program from scratch, no matter how many times I teach the course.”


Who am I?

Some programmers learn through online articles, videos, and blog posts. Not me. I need a throughline—a consistent, expert distillation of the material to take me from where I am to where I want to be. I am not good at patching together information from disparate sources. I need a great book. I have a PhD in computer science education, and I want to know what helps people learn. More importantly, I want to know how we can use such discoveries to write more effective books. The books I appreciate most are those that demonstrate not only mastery of the subject matter but also mastery of teaching.


I wrote...

Learn to Code by Solving Problems: A Python Programming Primer

By Daniel Zingaro,

Book cover of Learn to Code by Solving Problems: A Python Programming Primer

What is my book about?

You want your slippers to be fuzzy – not your grasp of Python programming. Build a rock solid Python programming foundation from an author who has built their career studying how students learn. Solve problems all the way through. Check your progress with Test Your Understanding questions. Practice solving new problems with full sample solutions. Wanna master Python power features like lists, dictionaries, and sets? Wanna know how to write code that’s fast? Wanna develop the skills that will help you become not only a Python expert but an expert in whatever programming language you want to learn next? It’s all here. Let’s roll!

Or, view all 23 books about computer programming

New book lists related to computer programming

All book lists related to computer programming

Bookshelves related to computer programming