Thread: I fail at learning...

  1. #1
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901

    I fail at learning...

    or at least at self-teaching. I have been trying to read through the same C++ book for months, and I'm only on chapter 11. I would read through it and understand it, then at some point it gets tedious and frustrating to try and continue reading. Sometimes I just throw the book in a fit of anger for not being able to concentrate on it. I also tend to read lines, paragraphs, even pages and in te end I realize I don't know what I was just reading. I've been trying to learn for years with several books and it all comes out the same.

    Thanks for your time *sleeps*

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I don't try to force myself into learning C++. I can spend days without going back to whatever book I'm reading. I believe there's more good than bad in this. Giving answers on these forums and reading other people's posts also help the learning process. I concede when I give a bad answer and always make an effort to give a good one.

    I believe the success in learning a programming language is based on 2 fundamental principles plus another 2 related plus 1 golden rule:

    The fundamental principles are:

    1. Allow for time to work. Know that it will take a couple of years to fully understand the programming language. Know also that it is an ongoing process. After those two years, language features may be known to you, but not mastered in any way.

    2. Practice is fundamental to learning. Problem solving is not. Practice the concepts you are learning at that moment. Don't try to build little programs to test these. But instead work on abstract concepts. This begs for a little explanation...

    When trying to learn about pointers (just an example) don't try to think of a real-world problem that you can solve with pointers. Concentrate on how they work. Concentrate on what functionality they offer and practice by coding small snippets to test this. Pointers contain the address of the object to which they point? Ok, let me test it. Const pointers and pointers to const are different? Ok, let me see how.

    Refuse yourself the need to start coding immediatly. It's damaging. Even the smallest real-word program demands you to know about different areas of the programming language. You will find that you will need to learn about other things that will distract you from what you are studying at that moment.

    The related principle are:

    A. Persist, don't insist. Remember 1. Take your time. Persist in your thirst for knowledge, but don't force it on you. If you don't feel like it on that particular day, or the next, and the next, and the next... so be it. Take it naturally. Accept it as being a trait you share with all of us. It's not you.

    B. Follow the book. Don't follow your needs. Remember 2. Understand you too work by objectives. Your objective is not to code a game, or a financial application. Your objective is to learn a programming language. As such, follow the book page by page. Don't try to skip to more "interesting" or "cool" subjects. Don't try to invent things you can do with what you learned already. Be fully cold and pragmatic about your learning process. But do yourself a favor, after you followed the example line-by-line presented on the book, do divert a little and try to code something slightly different (with different variable names, a slightly different structure,...). Follow the book, but don't obey every single thing it says.

    And the golden rule is:

    You need to learn the nomenclature. It's unfortunate, but you do.

    You see, where most people feel frustrated about their learning is when they don't fully understand what is being told to them. This can be a case of poor english writing skills (which I'm guilty. But then and again I'm not an author). But more often the problem is either the book not using the correct terminology or the reader not having understood the meaning of those terms being applied.

    For instance, many people confuse parameters with arguments, using declarations with using directives... and many many other examples. They are completely different things (although related). As the reader gets deep into the book, the author starts assuming more and more that those terms are now fully understood and starts to explain things by freely applying those terms without sidenotes. And the reader who didn't fully understand those terms when he should, is now facing himself with a more difficult task; understanding more complex features without having fully understood the terms being used before.

    I highly recommend C++ Primer as anyone's starter book. The authors go to great lenghts to not only use the correct terminology, but also explain it to you. Try to be a purist on this regard. Make an effort to use the correct language when asking or answering questions, even if it means going back to the book before posting. Believe it or not, understanding the terminology is halfway to understand the programing language. Don't call a const char* a char const pointer. Call it a pointer to const char.
    Last edited by Mario F.; 07-05-2006 at 10:10 AM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Find a project that you want to do, then start working on it, I learned the basics from tutorials/books then I learned most of what I know through coding and then looking up stuff that I don't know how to do.

    Programming takes patience, in any program that is more significant that "hello world" there is bound to be a bug or 2 that needs to be worked out. You wont learn to program in a complicated language like C++ over night, heck I was reading the same book and tutorials for about 5-6 months before I got enough of a handle on it that I can start using things as just a reference.

    If you are still struggling with C++ after you start a project, and have used your resouces to the best of your ability, then maybe you need to start with a different language. Perl has some nice elements to it, PHP if you like web stuffs, maybe even Java depending on what your priorities are with the application. Learning other languages will teach you the concepts you need to understand, if you can't get them down in C++.

    I never was good at classes in C++, couldn't ever find a use for them. I started writing PHP and needed something that would output a header/footer for me and found classes to be very useful, wrote one for my database queries too, made for a lot easier to read code.

    So just keep in mind, it takes patience to learn to program, and other languages may help you understand the concepts you need.

  4. #4
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    It's not to say that I don't understand a lot of things, I went through a good portion of the book and understand a lot of the concepts, it's just trying to sit and continue a lot of the times is a hastle. I have a short attention span so Ij ust put the book down and bounce around the internet.

    In a classroom environment it's no problem. I took two semesters of Java and passed with As, and I took a C++ class and passed that with an A, I learn better in school, but C++ is a dying breed and I think I only am exposed to it in my last semester of java programming as a kind of transitional step. I know a lot about C++, I just feel I can't really use it.
    Last edited by indigo0086; 07-05-2006 at 10:16 AM.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by indigo0086
    but C++ is a dying breed [...] I just feel I can't really use it.
    Totally wrong. However you may feel you personally don't have the need to learn it yourself. Which in that case is fine.

    However, C++ is far from dying (it's in fact about to take another boost with the TR1 specifications), but also is a fundamental language in many fields. Of which game development is perhaps the most notorious. But many other fields ranging from scientific applications, to GUIs and any processing intensive programs you can think of.

    Don't even think interpreted languages like Java can take C++ place.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    Don't call a const char* a char const pointer. Call it a pointer to const char.
    Unfortunately "design by comittee" has resulted in "iterator to const" being named as "const_iterator".

    it's in fact about to take another boost with the TR1 specifications
    Nice pun
    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

  7. #7
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    What a wonderful job those people are doing
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #8
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    I meant dying as in being phased out in the local colleges. I don't even think they have elective C++ courses. Though I have to admit had I not learned java more in-depth first I would have a harder transition to C++.

  9. #9

    Join Date
    May 2005
    Posts
    1,042
    In order to understand what you read you have to implement it in a program, period.
    I'm not immature, I'm refined in the opposite direction.

  10. #10
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    I disagree with these two statements
    Quote Originally Posted by Mario. F
    Follow the book. Don't follow your needs
    Practice is fundamental to learning. Problem solving is not

  11. #11
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    I would also say that making small "useless" programs that really doesnt do any good to you but where you implement concepts you read in books is a great way to learn things.
    STL Util a small headers-only library with various utility functions. Mainly for fun but feedback is welcome.

  12. #12
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    You cannot just read, read, and read and learn. You must code along with your reading. Best way IMO to learn is attempt some large project or perhaps a small game or utility. More than enough programming dilemmas will pop up during the project. Through your research and problem solving, you will get much better at C++. You will probably scrap your designs at least 3 or 4 times before you get a good class framework setup.

    Also you will want to design your system on paper well before beginning. This is crucial to your success as it will let you see the big picture. Programming is like working on a lot of small pictures and then assembling them all to create the final big picture. Often times it's easy to lose sight of the big picture w/o a design document to guide you.

  13. #13
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I agree that these are all opinions and techniques that may be more successful to some and disastrous to others. If someone had the answer to learning, writing a book, tutoring or teaching in a school would be much easier tasks.

    The above is my opinion. It is how I feel more comfortable about learning. It's based on some writings too that suggest one breaks learning down into objectives and separate the learning process from the application process.

    There's a lot of code being written still. But that code concentrates itself in understanding the concepts being taught at that moment. The idea is to understand How something can be done and Why it can be done. The point being that knowing these two well enough, is a good start to know When to do it and Where to do it. The better one understands the How and Why, the better he will apply that knowledge to answer the When and Where. And these last two should be the only thing worrying the mind of a programmer when applying his teachings.

    Nothing is written in stone though. However, my personal and humble experience tells me that learning and applying that knowledge are two distinct things. The latter, if too hasty, may (usually does) lead to bad code and fundamental concepts of the programming language not being fully understood... which will degrade the code even further.
    Last edited by Mario F.; 07-05-2006 at 04:03 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  14. #14
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    My learning of Java has been a large experiement. I set out to write a program that would be hard for me in any language. And aimed to do it in a language I have only done some small patches in, and never anything full blown. I have scraped my design 6 times now and redone it all in the last 4 weeks. I am getting a much stronger grasp on it than I would have if I had just followed some course. Others learn differently, but projects and really applying things and learning other things as I need them has been the way I have learned programming.

  15. #15
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    Quote Originally Posted by indigo0086
    I meant dying as in being phased out in the local colleges. I don't even think they have elective C++ courses.
    Yeah I've noticed that too. As far as I can tell, my local community college is not offering C or C++ during the upcoming fall semester. So either the course book isn't the complete one or they decided Visual BASIC .NET was enough.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Non-blocking socket connection problem
    By cbalu in forum Linux Programming
    Replies: 25
    Last Post: 06-03-2009, 02:15 AM
  2. Machine Learning with Lego Mindstorms
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 01-30-2009, 02:34 PM
  3. Need Help On a Simple Bank Program
    By oobootsy1 in forum C# Programming
    Replies: 9
    Last Post: 08-08-2005, 10:51 AM
  4. Fun Learning a New Language
    By UnregdRegd in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 09-30-2003, 10:03 PM