Monday, April 14, 2008

It is not your Mama's Java concurrency anymore

I have been going through this great book on Java Concurrency by Brian Goetz.
I studied a part of this book two years ago but at some point stopped. This time, I am determined to complete it. Reading(nay, Studying) this book makes you realize how much your language(I mean, programming language) changes/has changed over the years.

Here is the thing about high-tech and software development. You start career in this industry as a programmer/developer and you get used to a certain habits of programming or thinking about your programs. A programming language is essentially a tool for you to produce software. You start off enthusiastically and attain a certain proficiency/ comfort level to get the job done. Unfortunately, you get to use and actually need a very small percentage of the language to build about anything- provided you have sufficient time. This results in a flat learning curve for most programmers in their core language. True, they will be learning the latest zing thing framework - which requires changing another 10 xml files - from time to time.
But essentially, their understanding of their language remains stagnant.

That's when they need a kick in the pants. This book is such a kick in the pants for the average java programmer. This book will make you

1)Understand JMM(Java Memory model)
2) Understand how badly you are lagging the language synchronization constructs..
3)Clear Misconceptions you have regarding the java synchronization constructs.

If you are like me, who try to solve Josh Bloch's Java puzzlers/bloopers once in a while and fail 30% of the time or more, this book is for you.

Happy Reading :)

1 comment:

Sarvani Vakkalanka said...

Hi Radha,

I totally agree that Java has evolved a lot over the last few years. Unlike C/C++ Java now has a memory model. However, the reason it looks like Java has something more compared to C/C++ is because of its atomic volatile variables and the synchronize key words. But what Java memory models shows is a happens before for a relaxed consistency model. Actually when we write multi threaded programs in C/C++, the locks and unlocks have the behavior of flushing caches (think multiprocessor shared memory systems).

One advantage with JMM is that it is being used in JPF (Java Path Finder) to detect data races and other bugs which is quite cool!

God job with your blog!