"gswork" <> wrote in message
news: om...
> "Malcolm" <> wrote in message
news:<biiqgf$tjr$>...
> > "Peter Ong" <> wrote in message
> > >
> > > Is there learning material out there that teaches C through the use of
> > > small and simple but useful C programs?
> > >
> > A small and simple but useful C program is a fairly rare beast. Most
example
> > programs written for teaching purposes are fairly useless, like
ultra-simple
> > databases consisting of employee names and salaries. In real life you
would
> > of course need a professional accountant to tell you how tax information
and
> > the like needs to be kept, and the whole thing would be anything but
simple.
>
> very true. It must be difficult for book authors to think up small
> and simple programs that are also genuinely useful.
>
> Moving/copying files around on various OSes is often done with a
> script rather than a compiled program too. Just about every little
> admin type application has been done over and over in C (and other
> languages) on various OSes. The source is there to see on many
> (notably linux), it's often more complex, even for a tiny app, than
> the beginner would be happy with too.
>
> A website loaded with 'small but useful apps in ansi c' for those less
> experienced with c would be a gold mine (if you hunt around online you
> can find allsorts, snippets is good)
>
> > > Both the books I'm using now to learn C are so focused on
> > > "C Proper", but I'm having a difficult time putting to use what I've
> > > learned, and I don't know that I've even learned anything.
> > >
> > It's very easy to find a platform that supports the standard library,
whilst
> > if you happen not to own a copy of MS Windows, or if Microsoft update
their
> > api, then a Windows-specific book is useless.
>
> The windows api (which gets piled onto rather than cast out - old
> stuff still works generally) should be irrelevant to someone starting
> out learning c, as you advice below.
>
> >
> > My advice is to learn C and the standard library first, doing useless
"save
> > a list of employees" style example programs. Then get a book on your
> > favourite platform, which will possibly assume a knowledge of the
standard
> > library and the language proper. Then you can write some really useful
> > programs.
>
> I think there'e an intermediate stage that's worth exploring more
> first, that of making those small and simple yet useful apps with ansi
> c, only when the beginner has properly experienced that process, and
> the debugging involved etc, would they be ready to start adding
> complexity in the form of platform code.
You're right, most administrative things are done through scripts, which I
already use. Today I use BASH and some VBScript. However, the keyword is
"most" administrative tasks.
Right now, I need to read a file a piece at a time, whether it's Binary or
Text. The little piece read is written to two or three different places.
This process repeats until EOF.
In any case, it is an interesting question, do I really want this in
compiled code form? When I see the finish product in C, I can answer that
more easily. That is what I'm trying to build.
|