Re: Had an interview
- From: Robert Adsett <sub2@xxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 4 May 2008 13:07:32 -0400
In article <slrng1rj7g.c0f.andrews@xxxxxxxxxxxxxxxx>, Andrew Smallshaw
says...
On 2008-05-02, Robert Adsett <sub2@xxxxxxxxxxxxxxxxxxxxx> wrote:
Changing a 2 to a 1 and a 1 to a two obviously ;) I have noted though
that besides trying for the most obscure code to prove their worthiness
to program no-one has actually verfied the inputs are in range.
<rant>
And? I don't know about everyone else but I find the constant
checking of prerequisites an annoying distraction when working on
code and a waste of time and space in final production code. I
can understand some extra sanity checking in debug code but these
should be in moderation and preferably protected by #ifdef DEBUG
or whatever.
I don't think we are tremendously far apart really. I just observed
that no-one considered the possibility that the numbers might not be in
range. No asserts, no comments about acceptable range, nothing. That
combined with the search for obscure techniques I find a telling
cultural observation.
We could go on about the details of when and how to error check and I'm
not a paragon of checking either.
However, the fact that no one considered that the inputs could be out of
range (and for that matter your reaction to the observation) is an
interesting commentary on how we view this practice we call programming.
We seem to default to the assumption that the input values to our
current problem will be in the range we expect.
I wouldn't be surprised if obscure coding techniques and insufficient
range checking go together. And to be fair I think most contributions
to the obscure examples have been tongue in cheek.
Robert
** Posted from http://www.teranews.com **
.
- Follow-Ups:
- Re: Had an interview
- From: Andrey Tarasevich
- Re: Had an interview
- From: CBFalconer
- Re: Had an interview
- References:
- Re: Had an interview
- From: Andrey Tarasevich
- Re: Had an interview
- From: Spehro Pefhany
- Re: Had an interview
- From: Robert Adsett
- Re: Had an interview
- From: Andrew Smallshaw
- Re: Had an interview
- Prev by Date: Re: uC Slection for a learner project
- Next by Date: Re: A few novice questions
- Previous by thread: Re: Had an interview
- Next by thread: Re: Had an interview
- Index(es):