|Sent on:||Sunday, March 17, 2013 12:52 PM|
Concurrency is hard. When I interview people, I am one of those who ask about concurrency. Usually I'm asking about how you diagnose concurrency issues, rather than how you code anything - because you can give all sorts of answers about concurrency coding whatever your level of experience, whereas you have to have a certain minimum level of understanding to explain how to diagnose issues.
The primary way to code concurrently and minimize concurrency bugs is to avoid explcitly writing concurrency code. This is my understanding from my concurrency guru - Brian Goetz. Basically, Brian's advice is that if you find yourself starting to write explicit concurrency handling, stop and look for a library class that does what you want, because concurrency bugs are subtle, non-obvious, and often difficult to reproduce, and the library class is likely to have had to handle most of them and been debugged by a community. The other things he's suggested, immutable objects, non-shared objects, etc, those are all workarounds when you can't find a library to do what you want.
The whole lambda addition in Java 8 is exactly along this line - if you use lambdas the code is concurrently executable by the libraries without you having to explicitly do any explicit concurrent handling (which is one of the reasons Brian is spearheading the project, it's close to his heart). Of course you have to be careful to avoid inadvertent concurrent data sharing or face the consequent race conditions, but you can't have everything.
Advice to students would be to read whatever Brian has written that's out there.
On 16/03/[masked]:36, Barry Cranford wrote:
We are often tasked to find Java developers with an understanding of low level core Java. Not necessarily specialist contractors at 5-600 pday, but permanent developers, one may classify as mid-senior level (40-60k). When pushed this is often defined by developers that understand what is going on 'under the hood' e.g. not just how to use popular frameworks but those that understand the concepts and principles beneath them. Whilst some companies will be a little more easy on practical experience, they will push for an understanding.
Many developers don't make it through interview processes with feedback coming up time and again around a lack of understanding of multi threaded programming and concurrency. I have seen a few conversations recently on the list around these areas so I'm keen to understand the thoughts of the community on this.
A few things I'm curious about...
- If we could put on some deep dive talks what subjects would you personally most like to have covered?- Why are some developers drawn to this deeper level and why do some people seem to grasp these concepts so easily against others?- If you could offer advice to students starting out in Java development today, how would you suggest learning the fundamentals of these concepts? (reading, self study, projects, talks, oss, something else)?- Have you been through this learning process in the past and had a eureka moment? What happened for you personally.
--This message was sent by Jack Shirazi ([address removed]) from LJC - London Java Community.
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
To learn more about Jack Shirazi, visit his/her member profile