Nuance...

KGIII

Administrator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
13,612
Reaction score
12,725
Credits
112,840
Recently, someone used the term (here) of 'lazy programming'. I chuckled but didn't comment. It exists - sometimes in the strangest of places.

I am playing with an old 486 with a 40 MB HDD - that type that needs its own controller. The drive is functional but the controller is meant for an 8 bit system and that's just not going to cut it. I can (and now have) improved it a great deal now that it's on a 16 bit system.

Anyhow, I own a copy of SpinRite (no, I didn't pirate it 'cause Steve deserves the money) and wanted to low-level format the drive. It's a different format than the 8 bit and will result in a much faster drive, with much faster seek and read times.

Along the way, I saw this:

(A STERN WARNING followed by) "To continue, press any key. To quit press ESC."

Do you see the problem with that?

The clause 'any key' includes the ESC key. So, to continue you can press any key except the ESC key. You can not press any key to continue.

I should email Steve Gibson (GRC) and let him know that I noticed a 'bug' in his program all these years later.
 


That’s a classic case of programming at its finest! Nothing like a little “press any key” confusion to keep us on our toes. Imagine the user’s face when they hit ESC and suddenly find themselves in a loop of regret!
 
(A STERN WARNING followed by) "To continue, press any key. To quit press ESC."

Do you see the problem with that?

The clause 'any key' includes the ESC key. So, to continue you can press any key except the ESC key. You can not press any key to continue.

I should email Steve Gibson (GRC) and let him know that I noticed a 'bug' in his program all these years later.
Interesting and classic mistake,
I'm curious what suggestion will you propose?

"To quit press ESC key. To continue press any other key" seems reasonable to me.
The only problem with this is that it favors quitting over continuing but swapping the 2 doesn't work grammatically.
 
I'm curious what suggestion will you propose?
With the exception of the ESC key, you may push any key to continue the process, If, you however wish to stop or cancel the running process then you may press the ESC key
 
With the exception of the ESC key, you may push any key to continue the process, If, you however wish to stop or cancel the running process then you may press the ESC key
Sorry but I don't agree because program output or output asking for user input is supposed to be concise and to the point without long sentences or too much talking.

For instance a dialog asking for user password should read "Please input password" or simply "Input password", anything longer than that is counter intuitive for both a user and programmer, a user is likely to skip reading or find the output annoying if it's too long, and the programmer often takes terminal or dialog width into account.
 
Sorry but I don't agree because program output or output asking for user input is supposed to be concise
JOKE
we all know not many people bothers to read instructions, no matter how short [or long] but not withstanding, they should be accurate,
 



Top