Thread: how long to learn c programming

  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    53

    how long to learn c programming

    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.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    Quote Originally Posted by cmay
    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
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Sep 2008
    Posts
    53
    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 .

  4. #4
    In my head happyclown's Avatar
    Join Date
    Dec 2008
    Location
    In my head
    Posts
    391
    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!
    OS: Linux Mint 13(Maya) LTS 64 bit.

  5. #5
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by cmay View Post
    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.

  6. #6
    Registered User
    Join Date
    Sep 2008
    Posts
    53
    Quote Originally Posted by abachler View Post
    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

  7. #7
    Administrator webmaster's Avatar
    Join Date
    Aug 2001
    Posts
    1,012
    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

    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.

  8. #8
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >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.
    My best code is written with the delete key.

  9. #9
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    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.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  10. #10
    Making mistakes
    Join Date
    Dec 2008
    Posts
    476
    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!

  11. #11
    Registered User
    Join Date
    Sep 2008
    Posts
    53
    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 disease

  12. #12
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Quote Originally Posted by cmay View Post
    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.

  13. #13
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,834
    Quote Originally Posted by cmay View Post
    . 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.

  14. #14
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >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.

    My best code is written with the delete key.

  15. #15
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Quote Originally Posted by Prelude View Post
    >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.

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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 15
    Last Post: 09-30-2008, 02:12 AM
  2. sorting using pointer to pointer not working
    By eager2no in forum C Programming
    Replies: 17
    Last Post: 09-21-2008, 12:52 AM
  3. Having Buffer Problems With Overlapped I/O --
    By Sargera in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 04:46 PM
  4. Problem in Converting Unsigned long to String
    By cprogrammer_18 in forum C Programming
    Replies: 8
    Last Post: 01-14-2006, 08:57 AM
  5. Sorting Algorithms with Time
    By silicon in forum C++ Programming
    Replies: 3
    Last Post: 05-03-2005, 11:27 AM