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




"user923005" <dcorbit@xxxxxxxxx> wrote in message
news:1176496813.556879.95510@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Apr 13, 1:06 pm, "Barry" <bar...@xxxxxxxxxxxxxxxxxx> wrote:
"user923005" <dcor...@xxxxxxxxx> wrote in message

news:1176493958.723769.283520@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





On Apr 13, 12:39 pm, "Barry" <bar...@xxxxxxxxxxxxxxxxxx> wrote:
"user923005" <dcor...@xxxxxxxxx> wrote in message

news:1176490703.023200.313450@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

On Apr 13, 10:56 am, Rehceb Rotkiv <reh...@xxxxxxxxxxx> 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


.



Relevant Pages

  • Re: Python or PHP?
    ... If it's one of the things for which Python ... every language here and there more ways to do something. ... you make Perl more complicated than it is:-D. ... Not the programmer. ...
    (comp.lang.python)
  • Re: Python or PHP?
    ... >> every language here and there more ways to do something. ... The best the programmer can do, as you imply, is to ... I am curious of a list of extraneous methods in Perl (more about the ... I just had a glance on Python, ...
    (comp.lang.python)
  • Re: OT: Should I learn bash/C/python/perl/other
    ... > computer I must know how to speak it's language, ... as not many home machines have it installed. ... > compile for both windows and linux. ... Python is really good for such a purpose. ...
    (Fedora)
  • Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl)
    ... >> That's actually my biggest problem with Perl. ... It depends on the programmer as well. ... > coding standards should make the code readable in any language, ... > perl, python. ...
    (comp.lang.ada)
  • Re: Is python worth learning as a second language?
    ... I am a C++ programmer and I am thinking of learning something else ... because I know second language might be very helpful somehow. ... single line in python so I do not know this language at all. ...
    (comp.lang.python)