aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Is idiot-proofing user input a requirement? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Is idiot-proofing user input a requirement?" Watch "Is idiot-proofing user input a requirement?" New topic
Author

Is idiot-proofing user input a requirement?

Sean Gildea
Ranch Hand

Joined: Jul 01, 2004
Posts: 81
Hi Ranchers,

Some people here have said that we should only do what the spec asks us to do, nothing more. That leads to my question:

Since my requirement spec says no where that I must implement any kind of input validation and further more says "Note that for this application, you should assume that customers and CSRs know their customer ids."

Will I lose points for lack of validation?

Should I prompt the user to retry or end the program on bad input?

Thanks in advance!


SCJD, SCBCD, SCJP
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

Good questions, in which parts could they put in bad data. You don't need to worry about Customer ID, but it there any other areas.

The search shouldn't be an issue if you use JComboBoxes they will be filled with only valid data.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Sean Gildea
Ranch Hand

Joined: Jul 01, 2004
Posts: 81
Mark,

Thanks for your reply,

In my search, users can specify a hotel name and/or location.

Should I validate correct text there?

Should I create a dialog box popup if incorrect and allow them to retry?
[ December 03, 2004: Message edited by: Sean Gildea ]
Barend Garvelink
Ranch Hand

Joined: Dec 07, 2004
Posts: 64
I did not put input validation on the hotelname/city box... if they enter a non-existent hotel name, the search simply yields 0 results (the search criteria and number of matching records are contiuously displayed in a statusbar).

The best way IMHO to put input validation on that dialog box is to make a list of all hotel names and all cities in the database, and put them both in JComboBoxes. That's friendlier to your users [than my approach] but more work to implement.


SCJP 1.4, SCJD 1.4, SCWCD 1.3, ICSD:Websphere 5.1
Barend Garvelink
Ranch Hand

Joined: Dec 07, 2004
Posts: 64
Also, if you have the URLyBird assignment, keep in mind that the "Urlybird only takes reservations within 48 hours..." line in the intro text appears to be graded as a hard requirement (automatic failure) by some assessors, but not by others.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

Originally posted by Sean Gildea:
Mark,

Thanks for your reply,

In my search, users can specify a hotel name and/or location.

Should I validate correct text there?

Should I create a dialog box popup if incorrect and allow them to retry?

[ December 03, 2004: Message edited by: Sean Gildea ]


You see with a JComboBox for these fileds, they can only select the values in the database, and therefore never put in bad data, since it is in the database. This is the most user friendly.

Mark
 
wood burning stoves
 
subject: Is idiot-proofing user input a requirement?