View Single Post
  #43   Report Post  
Posted to rec.crafts.metalworking
Jon Elson Jon Elson is offline
external usenet poster
 
Posts: 1,384
Default Beginning programming question

Ed Huntress wrote:

I know, I should ask this somewhere else, but I don't trust somewhere
else...

My son is an economics researcher for a think tank, and he uses statistics
programs -- SAS, SPSS, and SDATA -- all day long. He took it upon himself
to learn scripting for all three, an he's become pretty facile at writing
scripts in their dedicated scripting languages. Now he wants to learn
something about programming.

He has no interest in becoming a programmer, but he'd like to know
something that may be useful in his work (he had a math minor, and he's
now going for a Masters in applied mathematics). I used to dabble in C and
Assembly, so he's asked me what he should learn. I have no clue.


Unless he wants to know how computers REALLY work, avoid assembly language.
Knowing how computer work CAN be quite useful, and the knowledge can help
you avoid or at least understand really oddball problems from time to time,
but as you have programmed in it, you will already know it is NOT a quick
way to get a job done.

C is really a CRAPPY language, and has a number of syntactic "features" that
make it VERY easy to make hard-to-find mistakes. The meanings of = and ==
is a good example.

if (a==b) { do something}
is the normal conditional statement.
However :
if (a=b) {do something}
not only does the "something" based only on the value of b, it assigns the
value of b to a. In a couple dozen pages of code, I defy anyone to find
such a bug in less than a few hours. There are dozens more like this I
know about.

On the other hand, C generally produces efficient code, and is portable to
hundreds of different platforms. C++ adds a number of advanced features
that make it possible to create functions that perform operations not built
into the language, but I don't use them enough to be really comfortable with
them.

Jon