Hi,
Now that I have my
JUnit tests up and almost running (I made
a change, and so some of them are broken), I now feel more
comfortable speculating as to why 44/80 scores in locking
have haunted quite a few: in my opinion, it is not the ten
or twenty or more lines of the LockManager, but it is the entire server
that could, in pockets of missed or misguided logic or miscoded
code that could potentially go wrong that results in the 44/80
scores.
For instance, as I devise tests for my server using JUnit, I continually
run into instance after instance of some technicality in the
implementation which fails (of course, in a certain sense, that is
exactly what JUnit is for; if your tests aren't finding bugs, then
your formulated tests may not be probing enough). Without JUnit,
I would have submitted, and clearly would have received 44/80 in
locking (or worse), even though the core locking facility works like
a charm (that is, that core which everyone always posts).
In short, the server software in its entirity, which is always dealing
with locking on many fronts, is a mine field; and, I am no longer
so surprised that people walk away with a 44/80 score.
I have seen a post recently were someone is asking advice. Here
is my simple advice:
1. Use Junit
2. Think about different scenarios and translate them into JUnit
tests.
In short, if it involves data.lock(), data.doThis(), and data.unLock(),
use JUnit. (I'm not saying use JUnit on everything, but instead focus
using JUnit on Data).
If you do the above, you will, with the great assistance and advice
of the people in this group, maximize your score.
Thanks,
Javini Javono
[ March 17, 2004: Message edited by: Javini Javono ]