PDA

View Full Version : how long to learn c programming



cmay
05-02-2009, 11:02 AM
how long should it take an average hobbyist to learn to program in c as the first language.
i been learning for some time but i have a set back with my eyes so my vision is being bad at times and i dont remember very well either. so i would like to know how long it should take to learn so i can sort of measure if i am doing allright all taken in consideration. i read somewhere it takes a year at least to learn the first language but if you already know one language c would be learned in a few weeks or even days.

thanks.

ps:
i hope i posted this in the right forums.

laserlight
05-02-2009, 11:23 AM
how long should it take an average hobbyist to learn to program in c as the first language.
Since this is a hobby, don't worry about whether you're fast or slow. After all, you need to define the state "has learnt to program in C", but if you are not taking a test or developing some rather well defined project to prove that you have "learnt to program in C", then as long as you are making progress, well and good :)

cmay
05-02-2009, 01:17 PM
After all, you need to define the state "has learnt to program in C",
i think when i can remember and i use regular the whole language with out looking in the books and i know the ins and outs well enough to being able to write a program that i would like to write and know how it should be done before starting i must have learned c well enough to use it.

i am far from that yet. i still stand between files and has to learn linked list and then i need to learn a lot more about programming in general. which is maybe hard to find something about for c compared to other languages since c is a language known to be a tool mostly for people who can already program in a other language.


but i still see people in forums that can program and has programmed a long time reading manuals as they done many times before so they know how to use new libraries and use functions they never used before. even that the core language and the ins and out they know very well .

happyclown
05-02-2009, 05:22 PM
As laserlight has said, since it's a hobby, progress is more relevant than timeframe.

The more you enjoy programming, the faster you will progress. If all you do is learn the theory, but do very little actual programming, your progress will be slow. You need to program to become proficient with the language.

Good luck! :D

abachler
05-02-2009, 05:41 PM
i think when i can remember and i use regular the whole language with out looking in the books and i know the ins and outs well enough to being able to write a program that i would like to write and know how it should be done before starting i must have learned c well enough to use it.


Well, ive been using it for 15+ years and I can't do that yet, so I'd say >15+ years.

cmay
05-02-2009, 11:32 PM
Well, ive been using it for 15+ years and I can't do that yet, so I'd say >15+ years.

ok. thanks for the input.
this statement makes me relax a bit i think. its nice to get ones ambitions put in perspective from those who have a small lifetime of experience.

thanks for your time:)

webmaster
05-03-2009, 06:24 PM
1. Becoming an expert at anything takes a long time--many people say that to become an expert on any subject takes 10,000 hours of deliberate practice.

Three keys words there: 10,000, deliberate and practice. First, to be a true expert takes a long time; second, it requires you to be constantly aware of what you are doing, trying to do things better, rather than just learning to do things automatically. That's where books or other people come in--you can practice programming for a long time, but only get better at "making it work", without making it work really well. Constant attention to how you can do something better, where the flaws are in your current work, is critical, and external input can really help you see those flaws more quickly. But experience is similarly important to make that book learning meaningful. Peter Norvig wrote eloquently on the same topic: Teach Yourself Programming in Ten Years (http://norvig.com/21-days.html)

So yeah, if you're feeling like it's not all coming together, that's OK--it takes a long time.

2. That said, you can actually get pretty darn good at programming fairly fast. When I was a teaching fellow, I helped teach a college-level intro CS course, which focused on C programming. Students had 4.5 hours of instruction a week, 3 from the prof, 1.5 from a TF. They also had weekly homework assignments, which they were helped with by TFs during lab time, and which they received detailed feedback on about a week after completion. Students typically spent between 10 and 20 hours a week on these assignments, of which there were ten, so that's about 150 hours of actual programming, and about 50 hours of class time. At the end of the course, these students all completed a final project that typically took about 20-50 hours; many of these projects were very impressive--lots of well-executed games (one person made a Mario clone), IM clients that actually connected to AIM, etc.

The students were not, in my opinion, suitable for serious employment, but the one who were enthusiastic about the class and put in the effort were serviceable programmers with a strong foundation for further improvement that would allow them to progress quite far.

But what made them able to do all of this is that they were constantly being challenged to do really hard stuff each week in the problem sets. The lesson to draw is that you should really try to write programs that do non-trivial things, rather than just making sure that you understand the basic syntax. You need to learn to really use ideas like pointers, recursion, and trees in complex ways. For example, three problem sets that were quite challenging for students were implementing a prefix calculator, a Huffman decoding algorithm, and a small peer to peer network chat client.

So make sure you're constantly practicing by writing real programs that test your skills to their limits.

3. Careful what you target--no-one I have ever known or worked with, even folks with twenty or thirty years of experience, can just go without reading manuals sometimes. Programming is an art that sweats the details, but no-one can possibly keep all the details straight all the time. It's far more important to be able to read documentation and understand it than it is to remember it (in detail) for more than about fifteen minutes. Ultimately, it is more about having a deep understanding of ideas than knowing everything. Over time, you'll get very comfortable with things you use frequently, and you'll know where to find information about what you do not.

Prelude
05-04-2009, 08:07 AM
>i think when i can remember and i use regular the whole language with out looking in the books
Good luck with that. I write C compilers for a living, and still have to consult the references on a daily basis. There are too many nuances to waste your valuable gray matter memorizing. Further, there are parts of the language that simply don't need to be used regularly. How often are you going to use setjmp/longjmp in production code? Or trigraphs?

>and i know the ins and outs well enough to being able to write a program that i would like to write
You'd be surprised at how little you need to know before you can write useful software.

>and know how it should be done before starting i must have learned c well enough to use it.
This has nothing to do with C and everything to do with general programming. You can know C inside-out and be able to quote the standard document from memory, but still not be able to program your way out of a wet paper bag. In my opinion, programming concepts like data structures and algorithms will serve you far better than mastery of a programming language.

Salem
05-04-2009, 09:55 AM
I agree with Prelude. Learning HOW to program will serve you well no matter which language(s) you end up programming with.

Learning C itself (excluding libraries) takes a couple of weeks for the syntax, and maybe a couple of months to be able to write useful programs.

There is however a long 'tail' to the learning process which is learning where all the "traps" are :)
The very flexibility of C gives you plenty of scope for making a complete mess of it without any warning at all. Knowing how to avoid this is called 'experience'.

After nearly 20 years of C, I still haven't bothered to memorise things like all the formatting and conversion flags for printf/scanf. That's what manual pages are for.

Brafil
05-04-2009, 11:40 AM
I see everybody shares my opinion ;-)

It is simply not necessary to learn the standard library entirely. Just have a small reference near you. But of course, You should be able to use the more important functions (malloc & friends, str*, mem*) quickly. They can be very useful. But I think there's no need in learning all of them. I have never used float.h nor locales nor iso646 extensions. This drops off a whole bunch.

As to the syntax, you should learn it completely. Recently I discovered a neat little feature in structure initialization. It helps me a lot. (The same can be said for some functions)

But I think the most important part is:

Have fun and remain motivated!

cmay
05-04-2009, 02:44 PM
thanks for the time all of you. it means a lot to me to get these answers.

my background for wanting to learn programming is that i have been sick for some years so i dont work anymore and i sit in front of my computer most of the time since i cant walk around as much as i could before.

before i got sick i had a terrific memory and that i have lost now for some reason kidney diseases can make people unconcentrated and my memory sure is not at its best always.

so to keep on learning some things and to use my mind i started to learn c programming and i also just beginning to study the history of computers and unix systems as i find it very interesting.

but it means a lot to me to know that i dont have to worry about not being able to remember everything by hart.

i write some code everyday and solve the problems in the books i have from the library and i always try to see how i would try solve a post in a forum like this and then compare with the result of the others answers .

i never really had any specific goal to achieve by learning c but now after having spend sometime with it i do enjoy using the language and i pratice everyday.

i am not going to aim at becoming a proffesional or open-source developer as it is just something i would like to be good at . but i think coding in some language and study these things helps my brain staying active and i like that. anyrate i think its better than just sitting and watching tv all day long:)

thanks for sharing your experience.

ps:
in case you wonder what my disease is called here is a article about it.
Wegener's granulomatosis - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/Wegener%27s_granulomatosis) disease

indigo0086
05-04-2009, 02:46 PM
i think when i can remember and i use regular the whole language with out looking in the books and i know the ins and outs well enough to being able to write a program that i would like to write and know how it should be done before starting i must have learned c well enough to use it.

i am far from that yet. i still stand between files and has to learn linked list and then i need to learn a lot more about programming in general. which is maybe hard to find something about for c compared to other languages since c is a language known to be a tool mostly for people who can already program in a other language.


but i still see people in forums that can program and has programmed a long time reading manuals as they done many times before so they know how to use new libraries and use functions they never used before. even that the core language and the ins and out they know very well .

I can't write three sentences that are each as long as a paragraph.

nonoob
05-04-2009, 03:37 PM
. but i think coding in some language and study these things helps my brain staying active and i like that. anyrate i think its better than just sitting and watching tv all day long:)
That's it right there. I program for my job but when I get home, when I'm not too tired, I do some more for recreational purposes. I use different languages and sometimes just create and solve geometric or logic problems just for fun. I believe being reasonably good at programming means you're up to general problem solving in any other disciplines as well.

Prelude
05-04-2009, 05:33 PM
>I can't write three sentences that are each as long as a paragraph
I can. In fact, I have to work. To keep my sentences small. Enough that the. Average. Webbie. Won't lose. Interest.

:p

bithub
05-04-2009, 07:11 PM
>I can't write three sentences that are each as long as a paragraph
I can. In fact, I have to work. To keep my sentences small. Enough that the. Average. Webbie. Won't lose. Interest.

:pI got as far as "my sentences". Can you just summarize that in 3 words or less?

FiveFiftyOne
05-05-2009, 10:19 AM
I'm hardly a great judge, having just started with the language myself, but after years of high level dev (in language terms, not skill) using Perl, Python and PHP for web, I find that C can take you so close to the metal on the platform that you're working on, that it becomes less of a language issue, and more of an architecture / platform / OS issue.

C has few keywords, the same-ish loop structure as everything else you've used, so "learning" C is pretty easy. Learning "how" to use C could take a lifetime. Just poke through some of the docs on a friendly FreeBSD server, or look at the source code and see what can be achieved. It's mind blowing.

Mediah-ikthya
05-05-2009, 06:46 PM
I am just getting started on all this myself.
I am learning through school rather then going through any sort of self study. I took an introduction to programming concepts where I learned psuedo code, then I took fundamental programming where I learned C# and at last I am on to C++.

With the first class I feared I had made a mistake and all of this was way over my head and there was no way I'd ever get it.

Then C# gave me hope, but I didn't have an IDE to work with and the compiler I was working with was cheap and annoying. I enjoyed what I was doing but I struggled with every new concept and execution.

Now I am working with a better book, an actual IDE instead of notebook and I am having so much fun. I see this as a form of art and I am enjoying myself so very much. I'm already planning programs in my head that are far beyond my capability.

strickyc
05-13-2009, 12:33 AM
how long should it take an average hobbyist to learn to program in c as the first language.

Depends on how long it takes you to read understand and implement the things you learn in the vast number of books and tutorials you'll be reading. I find that as soon as I have something I've been studying figured out completely; I have to turn the page...

I also find that reading, understanding, and implementing is a repetitive cycle on any particular subject. In what I've read its unlike a regular book where you can skip over the big confusing words and the rest of the novel/artical still makes sence.
Take your time and don't rush it. If you run up to something you don't understand it's best to try and figure it out.(write a lot of code until you will remeber what the words were at least refering to)

brewbuck
05-13-2009, 12:55 AM
Nearly 20 years of C and I'm still "learning." Or rather, re-learning something I forgot about.

For the basic syntax, I'd give it a few months. To learn the C library well enough to not constantly have to consult a book, another year or so.

To get to the first thousand line program, at least a couple of years, unless you're unusually gifted.