addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwchatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgoogleimageimagesinstagramlinklocation-pinmagnifying-glassmailminusmoremuplabelShape 3 + Rectangle 1outlookpersonplusprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

Re: [ljc] Concurrency, multi-threaded programming: under the hood

From: Jack S.
Sent on: Saturday, March 16, 2013 8:06 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:
Hi all,

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.

Our Sponsors

  • Our Blog

    Read the latest news from the LJC

  • RecWorks Ltd

    Fixing Tech Recruitment using the Power of Community

  • jClarity

    Java/JVM Performance Analysis Tools & mentoring for Java related matters

  • LJC Aggrity

    Our LJC Aggrity site contains blog posts from our members

  • LJC Book Club

    Our Book club with book reviews from our members

  • Devoxx UK

    Java Community Conference in collaboration with the LJC, 8-10th June 16

  • SkillsMatter

    "Host, help organise, promote, film many of our meetings."

  • IBM

    Build Enterprise-grade apps at start-up speed.

  • New Relic

    New Relic makes sense of billions of metrics a day in real time.

  • Hazelcast

    Hazelcast is the leader in operating in-memory computing.

  • Java.Net

    We are an official Java User Group recognised by Oracle's JUG program

  • JRebel

    Free 3 month J-Rebel license.

  • O'Reilly

    40% discount on printed books and 50% on e-books.

  • Craft Rebellion

    Your choice of fresh craft beer, delivered. For 10% off use ‘LJC'

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy