Re: unexpected result



On 2006-03-12, Michael Mair <Michael.Mair@xxxxxxxxxxxxxxx> wrote:
Richard G. Riley schrieb:

That seems to be an unfair accusation.

Note for the humour impaired : I included an obligatory ":)" smiley ...


Considering the people with which I had the dubious pleasure
to be at the receiving end of a job interview... Many had
excellent references and shiny documents proving their excellence
but were stumped after a couple of intermediate level questions.
When going back to basic level questions, I still found enough
gaps in their knowledge. From my point of view, passing an
advanced or better level course only means that the person should
know about such things but not that he or she actually does.

Are you seriously suggesting that someone who passes an advanced
course is not, at least, aware of bounds checking? I have no doubts
about the quality or thinking processes of a lot of C programmers. We
used to set a very simple test : write a version of strcpy. No *** :
90% couldnt do it. We wont mention writing a function to reverse a string.


Good C programmers frequently get the count wrong on array traversal :
and it doesnt cause your hard disk to get erased. All programmers are
human.

Alternatively, jump in there with a good book and have a lot fun
learning the language. If you worried that your hard disk would melt
for every out of control memory access you have in C then trust me, C
would be history by now.

That is true; however, I once upon a time managed to kill
80 percent of a harddisk's contents by an off-by-one error
when writing a Copper list. And it was not much fun to
bring it back floppy disk by floppy disk (as far as possible).

There are always risks. I was dicking around with a device driver
recently and locked my machine solid : I lost a whole batch of
bluetooth sync data that hadnt flushed through to the HD. Its never
100%. But to advise someone against learning C because of the
potential of buffer overruns is throwing the baby out with the bath water.


I did not follow it through but essentially missing memory
protection made it possible for the computer to run off wildly
through memory unfortunately encountering only legal opcodes
until most of the harddisk sectors contained only rubbish
while I thought that I should have given the task a higher
priority and why is the harddisk LED glowing...

Systems are a lot more robust now. I wiped my entire code of a
microdrive when I was writing a 68000 routine to save hiscore data : I
neglected to swap the microdrive and remove my backup assembler
source. Didnt stop me writing "save routines" though :)



Cheers
Michael
.