Mail Archives: djgpp/2004/07/21/22:31:12
Sterten wrote:
>
> I tried R[99]={770} and then found that only the first value was 770,
> so I concluded that the other values are undefined and only accidently
> zero in most cases.
Many years ago I worked on software to drive some
automated electronic test equipment. One member of the
team was a sure-fire electronics engineer, who could
explain to us just why it was important to adjust the
potential to 5 volts *before* applying the 1200 Hz sine
wave, and that sort of thing.
He was accustomed to analyzing his circuits before
applying power to them, and he was much amused and bemused
by us software types, perfectly willing to throw together
any old bunch of gibberish and run it through the compiler.
He characterized our methodology as "Random punches in
random card columns," (I said it was many years ago),
"then debug."
Guenter Sterten, you are validating his observation.
You have, it seems, no knowledge of the programming language
you are attempting to use. You throw together some half-
understood bits of C-ish text, stir them until the compiler
stops complaining, and then try to draw inferences from
whatever you can observe of the outcome. Your efforts do
not seem guided by purpose, but by chance.
Now, when confronted by the mysteries of the primate
genome or the interstellar microwave background radiation,
your method is indeed the best available. But given the
existence of instruction manuals -- to wit, dozens of fine
books explaining how to use the C language -- the choice to
ignore them is either folly or arrogance. Your experiences
in trying to get this simple program to run must surely have
cured you of the latter; what will cure you of the former?
Learn C, Guenter Sterten. Get a book: There's no
shortage of good ones, and even a bad one would put you
ahead of where you stand today. Your problems stem from
a complete lack of knowledge of the tool you are trying
to use; take some time to learn about the tool before you
chop your leg off in your ignorance.
Seriously.
There's nothing wrong with being ignorant; it's where
we all started. But there *is* something wrong with plowing
ahead in a wilful state of continuing ignorance, when the
means to cure it are all about you. Use them; you'll feel
better for it.
--
Eric Sosman
esosman AT acm DOT org
- Raw text -