Re: Practical C

Discussion in 'C Programming' started by Malcolm, Aug 27, 2003.

  1. Malcolm

    Malcolm Guest

    "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.
     
    Malcolm, Aug 27, 2003
    #1
    1. Advertising

  2. Malcolm

    gswork Guest

    "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.
     
    gswork, Aug 28, 2003
    #2
    1. Advertising

  3. Malcolm

    Peter Ong Guest

    "gswork" <> wrote in message
    news:...
    > "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.
     
    Peter Ong, Aug 28, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neil Zanella
    Replies:
    0
    Views:
    624
    Neil Zanella
    Nov 16, 2003
  2. Edwin Knoppert

    Sharing resources, practical? (webfarm)

    Edwin Knoppert, Feb 13, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    331
    Edwin Knoppert
    Feb 14, 2006
  3. sam

    Re: Practical .NET2 and C#2

    sam, Mar 17, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    437
    Patrick Smacchia
    Mar 17, 2006
  4. Jim
    Replies:
    3
    Views:
    902
    Will Hartung
    Sep 22, 2004
  5. Replies:
    1
    Views:
    795
    Ingo R. Homann
    Oct 26, 2005
Loading...

Share This Page