Jump to ratings and reviews
Rate this book

100 Java Mistakes and How to Avoid Them

Rate this book
Dodge the common mistakes that even senior developers make, take full advantage of static analysis tools, and deliver robust and error-free Java code.

Inside 100 Java Mistakes and How To Avoid Them you will learn how


Whenever you make a mistake writing Java, it’s almost guaranteed that someone else has made it before! In 100 Java Mistakes and How To Avoid Them you’ll learn about the common and the not-so-common antipatterns, errors, and tricky bits that trip up almost every Java developer. Discover the bugs that are hiding in your Java code, and explore useful and effective ways to dodge them—from unit tests and defensive coding to static analysis tools like IntelliJ IDEA, SonarLint, and Error Prone.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology

Minor bugs you might not notice when writing code can quickly spin out of control in production, costing you time and money to fix. The solution is spot the mistakes before you make them! This one-of-a-kind guide makes it just that easy. It shines a spotlight on the errors most often made by Java developers, so you can consistently deliver exceptional Java code.

About the book

100 Java Mistakes and How To Avoid Them shows you how to improve your Java code by identifying and dodging common programming problems. Inside, you’ll find one hundred errors, from missteps that trip up beginners to mistakes even Java experts don’t know they’re making. Each mistake is accompanied by concrete troubleshooting advice, as well as ways of using modern static analysis tools like IntelliJ IDEA and SonarLint to identify and fix the problem. You’ll quickly see why static analysis can be so helpful for writing your code, and even learn how to write your own useful plugins!

About the reader

For Java developers of all skill levels.

About the author

Tagir Valeev is a technical lead in JetBrains GmbH, where he works in the Java team and gives Java language support in IntelliJ IDEA. Tagir designed and developed many code inspections for IntelliJ IDEA built-in static analyzer. He is a Java Champion, and holds a PhD in computer science.

352 pages, Paperback

Published April 30, 2024

7 people are currently reading
42 people want to read

About the author

Tagir Valeev

1 book5 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
9 (52%)
4 stars
5 (29%)
3 stars
2 (11%)
2 stars
1 (5%)
1 star
0 (0%)
Displaying 1 - 6 of 6 reviews
Profile Image for dantelk.
213 reviews20 followers
July 9, 2024
I believe writing a book is a bold move: By submitting the paper, a narrator claims that they have written some text worth of reading for hours by strangers. I think this book somehow lacked the elegance and 'a-ha' effect I was hoping for. It felt synthetic and unambitious - what you'd expect from a "classic engineering book".

Just as being a great programmer won't make you a good teammate, being a Java champion doesn't make a person a great writer either. I am sure the author has extensive tech knowledge, tough reflecting this on text requires something else.

2 stars is a bit harsh, and if the author was just in the same room as I am in now, probably I wouldn't give the book such a low score. But he's not at Küçükyalı, so here comes the two stars.

I think the main issue is, I felt that the author just opened the list of Sonar issues and starting giving examples from them one by one. Although I've taken some notes, I wouldn't think my thinking about Java OR programming techniques are improved as much as I expected them to after reading 350 pages.
1 review
May 2, 2024
When I picked this book I had the arrogance to think that it would have been just a way to revise concepts I already knew. After all, I have a 20 year experience as java developer! Well, I was wrong. Quite a few of the mistakes described caught me off guard. A big percentage of the remaining mistakes were familiar because I had encountered them in the code bases I had worked on. This is how useful this book is!
I really recommend it, no matter what your proficiency level is: you will be surprised.
The book is very effective both in describing the mistakes and in explaining the countermeasures to avoid them.
I am recommending this book to all my coworkers. If you care about being a top notch java developer, you should read it too.
Profile Image for Dmitry Aleksandrov.
1 review1 follower
October 14, 2023
I spent a few days with the wonderful book “100 Java Mistakes and How to Avoid Them”, written by my good friend Tagir Valeev. He is one of the few guys I know who really can think like a JVM! Definitely one of the best specialists in Java! His puzzler talks are always fun, intriguing, and full of quality knowledge. Now many of them are summarized in this book.
Although I have 20 years of experience with Java, I have still learned a lot from this book, how to use the right tools for certain situations and how to identify corner cases and avoid them.
Highly recommended book for all Java developers!
Profile Image for Andrzej Grzesik.
50 reviews6 followers
July 28, 2024
Good book, joins the recommendation shelf next to "Effective Java" and "Java Puzzlers".

The number of examples, and their consequences, and how to avoid - it's quite thorough.
Someone might say "knew this already" - good for them.
What Tagir gently introduces are some of the APIs which materialised in more recent JDKs - taking a very pragmatic view on how they can help, if available.
Profile Image for Andres Sacco.
28 reviews7 followers
April 30, 2024
A great book to improve the quality of the code and not introduce any mistake
Displaying 1 - 6 of 6 reviews

Can't find what you're looking for?

Get help and learn more about the design.