Studying (books, tutorials): 3 months Coding: 3 weeks Waiting for results: 4 weeks (this long waiting is nightmare) Source files: about 40files, around 300kb of source code Used tools: eclipse, ant, checkstyle, locmetrics
General considerations: I have no idea. Perhaps the project was big?, too many classes?, hard stuff for junior programmers? Coding standards?
Documentation: I wrote many javadocs, and also some inline comments to explain 'hard parts'. Comments took about 2/5 of all source code.
O-O design: I would give myself 25/30, because this was where I made most of mistakes. I broke sometimes "program to interface".
GUI: I made a TabPane with 2 tabs. Search and book panel. Both had tables. One for specifying search criteria, one for search results. I saw a GUI from guy, who got 40/40 and I can't tell why is mine worse.
Locking: I'm disappointed about Locking, because I made multiple tests, considered multiple situations (even the ones where 'classic' locking fails, see my thread on "3rd level of locking"). You can even spawn multiple threads with same cookie and can't get to inconsitent state. As I wrote in that thread, I didn't enforce locking prior to delete and I justified that in choices, perhaps that is the reason of point loss. Should thread calling lock(); lock(); be blocked forever?
I had a special lock object for every record. LockManager returned this object and methods in Data class synchronized on it.
Here is the simplified pseudo code:
lock, unlock, isLocked, delete, update always synchronized on object associated with that record, so only one thread could work with particular record at a time - and for whole duration of some operation. I can't see how this can't be thread-safe.
I think, that it was thread-safe, and the reason of point loss is that, they expected to see some behavior, which I didn't provide, and even I had good reason for that, testing application couldn't know it. There are numerous foggy areas: e.g. "lock(); delete(); unlock(); bang!", "lock(); lock();",..
Data store: It reads/writes file according to spec, I used hex editor to verify, that I have correct structure. I used spaces for tabbing data. My create method just inserted empty spaces, and then I called update :-).
Network server: I registered one object to RMI registry: Contractor service - running as singleton and having only 3 methods: book, clearBooking and search. All locking took part on server side: lock(); operation(); unlock();.
All in all, I'm happy I made it. (now focusing on SCWCD) [ October 25, 2007: Message edited by: John Stone ]
Hi John, i'm also wondered how you made the certification so fast. I took 1 year and 4 months (but seriously working harder 6 months), yes it's true, waiting for results is a nigthmare. I'm also focused in the SCWCD. Congratulations John.
SCJP, SCJD, now studying for SCWCD and working to be a better person
Joined: May 04, 2007
Originally posted by Gabriel Vargas: Hi John, i'm also wondered how you made the certification so fast. I took 1 year and 4 months (but seriously working harder 6 months), yes it's true, waiting for results is a nigthmare. I'm also focused in the SCWCD. Congratulations John.
Thanks, as time goes I worry about the 44/80 curse less and less (but I'll be more carefull in real-life projects), and I'm focusing now more on hapiness.