On Sat, 7 Apr 2001, Jack Coates wrote:

> Every time I've tried to learn C or C++ the instructor or author lays
> out all the basics of the language and I do fine. We do a few example
> programs like helloworld.c and add/subtract calculators, and I do fine.
> Then the excersises jump into geometry or calculus problems, because of
> course anyone interested in programming took lots of math in school,
> right? And then it's all over. I'm learning, but so far shell script is
> where it's at for me.

Sorry to hear about the inappropriate subject matter in your
classes.  I seem to remember a lot of business and computer science
subjects back when I was taking programming classes. Numerical analysis
is not a strong point of C, though C++ has some features that lend
themselves to advanced math.
 
> -- 
> Jack Coates
> Monkeynoodle: It's what's for dinner!
> 
> On Thu, 5 Apr 2001, David Douthitt wrote:
> 
> > [EMAIL PROTECTED] wrote:
> >
> > > People who are good at C say that C is easy. Every time I attempt
> > > to learn C, I fail miserably...

I learned C on my own... I needed to program an embedded computer, and I
already had learned assembly language on my own, but wanted something a
little higher-level.  I couldn't find a Pascal compiler for my embedded
board, but I could find a C cross-compiler.  So I learned C.  Funny thing
was, they didn't have a source code debugger, so I got to debug in
assembly.  I learned what all the C constructs looked like in assembler,
and my grasp of both assembly AND C improved a lot.

At this point I have a detailed grasp of the vagaries of C and am pretty
strong with C++ as well, but that way of thinking only helps me get around
the oddball syntax and execution errors.  At a different level you have to
think about the vocabulary you want to express your solution in, and
keeping knapsacks of data (structs) around lets you hide a lot of
details... the FILE stdio type is an example of this.

I would not characterize C as easy.  However, it is such a powerful tool
that I think it is worth the effort put into it.  Learning to use gdb and
disassembling the C code will raise a lot of questions, but knowing the
answers to those questions pay off when you run into strange syntax or
behavior.

What I have been up to recently is trying to get a good handle on
Unix.... since most of my C work has not had Unix features available.

> > Sounds like what happens to me every time I try to learn LISP or
> > Smalltalk.....

I tried Smalltalk.  I was looking for a powerful GUI tool, but didn't want
to spend the piles of $$ a commercial system would cost, and the GNU
version was not working very well for that purpose.

> >
> > The thing I always find fascinating is the textbooks show you how to
> > add 5 and 6, but not how to scan a configuration file; or they show
> > you how to do a bubble sort, but not how to react to user input.  It
> > seems as if general disk I/O is a no-no.

Heck, user I/O in C is a pain.  To do it right, you pretty much have to
write your own character-by-character input routines, or someones oddball
non-portable library of goodies.

> > Thus, I never seem to be able to find a way to do anything useful in
> > languages like LISP or Smalltalk - or even Scheme - I wound up with TI
> > PC Scheme on 5.25" once - still have it :-)

Try Forth.  Stream data is for sissies.

> > Of course, having an expert you can pester helps too....

Yes.  I have never been able to wangle one in the next cubicle, so I like
USENET and Google. :)

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[EMAIL PROTECTED]>        Basics: ##.#.       ##.#.  Live Go...
Work:<[EMAIL PROTECTED]>              Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------


_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to