Vlad Rabkin

Ranch Hand
+ Follow
since Jul 07, 2003
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 Vlad Rabkin

Hi Terry,
I am very sorry to hear you have failed.
I had URLyBird 1.1.1. I DIDN'T implement the 48 hours rule. I passed it in November with pretty good notes. However, I carefully documented it. Here is exactly how I explained it:

1. General Assumptions
The following major assumptions are made:
...
...
...
The Background section of the application overview mentions the following:
"They take bookings only within 48 hours of the start of room occupancy".
However, specification neither provides any details how it should be handled, nor requires to provide any functionality related to the issue. Thus, I consider this BACKGROUND information as the business rule, which is not required to be controlled by the program.

I would try to appeal. Of course, it doesn't guarantee you "win". I would try to write as many arguments as possible to convince Sun. However, I would not use arguments, that others have done the same and passed:
- it is not a good argument
- Sun can always say: "So what, we didn't see it. If have seen it the others would also fail".
Best,
Vlad
P.S. Guys, Andrew, Phil, Bharat, Jim and others, I am so sorry that I disappered for such a long time from he forum. I had some problems, but there no real excuse...
Congrats Wilder,
Vlad
20 years ago
Hi Linda,
MetaData class can contain information about database fields (e.g. name, max. size), to help the client apllication be more flexibile to database structure changes.
Best,
Vlad
Hi HaoZhe,
To book a record you set a value to the customer field. Don't delete it!
If customer field is not empty it is booked.
To check if a room is booked you have to check if the customer field is filled.
The customer ID is set by an operator (end-user). It is a number. The operator knows customer ID. All what your program has to do is to save it to the appropriate field in the file, to book the record.
Best,
Vlad
Hi Philippe,
Congratulations!

Vlad
20 years ago
Hey Bharat,

CONGRATULATIONS!!! WE GOT IT!
Good Luck,
Vlad

P.S. Sorry for the late mail.
20 years ago
Hi Seid

- throw application exception (or IllegalArgumentException) when criteria is null


Perfect idea!

- throw IllegalArgumentException when recNo is less than 0 or greater than total number of records in db, instead of RecordNotFoundException


I personally would preffer to throw RecordNotFoundException not to risk to breach the specification requirements. Howevers, I think IllegalArgumentException is also a valid solution and should be Ok.
Best,
Vlad
Hi HaoZhe,

Does it mean I can simply ...


I don't quite understand your question. Could you try to specify your question?
Best,
Vlad
Hi Bill and Andrew,
Andrew:

If, after validating the record exists, you loose the mutex on lockedCntrRecords, and someone deletes the record, so what?


Ups. I agree. Honestly saying I thought about lock() method. It is much more tricky there. Regarding unlock() I agree with Andrew and recognize my mistake in my previous mail.
Sorry.
Best,
Vlad
Hi Bill,

If I synchronize on my collection lockedCntrRecords, should I synchronize on that collection within each of the methods?


No way!
You first sample of the unlock() looks great is valid.
You have to guarantee atomicity of the unlock() transaction.
If you synchronizie each submethod separately no atomicity of the unlock() will be guaranteed.
Best,
Vlad
Hi Ulrich,
I find your approach interesting. You can probably justify it: You don't have to follow patterns and so on. So, it is a valid solution.
However, I would try to avoid it, since your ConnectionObject consufes a bit from the first look. It is hard to comment it: it is a valid solution, but, I PERSONALLY, don't like it. I still beleive it is the best way to provide the client with business user interface containing all methods needed to work with the server (including getMetaData()).
I would like to ask others to join this thread to hear other opinions, since I my approach is, may be, too restrictive.
Best,
Vlad
Hi Ulrich,

I'm sorry to border you with this mass of code, but I'm a little bit lost


Stop saying sorry! I enjoy talking to you.
1. There is no way I would make another remote object just for DataSchema. I know, there were people doing that, but I, personally, don't like it. It is too complex and confusing.
2.
Solution A:
Well, I did have some kind of "hybrit" between 2/3 tier.
I did have interface DBAdapter. This adapter had no any much of the logic:
- It chained unchecked exception to checked exceptions.
- additional getMetaData() method.
I would solve the problems mentioned by you.
Solution B:
You have a standard interface (say DB) and data class implementing it.
You can create one more interface MyDB extending DB interface (which would have additional getMetaData() method). Then you can
1) just add getMetaData() method to your Data class and make it implement not DB, but MyDB. It is a bit risky (since it may be a breach of specification), but the people in this forum decided that it should be Ok.
2) create MyData class (pretty the same as DBAdapter), which would implement MyDB and call the logic from Data:

Your RemoteObject can wrap than MyDB instead of DB.
Best,
Vlad
Hi Nick,
I guess, it is Ok.
You can confire property file of the JRE to let the messages be written in the file. I didn't want to switch off messages statically and I didn't want
to provide any property file for logging configuration. So, I let all messages till level "INFO" be shown in the console (it is standard configuration) and just documented it.
Best,
Vlad
Hi Seid,
I would preffer the second option (with array). GUI is required to be developed with option of future functionality enhancements. The second option helps client to do so by providing more generic framework.
Best,
Vlad
Hi Nick,

Should I keep displaying "name" in the JTable Header, or I should display "Hotel Name" instead of "name"?


Well, I tried to display names from "descriptive name" list. I changed them a bit: Hotel name-> Hotel, Cutomer .... -> Customer and so on.
Best,
Vlad
P.S. I would suggest to change the name of your class MetaData to ColumnInfo or something like that. MetaData logically should a class describing all columns (e.g. the array of columns), not a single column.