Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: Practical C

Reply
Thread Tools

Re: Practical C

 
 
Malcolm
Guest
Posts: n/a
 
      08-27-2003

"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.
>
> 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.

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.


 
Reply With Quote
 
 
 
 
gswork
Guest
Posts: n/a
 
      08-28-2003
"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.
 
Reply With Quote
 
 
 
 
Peter Ong
Guest
Posts: n/a
 
      08-28-2003

"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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Practical .NET2 and C#2 sam ASP .Net 1 03-17-2006 07:50 AM
Sharing resources, practical? (webfarm) Edwin Knoppert ASP .Net 1 02-14-2006 06:42 AM
Practical value of certifications jeffc Microsoft Certification 8 01-05-2005 06:01 PM
Practical advise on 70-292 required pearsondan99 MCSE 2 12-01-2003 11:24 PM
VHDL: practical questions: beyond just hobbies Neil Zanella VHDL 0 11-16-2003 06:46 AM



Advertisments