[FM Discuss] C primer needed

Julian Oliver julian at selectparks.net
Wed Mar 25 08:47:19 PDT 2009


..on Wed, Mar 25, 2009 at 10:26:08AM -0500, Janet Swisher wrote:
> So, wanna write a book? I think that can be arranged :-)
> 
> On Tue, Mar 24, 2009 at 8:14 PM, Lori Nagel <jastiv at yahoo.com> wrote:
> >
> > Hello, you may remember me from the Libre Planet conference when I stopped by to see what you were working on with the free software manuals.
> > I noticed there were not any that pertained specifically to programming
> > although that is not so much just software usage.
> 
> > A primer is a sort of
> > pre-programing book, the kind of book you would give to someone who
> > didn't know anything about programming at all who suddenly decided they
> > wanted to modify a C program. It should be really basic.
> 
> If somebody says "I want to learn to program", C is not the language I
> would suggest. But I can see the scenario of "I have this program, but
> I just wish it did X instead of Y." An interesting larger question is
> how people make the leap from user to coder. That might happen more
> often if there were more resources like you're suggesting. I think
> many users don't think programming is within the realm of possibility
> for them.

There are a few schools of thought about this. 

I often teach object oriented programming, to students with little or no
knowledge as to what a program is, using Python.

A great, if not poorly formatted, manual to these ends is:

	http://greenteapress.com/thinkpython/thinkCSpy/

All said, while Python can go a long way to teaching people the basics of object
orientation and program design more generally, it can also prove to introduce
problems when that person later wants to explore C or C++. Things like memory
management, garbage collection, pointers/references are 'glossed over' with
Python. Moreso, you're not talking to a compiler but rather an interpreter - a
very different relationship with the code you write.

The kind of great C manual the world needs is not "Learn to program with C" but
"Programming in C".

Such a manual would introduce C (or C++) from the perspective of writing good
quality object code; what a pointer is and why to use them, learning about
compilers and common pitfalls in the design of a C program.. etc.

IMHO it should be separate from a "learning to program" manual, which can, I
believe be taught using any modern fully OO language as a base (an interpreted
language like Python being a great candidate, while compiler dependent C is
not!).

Cheers,

-- 
Julian Oliver
home: New Zealand
based: Madrid, Spain
currently: Madrid, Spain
about: http://julianoliver.com



More information about the Discuss mailing list