Best books for programmers - feature image

The Best Books for Programmers (Updated 2022)

Author image
by Sven WoltmannFebruary 5, 2022

In this article, I’ve compiled a list of the most relevant books for programmers.

These books are on the topics programming in general (hard skills and soft skills) and Java programming in particular.

Books for software developers are rarely suitable as audiobooks, as they often contain code examples and complex diagrams. Fortunately, there are a few exceptions. Therefore, I also indicate for each book whether it is suitable and available as an audiobook.

(Disclosure: As an Amazon Associate I earn from qualifying purchases.)

Contents hide

Books About Programming in General – Hard Skills

Agile Software Development: Principles, Patterns, and Practices

Book cover "Agile Software Development - Principles, Patterns, and Practices"

by Robert C. Martin

Link to the book at Amazon

In this excellent book, Robert C. Martin, also known as “Uncle Bob,” co-author of the agile manifesto, explains the core concepts of agile software development, Extreme Programming (XP), and Test-First Design (the predecessor of Test-Driven Design).

He shows how to write clean, maintainable code through agile design and the application of SOLID principles.

The author then demonstrates these principles and the application of well-known design patterns using three case studies developed in C++ and Java. I recommend that every programmer study these case studies intensively and implement them themselves.

The book is from 2002 and is available in a new edition from 2013, which I haven’t read yet.

Suitable as an audiobook? No. The book is full of source code and UML diagrams that are essential for understanding this book.

Clean Code: A Handbook of Agile Software Craftsmanship

by Robert C. Martin

Link to the book at Amazon

This classic software development book is, as the name suggests, about clean code: Code that not only works but, above all, is easy to read and maintain.

This includes:

  • meaningful names,
  • short functions that perform one task at a consistent level of abstraction,
  • meaningful (or no) comments (as opposed to comments that merely repeat what the code does, or worse, what it did once upon a time),
  • a consistent code style,
  • a clean class structure (this point is covered in more detail in the previously mentioned "Agile Software Development: Principles, Patterns, and Practices")
  • error handling that does not obfuscate the actual business logic,
  • unit tests, optimally test-driven in origin.

The principles presented are elaborated through several concrete Java case studies.

The book is easy to understand and entertaining to read through occasional anecdotes. Every developer should read this book and make the principles presented second nature.

The chapter on concurrency is unfortunately enormously simplified (without pointing this fact out). Modern optimizations such as instruction reordering and CPU cache effects are not addressed. Thus, after reading this chapter, the reader can quickly believe in deceptive security and produce subtle bugs that are hard to find afterward.

To gain confidence in writing concurrent applications, I highly recommend Brian Goetz's "Java Concurrency in Practice” to any Java developer.

Finally, a personal tip about code style: Don't make up your own style. Save yourself the countless discussions in your team and instead use an existing, widely used style for which there is documentation, checkers, formatters, and IDE plugins. A good example is Google's Java Style Guide and the associated tools.

Suitable as an audiobook? No! Even though this book inexplicably exists as an audiobook, it is not suitable as such due to the numerous code examples.

Extreme Programming Explained: Embrace Change

by Kent Beck and Cynthia Andres

Link to the book at Amazon

In this landmark classic from 1999 and 2005 (2nd edition fully revised with insights from five years), Kent Beck introduces the "Extreme Programming" he developed.

What sounds like common sense to today's software developers was revolutionary at the time and fundamentally changed the way we develop software. XP has led us to build software with better quality, less time, reduced cost, and higher customer satisfaction than twenty years ago.

The book presents and explains the core values and principles of XP – which were radical at the time – and the practices used to put those core values and principles into action. These include user stories and incremental design, test-driven development, continuous integration with rapid builds and feedback, and pair programming.

What must have been an inspiring book for all programmers in the dawn of agile software development is still interesting today. It is a history book that takes us to a time when XP, the origin of modern agile methods, came into being.

Suitable as an audiobook? It would be suitable as an audio book but is not available as such.

Refactoring: Improving the Design of Existing Code

by Martin Fowler

Link to the book at Amazon

With this classic software development book, Martin Fowler introduced in 1999 the topic of "refactoring", which was already known in the SmallTalk community then, to a broad developer community.

The book first describes the basic principles of refactoring and illustrates them with an introductory example.

The motivation for refactoring is usually a "code smell", i.e., code that works but is difficult to read and maintain. By naming and describing widely used code smells, Fowler also brought them to the attention of the developer community.

The largest part of the book comprises the catalog of over 60 refactorings. For each refactoring, the author describes the motivation (i.e., the situation in which it is to be applied), explains the functionality step-by-step, and demonstrates it vividly using JavaScript code examples.

This is where the changes in the second edition become clear: Fowler has not merely superficially polished the book but has extensively updated the entire catalog. Thus, he has renamed, consolidated, added refactorings, and replaced the Java examples with JavaScript variants. He provides appropriate notes where differences arise from using weakly vs. strongly typed programming languages.

Refactoring is not light reading (I had to keep pausing at the advanced refactorings) – yet I consider it a timeless must-read for all software developers.

For beginners, it is an excellent introduction to the subject. And professionals, for whom refactoring has been part of the TDD cycle for years and who know every refactoring shortcut in their IDE by heart, will learn a new refactoring or two – or find that refactorings they've done intuitively also have a name and a formal process.

Suitable as an audiobook: No, and fortunately, it is not available as such.

Growing Object-Oriented Software, Guided by Tests

Book cover "Growing Object-Oriented Software, Guided by Tests"

by Steve Freeman and Nat Pryce

Link to the book at Amazon

This book provides a practical introduction to Test-Driven Development (TDD), especially in object-oriented programming.

The authors (one of whom is the developer of jMock) explain how unit tests and mock objects lead to a clean object-oriented design with reliable and maintainable code.

In a case study, they design and implement an auction system in Java with a test-driven approach.

I particularly recommend this book to every Java programmer. Once you’ve experienced how tests lead to more elegant design and code, you’ll never want to develop without them again.

Suitable as an audiobook? No, due to numerous code examples.

Clean Architecture: A Craftsman's Guide to Software Structure and Design: A Craftsman's Guide to Software Structure and Design

clean architecture robert c martin

by Robert C. Martin

Link to the book at Amazon

According to Uncle Bob, good architecture is characterized by the fact that software can be adapted to new and changing requirements with minimal effort – and thus has a long and profitable life.

First, the book gives an introduction to the basic principles of software design (SOLID principles), principles of component design (cohesion and coupling), and metrics for evaluating the design (Efferent and Afferent Coupling, Instability, Abstractness). All of the principles and metrics were described by Uncle Bob back in 2002 in "Agile Software Development: Principles, Patterns, and Practices"; for the most part, complete sections were simply copied.

The focus of the book is on the deduction and description of what Uncle Bob calls the "Clean Architecture":

At the software's core are the domain-oriented components, such as entities and use cases. Those are clearly separated from so-called "secondary components" – technical implementation details such as databases, user interfaces, or frameworks. All dependencies flow from the technical details to the core. This is achieved by Dependency Inversion at the component borders.

Decoupling makes it easier to test components. Technology decisions (such as which persistence technology or dependency injection framework to use) can be postponed – or revised relatively easily later in the project.

Numerous practical examples help to understand the theory. And like all of Uncle Bob's books, this one is peppered with numerous anecdotes from the author's professional life – all the way back to the 1970s. These anecdotes are not only entertaining, but also help to understand the long evolutionary path to modern software architecture.

All software architects and programmers should have read "Clean Architecture" – not only to implement modern software architectures – but also to understand the theoretical foundations behind it.

Suitable as an audiobook? No, due to numerous diagrams and code examples.

Get Your Hands Dirty on Clean Architecture: A hands-on guide to creating clean web applications with code examples in Java

get your hands dirty on clean architecture

by Tom Hombergs

Link to the book at Amazon

What is hexagonal architecture? What are its advantages? And how do you implement a hexagonal application in Java? Tom Hombergs answers these questions in "Get Your Hands Dirty on Clean Architecture".

The author first describes the problems of the classic layered architecture and explains how the "Clean Architecture" described by Robert C. Martin and the "Hexagonal Architecture" introduced by Alistair Cockburn (which is comparable in principle) can better meet the requirements of a modern application (maintainability, adaptability, extensibility) – namely by placing the business domain (and not technical details) at the center of the architecture.

After a short theory follows the practice: Step by step, the author develops an exemplary Java application with entities, use cases, ports, and adapters. He presents different mapping strategies for the adapters and discusses their advantages and disadvantages.

He details how to cut and test components and proposes a package structure that makes the architectural style visible.

After all application components are finished, the author shows how they can be assembled – firstly with pure Java and secondly using the Spring Framework. Thus, he impressively demonstrates that even the implementation of dependency injection can be merely an interchangeable detail of the software.

After that, the author shows how the application can be modularized using separate build artifacts, e.g., Maven modules, so the architectural style cannot be easily bypassed. Unfortunately, the author does not address how the Java module system could also perform this task.

Finally, he discusses what shortcuts we can take when mapping between layers and what technical debt we need to be aware of.

The book is excellently structured and written understandably and concisely throughout. The author has managed to fit into just 138 pages what takes up more than four times the space in "Designing Hexagonal Architecture with Java". An outstanding achievement!

Suitable as an audiobook? No, due to numerous diagrams and code examples.

Clean Craftsmanship: Disciplines, Standards, and Ethics

by Robert C. Martin

Link to the book at Amazon

In his latest book, Uncle Bob teaches us the basic practices and principles of software craft that every professional programmer should know and follow.

The book consists of three parts:

Part 1, "Discipline", describes five core disciplines of Extreme Programming (XP): test-driven development (TDD), refactoring, simple design, pair programming, and acceptance testing.

TDD takes up almost half of the book. Uncle Bob lets us look over his shoulder as he solves test-driven several katas (also available as videos).

Part 2, "Standards", is about how to continuously balance high productivity with stable quality; it's about effort estimates in the form of probability distributions and the courage to say no when the boss wants to impose his unrealistic schedule on us.

Part 3, "Ethics", is about our responsibility to our users, our colleagues and managers, society, and – last but not least – ourselves. By consistently writing robust and effective code, we avert harm and build trust in our work.

Like all of Uncle Bob's books, this one is highly recommended. It's easy to read and, as always, is lightened by historical background and many of the author's anecdotes (though many are repeated throughout his works).

Suitable as an audiobook? The book is not currently available as an audiobook. Should this change (other works by Uncle Bob are available as audiobooks), I would advise against it due to the numerous code examples and diagrams in Part 1 (which, after all, comprises two-thirds of the book).

Design Patterns: Elements of Reusable Object-Oriented Software

Book cover "Design Patterns - Elements of Reusable Object Oriented Software"

by Erich Gamma, Richard Helm, Ralph E. Johnson, John Vlissides

Link to the book at Amazon

Every programmer should actually have read this classic. “Actually,” because it is written in a very academic style and therefore difficult to read – especially if you’re a non-native speaker and read it in the original English edition.

It describes some of the most relevant design patterns (if not the most relevant ones of all) and their relationships with each other in great detail.

You’ll notice that the book is already 25 years old: the code examples are partly outdated from today’s point of view, and they entirely ignore newer aspects like concurrency. Nevertheless, every programmer should have this work on his bookshelf and know, recognize, and apply the classic 23 design patterns.

If you prefer something more practical, I recommend the online course “Java Design Patterns” by Dr. Heinz Kabutz, author of the well-known JavaSpecialists’ newsletter.

Suitable as an audiobook? No, due to numerous code examples and diagrams.

Pattern Hatching: Design Patterns Applied

Book cover "Pattern Hatching - Design Patterns Applied"

by John Vlissides

Link to the book at Amazon

This book by one of the four authors of the classic “Design Patterns” gives insights into the development process and describes the ten biggest misunderstandings about design patterns.

Frequently used design patterns are explained using practical examples – in contrast to the very academic approach in the classic. Variations of established patterns are presented, as well as two entirely new design patterns.

You don’t necessarily have to read this book, but for me, it was a very pleasant and much easier to digest read after having worked through “Design Patterns.”

Suitable as an audiobook? No, due to numerous code examples and diagrams.

Working Effectively with Legacy Code

by Michael C. Feathers

Link to the book at Amazon

Tests are important. And Test-Driven-Development leads to well-tested, well-structured software. Of course, every programmer knows that nowadays. Unfortunately, this has not always been the case. And so, we are often faced with the challenge of working on a system without tests – a "legacy system" by Michael Feathers' definition.

But how do we proceed if we don't have test coverage to ensure that our changes don't break anything? And if, on the other hand, we can't write these tests because the code is too complex, contains far too many dependencies, and logic and presentation are intertwined?

What can we do if we can't instantiate the class under test because we have to pass an object to its constructor that we can't easily create? Or if the method under test accesses the database – even though that database access isn't necessary for the functionality we want to test?

This book contains a catalog of mechanisms to locate and break these dependencies. And to consequently modularize the code, creating module boundaries – so-called "seams" – where we can apply our unit tests.

The presented strategies allow you to make changes with minimal risk. Today, using the refactoring features of modern IDEs, you can perform many of these changes fully automated. These changes allow you to implement initial tests. And based on these, you can perform more far-reaching refactorings that ultimately transform the codebase into a better design.

The author explains all strategies using excellent, real-world examples, written primarily in Java and C++.

Unfortunately, the book has not been updated in 15 years. In particular, inexperienced programmers should take care not to implement every strategy dogmatically. For some mechanisms, there are better alternatives nowadays; some practices lead to worse, instead of better code; and the issue of thread safety – a core issue in most enterprise applications today – is entirely left out.

For example, these days, you don't need an interface for every class you want to mock. Mockito can easily mock classes, i.e., resolve dependencies without extracting an interface. And if you do extract an interface, please follow the Interface Segregation Principle! The author's statement, "it's nice to have an interface that covers all of the public methods of a class" (p. 366), is unfortunately in stark contradiction to this.

Invoking abstract methods from a constructor ("Extract and override factory method") is better avoided if you don't want to suddenly be faced with an object that is only partially initialized. It is for good reason that C++ forbids this practice. Fifty-five pages after the introduction of this strategy, the author finally advises against its use in Java.

Multithreading is not a topic in almost any of the older classics. Nowadays, no programmer can get around it. If you extract a class using strategies such as "Break Out Method Object", you should, therefore, add a hint that the class is not thread-safe. (Alternatively, you can protect instance variables by suitable lock mechanisms).

Despite the age-related weaknesses mentioned, I can recommend the book to any programmer who has to work with legacy code. Experienced programmers have certainly used one or the other strategy intuitively before. Other techniques may be new. Either way, the formalization helps to reinforce the strategies, and their names improve team communication.

Just keep two things in mind: the book is 15 years old, and there is an exception for every rule!

Suitable as an audiobook? No, due to numerous code examples.

The Pragmatic Programmer: From Journeyman to Master

The Pragmatic Programmer: From Journeyman to Master - Book cover

by Andrew Hunt and David Thomas

Link to the book at Amazon

This book contains concentrated, practical experience from several decades of programming practice. It presents the best practices and the major pitfalls of many aspects of software development concisely and with numerous practical examples. The focus is on creating high-quality, i.e., working, flexible, reusable, and maintainable code.

The book is suitable for both beginners and advanced programmers.

Beginners find valuable knowledge in this book that would otherwise take them years or decades to build up through their own experience (although the book cannot replace that experience, of course).

Advanced programmers can find their own experience in this book in a structured form, consolidate and deepen it – and most probably take some additional tips with them.

In addition to numerous anecdotes and analogies, each section contains practical exercises, with solutions at the end of the book. A book that every programmer should read.

Suitable as an audiobook? No, due to numerous code examples and exercises.

Books About Programming in General – Soft Skills

The Clean Coder: A Code of Conduct for Professional Programmers

by Robert C. Martin

Link to the book at Amazon

An exceptional programmer does not equate to a professional.

In "Clean Coder," software expert Robert "Uncle Bob" Martin describes the mindset and behaviors beyond writing code necessary to become a professional programmer.

He shares plenty of practical advice for both beginners and advanced programmers, such as:

  • How to behave professionally under pressure?
  • How do you react when your boss demands that a task be completed faster than you think is possible?
  • How can you reliably estimate effort?
  • Which tests should one write, and when?
  • How do you behave professionally towards your teammates?

You can tell that the author draws from a hard-earned wealth of experience. But you don't always have to agree with him.

For example, I don't think the flow state has more disadvantages than advantages. I can also get into the flow during pair programming. And it's OK to find a solution alone in flow and then reprogram it in pair.

The book contains many personal, entertaining anecdotes from Bob's long career. For younger readers, though, the stories from the 60s and 70s, when people still worked with punch cards and teleprinters, might be a bit too antiquated ;)

A must-read for anyone who wants to call themselves a software professional.

Suitable as an audiobook? Yes! This is one of the few programming books about practices beyond the actual code. You won't find a single line of source code or a single UML diagram in this book. It is therefore absolutely suitable as an audiobook.

Clean Agile: Back to Basics

by Robert C. Martin

Link to the book at Amazon

In February 2001, 17 programmers – among them Robert C. Martin, a.k.a. Uncle Bob – met to bring various lightweight software development processes (XP, Scrum, and others) to a common denominator. The result was the now-famous Agile Manifesto.

But what many call "agile" these days – with its excessive focus on process but neglected technical practices – is a far cry from what the creators had in mind back then.

The mission of this book is to get the facts straight and provide an overview of the original agile views, ideas, values, and principles.

Uncle Bob writes – as always – casually and entertainingly, rounding out the historical narratives with numerous personal anecdotes.

A definite recommendation for any programmer.

Suitable as an audiobook? Yes! There is not a line of code in the whole book and only two exemplary diagrams: a velocity and a burn-down chart. You can quickly google both of them.

The Passionate Programmer: Creating a Remarkable Career in Software Development

Book cover "The Passionate Programmer - Creating a Remarkable Career in Software Development"

by Chad Fowler

Link to the book at Amazon

This book gives software developers numerous helpful and practical tips for professional success and career development.

The author describes which technical skills you should have as a programmer, how you should develop yourself technically, but also how you should not leave your career path to chance, and instead take your personal development into your own hands, pursue your own goals and remain motivated to realize them.

In particular, he describes how you should market yourself as a programmer and gives numerous short recommendations for action.

Suitable as an audiobook? Yes, but the book is currently not available as such.

Soft Skills: The software developer’s life manual

Book cover "Soft Skills - The software developer's life manual"

by John Sonmez

Link to the book at Amazon

In this book, developer and blog author John Sonmez gives helpful advice on building the soft skills a developer should have, and which lead to a more satisfying life as a professional software developer.

It’s all about career development, self-marketing, learning, productivity, investment strategies, and financial security, fitness, and mental health – all from a software developer’s perspective.

For a change, if you would like to read a book for programmers without source code and diagrams, I can recommend this book.

Suitable as an audiobook? Yes, absolutely. I particularly like the fact that John Sonmez reads his books himself and repeatedly adds a few paragraphs that are not in the book.

The Complete Software Developer’s Career Guide

Book cover "The Complete Software Developer's Career Guide"

by John Sonmez

Link to the book at Amazon

This book is a comprehensive guide to a successful career in software development.

It answers questions from all levels of the development career: How do I start my career? How do I get a job? In which direction can and should I specialize? How do I deal with superiors and colleagues? How do I earn a promotion? How do I develop myself?

The book is written in a simple and entertaining form, enriched with personal anecdotes, and it is enjoyable to read.

Suitable as an audiobook? Yes, absolutely. I particularly like the fact that John Sonmez reads his books himself and repeatedly adds a few paragraphs that are not in the book.

Books About Java Programming

Effective Java (Third Edition)

Effective Java - Third Edition - Buchdeckel

by Joshua Bloch

Link to the book at Amazon

In this book, Joshua Bloch has compiled the most important dos and don'ts of Java programming:  Best practices that help you write efficient, readable, and maintainable – and therefore future-proof – software.

The book is primarily aimed at experienced Java programmers – good knowledge of the language is required.

Some of the practices you probably already use in your daily life; others may be new to you and help you take your skills to the next level.

The book contains 90 articles ("items") divided into 11 topics. A lot of material – but you can get to grips with it bit by bit. The items each represent a self-contained unit.

Each article contains specific, easy-to-understand advice, accompanied by concise, clear source code examples.

Every Java programmer should have read this book. I recommend reading the book once entirely, and then, if you have to solve specific tasks in your daily programming routine, consult the corresponding articles again.

When buying this book (especially if you purchase second-hand), make sure that you acquire the current, third edition! The second edition is based on Java 6 and is no longer up-to-date.

Suitable as an audiobook? No, because of the numerous code examples.

Mastering Lambdas: Java Programming in a Multicore World

Book cover "Mastering Lambdas - Java Programming in a Multicore World"

by Maurice Naftalin

Link to the book at Amazon

Mastering Lambdas is an excellent book about Lambdas and Streams, introduced in Java 8. Despite their presence in the title, Lambdas occupy only about the first quarter of the book. The major part describes Streams: how to use them, how to create them, and how to terminate them using Collectors and Reducers.

I recommend this book to both beginners and advanced users. Beginners can use the book as a step-by-step introduction to the functionality of Lambda and Streams. Advanced readers learn how to develop Spliterators to generate streams as well as custom Collectors and Reducers.

Suitable as an audiobook? No, due to numerous diagrams and code examples.

Java Generics and Collections

Book cover "Java Generics and Collections"

by Maurice Naftalin and Philip Wadler

Link to the book at Amazon

While these days, most Java developers can skip the book’s introduction to generics, the book quickly addresses advanced topics such as Subtyping, Wildcards, Wildcard captures, and Bounds – topics that every Java programmer has probably had to deal with before, but has usually walked through compiler errors rather than knowing what they did.

In the second part of the book, the author presents the essential Collection interfaces and classes of the Java Collection Framework – Sets, Queues, Lists, and Maps, as well as their implementations – and compares them regarding concurrent programming and performance.

Any advanced Java programmer should be familiar with these topics.

Suitable as an audiobook? No, due to numerous code examples.

Java Concurrency in Practice

by Brian Goetz, Tim Peilers, Joshua Bloch, Joseph Bowbeer, David Holmes, Doug Lea

Link to the book at Amazon

Writing scalable applications that use the capabilities of today's multi-core CPUs while running reliably and with high performance is a challenge. Race conditions, deadlocks, and other liveness errors quickly creep in.

Brian Goetz and a team of experts from Java Specification Request 166 "Concurrency Utilities" describe in "Java Concurrency in Practice" the fundamental concepts of thread safety and the correct implementation of thread-safe applications in Java.

The book is divided into four parts:

  1. The first part is about basics like atomicity and visibility, intrinsic locks ("synchronized"), safe publication of objects, thread-safe composition, and concurrency building blocks concurrent collections and synchronizers like semaphores, latches, and barriers.
  2. The second part is about parallelizing applications using tasks and the executor framework. It explains the configuration of thread pools and the safe termination of tasks, threads, thread pools, and applications.
  3. The third part is about liveness (deadlocks, livelocks, thread starvation), measuring performance and improving it by reducing lock contention, and writing tests for concurrent algorithms.
  4. The fourth part covers advanced topics such as explicit locks, condition queues (wait/notify), atomic variables, non-blocking algorithms, and the Java Memory Model. Building on this, the functionality of many of the topics presented in part one, such as object publishing, concurrent collections, and synchronizer classes, is explained.

All explanations are accompanied by excellent real-world code examples. Most show frequently made but incorrect implementations first, followed by the correct ones.

The authors successfully explain an extremely complex topic in a relatively simple way. Of particular note is the excellent explanation of the Java Memory Model and the "happens-before" relationship.

Nevertheless, the book is not an easy read, and it takes time to understand all the details. I recommend reading the book at least twice.

Even though the book is on the level of Java 6, it is still up-to-date. The basics of thread safety have not changed since, and all features added in later Java versions (like the fork/join framework, CompletableFuture, or parallel streams) are based on them.

Suitable as an audiobook? No, due to numerous extensive code examples.

P.S.: If you want to go deeper into the advanced topics and read about specific types of memory fences and advanced memory access methods like release/acquire and opaque, I recommend Doug Lea's "Concurrent Programming in Java" as a follow-up reading.

Concurrent Programming in Java: Design Principles and Pattern, 2nd Edition

by Doug Lea

Link to the book at Amazon

Concurrency has always been a first-class citizen in Java. Threads, monitors (keyword "synchronized"), and guarded blocks ("wait"/"notify") have been part of the language since Java 1.0.

"Concurrent Programming in Java" is from 1999 and thus on the level of Java 1.2. Nevertheless, the described challenges of concurrent programming (security, liveness, performance) are still relevant today. So are the presented principles and design patterns, like synchronization and confinement, monitors, guarded waits and notifications, latches, worker threads, futures, fork/join, and many more.

Abstracting from this, the author introduces more complex, reusable utility classes for initiating and coordinating concurrent activities. Most of these classes are today – in an evolved form – part of the JDK. In the JavaDoc of these classes (e.g., Semaphore, ReentrantLock, Executor, or CountDownLatch – and in newer ones like CompletableFuture or StampedLock), you will find the signature of Doug Lea, the author of this book.

The book is not a light read. The writing style is academic and highly challenging. I had to read many paragraphs more than once and keep cross-referencing to other parts of the book to understand. With the examples, it is sometimes advisable to read the theory first, then the source code, and then the theory again. Every few pages, you have to take a break.

It took me several weeks to work through the entire work. But it is definitely worth the effort!

Once you have internalized the basics of this book, you will be able to write performant, thread-safe code and quickly recognize non-thread-safe code as well as the causes of race conditions. That will make you one of the most sought-after Java programmers.

Suitable as an audiobook? No, due to numerous diagrams and code examples.

Bad Tests, Good Tests

by Tomek Kaczanowski

Link to the book at Amazon

Tests and test-driven development (TDD) have arrived in most IT teams. Tests are supposed to assure the correct behavior of new and existing features, to survive refactorings unscathed, as documentation to make it easier for new developers to get started with the code, and – on top of that – lead to clean(er) code.

Unfortunately, many tests are not worth the time spent developing them. They are poorly readable and maintainable. And they often need adjustments during refactorings because they don't verify the result of an operation but how the operation was executed.

Bad Tests, Good Tests uses numerous examples (about half of the book contains code) to explain what constitutes bad tests – examples as the author has found them in real projects. The author then contrasts each example with specific suggestions for improvement.

The range of shortcomings goes from poor readability (e.g., long setup or assertion blocks) and obvious errors (e.g., forgotten assertions) to incomplete tests (that don't fail despite functionality changes) and subtle errors (e.g., exceptions thrown in places other than expected) to completely useless tests (that, e.g., verify the test library instead of your code).

The book is exceptionally hands-on and suitable for both beginners and advanced developers.

Beginners don't have to repeat the mistakes that others have made before them. Advanced programmers will surely recognize one or the other anti-pattern from their daily work and can fill their toolbox with new techniques.

The author writes understandably and humorously. And he explicitly points out that one may also break his rules if it serves the cause in the individual case.

A clear recommendation for every Java developer.

Suitable as an audiobook? No, due to countless code examples.

Bonus: Novels

Mostly I read technical books. But now and then, when I get a good recommendation, I also read a novel. I want to recommend some of the books that fascinated me most:

The Phoenix Project: A Novel About IT, DevOps, and Helping Your Business Win

Book cover "The Phoenix Project - A Novel About IT, DevOps, and Helping Your Business Win"

by Gene Kim, Kevin Behr, George Spafford

Link to the book at Amazon

An entertaining and insightful story about the transformation of an old, traditional IT department into a modern agile DevOps team.

Bill is appointed head of the IT department and is to help the “Phoenix” IT project, which is under massive pressure from features and deadlines, to succeed. He is confronted with problems that many of us know only too well: Uncompleted features planned months in advance; manual deployments that go wrong and keep the operations department awake night after night; developers who blame operations and vice versa; employees who turn directly to developers – bypassing all processes. Bill has 90 days to fix the mess; otherwise, his department will be outsourced.

Suitable as an audiobook? Yes, absolutely.

The Unicorn Project: A Novel about Developers, Digital Disruption, and Thriving in the Age of Data

The Unicorn Project - Buchdeckel

by Gene Kim

Link to the book at Amazon

"The Unicorn Project" is set in the same location and time as "The Phoenix Project". It tells the story not from a management point of view, but from the perspective of top programmer Maxine, who is transferred to the Phoenix project as punishment.

There she tries to compile the Phoenix project and encounters problems that most of us know only too well: lack of documentation about setting up the development environment, missing accesses, insufficient tests, non-existent build and deployment automation, inadequate infrastructure – both for testing and production.

Maxine's determination and perseverance help her get closer to her goal step by step. In doing so, she encounters a secret underground organization, the "Rebellion", which has the goal of replacing outdated approaches with modern software development principles.

Like its predecessor, the book shows what is possible when a traditional company is open to the necessary changes of the digital age. It is entertaining, easy to read, and it is pleasant to meet some familiar characters again.

Suitable as an audiobook? Yes, absolutely.

Project Hail Mary

by Andy Weir

Link to the book at Amazon

A man wakes up to find himself in a spaceship, light-years from Earth, with two dead bodies next to him. He can neither remember his name nor how and why he got into this spaceship or where it is flying to.

In several flashbacks, main character and reader alike gradually learn what happened.

And that's all I want to give away about the plot.

The novel contains numerous scientific-technical subtleties – for some readers, this might be going too far – for us programmers, it's just right :)

Be warned, though: the physical explanations are not always completely watertight. Sit back, enjoy the story, and don't try to get to the bottom of all the physical details.

All in all, it's an original, exciting, slightly humorous science fiction story that I recommend to every reader of this website.

Suitable as an audiobook? Yes, absolutely.

Ender’s Game

Book cover "Ender's Game"

by Orson Scott Card

Link to the book at Amazon

Ender’s Game is the first part of a science fiction epic and, for me, one of the best novels I’ve ever read.

The story is about a young boy, Ender, being recruited for a training program to defend Earth against a threatening invasion by an alien species.

I don’t want to tell you more about the plot. There are several follow-up novels – the first four parts are also available as a set: The Ender Quartet.

Suitable as an audiobook? Yes, including the sequels.


Book cover "Seveneves"

by Neal Stephenson

Link to the book at Amazon

An epic science fiction story that feels like a work comprising several novels, and that captivated me from beginning to end. Something completely different than I’ve known before.

I don’t want to tell anything about the story so as not to take the tension away. I also recommend not reading the description on Amazon, because, in my opinion, it reveals too much. Barack Obama and Bill Gates both recommended this book.

The book has “only” 4.1 stars at Amazon – a rating that I cannot comprehend. Most readers criticize that the author describes technical correlations in too much detail. I liked that, and therefore, it is a definite recommendation for every other programmer.

Suitable as an audiobook? Yes.