Lousy Error Messages

Programmers (I am sometimes among this crew of miscreants!) are often terrible at informing users about what has gone wrong in an interaction. I have previously offered the example of text boxes on, say, an application form, that have a limit on the number of words acceptable. Almost every time I encounter one in which I've gone over the limit, the program responds, "Over the limit of X hundred words." Realize that the programmer who put up this message just counted the number of words in your message (say 700), saw this was over the limit (of say 500), and then... totally failed to tell you "You are 200 words over the limit"! ("I don't get paid to count the words for you, MF!")

Tonight I ran into an equally uninformative error message in programming in iPython. I tried to run my program, and got this:

run predator_prey.py
Syntax error       ^

OK, by the looks of the message, it is a "syntax error" to type the letter "y" into a Python program.

What was really happening was that I had not turned on "automagic," and therefore I should have been typing:

%run predator_prey.py

OK, parsing is hard, and maybe the programmer at that point wasn't really sure what had gone wrong. Fair enough, but then don't stick in that little caret pointing at the letter 'y' implying "Here you are: that little 'y' is the offender here!"


Popular posts from this blog

Central Planning Works!