[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Human languages (was Re: expressions vs. statements)



On Thu, Dec 20, 2001 at 09:02:54PM -0000, Seth Gordon wrote:
> Judging from how commonly the "if (a = 0) {...}" bug appears in C
> programs, it seems that humans are *not* very skilled at solving this
> sort of problem.
Well, I think the problem with = and == is the large visual similarity. If you
don't look exactly, you can easily mix them up. As humans read in chunks, it is
easy to read an == for an = if you expect it to be there. If someone has some
psychology undergrads looking for an experiment to conduct, perhaps on could
construct program fragments and measure reading time and error rate for the
different variants.
As long as there is no data, I would prefer to apply Occams razor and accept the
simpler explanation.
Cheerio,
-- 
J.Wender@science-computing.de  -  Fon +4970719457-257 Fax-211
science+computing ag - Hagellocher Weg 71-75 - 72070 Tübingen
"All XML is a mere footnote to Lisp". (Sean McGrath)