aspose file tools*
The moose likes Certification Results and the fly likes Passed OCMJD 6 with 392/400 (URLyBird 1.1.3) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Certification Results
Bookmark "Passed OCMJD 6 with 392/400 (URLyBird 1.1.3)" Watch "Passed OCMJD 6 with 392/400 (URLyBird 1.1.3)" New topic
Author

Passed OCMJD 6 with 392/400 (URLyBird 1.1.3)

Guillaume Drouet
Ranch Hand

Joined: Apr 16, 2012
Posts: 36
Hi all !

I have taken the essay exam on August 2012 but it was my first certification and Oracle told me that they can't indicate my result since I don't have ant OCPJP certification. Don't ask me why I didn't took the OCPJP first, it is an administrative problem from my compagny which give me the vouchers ;)

However I have passed my OCPJP exam successfully today and I was very happy to see that my OCMJD result also appeared automatically with that high score ! I need now to take a mandatory course in order to get my certification kit.

The various topics in this forum helped me a lot to manage the different issues of the exam. I also bought the excellent Monkhouse book, reading it was very usefull like the Roberto Perillo's paper. I have essentially followed the advices and feedbacks of Roel De Nijs (thanks to him) when making my choices and design decisions. However, I can detail my choices if you are interested ;)

The interesant point of my story is that you can totally download your OCMJD assignment and prepare it in the same time of the OCPJP. Then you can take the essay exam and the OCPJP exam at the same time. It could be interessant because while studying the OCPJP, you can apply what you learn by coding the OCMJD assignment. The only problem is the limit of 6 months you have to submit your assignment in the OCMJD exam which could be not enough if you study OCPJP too with a full time job. However, if you have all your day to work on it, 6 months is definitively enough to submit your application and studying OCPJP.
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2266
    
    3

Howdy, champion!

Well, I'm just very happy we were able to help you in your journey! Congrats, champion!


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 773
Congrats, Guillaume.
How do you get such a high score?
I want to know why I lost 30 points (I got 370/400), but I am not supposed to know.

I guess my lock algorithm is too complicated. I used Terry and Andrew Monkhouse' less CPU intensive locking algorithm. But I presented my algorithm in a complicated way.
Simplicity counts in the exam.
Guillaume Drouet
Ranch Hand

Joined: Apr 16, 2012
Posts: 36
Thanks !

Well, it is sad that Oracle does not give the details anymore. But in fact you can count on your lock feature to be the cause of the this lost of points. It is a very hard part (but exciting) of the exam. I don't think that the locking algorithm itself could be considered as the reason of this lost of points. However, I'm pretty sure that the way you chose to justify the choice of this algorithm could impact your score, more than the algorithm itself.

In my assignment, I was a little bit anxious about how I will be marked because I have introduced some complexity in my application. I have driven my choices (and explained it in my choices.txt) by following a set of criterion with different priority. The most important one was to provide an application with reusable code. The less important was to guarantee performances. It means that if I provide a code which is complex with poor performances but reusable, it is a good thing to me. For instance, I used reflection in the DB layer to map the data retrieived from the file to my DTO according to the name of the columns. If one day another data file has to be managed, the code could reused entirely without the need to add the new column names in the code. However, if code reusability is guarantee, a piece of code must be optimized as much as possible. That's why I follow Monkhouse book which demonstrates how to increase performance by minimizing the synchronized code using synchronized blocks instead of synchronizing the methods entirely. On that part, I can tell that it was not so easy to prevent deadlock has I wanted. But I did it, and the very useful Roberto's unit test finished by run all the threads without any deadlock. According to the various topics on lock issue, I have do more than what was required, but it seems to have worked well ;)
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 773
Hello Guilaume buddy.
Thanks for your suggestion about reusability.

I have a hard code file reader. I specified 64 bytes for reading a field from the database file, another 64 bytes for reading another field and etc.
I know making the file reader hard coded reduce reusability. That may be the reason I lost 30 points.
Guillaume Drouet
Ranch Hand

Joined: Apr 16, 2012
Posts: 36
Ahah not sure ! Actually, many people have hard coded the reader and many of them have an high score. It's so hard to understand where so many points could be lost. Maybe the response is in how you argue that choice in your choices.txt. However, we know that issue(s) around the lock mechanism in the code can justify the lost of many points.

When did you take the exam ? Another possibility is that people who mark the assignments have changed and marking considerations have changed with them.
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 773
I submitted my exam at the end of November 2012.
Points could be deducted because I locked the create/update/delete methods.
In these methods, I use Java's lock() to enclose the implementations even though I have my own lock() and unlock() methods.

It looks like this:

And


The reason why I lock in the create method because I want to prevent thread 1 creating record 1 and thread 2 creating record 2 at the same time. And also, thread 1 locks record 1 and thread 2 locks record 2. Thread 1 and thread 2 are not waiting for each other because they are locking different records.
But they should wait for each other when they access the database file.

I guess I have too many locks.
Guillaume Drouet
Ranch Hand

Joined: Apr 16, 2012
Posts: 36
Sounds like your additional lock was not necessary inside your create method. Moreover, locking out of the lock() method makes your code with less cohesion (your create method does not simply create, it locks something too).

I had a similar problem at the end of my development because I notified threads in my delete-method and not only in my unlock-method. Everything worked fine (no deadlock) but I was worried about that. I created a topic on the forum and shared my problem. Roel De Nijs helped me a lot by confirming the default of my design. Even if I was writing my choices.txt with not more code to be written, I decided to found a workaround and finally I had only a very particular case where it was required to call notifyAll() in my lock-method (for the rest, I used notify() for performance reasons in my unlock-method). I have documented that point and explained it in my choices.txt.

Roel De Nijs explained me that my solution was complex but I tried to justify it in my choices by explaining that - because no deadlock issue could occur - nothing should be done in the future to maintain this part of the code. Considering that, and according to my criterion, complexity was not a problem ! However, maybe it was there I lost my points, but no more than 8 have been dedutected ;)
Vinod Tiwari
Ranch Hand

Joined: Feb 06, 2008
Posts: 459
    
    1
Congrats, Guillaume. That's a great score!!!


Vinod Tiwari | Twitter
Guillaume Drouet
Ranch Hand

Joined: Apr 16, 2012
Posts: 36
Thank you
 
jQuery in Action, 2nd edition
 
subject: Passed OCMJD 6 with 392/400 (URLyBird 1.1.3)