Roman Yankin

Ranch Hand
+ Follow
since Aug 27, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Roman Yankin

Not sure if that has not been answered for a million of times, but...
Say I'm about to interview a candidate, and within his CV I read that he is a sun certified specialist, how do check if its true and is there any way I can find out which marks has this person received without asking him directly?

Appreciate your reply!
14 years ago
Say I have two startup classes:




As you can see both classes inherit from one parent.
Singleton init() methods are called in a specific sequence and it is important to maintain that sequence.

Problem: I'd like to simplify startUp() methods. Ideally i'd like to keep information on all singleton dependencies at one place. I'm very new to Spring, and would like to explore the opportunity to resolve my task with this framework. So does my problem seem to be something that Spring can be used for? If so how do I start and what to I do next?


PS
If there is another more suitable/simple way of resolving such problem please do let me even it is not related to application frameworks
Hi,
I'm looking for the freeware tool that automatically generates unit or any other tests over the existing code. Among the similar shareware products there is Agitar - http://www.agitar.com/, but as far as it costs money I can't use it. Does anyone know somewhat similar to Agitar but freeware?
15 years ago
Thanks guys!

2Justin&Jethro, It has taken almost exactly four weeks, to receive the results. I've passed my essay exam on 26th of Sep and the "History" page on certmanager web-site was updated on 27th of October.

Whats regarding the page where you can see your results it is http://www.certmanager.net/sun_assignment/
The primary page (http://www.certmanager.net) shows nothing but some status messages.
15 years ago
So here are my scores:

General Con: 100 90
Documentation: 70 70
OOD: 30 30
GUI: 40 28
Locking: 80 80
Data Store: 40 40
Network Server: 40 30
Total: 400 368

I didn't use JavaRanch much while developing my SCJD, but I really want to say a big thanks to Jethro Borsje and Alex Belisle Turcot for a huge help they have provided me on my final stage of development.

Now regarding my assignment design choices.

General considerations:
This criteria evaluates how easy it is to maintain your code. Well I guess I had just one feature that is not really widespread in java world. I had one class called Constants that was organized in the following way:


Perhaps that class was a pitfall in my considerations


OOD
I had the MVC implementation for my controller class, which was basically an inner class of my primary window class, I also had a nifty interface hierarchy that allowed me to have just 2 interfaces in the whole application - one for the non-networked part (that was the parent interface) and one for the RMI part. BTW those interfaces were generic.

GUI
Ok I have no idea why I've missed so many points here. Perhaps because I had to implement context menu on a JTable instead of handling double-click that has brought up the dialog with option buttons like "Book record", "Delete record", etc.

Locking
I've used ReentrantLock, because I love concurrency package, and basically have no sympathy to classic synchronized approach. And one more thing since this particular criteria receives more interest then any other. I've written sort of a stress concurrency tests for my code, those were really simple, however. From 100 to 1000 threads were reading and writing simultaneously from and to the data file. Afterward, I've opened data file from GUI and verified it was corrupted or not. That stress testing has helped me to find one nasty bug, that I don't think I could find without tests.

Data store
I don't know what they've been evaluating here

Network Server:
That was a classic RMI class with no unique features or something special. The only thing I didn't like about my server, however is that it had such a little GUI window with only button - "Stop server" so if you have closed that window you could not shutdown server in any way, other then hitting Ctrl+C several times in command line. Yes, I forgot to handle WINDOW_CLOSED event there.


Well, this seems to be it!
Thanks, everyone!
15 years ago
Okey, this should be really straightforward.

When "alone" flag is specified does this mean that the application should start in non-networked mode when all operations are performed on file-system level

OR

it means that the client GUI application starts that performs all operations over the network using RMI or sockets?




Why do I feel confused about this really simple question? Because under "Overall Architecture > Non-Networked Mode" of the assignment instructions I read

The operating mode is selected using the single command line argument that is permitted.

(note this is written NON-networked paragraph) and under "Deliverables > Target Platform and Execution" paragraph I read

The mode flag must be either "server", indicating the server program must run, "alone", indicating standalone mode, or left out entirely, in which case the network client and GUI must run.


This makes me think that standalone equals non-networked, so under NON-network section we are indirectly advised to specify config parameter and under "Target Platform and Execution" we are not advised to specify any parameter.

Who knows the truth please answer what is the right thing to do?
[ September 21, 2008: Message edited by: Roman Yankin ]

Originally posted by David Winters Junior:
Hey,

yes i see no reason why one could not do this as long as the methods are related to the functionality of the Data class and not functionality which should be delegated to another class. What will these new methods do exactly?
david



Well those methods can be divided into two groups. The first group deals with records. For instance I've added wrapper methods that encapsulate calls to lock/unlock methods in combination with read/update/delete operation. The second group are those methods that deal with internal data cache - a map where all records are kept for performance reasons.
Though this seems to be obvious, I want to make sure everyone agrees with me. In my assignment I have introduced a couple of public methods that are not referenced in DB interface. So is it legal to extend functionality of Data class by introducing public methods?

Originally posted by David Winters Junior:
All,

Just wondering in the lock method is it really necessary to check which client owned the lock?



I have not done this, because from my point of view there is simply no point in providing such functionality.

If we are talking about remote implementation of a client (local implementation is allowed to be thread - unsafe ), then such client must never deal with locks. It is server and only server responsibility to provide thread-safety, so it is only server that deals with locks.

Originally posted by Iv�n P�rraga:
Hi,
(so perhaps it is not a great idea use them as primary keys).



Why not? Once the record has been deleted you can reuse its unique ID thats the whole point.

BTW, Iv�n, did you go about navigation in your data file? For instance if user has requested to delete a certain record how would you find out which record you have to delete?

I have doen this design of having two caches one for the deleted records and one for the actual records in a database file.

Did the same thing. Especially useful when you are reusing deleted records in your data file, because as soon as you need to create new record you can really easily pickup one form deleted records cache without sniffing through the data file
OK I got your point, well this is where you should wrap the call to unlock with try/catch(RecordNotFoundException) block
Thanks Chellathurai, didn't think about this. But how would you go about displaying data in a JTable when user is scrolling through records?
Put breakpoint on line 267 of JarVerifier class and trace down the stack to see why you are getting NPE
15 years ago