• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Assignment Search Criteria - Auto Failure

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey all,

please let me know if you think this is an auto-failure..

Req: "It must [the UI] allow the user to search the data for records where the name and/or location fields exactly match values specied by the user."

In my assignment, i'm provided some smarts to the search functionality..for instance my search code is case in-sensitive and will match a value if it starts with the value entered by the user.

so entering aus would match Australia.

I'm worried that this violates the 'exact match' part of the assignment. Do you think i'm taking that sentence too literally? Your advice would be helpful.

I plan to submit this week.

Kind Regards

Daniel
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
why take the risk?
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Daniel.

Welcome to the Ranch...

With regard to your question

In my assignment, i'm provided some smarts to the search functionality..for instance my search code is case in-sensitive



I agree with Jeroen - you're taking a risk here, but if you document you thoughts on the subject in the choices.txt you probably would get away with this.

and will match a value if it starts with the value entered by the user.



I think this is an auto-fail. My spec says the server MUST perform a search where a record is returned if a field String starts with the associated criteria String (what you are proposing), but my client-side spec states that only an EXACT match for the fields MUST be returned.

Many posts I've read on the Ranch believe that Sun have deliberately given you different search specs for client and server in order to see if you have read and understood the requirements.

I know it could be argued that you are helping out your users by providing better functionality, but I don't think it's worth deviating from the given specs (and if in doubt I usually think about what I do in the real world - here in a real project I wouldn't add functionality to a search algorithm/mechanism if the client had signed-off, but I probably would mention this as an possible addition)

Best wishes,

Daniel
[ August 16, 2006: Message edited by: Daniel Bryant ]
 
Ranch Hand
Posts: 284
Netbeans IDE Firefox Browser Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I'm worried that this violates the 'exact match' part of the assignment


Sure it violates, if you change behaviour of the specified interface.
But it's acceptable if you implement it at business layer.

Regards
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What I did was implement both and expose only the exact match through the client (though it could be rapidly changed to use the other match by changing a single flag in a single method).
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jeroen T Wenting:
What I did was implement both and expose only the exact match through the client (though it could be rapidly changed to use the other match by changing a single flag in a single method).



I took the same approach. Doing this means that you satisfy both the requirements of the data class and the requirements of the client.
 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used a couple of radio buttons on the GUI to select between starts with and exact matching. That way, it allows a picky examiner to carry out an exact match if they want to. The interface specified that the Data class should do a "starts with" search, so it was easy to filter those that didn't "exactly" match.

However, I left everything case sensitive. That's because the Data class had to implement the supplied interface and making it case-insensitive would mean that potentially the search method would return too many records. While you can filter these in YOUR application, someone else using your Data class may not expect that behaviour. In other words, it could be argued that you haven't implemented the interface correctly - and I didn't want to take that risk!
 
Daniel Chevelle
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Excellent replies. I completely agree with the arguments raised. Thanks all.

Especially to all the Daniels who posted
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My string entry fields have a "case sensitive" checkbox and an "exact match" (i.e. not substring match) checkbox.
 
If you like strawberry rhubarb pie, try blueberry rhubarb (bluebarb) pie. And try this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic