By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,709 Members | 2,155 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,709 IT Pros & Developers. It's quick & easy.

Learning C for the third time?

P: n/a
Hi all,

I have tried to learn C now several times before but gave up
twice. I would like to learn GCC under Debian. Is there
any good BEGINNER tutorials out there that will take me
from the "this is the software you need and this is how you
set it up and run it" kind of thing? I have programmed in
other languages but have never made the total leap in
learning C. I did a scan of the past posts here but didn't
see this type of question. If there is a better place for this,
please let me know.

thanks,
charles.....
Aug 20 '06 #1
Share this Question
Share on Google+
18 Replies


P: n/a

***** charles wrote:
Hi all,

I have tried to learn C now several times before but gave up
twice. I would like to learn GCC under Debian. Is there
any good BEGINNER tutorials out there that will take me
from the "this is the software you need and this is how you
set it up and run it" kind of thing? I have programmed in
other languages but have never made the total leap in
learning C. I did a scan of the past posts here but didn't
see this type of question. If there is a better place for this,
please let me know.

thanks,
charles.....
Start with "The C Programming Language" by Brian Kernighan and Dennis
Ritchie.

For some more indepth info on the topics in that book, check out this
website:

http://cslibrary.stanford.edu/

Read the FAQ that is posted here.

Then, just write code. Come here and post code and be prepared to be
told you're wrong. You learn a lot by just writing code.

Aug 20 '06 #2

P: n/a

"***** charles" <so*****@out-there.comwrote in message
news:A2******************@newssvr11.news.prodigy.c om...
Hi all,

I have tried to learn C now several times before but gave up
twice. I would like to learn GCC under Debian. Is there
any good BEGINNER tutorials out there that will take me
from the "this is the software you need and this is how you
set it up and run it" kind of thing? I have programmed in
other languages but have never made the total leap in
learning C. I did a scan of the past posts here but didn't
see this type of question. If there is a better place for this,
please let me know.

thanks,
charles.....
The best instructor is having to write production code. No I don't mean
critical mission system software that will endanger humanity if you screw it
up, I mean "dang I wish I could improve this script into something everyone
can appreciate."

Tutorials are nice, but in my mind necessity is the best instructor you can
ever have.
Aug 20 '06 #3

P: n/a

"***** charles" <so*****@out-there.comwrote in message
Hi all,

I have tried to learn C now several times before but gave up
twice. I would like to learn GCC under Debian. Is there
any good BEGINNER tutorials out there that will take me
from the "this is the software you need and this is how you
set it up and run it" kind of thing? I have programmed in
other languages but have never made the total leap in
learning C. I did a scan of the past posts here but didn't
see this type of question. If there is a better place for this,
please let me know.
Programming is a bit like playing a musical instrument.
Some people take to it quite naturally, some people will never get anywhere,
and some people, probably the biggest group, can with great effort attain a
certain level of competence, but will never be of performance standard.

If you are not in group one, why do you want to learn C?
There might be reasons, but you might well put in a lot of effort for very
little reward.
--
www.personal.leeds.ac.uk/~bgy1mm
freeware games to download.
Aug 20 '06 #4

P: n/a
Malcolm posted:
Programming is a bit like playing a musical instrument.
Some people take to it quite naturally, some people will never get
anywhere, and some people, probably the biggest group, can with great
effort attain a certain level of competence, but will never be of
performance standard.

The best analogy I've heard so far with regard to programming.

--

Frederick Gotham
Aug 20 '06 #5

P: n/a

Eigenvector wrote:
"***** charles" <so*****@out-there.comwrote in message
news:A2******************@newssvr11.news.prodigy.c om...
Hi all,

I have tried to learn C now several times before but gave up
twice. I would like to learn GCC under Debian. Is there
any good BEGINNER tutorials out there that will take me
from the "this is the software you need and this is how you
set it up and run it" kind of thing? I have programmed in
other languages but have never made the total leap in
learning C. I did a scan of the past posts here but didn't
see this type of question. If there is a better place for this,
please let me know.

thanks,
charles.....

The best instructor is having to write production code. No I don't mean
critical mission system software that will endanger humanity if you screw it
up, I mean "dang I wish I could improve this script into something everyone
can appreciate."

Tutorials are nice, but in my mind necessity is the best instructor you can
ever have.
C is not a scripting language so why would you be tring to improve a
"script" in C?

Aug 20 '06 #6

P: n/a
In article <cK*******************@news.indigo.ie>,
Frederick Gotham <fg*******@SPAM.comwrote:
>Malcolm posted:
>Programming is a bit like playing a musical instrument.
Some people take to it quite naturally, some people will never get
anywhere, and some people, probably the biggest group, can with great
effort attain a certain level of competence, but will never be of
performance standard.


The best analogy I've heard so far with regard to programming.
Except that, if I'm not mistaken, current research in cognitive psychology
indicates that it's completely wrong.

Apparently the primary[1] contributing factor in being Really Good at
something is having put large amounts of time and energy into getting
Really Good at it. The "natural talent" that some people have is mostly
a result of getting a good start because of some environmental influence
or another; that good start makes it easier to keep working at it (by
decreasing the difficulty-to-motivation ratio) and starts a positive
feedback loop.

(The current issue of Scientific American has a pretty good article
on this. I've heard the idea referenced second- and third-hand in a
few other places as well.)

So if you really want to learn how to write computer programs well, or
play a musical instrument well, or do anything else well, all you really
need is time, energy, and motivation (adding a competent mentor to that
will probably make the beginning stages Rather Easier); that combination
is a lot harder to come by than it should be (most people who have the
motivation seem to have other things taking up their time and energy),
but if you can get those they'll easily make up for little things like
natural ability or lack thereof.

The WORST thing you can possibly do is decide that there's not much
point in trying to get better because you don't have the natural talent
required to get past "somewhat competent".
(Of course, it could easily happen that you decide that you have other
things you'd rather focus your time and energy on than getting better
at <foo- I could probably name five or ten without having to stop
and think about it. But in that case, don't complain about not having
natural talent for it, complain about not having enough time and energy
to go around.)
dave

[1] That's "primary" as in "drowns out all the rest".

--
Dave Vandervies dj******@csclub.uwaterloo.ca
[A] colleague who shall remain nameless always claimed (in jest, I think) that
the University motto should be: "Waterloo - Not as bad as it sounds"
--Alex Lopez-Ortiz in uw.general
Aug 21 '06 #7

P: n/a

<sw***********@gmail.comwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...
>
Eigenvector wrote:
>"***** charles" <so*****@out-there.comwrote in message
news:A2******************@newssvr11.news.prodigy. com...
Hi all,

I have tried to learn C now several times before but gave up
twice. I would like to learn GCC under Debian. Is there
any good BEGINNER tutorials out there that will take me
from the "this is the software you need and this is how you
set it up and run it" kind of thing? I have programmed in
other languages but have never made the total leap in
learning C. I did a scan of the past posts here but didn't
see this type of question. If there is a better place for this,
please let me know.

thanks,
charles.....

The best instructor is having to write production code. No I don't mean
critical mission system software that will endanger humanity if you screw
it
up, I mean "dang I wish I could improve this script into something
everyone
can appreciate."

Tutorials are nice, but in my mind necessity is the best instructor you
can
ever have.

C is not a scripting language so why would you be tring to improve a
"script" in C?
Use your imagination I'm sure you'll think of something.
Aug 21 '06 #8

P: n/a

Eigenvector wrote:
"***** charles" <so*****@out-there.comwrote in message
news:A2******************@newssvr11.news.prodigy.c om...
Hi all,

I have tried to learn C now several times before but gave up
twice. I would like to learn GCC under Debian. Is there
any good BEGINNER tutorials out there that will take me
from the "this is the software you need and this is how you
set it up and run it" kind of thing? I have programmed in
other languages but have never made the total leap in
learning C. I did a scan of the past posts here but didn't
see this type of question. If there is a better place for this,
please let me know.

thanks,
charles.....

The best instructor is having to write production code. No I don't mean
critical mission system software that will endanger humanity if you screw it
up, I mean "dang I wish I could improve this script into something everyone
can appreciate."

Tutorials are nice, but in my mind necessity is the best instructor you can
ever have.
I comepletely agree. IMHO you don't need tutorials. You need a decent
reference book (K&R is the defacto standard, theres also a few good
ones online, google is your friend), and a goal for an app in mind.
Theres not point learning C just to memorize syntax. Do a little
research, find out what C is good for and think of an application you
can make (whether you need it or not). Whats your goal? Lower level
*nix programming? Make a program that recursively traverses directories
and prints the contents (much like ls). Maybe you're interested in
higher level GUI programming. Go take a look at the gtk library, it has
many tutorials and an online reference. Design yourself a calculator or
some simple GUI app.

Just to share my experience, I've learned C three times as well. Once
in high school where I went through some tutorials and got used to the
syntax but I couldn't actually DO anything with it. Then I took an
intro to programming course in university (they used c++, point being,
still syntax, maybe a linked list or 4, nothing very useful). Then, for
a project course, I decided to design a real-time vision system for a
team of autonomous robots. Thats when I REALLY learned C, by doing
something with it. When you're forced to make something that actually
has to work you go to all ends to find example code, ask questions
about it, change it a bit, compile it, study output, reserach compile
and runtime errors, read man pages on standard libs, read reference
books etc etc etc.

Another method is to look at some bug trackers for open source projects
that use C (search sourceforge for example or maybe an app you use
everyday on Debian). Try to understand why the bug is a bug and maybe
try to solve a few. Submit patches and get some feedback.

HTH,
Chris

Aug 21 '06 #9

P: n/a
My Suggestion Is To Goto Http://cprogramming.com/ Read That.. And As
Far As The GCC Flag's And Commands Go... I Will Explain gcc yourfile.c
That Will Compile yourfile.c To a.out To Run a.out Goto The Dir It
Would Be In (You May Need To Search For It...) Then Type In The Command
Line ./a.out To Avoid Searching For The File You Must Do This... gcc
yourfile.c -o yourfile.out Or The Path You Wont It At... To Learn More
About GCC Type In The Command Line man gcc ;)

Aug 21 '06 #10

P: n/a
Mr.Madtast <Ap*****@gmail.comwrote:
My Suggestion Is To Goto Http://cprogramming.com/ Read That.. And As
And afterward read http://c-faq.com. In fairness the resource you
quoted could be worse, but there are nevertheless details left to be
desired. The site's discussion of 0 vs NULL vs '\0'
(http://tinyurl.com/ezet8) leaves many helpful details out, for
example. Learning C from the site you linked to sounds extremely
challenging.

--
C. Benson Manica | I *should* know what I'm talking about - if I
cbmanica(at)gmail.com | don't, I need to know. Flames welcome.
Aug 21 '06 #11

P: n/a
"Dave Vandervies" <dj******@caffeine.csclub.uwaterloo.cawrote in message
In article <cK*******************@news.indigo.ie>,
Frederick Gotham <fg*******@SPAM.comwrote:
>>Malcolm posted:
>>Programming is a bit like playing a musical instrument.
Some people take to it quite naturally, some people will never get
anywhere, and some people, probably the biggest group, can with great
effort attain a certain level of competence, but will never be of
performance standard.


The best analogy I've heard so far with regard to programming.

Except that, if I'm not mistaken, current research in cognitive psychology
indicates that it's completely wrong.

Apparently the primary[1] contributing factor in being Really Good at
something is having put large amounts of time and energy into getting
Really Good at it. The "natural talent" that some people have is mostly
a result of getting a good start because of some environmental influence
or another; that good start makes it easier to keep working at it (by
decreasing the difficulty-to-motivation ratio) and starts a positive
feedback loop.

(The current issue of Scientific American has a pretty good article
on this. I've heard the idea referenced second- and third-hand in a
few other places as well.)

So if you really want to learn how to write computer programs well, or
play a musical instrument well, or do anything else well, all you really
need is time, energy, and motivation (adding a competent mentor to that
will probably make the beginning stages Rather Easier); that combination
is a lot harder to come by than it should be (most people who have the
motivation seem to have other things taking up their time and energy),
but if you can get those they'll easily make up for little things like
natural ability or lack thereof.

The WORST thing you can possibly do is decide that there's not much
point in trying to get better because you don't have the natural talent
required to get past "somewhat competent".
(Of course, it could easily happen that you decide that you have other
things you'd rather focus your time and energy on than getting better
at <foo- I could probably name five or ten without having to stop
and think about it. But in that case, don't complain about not having
natural talent for it, complain about not having enough time and energy
to go around.)
The point is that music and programming are not activity X.
From experience, young people with an aptitude for programming need very
little tuition in how to get things done. What they do need is guidance in
avoiding spaghetti code. But they will happily knock up a nice windowing
system with little buttons and drop down menus, bascially from the manual
alone.

However there are also a certain number of people who don't get it, and
however hard you try to help them, don't seem to get it. These are not
necessarily unintelligent; one had a PhD in biochemistry, for instance.
Basically they are wasting their time, and the best thing is to get them out
of the class and onto something that is suited to their talents.

For a lot of subjects, I agree. Very few people want to be professional
mathematicians, for instance, but very many want to be able to do basic
financial or statistical calculations. This can be taught, even to people
who find maths hard going.
--
www.personal.leeds.ac.uk/~bgy1mm
freeware games to download.

Aug 21 '06 #12

P: n/a
On Mon, 21 Aug 2006 02:49:19 +0000 (UTC), in comp.lang.c ,
dj******@caffeine.csclub.uwaterloo.ca (Dave Vandervies) wrote:
>Apparently the primary[1] contributing factor in being Really Good at
something is having put large amounts of time and energy into getting
Really Good at it.
Learned articles in SA notwithstanding, I frankly suspect that this is
PC bullshit. Try teaching anyone with motor control issues to ballroom
dance, irrespective of the time available. Try teaching a deaf person
to play the violin.
>So if you really want to learn how to write computer programs well, or
play a musical instrument well, or do anything else well, all you really
need is time, energy, and motivation
This will allow you to become good. Thats not the same as Really Good
or Concert Soloist level.
>The WORST thing you can possibly do is decide that there's not much
point in trying to get better because you don't have the natural talent
required to get past "somewhat competent".
Thats true but entirely a psychological effect.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Aug 21 '06 #13

P: n/a
"Mr.Madtast" <Ap*****@gmail.comwrote:
My Suggestion Is To Goto Http://badlink/
My suggestion is to learn to quote properly - this is Usenet, not a
fecking web board - and then _not_ to go to that link, because it's
'orrible. Not only is it mostly C++ (and even some Sheesh - furrfu), but
what little C there is is on occasion unsure of its identity; and much
of the rest is of very poor quality. Much better links can be found in
the newsgroup FAQ.

Richard
Aug 22 '06 #14

P: n/a
***** charles wrote:
Hi all,

I have tried to learn C now several times before but gave up
twice. I would like to learn GCC under Debian. Is there
any good BEGINNER tutorials out there that will take me
from the "this is the software you need and this is how you
set it up and run it" kind of thing? I have programmed in
other languages but have never made the total leap in
learning C. I did a scan of the past posts here but didn't
see this type of question. If there is a better place for this,
please let me know.
I'm not particularly fond of K & R as a reference text. Personally, I
think it is too dense and succinct for a true beginner.

I would recommend A Book on C by Kelley/Pohl. It's lucid, verbose
without being pedantic, and available on Amazon.
Aug 22 '06 #15

P: n/a

"Schizoid Man" <sc***@sf.comwrote in message
news:ec**********@geraldo.cc.utexas.edu...
***** charles wrote:
>Hi all,

I have tried to learn C now several times before but gave up
twice. I would like to learn GCC under Debian. Is there
any good BEGINNER tutorials out there that will take me
from the "this is the software you need and this is how you
set it up and run it" kind of thing? I have programmed in
other languages but have never made the total leap in
learning C. I did a scan of the past posts here but didn't
see this type of question. If there is a better place for this,
please let me know.

I'm not particularly fond of K & R as a reference text. Personally, I
think it is too dense and succinct for a true beginner.

I would recommend A Book on C by Kelley/Pohl. It's lucid, verbose without
being pedantic, and available on Amazon.
One of the issues that I always had with C was that the instruction books
were written for an audience that I wasn't. One of the reasons why I feel
that necessity is a better instructor than a book. I have the K&R book and
as an engineer I found it utterly useless to learning C, now that I know C
somewhat better I find it useful as a reference manual. I used the Wong
book on C in class at the U and found it to be a little better but still
suitable for a computer programmer. Not that I don't understand why, but
again it didn't really suit me or my goals. Getting my ass flamed out in
this group a few years back coupled with some system admin code I had to
write is how I learned.
Aug 23 '06 #16

P: n/a

Dave Vandervies wrote:
In article <cK*******************@news.indigo.ie>,
Frederick Gotham <fg*******@SPAM.comwrote:
Malcolm posted:
Programming is a bit like playing a musical instrument.
Some people take to it quite naturally, some people will never get
anywhere, and some people, probably the biggest group, can with great
effort attain a certain level of competence, but will never be of
performance standard.

The best analogy I've heard so far with regard to programming.

Except that, if I'm not mistaken, current research in cognitive psychology
indicates that it's completely wrong.
Perhaps true, perhaps interesting, but definitely deserving
of being renamed 'Subject: OT <something>' in comp.lang.c.

Aug 24 '06 #17

P: n/a

<en******@yahoo.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
>
Dave Vandervies wrote:
>In article <cK*******************@news.indigo.ie>,
Frederick Gotham <fg*******@SPAM.comwrote:
>Malcolm posted:

Programming is a bit like playing a musical instrument.
Some people take to it quite naturally, some people will never get
anywhere, and some people, probably the biggest group, can with great
effort attain a certain level of competence, but will never be of
performance standard.
The best analogy I've heard so far with regard to programming.

Except that, if I'm not mistaken, current research in cognitive
psychology
indicates that it's completely wrong.

Perhaps true, perhaps interesting, but definitely deserving
of being renamed 'Subject: OT <something>' in comp.lang.c.
Topic drift happens.
Someone refers to machine without any registers and the implications for
int.
Someone else mentions the first programmable punched card carpet-making
machines.
Someone else mentions knitting machines.
Then we're into a bitter debate about the merit of crochet versus knitting.
--
www.personal.leeds.ac.uk/~bgy1mm
freeware games to download.
Aug 25 '06 #18

P: n/a

Malcolm wrote:
<en******@yahoo.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...

Dave Vandervies wrote:
In article <cK*******************@news.indigo.ie>,
Frederick Gotham <fg*******@SPAM.comwrote:
Malcolm posted:

Programming is a bit like playing a musical instrument.
Some people take to it quite naturally, some people will never get
anywhere, and some people, probably the biggest group, can with great
effort attain a certain level of competence, but will never be of
performance standard.
The best analogy I've heard so far with regard to programming.

Except that, if I'm not mistaken, current research in cognitive
psychology
indicates that it's completely wrong.
Perhaps true, perhaps interesting, but definitely deserving
of being renamed 'Subject: OT <something>' in comp.lang.c.
Topic drift happens. [...]
Yes, and it's customary in c.l.c to label a Subject: as OT
when it drifts to a topic wholly unrelated to C.

Aug 26 '06 #19

This discussion thread is closed

Replies have been disabled for this discussion.