To C or not to C, that is the question...

Discussion in 'C Programming' started by Rehceb Rotkiv, Apr 13, 2007.

  1. Hello everyone,

    I'm using Linux since quite a while now and I'm happy to notice that I'm
    beginning to "know my way round". I can write little bash, sed and awk
    scripts to help me with my everyday tasks and I've also had a thorough
    look at Python, which is ideally suited for helping me with my work,
    which is linguistic research, i.e. mainly text processing.

    However, this does not seem to be of much use in understanding and
    modifying source code of Linux applications, 90% of which seem to be
    written in C. I do not want to write revolutionary new programs, I'd just
    like to look under the hood of some Linux apps and perhaps write a little
    patch here and there to adapt them for my purposes and, in this way,
    maybe even contribute back to the Open Source community one day.

    The problem is, C doesn't look at all like the newbie-friendly "written
    pseudo-code" walk-in-the-park that is Python! Variable declarations,
    pointers, memory allocations... I'm scared! My main concern is: Is it
    even feasible for me to learn enough C for the above purposes in my
    restricted spare time (which would be pretty much 8 PM till 8 AM! ;) or
    should I leave that to the computer science students and full-time Linux
    hackers?

    I would be glad if you could tell me about your own experiences with C --
    and whether I should or shouldn't learn it from your point
    of view.

    With best regards,
    Rehceb
    Rehceb Rotkiv, Apr 13, 2007
    #1
    1. Advertising

  2. Rehceb Rotkiv

    user923005 Guest

    On Apr 13, 10:56 am, Rehceb Rotkiv <> wrote:
    > Hello everyone,
    >
    > I'm using Linux since quite a while now and I'm happy to notice that I'm
    > beginning to "know my way round". I can write little bash, sed and awk
    > scripts to help me with my everyday tasks and I've also had a thorough
    > look at Python, which is ideally suited for helping me with my work,
    > which is linguistic research, i.e. mainly text processing.
    >
    > However, this does not seem to be of much use in understanding and
    > modifying source code of Linux applications, 90% of which seem to be
    > written in C. I do not want to write revolutionary new programs, I'd just
    > like to look under the hood of some Linux apps and perhaps write a little
    > patch here and there to adapt them for my purposes and, in this way,
    > maybe even contribute back to the Open Source community one day.
    >
    > The problem is, C doesn't look at all like the newbie-friendly "written
    > pseudo-code" walk-in-the-park that is Python! Variable declarations,
    > pointers, memory allocations... I'm scared! My main concern is: Is it
    > even feasible for me to learn enough C for the above purposes in my
    > restricted spare time (which would be pretty much 8 PM till 8 AM! ;) or
    > should I leave that to the computer science students and full-time Linux
    > hackers?
    >
    > I would be glad if you could tell me about your own experiences with C --
    > and whether I should or shouldn't learn it from your point
    > of view.


    Buy or borrow a copy of
    "The C Programming Language"
    by Brian W. Kernighan and Dennis M. Ritchie.
    Prentice Hall, Inc., 1988.
    ISBN 0-13-110362-8 (paperback), 0-13-110370-9 (hardback).

    It's 272 pages long, including the index. In about one month you can
    learn enough to become a C programmer with nothing to be ashamed of
    (if you apply yourself). I don't think C is more difficult than
    Python so if you became comfortable in Python you will be able to do
    the same thing with C.

    By the way, you've come to the right place to ask questions.
    user923005, Apr 13, 2007
    #2
    1. Advertising

  3. Rehceb Rotkiv

    Barry Guest

    "user923005" <> wrote in message
    news:...
    > On Apr 13, 10:56 am, Rehceb Rotkiv <> wrote:
    >> Hello everyone,
    >>
    >> I'm using Linux since quite a while now and I'm happy to notice that I'm
    >> beginning to "know my way round". I can write little bash, sed and awk
    >> scripts to help me with my everyday tasks and I've also had a thorough
    >> look at Python, which is ideally suited for helping me with my work,
    >> which is linguistic research, i.e. mainly text processing.
    >>
    >> However, this does not seem to be of much use in understanding and
    >> modifying source code of Linux applications, 90% of which seem to be
    >> written in C. I do not want to write revolutionary new programs, I'd just
    >> like to look under the hood of some Linux apps and perhaps write a little
    >> patch here and there to adapt them for my purposes and, in this way,
    >> maybe even contribute back to the Open Source community one day.
    >>
    >> The problem is, C doesn't look at all like the newbie-friendly "written
    >> pseudo-code" walk-in-the-park that is Python! Variable declarations,
    >> pointers, memory allocations... I'm scared! My main concern is: Is it
    >> even feasible for me to learn enough C for the above purposes in my
    >> restricted spare time (which would be pretty much 8 PM till 8 AM! ;) or
    >> should I leave that to the computer science students and full-time Linux
    >> hackers?
    >>
    >> I would be glad if you could tell me about your own experiences with C --
    >> and whether I should or shouldn't learn it from your point
    >> of view.

    >
    > Buy or borrow a copy of
    > "The C Programming Language"
    > by Brian W. Kernighan and Dennis M. Ritchie.
    > Prentice Hall, Inc., 1988.
    > ISBN 0-13-110362-8 (paperback), 0-13-110370-9 (hardback).
    >
    > It's 272 pages long, including the index. In about one month you can
    > learn enough to become a C programmer with nothing to be ashamed of
    > (if you apply yourself). I don't think C is more difficult than
    > Python so if you became comfortable in Python you will be able to do
    > the same thing with C.
    >
    > By the way, you've come to the right place to ask questions.
    >


    How has it been since you read it? Certainly more than one month.
    Yes I mean to imply something.
    Barry, Apr 13, 2007
    #3
  4. Rehceb Rotkiv

    user923005 Guest

    On Apr 13, 12:39 pm, "Barry" <> wrote:
    > "user923005" <> wrote in message
    >
    > news:...
    >
    >
    >
    >
    >
    > > On Apr 13, 10:56 am, Rehceb Rotkiv <> wrote:
    > >> Hello everyone,

    >
    > >> I'm using Linux since quite a while now and I'm happy to notice that I'm
    > >> beginning to "know my way round". I can write little bash, sed and awk
    > >> scripts to help me with my everyday tasks and I've also had a thorough
    > >> look at Python, which is ideally suited for helping me with my work,
    > >> which is linguistic research, i.e. mainly text processing.

    >
    > >> However, this does not seem to be of much use in understanding and
    > >> modifying source code of Linux applications, 90% of which seem to be
    > >> written in C. I do not want to write revolutionary new programs, I'd just
    > >> like to look under the hood of some Linux apps and perhaps write a little
    > >> patch here and there to adapt them for my purposes and, in this way,
    > >> maybe even contribute back to the Open Source community one day.

    >
    > >> The problem is, C doesn't look at all like the newbie-friendly "written
    > >> pseudo-code" walk-in-the-park that is Python! Variable declarations,
    > >> pointers, memory allocations... I'm scared! My main concern is: Is it
    > >> even feasible for me to learn enough C for the above purposes in my
    > >> restricted spare time (which would be pretty much 8 PM till 8 AM! ;) or
    > >> should I leave that to the computer science students and full-time Linux
    > >> hackers?

    >
    > >> I would be glad if you could tell me about your own experiences with C --
    > >> and whether I should or shouldn't learn it from your point
    > >> of view.

    >
    > > Buy or borrow a copy of
    > > "The C Programming Language"
    > > by Brian W. Kernighan and Dennis M. Ritchie.
    > > Prentice Hall, Inc., 1988.
    > > ISBN 0-13-110362-8 (paperback), 0-13-110370-9 (hardback).

    >
    > > It's 272 pages long, including the index. In about one month you can
    > > learn enough to become a C programmer with nothing to be ashamed of
    > > (if you apply yourself). I don't think C is more difficult than
    > > Python so if you became comfortable in Python you will be able to do
    > > the same thing with C.

    >
    > > By the way, you've come to the right place to ask questions.

    >
    > How has it been since you read it?


    It has not changed since I read it. I pick it up from time to time
    (it's within arm's reach at my desk) and verify things.

    > Certainly more than one month.


    I have read from in recently, if that is what you are implying. I
    guess your first sentence was supposed to be "How long has it been
    since you read it?"
    If that is the case, it has been 20 years since I read it from cover
    to cover. And yet if you master that simple book, less than 1/2 inch
    thick, then you will definitely be an expert in the C language. In
    fact, that is the main beauty of C. It is not something with
    megabytes of features that takes years to learn.

    > Yes I mean to imply something.


    I guess it will be better if you just come out and say it. Then we
    can make fun of you and we'll all have a good belly-laugh.

    Yes, I also meant to imply something.
    user923005, Apr 13, 2007
    #4
  5. Rehceb Rotkiv

    Barry Guest

    "user923005" <> wrote in message
    news:...
    > On Apr 13, 12:39 pm, "Barry" <> wrote:
    >> "user923005" <> wrote in message
    >>
    >> news:...
    >>
    >>
    >>
    >>
    >>
    >> > On Apr 13, 10:56 am, Rehceb Rotkiv <> wrote:
    >> >> Hello everyone,

    >>
    >> >> I'm using Linux since quite a while now and I'm happy to notice that
    >> >> I'm
    >> >> beginning to "know my way round". I can write little bash, sed and awk
    >> >> scripts to help me with my everyday tasks and I've also had a thorough
    >> >> look at Python, which is ideally suited for helping me with my work,
    >> >> which is linguistic research, i.e. mainly text processing.

    >>
    >> >> However, this does not seem to be of much use in understanding and
    >> >> modifying source code of Linux applications, 90% of which seem to be
    >> >> written in C. I do not want to write revolutionary new programs, I'd
    >> >> just
    >> >> like to look under the hood of some Linux apps and perhaps write a
    >> >> little
    >> >> patch here and there to adapt them for my purposes and, in this way,
    >> >> maybe even contribute back to the Open Source community one day.

    >>
    >> >> The problem is, C doesn't look at all like the newbie-friendly
    >> >> "written
    >> >> pseudo-code" walk-in-the-park that is Python! Variable declarations,
    >> >> pointers, memory allocations... I'm scared! My main concern is: Is it
    >> >> even feasible for me to learn enough C for the above purposes in my
    >> >> restricted spare time (which would be pretty much 8 PM till 8 AM! ;)
    >> >> or
    >> >> should I leave that to the computer science students and full-time
    >> >> Linux
    >> >> hackers?

    >>
    >> >> I would be glad if you could tell me about your own experiences with
    >> >> C --
    >> >> and whether I should or shouldn't learn it from your point
    >> >> of view.

    >>
    >> > Buy or borrow a copy of
    >> > "The C Programming Language"
    >> > by Brian W. Kernighan and Dennis M. Ritchie.
    >> > Prentice Hall, Inc., 1988.
    >> > ISBN 0-13-110362-8 (paperback), 0-13-110370-9 (hardback).

    >>
    >> > It's 272 pages long, including the index. In about one month you can
    >> > learn enough to become a C programmer with nothing to be ashamed of
    >> > (if you apply yourself). I don't think C is more difficult than
    >> > Python so if you became comfortable in Python you will be able to do
    >> > the same thing with C.

    >>
    >> > By the way, you've come to the right place to ask questions.

    >>
    >> How has it been since you read it?

    >
    > It has not changed since I read it. I pick it up from time to time
    > (it's within arm's reach at my desk) and verify things.
    >
    >> Certainly more than one month.

    >
    > I have read from in recently, if that is what you are implying. I
    > guess your first sentence was supposed to be "How long has it been
    > since you read it?"
    > If that is the case, it has been 20 years since I read it from cover
    > to cover. And yet if you master that simple book, less than 1/2 inch
    > thick, then you will definitely be an expert in the C language. In
    > fact, that is the main beauty of C. It is not something with
    > megabytes of features that takes years to learn.
    >
    >> Yes I mean to imply something.

    >
    > I guess it will be better if you just come out and say it. Then we
    > can make fun of you and we'll all have a good belly-laugh.
    >
    > Yes, I also meant to imply something.
    >
    >


    The next time you post something incorrect I will take the time
    to correct it for you. I don't have a copy of K&R2, but I can
    probably find a copy of K&R around here somewhere.

    My comment was not about the quality of K&R2, but your
    statement that someone could be an adequate C programmer
    in a month. I am sure we will get some comments from other
    folks, and I expect them to agree with me. If I am wrong I
    apologize up front.

    Barry
    Barry, Apr 13, 2007
    #5
  6. In article <>,
    Barry <> wrote:

    >My comment was not about the quality of K&R2, but your
    >statement that someone could be an adequate C programmer
    >in a month. I am sure we will get some comments from other
    >folks, and I expect them to agree with me. If I am wrong I
    >apologize up front.


    If the OP already has some skill in programming, a month of seriously
    studying K&R2 will be more than enough to acquire a basic competence
    with C.
    Becoming an expert will take longer, but the OP seems to be interested
    in acquiring basic competence, not becoming an expert.


    dave

    --
    Dave Vandervies
    Basically, there is no control structure you can imagine that
    can't be implemented using call/cc. Even very silly ones.
    --Bear in comp.lang.scheme
    Dave Vandervies, Apr 13, 2007
    #6
  7. Rehceb Rotkiv

    Barry Guest

    "Dave Vandervies" <> wrote in message
    news:evoofi$ifm$...
    > In article <>,
    > Barry <> wrote:
    >
    >>My comment was not about the quality of K&R2, but your
    >>statement that someone could be an adequate C programmer
    >>in a month. I am sure we will get some comments from other
    >>folks, and I expect them to agree with me. If I am wrong I
    >>apologize up front.

    >
    > If the OP already has some skill in programming, a month of seriously
    > studying K&R2 will be more than enough to acquire a basic competence
    > with C.
    > Becoming an expert will take longer, but the OP seems to be interested
    > in acquiring basic competence, not becoming an expert.
    >
    >
    > dave


    Perhaps you should reply to my question about arbitrary returns
    in correct portbable C.
    Barry, Apr 13, 2007
    #7
  8. Rehceb Rotkiv

    user923005 Guest

    On Apr 13, 1:06 pm, "Barry" <> wrote:
    > "user923005" <> wrote in message
    >
    > news:...
    >
    >
    >
    >
    >
    > > On Apr 13, 12:39 pm, "Barry" <> wrote:
    > >> "user923005" <> wrote in message

    >
    > >>news:...

    >
    > >> > On Apr 13, 10:56 am, Rehceb Rotkiv <> wrote:
    > >> >> Hello everyone,

    >
    > >> >> I'm using Linux since quite a while now and I'm happy to notice that
    > >> >> I'm
    > >> >> beginning to "know my way round". I can write little bash, sed and awk
    > >> >> scripts to help me with my everyday tasks and I've also had a thorough
    > >> >> look at Python, which is ideally suited for helping me with my work,
    > >> >> which is linguistic research, i.e. mainly text processing.

    >
    > >> >> However, this does not seem to be of much use in understanding and
    > >> >> modifying source code of Linux applications, 90% of which seem to be
    > >> >> written in C. I do not want to write revolutionary new programs, I'd
    > >> >> just
    > >> >> like to look under the hood of some Linux apps and perhaps write a
    > >> >> little
    > >> >> patch here and there to adapt them for my purposes and, in this way,
    > >> >> maybe even contribute back to the Open Source community one day.

    >
    > >> >> The problem is, C doesn't look at all like the newbie-friendly
    > >> >> "written
    > >> >> pseudo-code" walk-in-the-park that is Python! Variable declarations,
    > >> >> pointers, memory allocations... I'm scared! My main concern is: Is it
    > >> >> even feasible for me to learn enough C for the above purposes in my
    > >> >> restricted spare time (which would be pretty much 8 PM till 8 AM! ;)
    > >> >> or
    > >> >> should I leave that to the computer science students and full-time
    > >> >> Linux
    > >> >> hackers?

    >
    > >> >> I would be glad if you could tell me about your own experiences with
    > >> >> C --
    > >> >> and whether I should or shouldn't learn it from your point
    > >> >> of view.

    >
    > >> > Buy or borrow a copy of
    > >> > "The C Programming Language"
    > >> > by Brian W. Kernighan and Dennis M. Ritchie.
    > >> > Prentice Hall, Inc., 1988.
    > >> > ISBN 0-13-110362-8 (paperback), 0-13-110370-9 (hardback).

    >
    > >> > It's 272 pages long, including the index. In about one month you can
    > >> > learn enough to become a C programmer with nothing to be ashamed of
    > >> > (if you apply yourself). I don't think C is more difficult than
    > >> > Python so if you became comfortable in Python you will be able to do
    > >> > the same thing with C.

    >
    > >> > By the way, you've come to the right place to ask questions.

    >
    > >> How has it been since you read it?

    >
    > > It has not changed since I read it. I pick it up from time to time
    > > (it's within arm's reach at my desk) and verify things.

    >
    > >> Certainly more than one month.

    >
    > > I have read from in recently, if that is what you are implying. I
    > > guess your first sentence was supposed to be "How long has it been
    > > since you read it?"
    > > If that is the case, it has been 20 years since I read it from cover
    > > to cover. And yet if you master that simple book, less than 1/2 inch
    > > thick, then you will definitely be an expert in the C language. In
    > > fact, that is the main beauty of C. It is not something with
    > > megabytes of features that takes years to learn.

    >
    > >> Yes I mean to imply something.

    >
    > > I guess it will be better if you just come out and say it. Then we
    > > can make fun of you and we'll all have a good belly-laugh.

    >
    > > Yes, I also meant to imply something.

    >
    > The next time you post something incorrect I will take the time
    > to correct it for you.


    Believe it or not, I will deeply appreciate it.

    > I don't have a copy of K&R2, but I can
    > probably find a copy of K&R around here somewhere.
    >
    > My comment was not about the quality of K&R2, but your
    > statement that someone could be an adequate C programmer
    > in a month.


    In one month of intense effort, I believe that the OP could not only
    become an adequate C programmer, but even be good enough for junior
    level work on C projects. That is the main beauty of the C language.
    The same thing cannot be said for C++ or .NET languages or even SQL.
    The real excellence of C is its simplicity. That is one reason that I
    really like it.

    > I am sure we will get some comments from other
    > folks, and I expect them to agree with me. If I am wrong I
    > apologize up front.


    No need to apologize. My opinion is no better than yours.
    user923005, Apr 13, 2007
    #8
  9. Rehceb Rotkiv

    user923005 Guest

    On Apr 13, 1:29 pm, "Barry" <> wrote:
    > "Dave Vandervies" <> wrote in message

    [snip]
    > Perhaps you should reply to my question about arbitrary returns
    > in correct portbable C.


    No poster is obligated to post replies in a subject for which he/she
    lacks interest in responding. Structural arguments tend to foment
    religious fervor (e.g. what about goto, what about multiple returns).

    Let me say something about multiple returns:
    1. They're bad.
    2. I use them.

    They are bad because they can cause a lot of problems, especially if
    the routine is allocating resources like memory or file handles or
    things of that nature. On the other hand, I often do a big heap of
    tests right at function entry to see if things are in order. If (for
    instance) your file name is NULL or the length of some string is -7 or
    some other naughty-no-no I am liable to return right away, after
    handling the error (if possible). And so I do not object to this
    particular format:

    <type> some_func(param_list,...)
    {
    /* do a heap of parameter checks... */
    if (something_is_seriously_haywire)
    {
    handle_error();
    return FOO_STATUS_FAILURE; /* Or *status = FOO_STATUS_FAILURE or
    whatever... */
    }

    /* One hundred or more lines of important glop go here... */

    return FOO_STATUS_SUCCESS;
    }

    Every rule is meant to be broken except one:
    Use good sense when you write your program and always do the right
    thing.
    user923005, Apr 13, 2007
    #9
  10. "Barry" <> writes:
    [...]
    >>> "user923005" <> wrote in message

    [...]
    >>> > Buy or borrow a copy of
    >>> > "The C Programming Language"
    >>> > by Brian W. Kernighan and Dennis M. Ritchie.
    >>> > Prentice Hall, Inc., 1988.
    >>> > ISBN 0-13-110362-8 (paperback), 0-13-110370-9 (hardback).
    >>>
    >>> > It's 272 pages long, including the index. In about one month you can
    >>> > learn enough to become a C programmer with nothing to be ashamed of
    >>> > (if you apply yourself). I don't think C is more difficult than
    >>> > Python so if you became comfortable in Python you will be able to do
    >>> > the same thing with C.

    [...]

    > My comment was not about the quality of K&R2, but your
    > statement that someone could be an adequate C programmer
    > in a month. I am sure we will get some comments from other
    > folks, and I expect them to agree with me. If I am wrong I
    > apologize up front.


    I have to agree with Barry. Working your way through K&R2 will give
    you a good basic working knowledge of C, but it will hardly make you
    an expert. That takes practice and experience.

    But it's a good first step on the road to becoming an expert,
    especially if you already have some programming experience.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Apr 13, 2007
    #10
  11. "Barry" <> writes:
    [...]
    > Perhaps you should reply to my question about arbitrary returns
    > in correct portbable C.


    It would help if you could explain just what you're trying to
    accomplish.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Apr 13, 2007
    #11
  12. Rehceb Rotkiv

    Barry Guest

    (OT)Re: To C or not to C, that is the question...

    "user923005" <> wrote in message
    news:...
    > On Apr 13, 1:06 pm, "Barry" <> wrote:
    >> "user923005" <> wrote in message
    >>
    >> news:...
    >>
    >>
    >>
    >>
    >>
    >> > On Apr 13, 12:39 pm, "Barry" <> wrote:
    >> >> "user923005" <> wrote in message

    >>
    >> >>news:...

    >>
    >> >> > On Apr 13, 10:56 am, Rehceb Rotkiv <> wrote:
    >> >> >> Hello everyone,

    >>
    >> >> >> I'm using Linux since quite a while now and I'm happy to notice
    >> >> >> that
    >> >> >> I'm
    >> >> >> beginning to "know my way round". I can write little bash, sed and
    >> >> >> awk
    >> >> >> scripts to help me with my everyday tasks and I've also had a
    >> >> >> thorough
    >> >> >> look at Python, which is ideally suited for helping me with my
    >> >> >> work,
    >> >> >> which is linguistic research, i.e. mainly text processing.

    >>
    >> >> >> However, this does not seem to be of much use in understanding and
    >> >> >> modifying source code of Linux applications, 90% of which seem to
    >> >> >> be
    >> >> >> written in C. I do not want to write revolutionary new programs,
    >> >> >> I'd
    >> >> >> just
    >> >> >> like to look under the hood of some Linux apps and perhaps write a
    >> >> >> little
    >> >> >> patch here and there to adapt them for my purposes and, in this
    >> >> >> way,
    >> >> >> maybe even contribute back to the Open Source community one day.

    >>
    >> >> >> The problem is, C doesn't look at all like the newbie-friendly
    >> >> >> "written
    >> >> >> pseudo-code" walk-in-the-park that is Python! Variable
    >> >> >> declarations,
    >> >> >> pointers, memory allocations... I'm scared! My main concern is: Is
    >> >> >> it
    >> >> >> even feasible for me to learn enough C for the above purposes in my
    >> >> >> restricted spare time (which would be pretty much 8 PM till 8 AM!
    >> >> >> ;)
    >> >> >> or
    >> >> >> should I leave that to the computer science students and full-time
    >> >> >> Linux
    >> >> >> hackers?

    >>
    >> >> >> I would be glad if you could tell me about your own experiences
    >> >> >> with
    >> >> >> C --
    >> >> >> and whether I should or shouldn't learn it from your point
    >> >> >> of view.

    >>
    >> >> > Buy or borrow a copy of
    >> >> > "The C Programming Language"
    >> >> > by Brian W. Kernighan and Dennis M. Ritchie.
    >> >> > Prentice Hall, Inc., 1988.
    >> >> > ISBN 0-13-110362-8 (paperback), 0-13-110370-9 (hardback).

    >>
    >> >> > It's 272 pages long, including the index. In about one month you
    >> >> > can
    >> >> > learn enough to become a C programmer with nothing to be ashamed of
    >> >> > (if you apply yourself). I don't think C is more difficult than
    >> >> > Python so if you became comfortable in Python you will be able to do
    >> >> > the same thing with C.

    >>
    >> >> > By the way, you've come to the right place to ask questions.

    >>
    >> >> How has it been since you read it?

    >>
    >> > It has not changed since I read it. I pick it up from time to time
    >> > (it's within arm's reach at my desk) and verify things.

    >>
    >> >> Certainly more than one month.

    >>
    >> > I have read from in recently, if that is what you are implying. I
    >> > guess your first sentence was supposed to be "How long has it been
    >> > since you read it?"
    >> > If that is the case, it has been 20 years since I read it from cover
    >> > to cover. And yet if you master that simple book, less than 1/2 inch
    >> > thick, then you will definitely be an expert in the C language. In
    >> > fact, that is the main beauty of C. It is not something with
    >> > megabytes of features that takes years to learn.

    >>
    >> >> Yes I mean to imply something.

    >>
    >> > I guess it will be better if you just come out and say it. Then we
    >> > can make fun of you and we'll all have a good belly-laugh.

    >>
    >> > Yes, I also meant to imply something.

    >>
    >> The next time you post something incorrect I will take the time
    >> to correct it for you.

    >
    > Believe it or not, I will deeply appreciate it.
    >
    >> I don't have a copy of K&R2, but I can
    >> probably find a copy of K&R around here somewhere.
    >>
    >> My comment was not about the quality of K&R2, but your
    >> statement that someone could be an adequate C programmer
    >> in a month.

    >
    > In one month of intense effort, I believe that the OP could not only
    > become an adequate C programmer, but even be good enough for junior
    > level work on C projects. That is the main beauty of the C language.
    > The same thing cannot be said for C++ or .NET languages or even SQL.
    > The real excellence of C is its simplicity. That is one reason that I
    > really like it.
    >
    >> I am sure we will get some comments from other
    >> folks, and I expect them to agree with me. If I am wrong I
    >> apologize up front.

    >
    > No need to apologize. My opinion is no better than yours.
    >


    Unlike you (I expect), I started my career writing assembly language
    device drivers. When someone found the time to write a C compiler
    for the devices I was using they (the devices) were nearly obsolete.
    But I have been bitten more than once for writing sloppy C, and that
    is the type of thing you don't learn from a month of reading K&R2.

    Mr. Heathfield will certainly agree that he didn't learn C in a month.
    I have never seen his book, but I do read his comments.
    He recently posted a note about the knowledgeable posters on
    c.l.c, and if you watch the comments from that list of folks
    you will find it wasn't by accident.

    Like I said, if I am wrong...it won't be the first time. Millions
    of people use code I wrote in C every day. Since it "works"
    only I know how poorly it was designed and written.

    Barry
    Barry, Apr 13, 2007
    #12
  13. Barry wrote:
    > "user923005" <> wrote in message
    > news:...
    >> On Apr 13, 12:39 pm, "Barry" <> wrote:
    >>> "user923005" <> wrote in message
    >>>
    >>> news:...
    >>>
    >>>> On Apr 13, 10:56 am, Rehceb Rotkiv <> wrote:
    >>>>> Hello everyone,
    >>>>> I'm using Linux since quite a while now and I'm happy to notice that
    >>>>> I'm
    >>>>> beginning to "know my way round". I can write little bash, sed and awk
    >>>>> scripts to help me with my everyday tasks and I've also had a thorough
    >>>>> look at Python, which is ideally suited for helping me with my work,
    >>>>> which is linguistic research, i.e. mainly text processing.
    >>>>> However, this does not seem to be of much use in understanding and
    >>>>> modifying source code of Linux applications, 90% of which seem to be
    >>>>> written in C. I do not want to write revolutionary new programs, I'd
    >>>>> just
    >>>>> like to look under the hood of some Linux apps and perhaps write a
    >>>>> little
    >>>>> patch here and there to adapt them for my purposes and, in this way,
    >>>>> maybe even contribute back to the Open Source community one day.
    >>>>> The problem is, C doesn't look at all like the newbie-friendly
    >>>>> "written
    >>>>> pseudo-code" walk-in-the-park that is Python! Variable declarations,
    >>>>> pointers, memory allocations... I'm scared! My main concern is: Is it
    >>>>> even feasible for me to learn enough C for the above purposes in my
    >>>>> restricted spare time (which would be pretty much 8 PM till 8 AM! ;)
    >>>>> or
    >>>>> should I leave that to the computer science students and full-time
    >>>>> Linux
    >>>>> hackers?
    >>>>> I would be glad if you could tell me about your own experiences with
    >>>>> C --
    >>>>> and whether I should or shouldn't learn it from your point
    >>>>> of view.
    >>>> Buy or borrow a copy of
    >>>> "The C Programming Language"
    >>>> by Brian W. Kernighan and Dennis M. Ritchie.
    >>>> Prentice Hall, Inc., 1988.
    >>>> ISBN 0-13-110362-8 (paperback), 0-13-110370-9 (hardback).
    >>>> It's 272 pages long, including the index. In about one month you can
    >>>> learn enough to become a C programmer with nothing to be ashamed of
    >>>> (if you apply yourself). I don't think C is more difficult than
    >>>> Python so if you became comfortable in Python you will be able to do
    >>>> the same thing with C.
    >>>> By the way, you've come to the right place to ask questions.
    >>> How has it been since you read it?

    >> It has not changed since I read it. I pick it up from time to time
    >> (it's within arm's reach at my desk) and verify things.
    >>
    >>> Certainly more than one month.

    >> I have read from in recently, if that is what you are implying. I
    >> guess your first sentence was supposed to be "How long has it been
    >> since you read it?"
    >> If that is the case, it has been 20 years since I read it from cover
    >> to cover. And yet if you master that simple book, less than 1/2 inch
    >> thick, then you will definitely be an expert in the C language. In
    >> fact, that is the main beauty of C. It is not something with
    >> megabytes of features that takes years to learn.
    >>
    >>> Yes I mean to imply something.

    >> I guess it will be better if you just come out and say it. Then we
    >> can make fun of you and we'll all have a good belly-laugh.
    >>
    >> Yes, I also meant to imply something.
    >>

    > The next time you post something incorrect I will take the time
    > to correct it for you. I don't have a copy of K&R2, but I can
    > probably find a copy of K&R around here somewhere.
    >
    > My comment was not about the quality of K&R2, but your
    > statement that someone could be an adequate C programmer
    > in a month. I am sure we will get some comments from other
    > folks, and I expect them to agree with me. If I am wrong I
    > apologize up front.
    >

    Let's review the original reply, shall we?

    "In about one month you can learn enough to become a C programmer with
    nothing to be ashamed of (if you apply yourself)."

    In terms of adequate understanding to poke around in non-kernel stuff on
    Linux, I have to agree that one month will certainly give you enough
    traction to get somewhere useful.

    Especially since he then went on to say:

    "By the way, you've come to the right place to ask questions."

    I read this to mean that you will get further in your education if you
    read, practice and ask questions about what you discover and don't
    understand. A good place to ask such questions is this very forum.

    If you already have the basics of programming, and can already wrap your
    head around variables, logic and flow constructs, then C isn't much of a
    stretch. It's just easier to make mistakes that crash and burn. Some
    see this as a Good Thing in a learning language.

    "A month (or so) to learn. A lifetime to master."
    Clever Monkey, Apr 13, 2007
    #13
  14. Rehceb Rotkiv

    Barry Guest

    "Keith Thompson" <> wrote in message
    news:...
    > "Barry" <> writes:
    > [...]
    >> Perhaps you should reply to my question about arbitrary returns
    >> in correct portbable C.

    >
    > It would help if you could explain just what you're trying to
    > accomplish.
    >


    I made the mistake of referring to a previous note and did not
    include the proper context. I apologize.

    Barry
    Barry, Apr 13, 2007
    #14
  15. In article <>,
    Barry <> wrote:

    >Perhaps you should reply to my question about arbitrary returns
    >in correct portbable C.


    Perhaps if you want useful answers you should read the ones you've
    already gotten, and explain what's wrong with them in a way that lets
    people establish that it's worth giving you another one.

    You won't be getting any more from me, though.
    **PLONK**


    dave

    --
    Dave Vandervies
    The inability of Microsoft to produce a C99 compiler is not a good reason
    not to embrace the current C standard. (There may well /be/ good reasons,
    but that isn't one of them.) --Richard Heathfield in comp.lang.c
    Dave Vandervies, Apr 13, 2007
    #15
  16. Rehceb Rotkiv

    Barry Guest

    "Dave Vandervies" <> wrote in message
    news:evosa3$k29$...
    > In article <>,
    > Barry <> wrote:
    >
    >>Perhaps you should reply to my question about arbitrary returns
    >>in correct portbable C.

    >
    > Perhaps if you want useful answers you should read the ones you've
    > already gotten, and explain what's wrong with them in a way that lets
    > people establish that it's worth giving you another one.
    >
    > You won't be getting any more from me, though.
    > **PLONK**
    >
    >

    I think you missed my point. I didn't want to see you make anymore
    stupid posts to c.l.c. Hopefully it worked.
    Barry, Apr 13, 2007
    #16
  17. Rehceb Rotkiv

    user923005 Guest

    On Apr 13, 1:55 pm, Keith Thompson <> wrote:
    > "Barry" <> writes:
    >
    > [...]>>> "user923005" <> wrote in message
    > [...]
    > >>> > Buy or borrow a copy of
    > >>> > "The C Programming Language"
    > >>> > by Brian W. Kernighan and Dennis M. Ritchie.
    > >>> > Prentice Hall, Inc., 1988.
    > >>> > ISBN 0-13-110362-8 (paperback), 0-13-110370-9 (hardback).

    >
    > >>> > It's 272 pages long, including the index. In about one month you can
    > >>> > learn enough to become a C programmer with nothing to be ashamed of
    > >>> > (if you apply yourself). I don't think C is more difficult than
    > >>> > Python so if you became comfortable in Python you will be able to do
    > >>> > the same thing with C.

    >
    > [...]
    >
    > > My comment was not about the quality of K&R2, but your
    > > statement that someone could be an adequate C programmer
    > > in a month. I am sure we will get some comments from other
    > > folks, and I expect them to agree with me. If I am wrong I
    > > apologize up front.

    >
    > I have to agree with Barry. Working your way through K&R2 will give
    > you a good basic working knowledge of C, but it will hardly make you
    > an expert. That takes practice and experience.


    Here is what the OP asked:
    "My main concern is: Is it even feasible for me to learn enough C for
    the above purposes in my restricted spare time (which would be pretty
    much 8 PM till 8 AM! ;) or should I leave that to the computer science
    students and full-time Linux hackers?"

    In what way is guru status implied here?

    > But it's a good first step on the road to becoming an expert,
    > especially if you already have some programming experience.


    For someone who can already write code in Python, I guess that after
    one month of intense effort learning the language, he could contribute
    to open source projects at some level.

    As evidence, I would say to examine the excellent progress of 'arnuld'
    who is clearly going over K&R2 carefully. Now, Arnuld has been at it
    for about two months, but C is also his first programming language.
    For someone in that situation, I think K&R2 is probably not the ideal
    choice because of its terseness. Maybe K. N. King's book or is easier
    in that case.

    At any rate, I think that someone who is already a programmer can
    become adequate in C in one month to the level that they can
    contribute to an open source project.

    IMO-YMMV.

    Obviously, it depends on the intelligence and motivation of the
    student, but typically people who want to become programmers are
    intelligent and motivated.
    user923005, Apr 13, 2007
    #17
  18. Rehceb Rotkiv

    Guest

    On Apr 13, 11:39 pm, "Barry" <> wrote:
    > "Dave Vandervies" <> wrote in message
    >
    > news:evosa3$k29$...> In article <>,
    > > Barry <> wrote:

    >
    > >>Perhaps you should reply to my question about arbitrary returns
    > >>in correct portbable C.

    >
    > > Perhaps if you want useful answers you should read the ones you've
    > > already gotten, and explain what's wrong with them in a way that lets
    > > people establish that it's worth giving you another one.

    >
    > > You won't be getting any more from me, though.
    > > **PLONK**

    >
    > I think you missed my point. I didn't want to see you make anymore
    > stupid posts to c.l.c. Hopefully it worked.


    This way I won't see _your_ stupid posts here anymore
    **PLONK**
    , Apr 13, 2007
    #18
  19. Rehceb Rotkiv

    Ian Collins Guest

    Re: (OT)Re: To C or not to C, that is the question...

    Barry wrote:
    >
    > Unlike you (I expect), I started my career writing assembly language
    > device drivers. When someone found the time to write a C compiler
    > for the devices I was using they (the devices) were nearly obsolete.
    > But I have been bitten more than once for writing sloppy C, and that
    > is the type of thing you don't learn from a month of reading K&R2.
    >

    Did you have to quote the entire thread just to say that?

    A crap programmer could spend years studying a language and still write
    crap code. A competent one should have no problem getting up and
    running in C in a month.

    --
    Ian Collins.
    Ian Collins, Apr 13, 2007
    #19
  20. "user923005" <> writes:
    > On Apr 13, 1:55 pm, Keith Thompson <> wrote:
    >> "Barry" <> writes:
    >>
    >> [...]>>> "user923005" <> wrote in message
    >> [...]
    >> >>> > Buy or borrow a copy of
    >> >>> > "The C Programming Language"
    >> >>> > by Brian W. Kernighan and Dennis M. Ritchie.
    >> >>> > Prentice Hall, Inc., 1988.
    >> >>> > ISBN 0-13-110362-8 (paperback), 0-13-110370-9 (hardback).

    >>
    >> >>> > It's 272 pages long, including the index. In about one month you can
    >> >>> > learn enough to become a C programmer with nothing to be ashamed of
    >> >>> > (if you apply yourself). I don't think C is more difficult than
    >> >>> > Python so if you became comfortable in Python you will be able to do
    >> >>> > the same thing with C.

    >>
    >> [...]
    >>
    >> > My comment was not about the quality of K&R2, but your
    >> > statement that someone could be an adequate C programmer
    >> > in a month. I am sure we will get some comments from other
    >> > folks, and I expect them to agree with me. If I am wrong I
    >> > apologize up front.

    >>
    >> I have to agree with Barry. Working your way through K&R2 will give
    >> you a good basic working knowledge of C, but it will hardly make you
    >> an expert. That takes practice and experience.

    >
    > Here is what the OP asked:
    > "My main concern is: Is it even feasible for me to learn enough C for
    > the above purposes in my restricted spare time (which would be pretty
    > much 8 PM till 8 AM! ;) or should I leave that to the computer science
    > students and full-time Linux hackers?"
    >
    > In what way is guru status implied here?

    [...]

    Sorry, I inadvertently snipped the paragraph to which I was actually
    reacting.

    Upthread, you (user923005) wrote:
    | If that is the case, it has been 20 years since I read it from cover
    | to cover. And yet if you master that simple book, less than 1/2 inch
    | thick, then you will definitely be an expert in the C language. In
    | fact, that is the main beauty of C. It is not something with
    | megabytes of features that takes years to learn.

    I took issue with your use of the word "expert". Apart from that,
    we're probably pretty much in agreement.

    Perhaps by "master that simple book" you were referring to something
    that would take more than a month?

    You can certainly become a reasonably decent C programmer given
    personal potential, a copy of K&R2, and a month or so of work.
    Becoming an expert requires more experience.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Apr 13, 2007
    #20
    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. Philip Meyer
    Replies:
    0
    Views:
    403
    Philip Meyer
    Nov 30, 2003
  2. Kristian Domke
    Replies:
    11
    Views:
    493
    George Sakkis
    Jan 23, 2008
  3. Stephanie Stowe
    Replies:
    2
    Views:
    198
    Peter X
    Apr 7, 2004
  4. Sharon Phillips

    Not a question, not really news either

    Sharon Phillips, Jul 17, 2007, in forum: Ruby
    Replies:
    15
    Views:
    160
    Rick DeNatale
    Jul 20, 2007
  5. Ruby Freak

    To be not, or not to be not?

    Ruby Freak, Sep 23, 2008, in forum: Ruby
    Replies:
    2
    Views:
    128
    Thomas B.
    Sep 23, 2008
Loading...

Share This Page