Discussions

The Swing classes have several locks that are acquired in different orders, depending on what order the GUI methods are called.

This poses a well-known problem, in that we need to use SwingUtilities.invokeLater(Runnable) to access the gui, else we may get a deadlock. In the latest The Java Specialists' Newsletter, Heinz demonstrates a small piece of code that causes the GUI to hang up.

I'm totally bias, but I have to say the second link is dead on. Programmers are not born. It requires a certain personality and drive to become good. Very few people become elete programmers and even then it doesn't last very long. Even someone as great a Woz reached his peak and then changed focus. Though I think it's harder to fake "professional soccer" than programming. The analogy in the newsletter still works, just noting a difference.

I agree with parts of the second message, but the guy, to me, is overdoing it!

"I believe that being a programmer is not a job, it is a life. In order to learn it, you need to eat, breathe, sleep Java... If we take into account a few responsibilities, you have an additional 1.5 hours in the morning, and 6 hours in the evening.... I am not making this up."

This is way over the top. What he seems to suggest is that you have work, a few responsibilities, and the rest of your time is dedicated to... Java!?!? I love my job, don't get me wrong, but, I love my life, too!

What he is saying worked for me for a period of time (at the university, for example). I remember having this burn inside my stomach while away from programming/unresolved bugs etc. It still happens, but there are more "business as usual" days now.

(Zipped version of this post for casual readers of TSS: "Dude, get a life!")

Goran.

P.S. This post is NOT to say that programmers ARE born. (Title seems to suggest that :-))

My opinion is somewhat in the middle. On one end I agree; to be a good programmer you need to have bits flowing in your blood, you have to have that sixth sense that tells you that this totally illogical behaviour is most probably caused by the six inverter bit not being inverted (you catch my drift).

On the other hand, I know of this totally briljant software engineer (female, BTW, no pun intended), university degree with honors, started working at a bank but was totally unable to function within an organisation. Unable to communicate and cooperate.

So as always everything is a balance. But the last two decades has shown often enough that it is too easy to fake IT skills, especially when the demand is high.

Well, I think a Bachelor, a Master or even a Phd degree don't certify you are a good programmer. And I think programmers, engineers, writers, musicians, mathematicians etc. are born and aren't born.

There are people with less difficulties than other. Someones like Gauss, Mozart and Goethe are few examples of "born" people. But it don't means that a "normal" person cannot be a brilhant programmer. Remember Thomas Edision: 1% inspiration, 99% transpiration.

The author referenced the Bell Curve. I think that is a bad reference...

I still think it makes valid points, even if some parts aren't necessarily true or good examples. If Mozart never played an instrument because he lived in he amazon or Wayne Greztsky never picked up a hockey stick, any innate talent/potential probably would have gone unnoticed. I call it luck. The right job meeting the right person at the right time to produce someone that excels.

What, no iPOD ? !!. I dont agree with all of this. You dont need to know all of Java to be useful. You just need to know enough to do the job at hand. No need piling up knowledge you'll never use. The wise programmer is the one that learns as he goes and understands that the world does not revolve around Java or any technology in particular (heck a new one soon pops up anyway). Programming languages are similar enough that they can be picked up easily. Whats so new about Web services ? Whats the big deal with AOP, SOA and all that hype. I'll learn them when my job demands it man. An inability to adapt to new language suggests a deficiency of fundamental software engineering knowledge.

There is more to life than reading Java books what of the Bible, how can a man neglect his own soul for a subject as transient as Java.

So my advice, when U wake, read your Bible and pray, after work read the newspaper etc (for example read the economist, businessweek, Men's Health mags etc) , chill out and watch TV or just chill with the ones you love. Try and learn about other stuff that does not relate to computers.

psHeinz, I do love your newletters keep them coming. But please get a balance.

Heinz sent a second newsletter after the first one with the deadlock, where he stated, that it's just a problem with the static initializer, not with SWING.Well, it was a little mistake in the first newsletter, but that can happen...

Here is his class which shows the typical deadlock problem with static initializers:

This is a pretty interesting article. I recently read this article, which contains code for a DeadlockDetectingLock which the authors have written (which subclasses the JDK 5.0 ReentrantLock implementation), and contains some simple deadlock (i.e. circular locking) detection. I wonder if this would be possible to detect using AOP and standard synchronized blocks in current JVMs? i.e. could we use something like ASM to intercept calls to monitorenter/monitorexit, and then recursively walk the thread tree before acquiring , searching for circular references? I havent looked into this in detail, but this could be pretty useful.

I originally believe anyone could become a brilliant programmer given time. After much trial and effort, I can admit I was sadly wrong. Some have it, some don't. It doesnt make them "lesser beings" or anything, its just that programming is just not what they were destined to become.

Remember Thomas Edision: 1% inspiration, 99% transpiration.

Thomas Edison was a hack who stole the inventions of Nikola Tesla and claimed them as his own. Tesla was a born master of all things electric. Edison was just better at PR.

TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations technology projects - with its network of technology-specific websites, events and online magazines.