Mike Vess

Ranch Hand
+ Follow
since Aug 25, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Mike Vess

Can you please share why you're certain those two points have nothing to do with 44/80?



Because my application handles those two issues but i got 44/80 anyway... Besides that stupid score i almost scored full on all other areas!


What happens if two applications try to create new records simultaneously?

What happens to a client who is waiting for a lock to be released for a record which becomes deleted?



These two have nothing to do with the score 44/80...
My solution was about 1200 lines (NCSS - Non Commented source statements). I used the tool JavaNCSS for line counting.
Whow Nick! You have a whole lot of certifications!

Have you ever got time to work or do you spend all of your "working" time to study for new exams? :-)

I think the company policy that the employees should be certified is pretty silly because the certifications do not at all tell how good you are in programming.

Just out of curiosity, may I ask then, why you took this certification? I have heard many candidates say that they are taking it for the learning experience, but I don't think this was necessary in your case.



Thats right. I didn�t learn anything by doing this exam. The reason i did the exam was because we have a company policy that everyone working in my departement should be certified java developers. I really thought that the assignment should be much more difficult than it was.

I passed the exam with three points loss on all areas besides the silly 44 locking score...
It is consistency and readability that counts. I choosed not to follow Suns coding standard but i documented how "my style" looks like in the choices doc.
Before i started my URLyBird assignment i said to myself that i did not want to spend more than 40 hours on this project and this is how it turned out:

Design - About two hours and then i started coding.
Coding - 10 hours. My approach was to code a quick and dirty solution and than maybe do a small refactoring if neccesary but i was satisfied with the first version.
Testing - 10 hours. I used JUnit for testing during coding. Both functional tests and non-functional tests to verify the locking interface.
Documentation - 15 hours for code comments, manual and choices document.
Packaging - 1 hour
Written examination - 30 minutes

The whole soulution is about 1200 lines (NCCS - Non Commented source statements) and contains 22 classes (152 functions:-). One class is over 100 lines and that is the Client GUI frame. I used the tool JavaNCSS for line counting.

Short about the functionality:
Add/remove and update Bookings.
Search for all fields or selected fields with or without exact match.
Online HTML Help.
And a nice GUI if you ask me (i did get max score here so i think sun agrees with me

I could have spent a whole lot more time on details and documentation but then problably it would have taken twice as much time.
[ January 03, 2005: Message edited by: Mike Vess ]
I wrote the exam two days after i uploaded the assignment.
First of all i think you should update you test-program so that every thread do several updates of the record not just one.



Why are you calling unlock in the updateRecord method?

Now to your question of why some threads are deadlocked. The problem must be in the lock/unlock methods. These methods should be synchronized in some way and whenever you unlock a record you must notify other threads that may be waiting in the lock method.
Congratulations Anton!

How long did it take from upload until they graded your assignment?

My Data class was made thread-safe by making every public method of the DB implementation synchronized.



In a real world application the performance of this approach wont be that good. My Data class is also thread safe but i have choosen to only synchronize the code that really needs to be synchronized instead of all.
20 years ago

So basically leave the interface as it is, and then when you write the class that implaments it you could make the methods throw any additional exceptions you see neccessary.



This is not true. Will give a compiler error. You can not throw an exception in the implementing class that is not thrown in the interface. It is only possible to throw the exact exception or subclasses of it in the implementing class or choose to not throw any exception at all.
In my assignment the suncertify.properties should be located in the current working directory and if it is not found it should be created so no suncertify.properties needs to be delivered to sun.
Why not use finally instead of calling unlock three times?

Yes I did fail and I only got 7 out of 80 points in locking. In the rest of the asignment I lost very few points.



Did sun tell you what they thought was wrong with your locking solution or is the message only that you failed?

But if unlock() almost always throws RecordNotFoundException, how can you remove it from your unlock method?



My easy solution is to NOT check that the record exists or not in unlock method, i just remove the record number from my table of locked records.