Advice for learning C without a teacher

This is a discussion on Advice for learning C without a teacher within the C Programming forums, part of the General Programming Boards category; Hello All, I am currently learning C but I'm not at all happy with my teacher or the pace of ...

  1. #1
    Registered User
    Join Date
    Feb 2006
    Location
    Sydney, Australia
    Posts
    40

    Advice for learning C without a teacher

    Hello All,

    I am currently learning C but I'm not at all happy with my teacher or the pace of the course so I am considering just dropping the class altogether and attempting to teach myself C using the text that I already have (C Programming by Larry Ullman and Marc Liyanage), and any others that look like they might be helpful, as well as online sources (this forum for example).

    Before I burn any bridges though, I would be quite interested to hear from anyone who has taught themselves C without any formal courses. I'm a little concerned about how hard it might be to pick up C without the help of any face-to-face teaching.

    I'd particularly like to know (feel free to skip any questions that don't apply to you or add any that you think are relevant)...

    1) What was your background at the time (ie. How much programming/computer experience did you have at the time and in what languages/fields/platforms)?

    2) How long did it take you to become competent (I realise that this is pretty subjective)?

    3) What resources did you have at your disposal (ie. what books/advice/help/etc. did you have)?

    4) What other languages (if any) have you learnt since learning C?

    5) What do you know now that you wish you knew when you were learning C - please be specific. Saying "knowing how to program in C" is not helpful ;-)?

    6) How hard (as a rating out of 10) would you say it was to learn C by yourself (again, highly subjective)?

    7) What points in particular were hardest/easiest to learn or get your head around?

    8) How did you learn? eg. Did you work through a reference book? Work through a set of tutorials? Just pick bits and pieces up as you went along?

    9) If you worked from a text book, which texts did you use when you were at the beginner / intermediate / advanced stages and, looking back, were they suitable do you think?

    10) Is there any advice you'd like to give someone considering independent study of C?

    If you can think of anything else that you think would be helpful, I'd appreciate it if you would add that as well.

    Thank you,
    TV

  2. #2
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    1) Only experienced in one thing, MicroWorlds/LogoWriter
    3) A single, poorly written online tutorial
    4) C++
    5) About "Programming in C" (the book), and this forum
    6) 7
    10) do all the examples

    extra- I taught myself c in the 6th grade or so, so its very possible. However, there are all kinds of bad things I learned, and am probably still undoing. That was probably due to the material and age rather then self-teaching though.

  3. #3
    Registered User 00Sven's Avatar
    Join Date
    Feb 2006
    Posts
    127
    1) Not much programming experience. Just knew a lot about basic computer stuff and HTML.

    2) I'm not sure about competent but I had the hang of it pretty quickly. About a week to have a good understanding of the basics.

    3) I used some different tutorials on any sites that I could find. I have a friend taking a C class in school that I asked for help occasionally.

    4) Since C, none. I think that I will start another language soon though.

    5) I wish that I had gotten my book (C The All-In-One Desk Reference for Dummies) before I started and then read it cover-to-cover but that is not a huge thing I just needed to read through a bunch of basic stuff that I already knew to find where the stuff that I hadn't learned was.

    6) 6-7ish

    7) Well most of the concepts came to me quickly the one thing that I got caught on was pointers. I just read through the pointer sections on all of the tutorials that I used online and I got it.

    8) I did not get my reference book right away so at first I worked through one online tutorial and whenever I did not understand a concept I would go to the other tutorials. When that did not work I went to my friend and asked him. Now that I have my book I just use that and then for a specific question post here. Occasionally I ask my friend about something as well.

    9) I have been using the same book all the way through. "C: An All-In-One Desk Reference for Dummies" is pretty good. It has good simple focused examples that do not overload you with multiple concepts at a time. It covers everything from getting a compiler to double linked lists. It has been and still is pretty good. I am currently working on linked lists and it makes things pretty clear and easy to understand.

    10) Try to avoid "bad code". I got some habits because I didn't know that they were not proper to use how I did. Then after coming here I have learned that some of them are bad and am trying to get rid of them (ex. fflush(stdin)). Try to avoid things like that as much as you can.

    I have gotten this far in only about 2 months so I think that it shouldn't be too hard for you to do it. It does help to have someone that you can talk to in person that knows more than you so that you can ask them questions when you need to. Hope this helps!
    ~Sven

  4. #4
    Sys.os_type="Unix";;
    Join Date
    Aug 2005
    Posts
    52
    1) When I picked up C I had about 6 years experience on a unix environment doing mostly scripting, to much computer experience in general to recall.

    2) You won't be for years upon years, I've been programming in C for a mere 2-3 years and I still catch myself figuring out something trivial I never knew probably because I taught myself.

    3) The C Programming Language by k&r... few friends and a lot of forums to review. Other books are Advanced Programming in the UNIX Environment(read after k&r), UNIX Network Programming and Beejs socket programming online tutorial.

    4) Starting messing with Haskell, Scheme and C++.

    5) Honestly I just wish I would of started earlier.

    6) It wasn't that bad since when I first started I was friends with the developers at work and some people online who helped. I also started frequenting this forum and a few others immediately after I started reading k&r as well as hanging out on freenode. With all the people there to criticize you... you pick up on mistakes early

    7) Pointers, I read the chapter in k&r about 15 times.

    10) Don't get discouraged, there's plenty of people online who are more then willing to set you straight when you're wrong and you can easily feel hurt by some peoples comments but just realize they're only doing that to get you into good programming habbits.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,834
    1) What was your background at the time
    I "officially" knew Pascal since that was the teaching language at university at the time. One thing which was emphasised was the difference between "knowing how to program" and "knowing a programming language". Once you know the former, then mapping that to a whole range of programming languages is pretty easy (there are after all only so many ways you can write a for loop for example, most of those include the word 'for').
    At work, I was using PL/M (more or less self taught). I'd dabbled with various pre-ANSI-C compilers up to that point, but never took it seriously. A new project arrived at work to be written in this new "ANSI-C" (this was 1990), so armed with a nice new K&R-2 book I took my chance!.

    2) How long did it take you to become competent.
    Probably a couple of months to write useful bits of code which work as intended without too much effort.
    Mastery takes years and years - a bit like chess. There's always something new to be found out.

    3) What resources did you have at your disposal
    K&R-2, an ANSI-C compiler and a couple of other guys in the same boat as me (the project I mentioned above). There was no internet, online tutorial or message boards back then.

    4) What other languages (if any) have you learnt since learning C?
    I use C++ and Perl on a fairly regular basis. Played about with and largely forgotten things like Java and Javascript.

    5) What do you know now that you wish you knew when you were learning C
    I can't think of anything which would have made learning C easier. Like I said, knowing how to program first is a big help.

    6) How hard (as a rating out of 10) would you say it was to learn C by yourself (again, highly subjective)?
    About 5 - a kind of average for any new complex skill.

    7) What points in particular were hardest/easiest to learn or get your head around?
    Pointers can be pretty tricky at times.

    8) How did you learn? eg. Did you work through a reference book?
    K&R-2 and lots of practice.

    9) If you worked from a text book, which texts did you use when you were at the beginner / intermediate / advanced stages and, looking back, were they suitable do you think?
    I've only ever had one C book - K&R-2.
    I'm on my 2nd (now rather tatty) copy of it.

    10) Is there any advice you'd like to give someone considering independent study of C?
    a) Find several people (or online communities) which seem to have some idea of what they're talking about. People and places which at least know about the existance of the ANSI-C standard should be OK.
    b) Go for it

  6. #6
    Registered User
    Join Date
    Feb 2006
    Location
    Sydney, Australia
    Posts
    40
    Hmmm, OK. Thanks for the advice people. Looks like I'll need to really need to concentrate to figure out pointers. It seems to be universally the hardest thing to wrap your head around.

    I have since purchased a couple of other text books that will hopefully help me to progress on my own independantly of my course. I am also trying to get hold of a copy of K&R but it seems to be a bit hard to get hold of for some reason. It's also bloody expensive!

    Brace yourselves for a stream of questions over the coming months. I'll do my best to try not to be too thick or annoying.

    Thanks again,
    TV

  7. #7
    Registered User
    Join Date
    Feb 2006
    Posts
    155
    learning c is childs play,mastering it may be a useless skill, learn to program first ,after that u can deal with all the semantics.
    once u get the hang of things its very easy to move to any standard,so stay with the course,your teacher is a guy with some experience,listen to what he has to say.

  8. #8
    ex-DECcie
    Join Date
    Dec 2005
    Posts
    125
    Before I answer I will echo what Salem said about the difference between knowing how to program and knowing a programming language. That is HUGELY important in my opinion. Not wanting to trivialize the concept, but a loop is a loop is a loop, but how you say it in Perl, Java, Pascal, Fortran, C, C++ is different.

    To try to answer your questions:

    1. Had 2-3 years sys admin (Unix and VMS) under my belt, and knew VAX Macro Assembler pretty well.

    2. Hard to say -- within 6 months of starting to learn it, I was hired by DEC and began using it on the job there. You get better because you have to in that situation.

    3. In the beginning, just K&R, and if I remember correctly, the DEC C compiler. Like Salem said, there was no online tutorials, Google or anything like that. Although at DEC we did have a company wide "forum" similar in nature to this board, where all kinds of subjects (business and leisure) could be discussed, so I could always ask questions. A little later on, I had a good mentor.

    4. C++, Java (a bit, not really fluent), Perl, Python

    5. Nothing really. I had a pretty good grounding in assembly, which meant I was familiar with the lower levels of the machine, so concepts like pointers were a bit easier to wrap my head around.

    6. Not that hard, 4 or 5, maybe? When you need it for work, you learn it out of necessity so difficulty doesn't really enter into it.

    7. Hardest points? Some of the more complex pointer semantics (pointers to pointers I guess).

    8. Learned by working through K&R, and of course, reading other people's code. My co-worker, mentor often found very efficient ways of doing things, and while he commented well, I'd often have to ask him about what he did, and that was a great source of learning.

    9. Had K&R -- we didn't have a plethora of C books as I recall. K&R worked well.

    10. Make sure that you have the programming concepts (loop, conditionals) etc. clear in your head before you worry about how they are coded in C. Read and read and read and code and code and code. Really DIG into compiler errors to understand why they happen. Ask questions. Repeat all of the above as often as needed.

    And enjoy the journey!
    Mr. Blonde: You ever listen to K-Billy's "Super Sounds of the Seventies" weekend? It's my personal favorite.

  9. #9
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,834
    > your teacher is a guy with some experience,listen to what he has to say.
    Unfortunately, his teacher is an idiot who doesn't even know that C has a standard.
    I'm experiencing deja-vu (again)
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  10. #10
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    1) What was your background at the time (ie. How much programming/computer experience did you have at the time and in what languages/fields/platforms)?

    Spotty 13 year old. I had been interested in computers since I was about 8 but never really dabbled in programming until my uncle posted me his VB6 disc and a 1 inch thick tutorial book.

    2) How long did it take you to become competent (I realise that this is pretty subjective)?

    About 18 months of VB6 I caught wind of C++, then C. The whole concept of not having a cute little form designer along with (what I thought to be, at the time) a complex IDE really caught me off-guard. After I started to learn the language (C++) I guess it took me about 6 months before I really understood enough that I sat down to write usefull programs with it. A little while after that I started learning C to see what was different about it compared to C++ which was a bad idea because the worst habit I have as a programmer is to mix C & C++ very often without realising it, or compiling C on a C++ compiler, etc etc.

    3) What resources did you have at your disposal (ie. what books/advice/help/etc. did you have)?

    No books until that Christmas (about 4 months) so I learnt a lot using the internet. I had occasional advice and help from my uncle too. At the time I used Visual C++ 6.0.

    4) What other languages (if any) have you learnt since learning C?

    Learnt and use frequently:

    C/C++
    Pascal (College only though)
    Assembly (x86 at home, and on RISC PIC in my Electronics labs)

    Learnt and quickly forgetting:

    Java
    Python
    Ruby
    Perl
    VBScript
    JavaScript
    Lisp
    Eiffel
    BASIC - not so much forgetting (can you?) just never use it.

    5) What do you know now that you wish you knew when you were learning C - please be specific. Saying "knowing how to program in C" is not helpful ;-)?

    What x ^= y ^= x ^= y does. No, really.

    6) How hard (as a rating out of 10) would you say it was to learn C by yourself (again, highly subjective)?

    I'm going to say a 6. Especially since I started learning it at an early age. Well it's not so much because of my age, just my naivety - read #2.

    7) What points in particular were hardest/easiest to learn or get your head around?

    The relationship between pointers and arrays. Right now still can't get my head around bitfields. For me the basic language structures like if, while and do were easiest because I could compare them to their BASIC equivalent.

    8) How did you learn? eg. Did you work through a reference book? Work through a set of tutorials? Just pick bits and pieces up as you went along?

    When I got my first C++ book I followed it through, but before that it was just following online tutorials.

    9) If you worked from a text book, which texts did you use when you were at the beginner / intermediate / advanced stages and, looking back, were they suitable do you think?

    At every "level" of competance the only book I had was (well, is) Sams Teach Yourself Programming in 24 Hours. Obviously the 24 hours part is a load of BS. 4 years into my programming hobby I only own that and The Design & Evo. of C++ and the Ruby pickaxe. TBH There was little wrong with the Sams book.

    10) Is there any advice you'd like to give someone considering independent study of C?

    It's entirely possible to learn it all on your ownsie and have a well rounded competant knowledge of the language. I don't think you really stop learning a programming language - sure you can finish learning the syntax, but the methods of approaching problems aren't set in stone.
    Last edited by cboard_member; 03-17-2006 at 04:10 AM.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  11. #11
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >1) What was your background at the time
    About a month of COBOL and very little computing experience.

    >2) How long did it take you to become competent
    It was a few months before I was able to write something useful without tearing my hair out.

    >3) What resources did you have at your disposal
    The help files from Borland 4.02.

    >4) What other languages (if any) have you learnt since learning C?
    C++, Java, Perl, Python, assembly, and C# are the big names.

    >5) What do you know now that you wish you knew when you were learning C
    I wish that I knew I was learning non-standard C at the time. It would have saved me years of unlearning.

    >6) How hard (as a rating out of 10) would you say it was to learn C by yourself
    As my first official programming language, I would give it a 9. If I were learning C now, after gaining experience with another language, it would probably be a 5 or a 6.

    >7) What points in particular were hardest/easiest to learn or get your head around?
    I had a lot of trouble with working with bits. A lot of people mention pointers, but I think I made the connection pretty quickly and pointers never gave me too many problems. Using the bitwise operators was a pain in the butt though.

    >8) How did you learn?
    A lot of my early code was short programs to test "I wonder what'll happen if I do this". I tried to figure out how things worked under the hood and reproduce the effect of the libraries I used. When I couldn't figure out a problem, I checked the reference files. When they didn't help, I invented a workaround.

    >9) If you worked from a text book, which texts did you use
    >when you were at the beginner / intermediate / advanced
    >stages and, looking back, were they suitable do you think?
    I've read a number of books, and picked up things from all of them. But the only two that I can really say I learned C from would be K&R (like Salem, I'm on my second copy), The C Standard Library, and the C standard.

    >10) Is there any advice you'd like to give someone considering independent study of C?
    Question everything and everyone, but don't be stubborn when everyone agrees that you're wrong.
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Advice on C Programming with MSVC++ 2008
    By IT_Guy in forum Windows Programming
    Replies: 1
    Last Post: 03-06-2009, 04:23 AM
  2. create menu with do while loop advice pls
    By ali_1 in forum C++ Programming
    Replies: 1
    Last Post: 04-23-2006, 10:34 PM
  3. girl friend advice (prob. the wrong place)
    By B0bDole in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 10-22-2004, 07:38 PM
  4. Advice for Beginner??
    By hawghauler in forum C++ Programming
    Replies: 6
    Last Post: 06-01-2003, 06:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21