Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thanks for all guys!

 
long lingyu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I only need to read all records,but skip the deleted records when display for users.
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Long,
Originally posted by long lingyu:
I only need to read all records,but skip the deleted records when display for users.

Yes, you should not display deleted records to the user. In fact, with some exceptions (find and create), most database methods throw RecordNotFoundException if you were to try to operate on a deleted record.
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi George,
BTW, what did you do with booked (or more generally "not available for booking") records? Did you display them or not?
I ask you that because I remember I've had a quite different opinion on that than most other people.
Regards,
Phil.
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Philippe,
Originally posted by Philippe Maquet:
BTW, what did you do with booked (or more generally "not available for booking") records? Did you display them or not?

I displayed all records in the database that met the following two criteria: the record matched the search criteria, and the record was not marked for deletion. So yes, assuming they met the above criteria, booked records were displayed to the user.
I adopted a laissez faire attitude toward booked records. I allowed users to book already booked records, but in that case I made sure it was always known to the user that he was in fact booking an already booked record.
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi George,
Thanks for your reply.
I displayed all records in the database that met the following two criteria: the record matched the search criteria, and the record was not marked for deletion. So yes, assuming they met the above criteria, booked records were displayed to the user.

It's not the handiest solution for the CSRs of course (whose job is to sell *available* rooms, by definition), but that's what most of the people here do I think and ... it just conforms to the instructions. OK so.
I adopted a laissez faire attitude toward booked records. I allowed users to book already booked records, but in that case I made sure it was always known to the user that he was in fact booking an already booked record.

I loved the "laissez faire" expression that I didn't know I could use in English (thank you! ), but I'm not convinced by the solution.
Allowing a room to be booked twice doesn't make much sense IMO. Did you document it as a choice of you (in choices.txt), or did the grader need to read your code to notice it? In other words, are you sure your grader was aware of it?
Regards,
Phil.
[ March 05, 2004: Message edited by: Philippe Maquet ]
 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys. Sorry for jumping in here.

Allowing a room to be booked twice doesn't make much sense IMO.

Many things in this basic design makes sense not. (I.e. for when must the contractor actually be booked, etc)

Did you document it as a choice of you (in choices.txt), or did the grader need to read your code to notice it? In other words, are you sure your grader was aware of it?

I also allowed existing bookings to be rebooked.
Here is part of what I put in my choices:

Booking Overwriting:
Since the spec did not include the procedure for handling a book attempt on a
already booked record, or an unbooking implementation, I decided to allow
previous bookings to be optionally overwritten. I considered not allowing
booking overwrites, but in that case, the system could quickly become unusable,
because once a contractor is booked, it stays booked forever, barring a database
administrator clearing the bookings manually. Hence, when a user tries to book
an already booked record, they will be warned that the contractor is already
booked, and by which client ID, and will be asked whether the booking should be
overwritten.

See ya guys.
J
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Philippe,
Originally posted by Philippe Maquet:

Allowing a room to be booked twice doesn't make much sense IMO. Did you document it as a choice of you (in choices.txt), or did the grader need to read your code to notice it? In other words, are you sure your grader was aware of it?

But I thought not allowing a user to change a booking didn't make much sense. Suppose a CSR books a record for a client having the customer number 10000000. But for some reason the CSR actually enters 70000000, that is, he accidentally books this record for another customer, who may not even exist. A while later the CSR notices his mistake. I let him fix his error. Do you?
Or a customer calls his CSR and books a painting contractor to come out and paint his house. Another customer calls looking to book the same painting contractor, but the CSR must regretfully inform this second customer that the painting contract he wants is already booked, but that he can have his second choice painting contractor. (By the way, if all the records, booked and unbooked had not been displayed to the CSR then the CSR would not have been able to tell the customer that the painting contractor the customer wanted was already booked -- a good reason for displaying booked records to my mind). A few days pass, and the first customer calls his CSR back and unfortunately has some very bad news to tell him. His house burned down to ground last night. The CSR commiserates with the unfortunate homeowner and tells him that there will be no problem canceling the painting contractor. The CSR is about to unbook (rebook with a blank customer ID) the painting contractor when he remembers that another customer really wanted this contractor as his first choice. He calls back the second customer and tells him his first choice painting contractor is now available. He books the painting contractor for this second customer and unbooks this customer's earlier booking of his second choice painting contractor. Would you really send the painting contractor out to the first customer's house and have them paint the charred remains of this poor man's burnt house? Wouldn't you let the second customer have his first choice painting contractor?
I empower the CSRs to fix their own mistakes, to change client bookings as circumstances dictate, and to cancel client bookings if necessary. (As an added benefit to me, by not treating the booking of an already booked record as a special case, the code is simpler.)
I don't know if this was clear to the examiner or not. However, while discussing locking issues in my design choices document I did include the following:

The locked context
sequentializes this so that first one user books the selected record, and
when the first user is done then a second user may overwrite the earlier
booking. However, in this case the second user had to wait for the first
user to finish and is knowledgeable about the fact that he is overwriting
the earlier booking.

Given that my design choices document was excessively long I'm not really sure if the examiner maintained consciousness this far into the document or not. Anyway, I still like my design choice for booking already booked records: it's reasonable (at least to me), it simplifies the design, and it treats the CSRs like competent professionals.
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi George and Jacques,
Thank you for your replies.
They confirm that the simplest solutions (display *all* records to the CSRs / letting them to unbook as they want) can lead to the maximum score.
Best regards,
Phil.
[ March 06, 2004: Message edited by: Philippe Maquet ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic