On 02/03/2010, at 8:33 AM, Kurt Anderson wrote:
My point is, "why is 'Not' hard to read/understand/parse?"
A fair number of studies have shown that "negative tests" are
generally harder for people to comprehend than "positive tests".
Although it is possible to train yourself to handle negative tests
more easily, positive tests still parse faster (by humans). Therefore
it is nearly always better to write:
if ( something equal otherthing )
than
if ( something not equal otherthing )
or
if NOT( something equal otherthing )
For simple tests such as the above there is not much difference
especially for people whose lives are spent reading such things but
once the tests become more complex the difference in comprehension
becomes quite marked.
Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists
http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.