Thread: I suck at programming

  1. #1
    Registered User
    Join Date
    Aug 2012
    Posts
    11

    I suck at programming

    I've been trying learn C. Never done programming before. I was trying with this course from the havard website. cs50.net. I did the first 3 weeks but then it got harder and now I understand nothing.

    I want to keep learning but I think tutors are expensive and I don't understand anything from the cs50 course right now.

  2. #2
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,907
    This site has good tutorials C programming.com - Learn C and C++ Programming - Cprogramming.com

    Also, If you need clarification, there are people on this forum who have an impressive knowledge of the language -

  3. #3
    Registered User camel-man's Avatar
    Join Date
    Jan 2011
    Location
    Under the moon
    Posts
    693
    What is the furthest concept that you have covered in programming so far?

  4. #4
    Registered User
    Join Date
    May 2012
    Posts
    1,066
    Have you ever tried another approach to learning programming?
    IMHO watching videos isn't the best way to learn it. I'm probably old-fashioned but I prefer books more :-).

    Why do you want to learn programming, i.e. what's your motivation? Perhaps your expectations are too high (wanting too much in too little time).

    More specifically why do you want to learn C? Have you already considered starting with another (more beginners friendly) language. I know this is probably highly debatabel but I would recommend to a complete beginner to start with a scripting language like Python.

    Another aspect is how much time can you invest? Perhaps the cs50.net is just too fast for you and you should slow down a little bit (e.g. spend two weeks on each one week block).

    HTH, Andreas

  5. #5
    Registered User
    Join Date
    Jul 2012
    Location
    Australia
    Posts
    242
    Get yourself "Sam's Teach Yourself C in 21 Days 6th Edition" by Bradley Jones & Peter Aitken.

    I've been using it to learn C since July, and it is brilliant. The style of writing and format makes it easy to read for a beginner. Heaps and heaps of working sample code(which comes on a CD with the book), so you can just copy and paste into a compiler. Or you can just hand type the code and learn heaps more than just copying and pasting code without paying attention to the code. And each and every piece of sample code(all fully functioning programs) are fully explained, so you know fully how the program works.

    Difficult concepts are explained really well, not in a dry or terse way. Of course, you can't learn C in 21 Days. Forget about the 21 Days nonsense, and read it at your own pace, and it will serve you well.

    Just skip the "bonus" section on Linked Lists. Since it's a bonus section, it's very sparse, and I got nothing out of it. Don't get bogged down in the linked lists section, otherwise you will come to a dead stop. Skip the section and come back to it later. Everything else but the Linked Lists section is great.

    It is written so well that I find it difficult to stop reading it. I read it while I'm eating breakfast, before bed, during my lunches. I can't recommend this book enough. Enough to get a beginner up and running, and this forum can help with any problems.

    Have fun.
    IDE: Code::Blocks | Compiler Suite for Windows: TDM-GCC (MingW, gdb)

  6. #6
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Quote Originally Posted by cfanatic View Post
    I read it while I'm eating breakfast, before bed, during my lunches.
    Wow.. !.. you've got an OCD with this book.....which your username already hints !

  7. #7
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    It is rare for someone to not have issues like these, it's just par for the course. My suggestion would be to back up a lesson or two until you find your comfort level, build on it, and then move forward paying close attention to anything that seems difficult.

  8. #8
    Registered User
    Join Date
    Jul 2012
    Location
    Australia
    Posts
    242
    Quote Originally Posted by manasij7479 View Post
    Wow.. !.. you've got an OCD with this book.....which your username already hints !
    Not OCD.

    I find it hard to put down a good book, whether the book is fiction or non-fiction. I really enjoy reading this book!
    IDE: Code::Blocks | Compiler Suite for Windows: TDM-GCC (MingW, gdb)

  9. #9
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    If you're trying to complete a program and don't understand, another thing you could try is to search for other peoples' code that does the same thing. You can then modify/study that code to learn more about the language.

    For example, if I wanted to write my own strcpy function and didn't know C well, I might first find this code with Google (simplified):
    Code:
    void my_strcpy (char *dst, const char *src)
    {
        while ((*dst++ = *src++))
            ;
    }
    I could add print statements before/after expressions I didn't understand. So maybe:
    Code:
    void my_strcpy (char *dst, const char *src)
    {
        char *tmp_src = src;
        char *tmp_dst = dst;
        while ((*dst++ = *src++))
            printf("src = \"%s\" | dst = \"%s\"\n", tmp_src, tmp_dst);
    }
    Or, I could try to modify the while loop and check if the result is the same:
    Code:
    void my_strcpy (char *dst, const char *src)
    {
        while (*src)
            *dst++ = *src++;
    }
    Or if I didn't understand the pointer syntax, I would Google it and find this link to help.


    Then, without copying, I could write my own code.

  10. #10
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472
    I think it is about having something you really want to code - inspiration - and interest - counts for a lot, if you get an idea and suddenly realise you could write a program to show it, then ocd can strike! I think that is important in driving you on. Certainly for me - i was obsessed for a while playing a card game 'golf' on my mobile, and became interested in knowing just how many games would be solvable, stuff like that is what i got into, little projects with aims that actually helped me answer these questions and realising i could use a computer to help me.
    Last edited by rogster001; 09-11-2012 at 01:56 PM.
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  11. #11
    Registered User
    Join Date
    Jul 2012
    Location
    Australia
    Posts
    242
    For me, the only way to keep the momentum going is to always be coding a project at all times. Reading theory alone is not enough. Always be coding something, to practice new functions and features of the language. I have had periods where I didn't do any coding for a few days, and during those times I questioned my motivation, and thoughts about just giving up crept into my head. Especially when I didn't have any projects in mind.

    Now, for any OS function or feature that I use, like search and replace, word count, copy and paste etc, I write my own code. There are hundreds of OS commands that can be coded, so I will never be out of project ideas.

    I will reiterate the most important point for people who are learning on their own: ALWAYS BE CODING SOMETHING, AT ALL TIMES. If you stop coding, you have lost the momentum, and there is the possibility that you will just give up rather than continue.
    IDE: Code::Blocks | Compiler Suite for Windows: TDM-GCC (MingW, gdb)

  12. #12
    Registered User
    Join Date
    Jan 2009
    Posts
    1,485
    Quote Originally Posted by Dave Couture View Post
    I've been trying learn C. Never done programming before. I was trying with this course from the havard website. cs50.net. I did the first 3 weeks but then it got harder and now I understand nothing.
    I don't think you should declare that you suck at programing, if you never been exposed to it before it's quite a lot to take in. Keep in mind that those who attend the course in the flesh, has all sorts of resources available if they are stuck to help them move ahead compared to someone who does it on their own. I would go back an repeat and experiment with the parts that you do understand. Then when you feel ready move on to the parts that you do not understand today, I think you will find that you then are able to take it in. Perhaps get a book as a compliment, and if you already have one, get another one. Sometimes it's helpful to see something explained in a different way.

  13. #13
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by cfanatic View Post
    ALWAYS BE CODING SOMETHING, AT ALL TIMES
    this is excellent advice. I constantly catch myself thinking in terms of how I would write code to simulate some real-life event, or to simplify some repetitive task. after a while, it just becomes automatic.

  14. #14
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    Quote Originally Posted by cfanatic View Post
    ALWAYS BE CODING SOMETHING, AT ALL TIMES.
    This is good advice, but remember, it doesn't have to be the same thing every time. Sometimes taking breaks from projects is very helpful when you're trying to solve bugs or add code.

    Quote Originally Posted by Elkvis View Post
    this is excellent advice. I constantly catch myself thinking in terms of how I would write code to simulate some real-life event, or to simplify some repetitive task. after a while, it just becomes automatic.
    Sometimes when I'm playing games I start thinking how I'd code the game or something to solve the game :P

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help please I still suck
    By face_master in forum C++ Programming
    Replies: 3
    Last Post: 11-02-2002, 08:56 AM
  2. you suck!
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 04-15-2002, 09:46 AM