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

2 burning questions about URLyBird

 
Sean Gildea
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,
Just want to say so far, thanks to everyone for all their help so far. I couldnt find the answer to these questions after searching around so here goes:

Q: 1) When calling my findRecordsByCriteria in my client side GUIController, Im worried I will lose points or possibly fail for declaring a 100 size 'long array' for returning the record number results from the DBAccess method:

Since its rmi, I am only retrieving a DBAccessRemote interface which precludes me from calling a helper method which would return the number of records in the db file. My Question is: Is declaring a 100 size long array going to fail me or lose points if I document it, and/or is there a better way? by the way, its not a must in my design doc but the program would fail if a user imported a database with more than a 100 records.

Q: 2) When writing my design doc, I prefer to write it by class, and then describe pros/cons/decisions/issues/problems with particular methods of each class. Is this method of writing it acceptable or do you think I will lose points? What is the best method if not mine?

Thanks in advance!

[ November 17, 2004: Message edited by: Sean Gildea ] solved 1 question
[ November 17, 2004: Message edited by: Sean Gildea ]
 
Anton Golovin
Ranch Hand
Posts: 527
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sean Gildea:

Q: 1) When calling my findRecordsByCriteria in my client side GUIController, Im worried I will lose points or possibly fail for declaring a 100 size 'long array' for returning the record number results from the DBAccess method:

Since its rmi, I am only retrieving a DBAccessRemote interface which precludes me from calling a helper method which would return the number of records in the db file. My Question is: Is declaring a 100 size long array going to fail me or lose points if I document it, and/or is there a better way? by the way, its not a must in my design doc but the program would fail if a user imported a database with more than a 100 records.



Hi, Sean. When using RMI, the object (in this case, an array) is serialized and sent through the network, deserialized at the other end, and assigned to the variable. Thus, declaring long[] matches = null; and later assigning the deserialized array to this variable will do. There is no need to specify the capacity of the array.



Q: 2) Its been noted by alot of people here to use the array method "startsWith()" to return findByCriteria matches based on prefixes. However, I noticed something that disturbed me, If I type just the first letter of a search criteria, it will not return any results. It works with
2 letters. My Question is: Is this acceptable if documented in design doc or could I fail potentially? Its not a must in my design doc by the way



The method should match on the first letter as well. May I ask how you are comparing Strings to one another?

If I may, I should make a digression to note the problem encountered with the find mechanism. If you get an array of matching numbers, and request them one by one, sometimes you may be surprised to get something that does not match well or something that is completely different in one of those records. This would be due to other threads having modified one of the matching records in between the find method and the read method. Hope this is useful.



Q: 3) When writing my design doc, I prefer to write it by class, and then describe pros/cons/decisions/issues/problems with particular methods of each class. Is this method of writing it acceptable or do you think I will lose points? What is the best method if not mine?



I think it is acceptable if you raise it to the package level and prepend it with a general discussion on design decisions. It pays to be very extensive and specific about important points.

Hope this is useful.
 
Sean Gildea
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anton,

Yes very helpful!

Thanks for your quick reply and help now twice this week!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic