Sometimes It Pays To Cover All Bases
-
I did some programming for a German Engineering Company. I quickly learned that clarity of error messages counted alot and for good reason as many of the users were not engineers and were just average folks. "Gemütlichkeit" was their catch phrase for "user friendly" software at the time (80-90's). Language can be a tricky thing, at times. Once I was in large German department store during holiday. It was quite crowded. Waiting in a line some folks broke up the line by wandering through. I could not think of the German phrase for "excuse me there is a line here", so I blurted out "Achtung" (attention). The crowd parted like the Red Sea. My German companion laughed and said they thought I was a policeman directing them to "make way". Live and learn. Bottom line, "error messages are quite important".
"A little time, a little trouble, your better day" Badfinger
From Reader's Digest of about 50 years ago. (Much before Google) Somebody visited West Germany for the first time, and saw signboards of 'Ausfahrt' at many places, and was initially of the idea that Ausfahrt is huge city, to which all these roads lead. However no place called Ausfahrt was found on the map. Only later did he find out that Ausfahrt means Exit.
-
Hi All, Have been writing a front end for a piece of test equipment we designed in house to test a product which is a subassembly of another bigger (>£ or $). The subassembly is a questionable design but...I was told when writing the software these are the limits. Of course they change on a per-hour basis as the designers have copied some elses home work and don't really understand the issues so that get shoved in an ini file that can be edited via notepad. Too higher readings covered, too low readings covered & pass covered, ask the question whatelse does the unit output, 'nothing' add a catch for anything else. Basically a message box that says "Somethings Wrong, Check Part" someone who knows better looks over my code and says "Well, thats options a waste of time, but you have deployed it now, you will have to roll that mod back the next update we do!", Yesterday morning one of the operators reported a rig failure with a "message you haven't shown us" mass hysteria, morning meeting derailed, Senior leadership all tramp down to see issue. The message box on the screen is
Quote:
Somethings Wrong, Check Part
:wtf: I then have to explain infront of every one the rig has seen an error I have told not to check for & was told to remove as it was point less. You close the port and reopen the port and the issue is solved. "Why wasn't the operator told what to do with this error", my reply "Well I was told the error couldn't happen", think I was for it got told I had done the correct thing, "I'll have a word" waiting for the outcome now :)
These responses are most excellent and hilarious. :) I have to wonder though. When I try to update Windows, it errors out with a 0xC00XXXXXX error, sorry, we blah blah blah. I have to wonder who is minding the store.
Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.
-
These responses are most excellent and hilarious. :) I have to wonder though. When I try to update Windows, it errors out with a 0xC00XXXXXX error, sorry, we blah blah blah. I have to wonder who is minding the store.
Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.
As I have learnt proper error messages should contain the information to cure the problem, the 'Oh Dear that can't happen message' can be a little more comic to relive stress.
-
As I have learnt proper error messages should contain the information to cure the problem, the 'Oh Dear that can't happen message' can be a little more comic to relive stress.
glennPattonWork3 wrote:
, the 'Oh Dear that can't happen message' can be a little more comic to relive stress.
Sadly... depending on who reads that message, it might get the contrary effect and generate even more stress :rolleyes:
M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
-
Hi All, Have been writing a front end for a piece of test equipment we designed in house to test a product which is a subassembly of another bigger (>£ or $). The subassembly is a questionable design but...I was told when writing the software these are the limits. Of course they change on a per-hour basis as the designers have copied some elses home work and don't really understand the issues so that get shoved in an ini file that can be edited via notepad. Too higher readings covered, too low readings covered & pass covered, ask the question whatelse does the unit output, 'nothing' add a catch for anything else. Basically a message box that says "Somethings Wrong, Check Part" someone who knows better looks over my code and says "Well, thats options a waste of time, but you have deployed it now, you will have to roll that mod back the next update we do!", Yesterday morning one of the operators reported a rig failure with a "message you haven't shown us" mass hysteria, morning meeting derailed, Senior leadership all tramp down to see issue. The message box on the screen is
Quote:
Somethings Wrong, Check Part
:wtf: I then have to explain infront of every one the rig has seen an error I have told not to check for & was told to remove as it was point less. You close the port and reopen the port and the issue is solved. "Why wasn't the operator told what to do with this error", my reply "Well I was told the error couldn't happen", think I was for it got told I had done the correct thing, "I'll have a word" waiting for the outcome now :)
I do the user interfaces in our commercial ink-jet printing systems. There are more than 1,000 error messages defined, a number of which are "programming errors". A programming error is one where the code detects an error condition (out of memory, say) and then just throws up its hands and gives up. To quote Peter Griffin from Family Guy, these really grind my gears. All of these get directed to a generic message "An internal software failure has occurred. Please contact your service representative (
_symbol_
)" where_symbol_
identifies the actual error. More generally, error messages should identify the problem and guide the user to a solution: "Sensor A is out of calibration; adjust parameters A1, A2, and/or A3 to measured values." Even if the solution is to restart the application or the entire machine, this is what your users need for you to do. Telling them "It's broke" and thinking they'll just know how to fix it is contemptible.Software Zen:
delete this;
-
As I have learnt proper error messages should contain the information to cure the problem, the 'Oh Dear that can't happen message' can be a little more comic to relive stress.
glennPattonWork3 wrote:
Oh Dear that can't happen message
Imagine such a message coming on a car dashboard while someone is driving at high speed on a highway, ... ... or on the control panel of a medical imaging equipment while a technician is amidst an imaging procedure on a patient, or worse of all, ... ... on the main screen in the cockpit of a long haul commercial flight at 35000 feet. Can happen, though the probability is quite (infinitesimally?) low.
-
Hi All, Have been writing a front end for a piece of test equipment we designed in house to test a product which is a subassembly of another bigger (>£ or $). The subassembly is a questionable design but...I was told when writing the software these are the limits. Of course they change on a per-hour basis as the designers have copied some elses home work and don't really understand the issues so that get shoved in an ini file that can be edited via notepad. Too higher readings covered, too low readings covered & pass covered, ask the question whatelse does the unit output, 'nothing' add a catch for anything else. Basically a message box that says "Somethings Wrong, Check Part" someone who knows better looks over my code and says "Well, thats options a waste of time, but you have deployed it now, you will have to roll that mod back the next update we do!", Yesterday morning one of the operators reported a rig failure with a "message you haven't shown us" mass hysteria, morning meeting derailed, Senior leadership all tramp down to see issue. The message box on the screen is
Quote:
Somethings Wrong, Check Part
:wtf: I then have to explain infront of every one the rig has seen an error I have told not to check for & was told to remove as it was point less. You close the port and reopen the port and the issue is solved. "Why wasn't the operator told what to do with this error", my reply "Well I was told the error couldn't happen", think I was for it got told I had done the correct thing, "I'll have a word" waiting for the outcome now :)
It always pays to cover all bases! Every switch statement that I write contains a default clause. This is true even when switching on an enumerated type, because the underlying variable is an int (or another integral type), and it is possible that the value got corrupted.
enum {SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY} weekday;
weekday = SATURDAY;
++weekday; /* generates error in switch statement below */switch (weekday)
{
case SUNDAY: ...; break;
case MONDAY: ...; break;
case TUESDAY: ...; break;
case WEDNESDAY: ...; break;
case THURSDAY: ...; break;
case FRIDAY: ...; break;
case SATURDAY: ... break;
default: report("weekday out of bounds!"); /* report error */
}Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.
-
It always pays to cover all bases! Every switch statement that I write contains a default clause. This is true even when switching on an enumerated type, because the underlying variable is an int (or another integral type), and it is possible that the value got corrupted.
enum {SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY} weekday;
weekday = SATURDAY;
++weekday; /* generates error in switch statement below */switch (weekday)
{
case SUNDAY: ...; break;
case MONDAY: ...; break;
case TUESDAY: ...; break;
case WEDNESDAY: ...; break;
case THURSDAY: ...; break;
case FRIDAY: ...; break;
case SATURDAY: ... break;
default: report("weekday out of bounds!"); /* report error */
}Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.
That doesn't generate error here... we start the week on Monday :rolleyes: :laugh:
M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
-
glennPattonWork3 wrote:
Oh Dear that can't happen message
Imagine such a message coming on a car dashboard while someone is driving at high speed on a highway, ... ... or on the control panel of a medical imaging equipment while a technician is amidst an imaging procedure on a patient, or worse of all, ... ... on the main screen in the cockpit of a long haul commercial flight at 35000 feet. Can happen, though the probability is quite (infinitesimally?) low.
Amarnath S wrote:
the probability is quite (infinitesimally?) low
I tend to distinguish between cases were the probability is less than epsilon squared and those where epsilon squared is negative. I give less attention to the second group than to the first.
Religious freedom is the freedom to say that two plus two make five.
-
That doesn't generate error here... we start the week on Monday :rolleyes: :laugh:
M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
The problem is rooted in
Daniel Pfeffer wrote:
the underlying variable is an int (or another integral type)
If enumeration was a first class type, "++weekday;" (given Daniel Pfeffer's enum definition) would generate a runtime error, similar to a numeric overflow exception. Unless, of course if the enumeration type allows an enum to be defined as cyclical, in which case the new value would be SUNDAY.
Nelek wrote:
That doesn't generate error here... we start the week on Monday
First: I think that goes for all of Western Europe nowadays. We (Norway) changed from Sunday to Monday as the first day of the week something like 40-50 years ago to be in harmony with other European countries. As the English term is 'weekend', and Sunday is part of the weekend, I always assumed that Sunday ended the week in English speaking countries. I was surprised to learn that while this is true in GB, in the US of A it appears that the week ends one day before the weekend ends. A little nitpicking: Different cultures disagree about the first day of the week. If you make software for use in multiple cultures, you cannot (or at least should not) replace the enum definition when you start marketing the software in a new region; that could result in subtle errors. Rather, the enum definition should be completely ignorant of which value is considered to be the position of the air valve on the rotating wheel. So, Daniel Pfeffer's definition is perfectly OK, even in Europe, assuming that his application code never makes any assumption about the first enum value being the first day of the week. Given that enum is not a first class type, the code would correctly go to the default case even in Europe. If your language allows: Overload ++ for the weekday type, to make weekday++ == SUNDAY when the old value of weekday == SATURDAY. Then it doesn't matter.
Religious freedom is the freedom to say that two plus two make five.
-
A very long time ago, I worked on a classified system where the systems guys forgot about a key need. So, I whipped up the need. Everyone was happy. Well, part of the development was a handler that caught "the end of all things" - the s/w interfacing with the system has encountered an error that was evil and all was over. Honestly, the error should NEVER happen. So, as filler I added a "Error encountered, that's all folks message." Honestly, it was just a place holder. Honest. Reference video: Thats all folks! Looney Tunes - YouTube[^] Now, I wrote all this code as a contractor for company A, moved to company B, and was working with company C when I got a call late one evening (back then I was always up late). It's my boss (actually a great guy and friend... ) he's in Europe and they are doing serious testing on this system... and that message came up. Conversation: Boss: "Charlie...." inject pain and suffering and exasperation on his part... now I've had calls like this before sooo.... Me: "What's wrong boss?" Boss: "What does it mean when ...." Me: I started laughing. It honestly wasn't funny. They were in the middle of system trials that were very expensive - think aircraft flying around, people shooting missiles and artillery... it was a BFD. I explained the issue, and boss sighed. But we could not change the code. To this day there is documentation running around somewhere that explains what "That's all folks" means to a bunch of Germans. And Germans have no humor even on their best day. So, I feel your pain.
Charlie Gilley “Get off my lawn!"
Great story! Reminds me of Blinkenlights[^]. :laugh: ACHTUNG! ALLES TURISTEN UND NONTEKNISCHEN LOOKENSPEEPERS! DAS KOMPUTERMASCHINE IST NICHT FÜR DER GEFINGERPOKEN UND MITTENGRABEN! ODERWISE IST EASY TO SCHNAPPEN DER SPRINGENWERK, BLOWENFUSEN UND POPPENCORKEN MIT SPITZENSPARKEN. IST NICHT FÜR GEWERKEN BEI DUMMKOPFEN. DER RUBBERNECKEN SIGHTSEEREN KEEPEN DAS COTTONPICKEN HÄNDER IN DAS POCKETS MUSS. ZO RELAXEN UND WATSCHEN DER BLINKENLICHTEN.
-
From Reader's Digest of about 50 years ago. (Much before Google) Somebody visited West Germany for the first time, and saw signboards of 'Ausfahrt' at many places, and was initially of the idea that Ausfahrt is huge city, to which all these roads lead. However no place called Ausfahrt was found on the map. Only later did he find out that Ausfahrt means Exit.
-
A very long time ago, I worked on a classified system where the systems guys forgot about a key need. So, I whipped up the need. Everyone was happy. Well, part of the development was a handler that caught "the end of all things" - the s/w interfacing with the system has encountered an error that was evil and all was over. Honestly, the error should NEVER happen. So, as filler I added a "Error encountered, that's all folks message." Honestly, it was just a place holder. Honest. Reference video: Thats all folks! Looney Tunes - YouTube[^] Now, I wrote all this code as a contractor for company A, moved to company B, and was working with company C when I got a call late one evening (back then I was always up late). It's my boss (actually a great guy and friend... ) he's in Europe and they are doing serious testing on this system... and that message came up. Conversation: Boss: "Charlie...." inject pain and suffering and exasperation on his part... now I've had calls like this before sooo.... Me: "What's wrong boss?" Boss: "What does it mean when ...." Me: I started laughing. It honestly wasn't funny. They were in the middle of system trials that were very expensive - think aircraft flying around, people shooting missiles and artillery... it was a BFD. I explained the issue, and boss sighed. But we could not change the code. To this day there is documentation running around somewhere that explains what "That's all folks" means to a bunch of Germans. And Germans have no humor even on their best day. So, I feel your pain.
Charlie Gilley “Get off my lawn!"
Our favorite error message was from Fortran 77 compiler on Data General Eclipse mini-computer. "Unknown error code 79" Apparently it is known to the compiler to assign a number to it. It turns out their other similar cryptic messages Patch Installation Failure - Unknown Error Code: 2145124329 | ManageEngine[^]
"A little time, a little trouble, your better day" Badfinger
-
Great story! Reminds me of Blinkenlights[^]. :laugh: ACHTUNG! ALLES TURISTEN UND NONTEKNISCHEN LOOKENSPEEPERS! DAS KOMPUTERMASCHINE IST NICHT FÜR DER GEFINGERPOKEN UND MITTENGRABEN! ODERWISE IST EASY TO SCHNAPPEN DER SPRINGENWERK, BLOWENFUSEN UND POPPENCORKEN MIT SPITZENSPARKEN. IST NICHT FÜR GEWERKEN BEI DUMMKOPFEN. DER RUBBERNECKEN SIGHTSEEREN KEEPEN DAS COTTONPICKEN HÄNDER IN DAS POCKETS MUSS. ZO RELAXEN UND WATSCHEN DER BLINKENLICHTEN.
-
Great story! Reminds me of Blinkenlights[^]. :laugh: ACHTUNG! ALLES TURISTEN UND NONTEKNISCHEN LOOKENSPEEPERS! DAS KOMPUTERMASCHINE IST NICHT FÜR DER GEFINGERPOKEN UND MITTENGRABEN! ODERWISE IST EASY TO SCHNAPPEN DER SPRINGENWERK, BLOWENFUSEN UND POPPENCORKEN MIT SPITZENSPARKEN. IST NICHT FÜR GEWERKEN BEI DUMMKOPFEN. DER RUBBERNECKEN SIGHTSEEREN KEEPEN DAS COTTONPICKEN HÄNDER IN DAS POCKETS MUSS. ZO RELAXEN UND WATSCHEN DER BLINKENLICHTEN.
In the old days, Norwegian trains had windows that you could open. There was a warning note on the window sill, stating in Norwegian "Det er farlig å lene seg ut av vinduet" (Leaning out of the windows in dangerous), in English: "Please do not lean out of the window", and then, in twice as large letters, boldface, uppercase only, in German: "ES IST STRENGSTENS VERBOTEN, SICH AUS DEM FENSTER ZU LEHNEN". When I was a teenager, these sticky notes were disappearing: People like me and my friends pulled them off to put them on the sills of our bedroom windows. Few years later, those carriages with windows that could be opened were gone.
Religious freedom is the freedom to say that two plus two make five.
-
Our favorite error message was from Fortran 77 compiler on Data General Eclipse mini-computer. "Unknown error code 79" Apparently it is known to the compiler to assign a number to it. It turns out their other similar cryptic messages Patch Installation Failure - Unknown Error Code: 2145124329 | ManageEngine[^]
"A little time, a little trouble, your better day" Badfinger
In the pre-PC, pre-Linux days, I was working in a company making their own machines, their proprietary systems programming language and of course their own compiles. Sometimes it crashed fatally with the message "Something wrong". We started competing: Who can make the shortest, simplest program that creates a "Something wrong" crash. Of course we reported to the compiler responsible, and the next (or maybe second) compiler release handled that case. But as "Something wrong" was a catch-all comparable to "Unhandled exception", we regularly came up with new cases. The shortest program to result in "Something wrong" was four lines long :-), about as complex as "HelloWorld".
Religious freedom is the freedom to say that two plus two make five.
-
In the pre-PC, pre-Linux days, I was working in a company making their own machines, their proprietary systems programming language and of course their own compiles. Sometimes it crashed fatally with the message "Something wrong". We started competing: Who can make the shortest, simplest program that creates a "Something wrong" crash. Of course we reported to the compiler responsible, and the next (or maybe second) compiler release handled that case. But as "Something wrong" was a catch-all comparable to "Unhandled exception", we regularly came up with new cases. The shortest program to result in "Something wrong" was four lines long :-), about as complex as "HelloWorld".
Religious freedom is the freedom to say that two plus two make five.
-
The problem is rooted in
Daniel Pfeffer wrote:
the underlying variable is an int (or another integral type)
If enumeration was a first class type, "++weekday;" (given Daniel Pfeffer's enum definition) would generate a runtime error, similar to a numeric overflow exception. Unless, of course if the enumeration type allows an enum to be defined as cyclical, in which case the new value would be SUNDAY.
Nelek wrote:
That doesn't generate error here... we start the week on Monday
First: I think that goes for all of Western Europe nowadays. We (Norway) changed from Sunday to Monday as the first day of the week something like 40-50 years ago to be in harmony with other European countries. As the English term is 'weekend', and Sunday is part of the weekend, I always assumed that Sunday ended the week in English speaking countries. I was surprised to learn that while this is true in GB, in the US of A it appears that the week ends one day before the weekend ends. A little nitpicking: Different cultures disagree about the first day of the week. If you make software for use in multiple cultures, you cannot (or at least should not) replace the enum definition when you start marketing the software in a new region; that could result in subtle errors. Rather, the enum definition should be completely ignorant of which value is considered to be the position of the air valve on the rotating wheel. So, Daniel Pfeffer's definition is perfectly OK, even in Europe, assuming that his application code never makes any assumption about the first enum value being the first day of the week. Given that enum is not a first class type, the code would correctly go to the default case even in Europe. If your language allows: Overload ++ for the weekday type, to make weekday++ == SUNDAY when the old value of weekday == SATURDAY. Then it doesn't matter.
Religious freedom is the freedom to say that two plus two make five.
You missed the "joke" icon... didn't you?
M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
-
You missed the "joke" icon... didn't you?
M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
At least a couple of points were dead serious: I really wish that today's programming languages had enumerations as a first class type, not just as a thin veil over an integer 'base type'. Cyclical enumerations would be an obvious modifier. Second: I am dead serious when claiming that a far too high fraction of programmers ignore cultural differences in their coding. Stressing that the first enumeration value is unrelated to first day of the week is no joke. Yet you frequently see that kind of implicit assumptions in code. Overloading ++ (and --, and for that sake plain + and -) to make an enum type cyclical is no joke. So although I wrote it as a follow up to your joke marked entry, I wanted to point out that there are connotations to the joke that are not just a joke, but serious matters. Unfortunately, I have never found an English translation of one of the Danish poet Piet Hein's 'gruk' (he made up that term for his short, pointed words of wisdom), the one that goes, in my very un-poetic from-the-top-of-my-head translation: He who sees a joke as just a joke and seriousness always seriously, he really understands them both rather poorly. If I had flagged my post as a joke, I fear that a lot of readers would have failed to notice that the major points of my post are dead serious.
Religious freedom is the freedom to say that two plus two make five.
-
I do the user interfaces in our commercial ink-jet printing systems. There are more than 1,000 error messages defined, a number of which are "programming errors". A programming error is one where the code detects an error condition (out of memory, say) and then just throws up its hands and gives up. To quote Peter Griffin from Family Guy, these really grind my gears. All of these get directed to a generic message "An internal software failure has occurred. Please contact your service representative (
_symbol_
)" where_symbol_
identifies the actual error. More generally, error messages should identify the problem and guide the user to a solution: "Sensor A is out of calibration; adjust parameters A1, A2, and/or A3 to measured values." Even if the solution is to restart the application or the entire machine, this is what your users need for you to do. Telling them "It's broke" and thinking they'll just know how to fix it is contemptible.Software Zen:
delete this;
Gary R. Wheeler wrote:
ink-jet printing systems
:omg: That is even worse than working for the dark side. :-D So Gary, are you then able to explain what the 1.2Gb of driver software for a printer are for ? Could you delete the code for programmed obsolescence, the code that prevents me from scanning when my cartridges of violet ink are empty, the code that voluntarily prints out a "test page" every other day, the code that requires me to register online to print a word document on my local pc, recompile, and send me the resulting 200kB .dll ? :rolleyes: