A line number is harder to hold in your head
When you have 852442 line files, maybe, but I'm perfectly capable of remembering 3 digits for a short time. I'm sure that if you try, you can also do that. Sometimes, but not often, there are 4 digits. Still not at all hard.
If an end user sees the message and tries to remember it to tell you
Error messages are sent to me by email. The one time per week that someone actually calls, they're always reading it off the screen. Perhaps you code for the internetless?
A phrase like "Twinkies and Spandex" is significantly more likely to get to you intact.
bar.txt: No such file or directory at foo.pl line 15
versus
Twinkies and Spandex (No such file or directory)
Something tells me you're wasting my time.
| [reply] [d/l] [select] |
I'm perfectly capable of remembering 3 digits for a short time.
So would I be, if I didn't get interrupted three times
on my way from the circ desk to my desk (twenty feet)
to fix the problem :-)
Error messages are sent to me by email. The
one time per week that someone actually calls, they're
always reading it off the screen. Perhaps you code for
the internetless?
Close. Think in terms of people who print email and
have to disconnect from the internet to use the phone.
Also, I said "End Users", so think in terms of people
who don't know how to copy and paste. (Really. I've
been teaching introductory computer classes twice a
month at the library since 2000 and have by doing so
significantly increased the number of people in town
who copy and paste. Yes,
Galion is a fairly technophobic community. People
have access to the internet, but they're not
comfortable with it.)
Nearly half of the bug reports I get are on
sticky notes. Most of the rest are delivered verbally,
either in person (this is WAY more common than you
would suspect) or on the phone -- and, as noted,
almost all of the internet connections around here
are dialup, and most people don't have a second line
for voice, so they have to disconnect to use the phone.
Couple that with an end-user mentality that requires
them to "x out of" (i.e., close) the web browser in
order to disconnect, and you have a recipe for not
being able to remember an error message to give it
to me. When I first started this job, vanishingly
close to 100% of the bug reports I got were totally
useless, along the lines of "it didn't work".
Worse, when I started asking them to write down
the error message next time and bring it to me,
I discovered that they had no idea what to write
down and so usually wrote down a non-unique part of
the message. (No amount of cajoling can get most
end users to write down an _entire_ error message
if it has any length to it at all.)
An error message like "Grouchy Pickles" will actually
_get_ to me, because it sticks in the user's head;
then I grep for it, and I know which
line the error occurred on, which is more than
I was usually able to discover from error reports
before I adopted this technique.
If you're writing stuff that gets used mostly by
powerusers then you probably won't need this technique.
;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print
| [reply] |
| [reply] |