So, I recently started getting serious learning C++ from the 8th Edition of "C++ How to Program" by Harvey Deitel. I'm on the 13th chapter covering Polymorphism -- having learned: Basics, String class, Control Statements, Functions and Recursion, Arrays and Vectors, Pointers, Classes, Operator Overloading, Inheritance and now Polymorphism.
Syntactically, I understand the language. Logically, I'm beginning to understand most of the concepts. Practicality is where I struggle. It's like I'm learning, repeating what I see, then doing exercises. But, on my own, I struggle to find a use for what I'm learning.
I guess my question is, for you who are in a similar situation or remember being in a similar situation, did it feel like this for you? Was there a day when everything really just started to "Click" and you started to "Dream in Code", if you will?
Sounds like you're at the point where you can go and program on your own. If you're struggling with ideas, projecteuler.com is pretty good. Warning, it is math intensive. Otherwise, just think of somethin that sounds interesting and go do it. Make sure it's a challenge so you actually learn something. The cool with programming is you have the world at your fingertips.
No problem. I see a lot of people hit this same stump you did. People get caught up in reading books and tutorials, but at the end of the day you have to go out on your own, so to speak, and just code.
Well the other thing that they also get caught by is design. The books and tutorials do it in sections so that they are normally easy to setup and code without much forethought so when you get into your own code you will easily get overwhelmed. This was and is my problem, I think of the whole picture and start coding rather than taking time to break it down to smaller parts to get it done properly.
@ResidentBiscuit, would you agree those are the two main pitfalls, design and not actually coding?
I remember my first few months trying to program. I honestly couldn't wrap my head around it. For awhile it seemed impossible and I had people telling me that some people just "can't program".
How I started was I set a goal. My goal at the time was to create a GUI for some community to do some statistical calculations. Should have been simple... a few input boxes, a submit button... but it wasn't. I struggled with the general concept of "correctness". I was afraid to put paint to canvas in the case that it was wrong.
I never did finish the project. I did make amazing progress. I had the GUI already finished, I had the implementation of calculations and events finished along with correctly sized widgets using grid sizers. I even mastered the use of TinyXML (which I haven't touched since tbh... I don't really like XML outside of a type of subscripting language). But I had only two or three people who were interested out of the few hundred members. What I did get out of it though was experience. My next project after that was much easier. It started with more structure, more confidence.
However, this project failed more than just once. I built it up, then restarted a few times, each time, improving what I thought I did wrong (although leaving a lot of redundancy).
At some point, I started struggling with design more than I did actual code. I feel like I can do just about anything in C/++ (with a mixture of ASM) as long as I understand what I'm implementing.
Side note...I actually struggled with syntax for a couple months... my first language was actually UnrealScript and then Java, both of which I didn't really understand at the time of use. More often than not, I would guess at syntax because I didn't understand how to find adequate and proper information on how to do something. So I'd say another pitfall is not having enough patience on reading documentation or not being able to find the proper documentation.
I couldn't grasp programming at first either. I started with C++. I persevered for few months, then took a break and toyed with Pascal. Eventually for some reason I decided to write a random number generator in C++ when I was supposed to be learning Pascal and then switched back to C++. Around that time I think was when I found the tutorial on this site as well as the one on cprogramming.com (this site is better, but IMO learning from two different tutorials is useful). Some time later I joined a programming forum but I didn't really like it, so I searched "C++ forum" on Google and that was how I found this place. I already knew about the site from reading the tutorial but I hadn't noticed that it had a forum.
I remember being in that situation because all of the books I read taught the syntax and various programming concepts but only in a console environment. Things started to "click" when I began learning to program specifically for Windows via the winapi. Creating GUIs was the first step and then the various multimedia and graphical components. My first useful application was a 2D isometric map editor using GDI for graphics. Lately I'm learning the newish Direct2D API and some OpenGL and things are going well. I've been throwing around ideas for an isometric tile-based hack-n-slash RPG for many years now so that is a goal I'm working toward and I'm beginning to feel like it is within my grasp.
My advice: narrow your scope to a single field of programming, find books and other resources related to that field and C++, then do lots of reading and coding.