I'm still a student myself, and I've never 'worked in the industry'. This may be crap advice, but I'll go ahead and tell you what finally kicked what I do know into my head:
Don't try to learn individual syntax first, try to learn concepts and ideas. Instead of figuring out "How do I do <x>", instead learn, "What individual features are available, and what are they actually used for?" Essentially, find out what is possible with the language, and learn the situations that are appropriate for that facet of the language.
You can become an expert at syntax and grammar and still not know what to do or how to do things. You can even memorize the entire standard library functions and still be in the dark about how to properly use things.
Finding out what other people can do with the language, finding out HOW they do that with the language, and then double checking the things they did with others and figuring out whether what they did was appropriate or not, is MUCH more useful than learning syntax and built-in functions.
Some people recommend you do this by reading other people's code. Open up some open source software repositories, fork some Git repos, and just study up on other people's code.
That never worked for me. Especially at first, but still today, I suck at reading other people's code. For me, however, it helped to watch people program, and talk out loud as they programmed.
This is why I was stuck at making infinite loop silly terminal programs up until I actually took programming courses in college - because then, my instructors (especially a very particular one) would actually write out the code on the projector, run it, explain the thought process (often while typing it), find out it doesn't work, debug, modify, try again, etc... And document, verbally, every step.
For me especially, this also showed what the languages being taught were capable of and what they held within them. I mean, I could read about different functions and language features all day, but until I actually have someone use them in a real project while rambling out loud their thought process, I don't really understand their purpose at all.
Oh yeah, that instructor I rambled on about? He didn't do this. He came to class with program files already pre-built, and he went through and described what every single line did individually. Yeah, ok, sure, I could easily look that up online. But why did you use it like that?
So, anyway... The other thing that really helped me, was learning a 'language feature' in a different language that revolved around it. For me, this was object oriented programming and Java. Before I took a Java class (heh), I knew how to make classes and structs in C++, Python, and other languages... But I didn't know why so many people went crazy over it.
I really don't like Java. But man did taking a Java class help me understand and appreciate object oriented programming. And I'm pretty sure that there are other things to be learned in other languages in a similar fashion - but this is the only example I've had direct experience with.
Except, well, I didn't understand programming in general (except syntax and functions and all that crap that did me no good) until I took a PHP class. First class with that specific favorite instructor. Lots of people will hate on PHP, and maybe I'm biased a bit, but when you only finally 'get' programming after using what some claim to be the shittiest modern language, you start to think it's not a shitty language.
To answer your actual question:
Take classes, and try to find good teachers. I've not tried it personally, but there might be some good video tutorials on Youtube or thereabouts - if you can find some where the instructor in them is 'programming live' (didn't come in with pre-built code that he more or less re-types, knowing it already works fine), that's best.
Look at other people's code. Browse Github, try Google+ (I met some GREAT programmers - local too - on Google+. Your mileage may vary though; was through a sheer coincidence) and other social networking sites, and also...
Just start coding. With C++ especially, use header files to 'outline' your program and figure out how all the pieces fit together, and then use the .cpp/.cxx/whatever files to actually implement each thing. Post your early projects on Github, and go on here (/r/learnprogramming is good) and IRC (immediate feedback) to ask for help/advice/opinions.
Do not be afraid of criticism! Unless there are two other people battling over whether something is actually bad or not, assume that the person is right and that your code sucks. Ask them for advice on what they would do if they were you.
If they go off on a tangent and talk about complete redesign of the architecture, perhaps don't exactly do what they say, but still listen to what they say. Such tips may not help with your particular questions, but they still might come in handy later with more 'real' projects you do later.
Though really, if they just say it sucks and don't want to give a reason, don't give up. Maybe your code sucks, maybe they're a troll, or maybe they suck at coding and only think you suck - and nobody else is on to put them in their place. Or they're an elitist asshole, in which case, well, try to sound friendly and reverent, even though they don't deserve it. Maybe they'll give a few genuinely good pointers. Or reveal their idiocy. Either way, fun will be had on your part.
14
u/Tynach Mar 13 '14
I'm still a student myself, and I've never 'worked in the industry'. This may be crap advice, but I'll go ahead and tell you what finally kicked what I do know into my head:
Don't try to learn individual syntax first, try to learn concepts and ideas. Instead of figuring out "How do I do <x>", instead learn, "What individual features are available, and what are they actually used for?" Essentially, find out what is possible with the language, and learn the situations that are appropriate for that facet of the language.
You can become an expert at syntax and grammar and still not know what to do or how to do things. You can even memorize the entire standard library functions and still be in the dark about how to properly use things.
Finding out what other people can do with the language, finding out HOW they do that with the language, and then double checking the things they did with others and figuring out whether what they did was appropriate or not, is MUCH more useful than learning syntax and built-in functions.
Some people recommend you do this by reading other people's code. Open up some open source software repositories, fork some Git repos, and just study up on other people's code.
That never worked for me. Especially at first, but still today, I suck at reading other people's code. For me, however, it helped to watch people program, and talk out loud as they programmed.
This is why I was stuck at making infinite loop silly terminal programs up until I actually took programming courses in college - because then, my instructors (especially a very particular one) would actually write out the code on the projector, run it, explain the thought process (often while typing it), find out it doesn't work, debug, modify, try again, etc... And document, verbally, every step.
For me especially, this also showed what the languages being taught were capable of and what they held within them. I mean, I could read about different functions and language features all day, but until I actually have someone use them in a real project while rambling out loud their thought process, I don't really understand their purpose at all.
Oh yeah, that instructor I rambled on about? He didn't do this. He came to class with program files already pre-built, and he went through and described what every single line did individually. Yeah, ok, sure, I could easily look that up online. But why did you use it like that?
So, anyway... The other thing that really helped me, was learning a 'language feature' in a different language that revolved around it. For me, this was object oriented programming and Java. Before I took a Java class (heh), I knew how to make classes and structs in C++, Python, and other languages... But I didn't know why so many people went crazy over it.
I really don't like Java. But man did taking a Java class help me understand and appreciate object oriented programming. And I'm pretty sure that there are other things to be learned in other languages in a similar fashion - but this is the only example I've had direct experience with.
Except, well, I didn't understand programming in general (except syntax and functions and all that crap that did me no good) until I took a PHP class. First class with that specific favorite instructor. Lots of people will hate on PHP, and maybe I'm biased a bit, but when you only finally 'get' programming after using what some claim to be the shittiest modern language, you start to think it's not a shitty language.
To answer your actual question:
Take classes, and try to find good teachers. I've not tried it personally, but there might be some good video tutorials on Youtube or thereabouts - if you can find some where the instructor in them is 'programming live' (didn't come in with pre-built code that he more or less re-types, knowing it already works fine), that's best.
Look at other people's code. Browse Github, try Google+ (I met some GREAT programmers - local too - on Google+. Your mileage may vary though; was through a sheer coincidence) and other social networking sites, and also...
Just start coding. With C++ especially, use header files to 'outline' your program and figure out how all the pieces fit together, and then use the .cpp/.cxx/whatever files to actually implement each thing. Post your early projects on Github, and go on here (/r/learnprogramming is good) and IRC (immediate feedback) to ask for help/advice/opinions.
Do not be afraid of criticism! Unless there are two other people battling over whether something is actually bad or not, assume that the person is right and that your code sucks. Ask them for advice on what they would do if they were you.
If they go off on a tangent and talk about complete redesign of the architecture, perhaps don't exactly do what they say, but still listen to what they say. Such tips may not help with your particular questions, but they still might come in handy later with more 'real' projects you do later.
Though really, if they just say it sucks and don't want to give a reason, don't give up. Maybe your code sucks, maybe they're a troll, or maybe they suck at coding and only think you suck - and nobody else is on to put them in their place. Or they're an elitist asshole, in which case, well, try to sound friendly and reverent, even though they don't deserve it. Maybe they'll give a few genuinely good pointers. Or reveal their idiocy. Either way, fun will be had on your part.
...
I type too much.