Advertisement

How to learn c++ WELL for someone with programming experience

Started by November 08, 2013 08:10 PM
13 comments, last by Winfield 11 years, 3 months ago

I believe the best way to learn any language is a work with the ready working projects. Just pick up any and try to modify one as you like and while questions occurred to apply to books and tutorials. You may try with Concentration of all The Lessons in Common Library GLSummary in MFC

The source files are demo and codes of ready working projects of Visual C++ MS VS 2010/2012 pro integrated the OpenGL lessons from http://nehe.gamedev.net/ . A lot of people feel something like panic with the words MFC but do not trust them, just try yourself.

Start off by cultivating a powerful and all-consuming anxiety that whatever you just wrote is wrong in some way. Make sure that this anxiety is unquenchable, and very nearly debilitating. Remember, if you question everything you do you're much more likely to gravitate toward better solutions.

This is my system. Send help.


Sounds counterproductive. There are three kinds of code:
  • Does not work
  • Works
  • Works better
Practice and study until you move away from the first kind and more into the second kind. Then read books, read articles, and argue with people on the internet until you start getting into the third kind.

As a hidden bonus, the third kind is inexhaustible. There's always a better way.

Rather than stressing yourself out for not writing apocalypse-level code from the cradle, just accept that each piece of code you write is an opportunity to do better than last time.

A lot of people feel something like panic with the words MFC but do not trust them, just try yourself. [background=#f7f7f7] [/background]


That's not panic. That's disgust.
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.
Advertisement

Start here and buy Scott Meyers' books.

http://www.stroustrup.com/new_learning.pdf

Thanks a lot everyone, C++ primer and accelerated c++ where the 2 books I was considering based on my own research actually. I still don't know which one I'm going with, I like that c++ primer has a new edition out with c++ 11. I don't know much about c++ 11 yet, do you guys think it'd be best to go straight for c++ 11 or is there any value in learning old c++ yet. Also if anyone feels like it I could use a brief explanation of what c++ 11 is for someone who basically just thinks of it as "That new c++ thing that people talk about a lot."

C++11 is the new standard of C++ that recently came out. The prior version almost entirely compatible with it, but C++11 introduces a few new features that have a major impact on coding style, and in a few cases on performance. Namely "auto" variables, more standard smart pointers, varriatic templates, universal initializers, and range based for loops are new features that majorly improve style, and move semantics increase performance.

I would say it's best to go straight for C++11. There's some value in knowing older practices, but there are distinct advantages to using C++11, so if you ever have a choice in the matter, prefer 11. Likewise C++11 is very popular with developers and employer hiring new developers. Still, there's a lot of C++03 development going on.


Rather than stressing yourself out for not writing apocalypse-level code from the cradle, just accept that each piece of code you write is an opportunity to do better than last time.

The post was more than a little bit tongue-in-cheek. I'm from an industry background where code, once written, is never substantially changed and overhauling existing functionality gets developers in trouble for not writing it right the first time... which isn't healthy either, but there it is.

Doing better than the last time is nice, but it's also inevitable if you're learning at all. It's important to write good code in the first place so that, beyond solving the immediate problem, you've created tools to streamline the next problem, and the next.

This topic is closed to new replies.

Advertisement