Win a copy of Terraform in Action this week in the Cloud forum!

Gasan Guseynov

Ranch Hand
+ Follow
since Jan 03, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Gasan Guseynov

Please check "Java FAQ" there is the partition about Mock exams. Maybe it'll help. As for Mock exam for Sierra & Bates SCJP book, all I know is that book contains a CD with mock exams, which I didn't looked yet, but probably they're somehow organized along with the book. Hope that helps.
Probably I was to hurry to write a post, because a couple of pages later in a book there is some sort of clarification on that code regarding that problem and also there is provided a better version that addresses the problem. Probably, the only flaw I see now is that authors didn't aforementioned that the first code has a problem and they'll address that later.
@Anayonkar Yes, Operator finished it's job, but it repeats the loop. And it can reach line 5 before the Machine will release lock.
I probably found a bug in a code on pages 750-751.

Here is my original post:


I'm reading Sierra & Bates SCJP 1.6 preparation book. In chapter 9: "Threads", i read this code illustrating wait\notify methods:

Idea is that Machine thread first gets to waiting state, then Operator notifies it, after that Machine wakes up, does it's job and then reacquiring the lock and goes to wait again, after that all repeats.
At least this is how it's written in the book.

But I thought about the following situation:

Let's imagine that on the first run Machine thread took a lot of time to Send machine steps to hardware (line 20), meanwhile Operator already done Get shape from user (line 4) and is ready to acquire the lock (line 5).
Right after the Machine exits synchronized block, Operator acquires the lock and Machine goes to blocking state. After that Operator calls notify (line 7), but Machine isn't waiting yet, it only tries to acquire the lock.
After the Operator releases the lock, the Machine goes to wait state, after that the Operator calculates new machine steps, notifies the Machine, it wakes up and does it's job. But, the previous Operator command
was lost, because the Machine didn't acquired lock in time and wasn't waiting.

Have I missed something or the specified code may result in the Operator command loss?

Please let me know if this is really as I explained and if it is, was it already found and if here already were a discussions on this, I would be very thankful if links to that posts will be provided.

Recently I've installed IntelliJ 10 open source edition and found that there should be similar to eclipse functionality of creating tasks, linking contexts to them, you know, to not be overflooded by project files. I've installed connection to our JIRA and via Tools > tasks, managed to opened task (jira issue). But, the problem is, I still see all my project files and there is no button "activate task". Maybe this functionality is provided only in 'Ultimate version' (although comparison matrix says the opposite). Please advise.
well, finally I found the solution on the Minecraft forums. It seems that problem was because of motherboard AGP dirver was missing (GART). And after I installation of the driver, AGP fast write should be turned off (through Smart GART in catalyst control center) both with AGP write turned on and AGP speed set to 8x. Now it works!
11 years ago
Because Hadoop works in distributed environment and it needs to have all machines to be represented as single unit, an ability that HDFS provides.
11 years ago

Christophe Verré wrote:

Mark Reyes wrote:when I click the Hadoop in Action Link, I get forwarded to IPhone And Ipad in Action, maybe a wrong link or possibly my browser is wrong also.

The link is fixed.

No. It's not.
11 years ago
Let me disagree with you. The fact that I need the certification became obvious to me when I found "SCJP/SCJD preferred" in a response from a US employer. Indeed it doesn't prove that I must have the certificate, but it shows that chances to get a job there is much more higher when you have one. From my observations here in post-soviet region not many people have the certificate, thus employers don't pay attention whether you have it. But in UK\US\Canada where the percent of skilled developers is much higher, hence more people have the certificates, it may arise that presence of the certificate will determine will you get a job or you won't. Or, at least will an employer conduct an interview or it won't.
Hello everyone. I'm working as a Java developer almost five years, I've read many tutorials and manuals, also I bought K&B SCJP1.6 book and read some interesting chapters from there. Now I want to have become a SCJP to be more valuable for employers in US/Canada/EU. I tried some mock tests and found that I can answer many questions correct, at least I'm sure that I will pass the exam. The question I'm faced to is, what score is considered as good or at least as normal by employers. Because I want to know, how much time should I spend on preparation and how precise should I know answers. Or maybe the score isn't important and it only matters the fact that you have certificate. Please Advise.
Dear Ritchie,

You're right. I'm not a native speaker. I meant descendant, not ancestor. Sorry for inconvenience.
11 years ago
Cause, well, I'm paying money not for a monkey training (which I can get online for free), but to improve my skills. That's all.
11 years ago

Rob Prime wrote:
But I must admit that this discussion has the potential to turn into a VI vs Emacs discussion.

Dear Rob,

I think the only correct point here will be to say that equals() implementations that we are tough from books are assuming that
1. there won't be ancestors (which is ridiculous, but whatever); 2. The object is to be put in a Hash table of any sort or will be heavily compared.
In other words, I'd like authors of these books to stop repeating the same #%#@ from one edition to another and turn on their brains. Meh.
11 years ago
ancestors not accessors damn spellchecker. Here is what I'm talking about:

11 years ago
Hi all,

Finally, got K&B Java 6 Study Guide. First glance at equals() explanation: same flaw as everywhere: instanceof check at first line. And they are telling us about equals() transitivity?! Is it only me who notice that this equals implementation isn't transitive when you have ancestors of this class?

11 years ago