Re: Learning C Programming

Subject: Re: Learning C Programming
From: "Walker, Arlen P" <Arlen -dot- P -dot- Walker -at- JCI -dot- COM>
Date: Fri, 4 Dec 1998 10:04:31 -0600

I strongly suggest that unless you have some prior programming
experience, you start with something other than C. C and especially
C++ are difficult, complicated, and, frankly, dangerous languages.
Dangerous in that they allow beginners to unwittingly induce bugs
that can crash the whole program, if not the whole system, and which
can be extremely hard to find without sophisticated debugging tools
and techniques.

Male bovine execrement. All languages allow you to shoot yourself in the
foot with a double-barrelled 12-gauge and double-ought buck. But, when I
learned C (using MS QuickC, ages ago) I never once crashed the whole
system. Not that it can't be done, but rather that it's awfully hard to do
in a simple learning program without being careless and/or agressively
stupid. As for "sophisticated debugging tools and techniques," the tools
are bundled with the environment and debugging is as much a part of
programming as revising is of writing; if you're not prepared to do any you
won't get far at all, and the basic principles are simple and easy to
learn. (BTW, this is assuming you're not going to do this on Unix. Unix is
a fundamentally unfreindly environment and, unless the toolset has improved
by several orders of magnitude, if you're going to try this in *that* kind
of an environment, well, you're braver than I am.)

If you want to start with C, go ahead. Just get a good compiler and listen
to it. Turn on every possible warning and don't test run the program until
you've cleared every warning flag, or at least understand each and every
warning flag it gives you and are certain there are none left of any
importance. All the common mistakes should be flagged with warnings or
errors by competent compilers. If you're *really* paranoid about clean
code, get a lint (I can recommend PC-Lint from Gimpel Software) and go over
the code with it first. When it passes lint without flags, *then* compile.
And if your first attempt passes lint without any flags either: a) it's
"Hello World" or b) you're a natural talent and will soon require a very
large wallet.

Start with simple programs and build on to them. There's any number of
"learn C" books on the market that will do that for you.

The basic difference between Pascal and C is that C makes the assumption
that you know what you're doing, while Pascal assumes you're completely
ignorant. To anthropomorphize the metaphor I started with, when you tell
Pascal to point the shotgun at your foot and pull the trigger, he will ask
you six times, in different phrasing, before pulling the trigger. C, OTOH,
will cough gently and and ask "you really think that's a good idea, boss?"
and if you say yes (or don't respond at all) go ahead and fire.

If you're just striving for some practical (as opposed to theoretical)
knowledge of programming to help you converse intelligently with the
programmers around you, and don't want to waste the time learning a
language you'll never use, you're better off in C than Pascal. Almost no
one outside of academia uses Pascal, while C shows up almost everywhere.

Have fun,
Chief Managing Director In Charge, Department of Redundancy Department
DNRC 224

Arlen -dot- P -dot- Walker -at- JCI -dot- Com
In God we trust; all others must provide data.
Opinions expressed are mine and mine alone.
If JCI had an opinion on this, they'd hire someone else to deliver it.

From ??? -at- ??? Sun Jan 00 00:00:00 0000=

Previous by Author: Re: PC => MAC
Next by Author: Re: Alternative to Front Page?
Previous by Thread: Learning C Programming
Next by Thread: Re: Learning C Programming

What this post helpful? Share it with friends and colleagues:

Sponsored Ads