PDA

View Full Version : I fail at learning...



indigo0086
07-05-2006, 09:04 AM
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*

Mario F.
07-05-2006, 10:02 AM
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.

Wraithan
07-05-2006, 10:06 AM
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.

indigo0086
07-05-2006, 10:11 AM
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.

Mario F.
07-05-2006, 10:25 AM
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.

laserlight
07-05-2006, 10:44 AM
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 :)

Mario F.
07-05-2006, 10:47 AM
What a wonderful job those people are doing :)

indigo0086
07-05-2006, 10:48 AM
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++.

BobMcGee123
07-05-2006, 12:00 PM
In order to understand what you read you have to implement it in a program, period.

MadCow257
07-05-2006, 12:11 PM
I disagree with these two statements


Follow the book. Don't follow your needs



Practice is fundamental to learning. Problem solving is not

Shakti
07-05-2006, 12:40 PM
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.

VirtualAce
07-05-2006, 01:39 PM
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.

Mario F.
07-05-2006, 03:46 PM
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.

Wraithan
07-05-2006, 04:48 PM
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.

Frobozz
07-05-2006, 06:09 PM
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. :(

whiteflags
07-05-2006, 07:04 PM
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.
I have a theory: maybe they don't teach C++ in an academic setting because a term is only a couple of months. Initially this sounds like stupid reasoning, but a few moments of thought make the truth clear: any reputable source suggests that C++ takes years to master and wrap your head around descent OOP design and proper C++ constructs and usage.

With this in mind, no professor wants to do the incorrect thing and try to teach good OOP programming with C++ in one term. That is not effective: CProg would just be swamped with newbies ever stupider than me, and you cannot force students to take C++ Programming I - VII. Thus, we turn to evil Java or something, where the garbage collection helps them avoid C++ pitfalls and lets them learn a first language that is OO-relevant within a academic year. With this knowledge the professor hopes that one day his pupil will apply his OOP design knowledge and use it with C++.

Of course we are sort of doing this backwards... the new C++ Programmer with experience in Java will access memory that he doesn't own, create zero-length arrays, and not free his memory, ever. He will create singletons out of everything, and give himself a really hard time.

So unless C++ gets easier or people become really intuitive, academic C++ may never return.

prog-bman
07-05-2006, 07:24 PM
Valid point. But I mean learning the basics of C++ can be put in a semester. Then on the second one more advanced concepts. I would not say mastery or even a great understanding of C++ could be accomplished in 2 semesters(1 year) of school but it definatly would be worth teaching it as it can be related to those other languages such as Java.

Wraithan
07-05-2006, 08:11 PM
My CC is still offering it (I am taking it this term) and the course book has it listed for fall term too...

Loctan
07-06-2006, 01:47 AM
I just thought that I would bring up that I recently graduated with a computer engineering degree and my curriculum required only one semester of C programming for engineers (then two semesters of java programming). The C programming was very simple - FILE IO, functions, math computations. Basically we would put or read data from a file, perform some calculations on the data, and then output the results.

Now that I have done this and went looking on the job market apparently most of the companies expect me to be pretty familiar with C/C++ (in addition to VHDL, Assembly) so here I am trying to learn before and during grad school so I will be more marketable.

Mister C
07-06-2006, 10:54 PM
Well I thought it might be time to chime in...
I teach CS at a Two year college.

1. C++ is not dead, a real good CC would offer (programming langs): C++, VB. NET, Java, and C#- Those are languages that both academia and industry use

2. Java is the "in vogue" language now. C++ was a few years ago. C++ is not any harder to learn than Java- well ... :D

JC

indigo0086
07-07-2006, 08:14 AM
They teach C++ later in programming III towards the end, and windows programming class of course has C++, but In between Programming III and Windows I don't know what they teach. I love Java though.