• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Searching....

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

two questions on the search meganism :

1. I created the mechanism in such a way that whatever search criteria is used : starts with or exact match the search operator given name and/or location is NOT case sensitive. I documented this in my choices.txt, but i received a comment from a friend that Exact match is not exact match when it isn't case sensitive... How do you guys feel?
2. I created the search mechanism in such a way if the result of the search is empty => null the old data stays put, so no empty table is shown. I DO show a message indicating there were no results. Is this a proper solution or is it better to show an empty table when there are no results after a search?

Thanks a lot!!
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll assume you're working on the same assignment I am, Boggitt & whatever.

Originally posted by Ricardo Estafan:
1. I created the mechanism in such a way that (ed: search)... is NOT case sensitive. ... i received a comment from a friend that Exact match is not exact match when it isn't case sensitive... How do you guys feel?


Your friend is right, but that doesn't mean you should follow what he says. (Note I'm still working on my assignment.)

Since there are items that are intentionally ambiguous this is something I chose as well. Here's something you can do if you're uncomfortable with it: Add a method to your implementation that allows for case-insensitive searching. I bet there's nothing in your requirements to prevent that! Cause hey, just because your interface is unclear, that doesn't prevent you from making another method whose interface is clearer! Heck, the find() method in my example doesn't even throw exceptions! I suppose I could wrap find() with


2. I created the search mechanism in such a way if the result of the search is empty, the old data stays put, so no empty table is shown. I DO show a message indicating there were no results. Is this a proper solution or is it better to show an empty table when there are no results after a search?
Thanks a lot!!



There are two ways to answer that question, so I'll answer it twice:
1) Ask yourself these questions: Why do you want to do it that way? What are you trying to provide? What problems might occur due to this? If you can answer those questions satisfactorily to yourself, then go for it and make sure to describe it in your choices file.
2) My Opinion: I am presenting a blank table. I took my lead from software like Microsoft Access which does the same when you query it. I like the idea of a dialog box, though.

Good luck!
 
The moustache of a titan! The ad of a flea:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic