*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Am I getting paranoid? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Am I getting paranoid?" Watch "Am I getting paranoid?" New topic
Author

Am I getting paranoid?

Frans Janssen
Ranch Hand

Joined: Dec 29, 2004
Posts: 357
Hi all,

Whilst playing with my B&S application, I suddenly noticed that the database file I am provided with, contains one entry where the services field contains duplicate services. The contractor in this record is defined to provide "Heating, Drywall, Drywall".

Must I interpret this as a hint that my GUI should filter out duplicate services? Or am I just getting paranoid and is this just a minor flaw in the database that is not my problem?

Thanks for your opinions,

Frans.


SCJP 1.4, SCJD
Daniel Simpson
Ranch Hand

Joined: Sep 02, 2004
Posts: 181
I have the same thing that says "Heating, Painting, Painting." I am choosing to ignore it (:


SCJP 1.4<br />SCJD 1.4
Jeff Bosch
Ranch Hand

Joined: Jul 30, 2003
Posts: 805
You may want to consider documenting the duplicate record and your approach to it in your submission!


Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
Frans Janssen
Ranch Hand

Joined: Dec 29, 2004
Posts: 357
Originally posted by Jeff Bosch:
You may want to consider documenting the duplicate record and your approach to it in your submission!



Thanks for your suggestion, Jeff. I think that's what I will do.

Before I discovered the duplicate service, I passed the services from the data layer to the UI layer in a String array, which yielded a 1:1 transfer. I have now replaced that by a TreeSet which takes care of the duplicate entries and adds nice alphabetical sorting as a bonus. If I document this feature, I don't think any assessor can have a problem with that.

I still wonder if they put the duplicate service in by accident or that they expect candidates to notice such things. (I discovered it by accident; it would never have crossed my mind to check for things like this.)

Frans.
Daniel Simpson
Ranch Hand

Joined: Sep 02, 2004
Posts: 181
Originally posted by Frans Janssen:



Thanks for your suggestion, Jeff. I think that's what I will do.

Before I discovered the duplicate service, I passed the services from the data layer to the UI layer in a String array, which yielded a 1:1 transfer. I have now replaced that by a TreeSet which takes care of the duplicate entries and adds nice alphabetical sorting as a bonus. If I document this feature, I don't think any assessor can have a problem with that.

I still wonder if they put the duplicate service in by accident or that they expect candidates to notice such things. (I discovered it by accident; it would never have crossed my mind to check for things like this.)

Frans.


Maybe we have a different exam. My exam only requires searching for name and/or location. I've read from previous posts that people had to search for services instead. I will document the finding in my choices.txt but I don't think it applies to my situation personally.
Frans Janssen
Ranch Hand

Joined: Dec 29, 2004
Posts: 357
Originally posted by Daniel Simpson:


Maybe we have a different exam. My exam only requires searching for name and/or location. I've read from previous posts that people had to search for services instead. I will document the finding in my choices.txt but I don't think it applies to my situation personally.


My exam neither requires searching for services. However, the introduction suggests that users will want to do this, so I added it anyway.

Regardless, I still need to display the search results and showing the same service twice for a contractor just looks silly. I don't thinks I am violating a 'must' there, but I wonder if points can be deduced for failing to filter on duplicates.

Frans.
Jim Janssens
Ranch Hand

Joined: Sep 24, 2004
Posts: 210
Well, I have b&s 2.1.2 and I have also two times "drywall" . Since I'm not providing search on services (only name and location) I'm not planning to do anything with it.

Letting the data layer filter it out (like you said) seems a bit wrong to me ? Its not the task of the data layer to do such a thing. Can you imagine a real world database applying such filters when you perform a query ?
Basicly it is up to the user to correct this. And if you insist on filtering, I would do it in the GUI (so the db returns as is, but your gui will filter the duplicates out)
Frans Janssen
Ranch Hand

Joined: Dec 29, 2004
Posts: 357
Originally posted by Koen Serneels:
Basicly it is up to the user to correct this. And if you insist on filtering, I would do it in the GUI (so the db returns as is, but your gui will filter the duplicates out)


My current implementation does the filtering in my Business layer. So the Database layer indeed returns the data just as it is in the database (so, for the services, a comma separated list of services).

I don't think I will be violating any musts by doing so

Frans.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Am I getting paranoid?