As for the book review, I actually do not want to write it, because everyone has his own standard, everyone has his own Hamlet in his eyes, whether it is good or bad, everyone has different opinions. If you have mastered the for the knowledge in the book, you just want to use it as a kind of knowledge in series of memory, so you might be interested in the knowledge framework and system of the whole book context, so if the knowledge in the book is coherence, can weave in your mind you want to remember a blueprint, so I believe that it is not so good for you; If you want to use it as a gateway to a new world, and you want to learn about the mysteries of concurrent programming, I’m sure it will be a good book for you to expand your depth of knowledge. It’s also a good book if you’re reading it for an interview, because most knowledge is a test point for an interview.

I’m going to walk you through the book from the top.

Front knowledge

First of all to mix a face familiar, I believe that we are not unfamiliar, the book!!

First of all, the book was written by three people, all of whom are Ali people, and LET me show you a picture of what all three people wrote.

If it is a book written by three people together if you can’t do it to the whole book context has the accused of words, will be in the deaf hear mute said the blind saw a ghost on the logic cannot be self-consistent situation, but I can see it from books, publishing house and the veins of the teacher in the whole knowledge system strictly control the above done, but I think almost.

I will try to interpret the book as objectively as possible.

The first chapter, the Challenges of concurrent programming, is a good idea. It introduces the main points of the book, gives the reader an overview of the problems associated with concurrent programming, and then goes to the pain point of concurrent programming: the performance bottleneck.

And then the second chapter goes straight into the underlying implementation of Java concurrency, which I think is debunking, but from an intensive reading point of view, it’s ok, and for those of you who have some foundation in Java concurrent programming and want to get to the bottom of Java concurrency, It’s easy to catch your eye. But for those of you who haven’t done concurrent programming yet and just want to learn about Java concurrency, this second chapter is a direct way out. To be honest, WHEN I first started reading this book, I went straight to my monitor.

So it’s a question of choice, and the deeper question is: What kind of reader do you want to present?

And then we’re going to assume the first case, which is for those of you who have some foundation in Java concurrent programming and want to get a deeper understanding of the underlying implementation of Java concurrency, those of you who I’m sure will just call out yyds because this chapter is really amazing, The ability to write such content benefited from teacher Fang’s one hundred years of persistence and long-term knowledge accumulation in the front line of struggle. The link between chapter 1 and Chapter 2 is like you just learned that 1 + 1 = 1, and then you have to argue why 1 + 1 = 1?

There is no ???????

Chapter 2 takes us straight from volatile to synchronized, from object headers to locks, from CAS to ABA, and from atomic operations to memory barriers. It’s amazing.

However, the second chapter for some details of the polish is still a little poor, such as in the lock upgrade section of the flow chart is not so obvious, anyway, I read the picture, and then combined with a lot of online reference to see a little. Still have is fang teacher come up to speak application and bottom principle directly, do not have foreplay??? What is volatile? Well, I think it should also be drawn from a simple little example.

Then in chapter 3, we switch players and go straight to the hard stuff. This chapter starts with the memory model, and discusses the memory semantics of volatile, final and synchronized, as well as the as-if-serial and happens-before principles. That’s all I can say about what the Java memory model is and what jSR-133 changes to the memory model.

But, again, some of the content in this chapter should have been translated from a foreign language website, and a lot of it is a little stiff, it feels like a pile up, not a lecture. I think this style of explanation is not as sharp as Teacher Fang, can directly cut to the point. I read this chapter well at the beginning, but in the second half of this chapter, I felt obviously difficult, I don’t know whether it is my food or what, watching it and obviously feel sleepy, I don’t know what the friends in front of the phone/computer think.

After the third chapter, look at the fourth chapter, it feels a bit of a small meaning, why Java concurrent programming foundation in the fourth chapter ?????? Why should the foundation be placed ?????? behind the underlying implementation Isn’t that putting the cart before the horse? If you look at the table of contents first and go straight to Chapter 4, that’s fine. If you move from Chapter 1 to Chapter 4, you’re probably wondering, what the hell is life? I really don’t understand why the foundation should be put in chapter 4. Part and the fourth chapter that many of them are about, let me have to suspect that the player should not how to write articles, my side these public primary, in doing good, have some of the original main flow, it is impossible to write the article so that piled up a lot of code, and the interpretation of the area, it is useless, I really recommend the author to read the Java Concurrent Programming Practice again.

In chapter 5, I finally realized that it’s best not to read this book without some Java concurrency basics, because it’s easy to get overwhelmed.

Chapters 6 through 11 are a little bit too basic, and if the book is meant to give you an in-depth understanding of concurrency, it doesn’t cover a lot of source code, but for those of you who haven’t done concurrent programming and just want to learn about Java concurrency, Is a understanding of Java concurrent with a better reference books and reference books, for those who want to interview back to the same students.

Interviews are usually divided into four stages:

  • Do you know XXX? Have you ever used XXX? (Ask to see if you have contact, generally did not contact will not ask this direction)
  • How do you use XXX in your daily development? (Again, judge whether you have been in contact with the application, if you can answer the application situation, will continue to ask, otherwise the interviewer thinks you are cheating)
  • Do you know the principle of XXX? (If you ask the principle, you can judge whether you have studied this in private, you can answer how XXX works, such as the principle of thread pool, you can answer the working mechanism of thread pool)
  • You might be asked more detailed questions at the end, such as what is the put process for a HashMap? (This requires familiarity with the source code)

So, this book to bring knowledge is limited to the first three points, in fact, from the industry as a whole, I have not seen any authors of the source code out into a book, so this is the direction of our programmer efforts.

Here are some of the articles I wrote about concurrency:

2W words + 40 pictures take you to understand concurrent programming!

I’ve been working for three years. I should know how to write concurrently.

Atomic XXX

Understand CountDownLatch usage and source code!

Semaphore, this is it?

I really don’t want to learn happens-before!

Cxuan won’t even bother with these 10 questions…

Lots of synchronized crap!

volatile

After this thread pool, I coughed up blood

Has the explanation, has the source code, has the case, is not to learn a wave

Why is this book good?

So why is this book good?

Because this book is in line with the tone of our Chinese people, after all, is from the Hands of the Chinese, this book is different from the “Java concurrent programming combat”, Java concurrent programming combat more attention is “how to write excellent concurrent code”, and “Java concurrent programming art” is more around the Java underlying knowledge to explain, They have different priorities. After all, concurrent programming practice is written by foreigners, and the translation process will lose some of the charm of the original book, so try to read the original book, it is best not to wear second-hand shoes.

Java concurrent programming art atmosphere, but also compare joint today’s interview now you know the interview is all sorts of eight-part essays all rushed directly, this interview made the rockets this way all of us, but also unable to change this situation, so can only adapt to, and this book is a let you better adapt to the eight-part essay writing an interview of a book. As I said above, there are a few chapters in the book that are quite good, and if you understand these chapters, you are almost sure to get the interview. But there are some chapters in the back are relatively shallow, need to fit the online blog to understand in detail.

Why is this book bad?

Why is this book bad?

I don’t agree with the narrative and architecture of the book, and it’s easy to tell people off. I think that’s a point of reflection.

And ali’s students as the industry, especially the Java technology stack of top programmers, if they can not put their own technology stack and the completeness of the knowledge system as the highest standards of their own, then we ordinary programmers can trust who?

The book gave me a feeling of being able to live without it but not without it. I didn’t feel that way when I read Inside the Java Virtual Machine. After reading Zhou’s in-depth understanding of the JVM, I even think you can leave the Java Virtual Machine Specification behind.

However, the Practice of Java Concurrent Programming and the Art of Java Concurrent Programming are complementary, and without knowledge of either book, I feel something is missing. But the art of Concurrent Programming in Java is not enough, so… Why not polish it more seriously?

So hopefully there will be another edition of the Java Concurrent Programming Art, and we’ll all be looking forward to it.

At the end of this article, I recommend a github, github.com/crisxuan/be… This github is a roundup of all the articles I’ve devoted myself to. Welcome star.