C++ Cookbooks

Posted: March 13, 2011 in Programming Recipes
Tags: ,

Some people wonder how to start studying C++ in a professional way. I’m not a C++ guru but I love it and I’d like to improve my skills. With the purpose of doing it, I’ve studied a bunch of books and I’ve read some articles about C++ programming and designing. Anyhow, you can study all the books in the world but you must program and write your own applications, otherwise you’ll just know the theory!

I keep on studying books and articles but I strive to develop full applications in my free time. Currently, I’ve set up a small team of mad guys (like me) and we are going to create a videogame. This is a hard challenge but we want to get it.

Ok, I stop talking about me, I promise. Let’s talk about C++ and what you can do when you are at the beginning.

The first thing to do is being aware of your programming skills. If you want to have a very complete start (if you have time), I’ll recommend you “Programming from the Ground Up”. It begins with Assembly and goes on dealing with C. If you read it, you’ll get acquainted with programming from the low-level – Alas, thing forgotten by the most part of modern programmers.

To have a quick start with C++, read Accelerated C++, by Andrew Koenig and Barbara E. Moo. This is one of the best introductory book about C++, covering basic concepts, STL, exceptions, OO programming, good practices, etc. It is really fast, giving you the chance to begin writing programs immediately. Reading it, you’ll be aware of the primary memory issues, operators overloading and their related troubles, inheritance, etc.

Next, you’re ready to toughen your proficiency studying Meyers’ books:

  • Effective C++
  • More Effective C++
  • Effective STL

Overall, in these books you’ll find more than 130 ways (items) to improve your programs and designs. Tips, tricks, idioms, patterns and other recipes you won’t be able to live without!

At this point, you should have an intermediate understanding of C++. Bear in mind you must get your hands dirty and write your own programs. Keep on hand the reference of the C++ Language Library (for example, this).

I think of this game like a sport team (say, a Volleyball team) trains before the beginning of the championship: during the first months, the players train their body, their mind and their skills (as you’ve read Koening’s and Meyers’ books); next they are ready to start playing some matches (as you start writing you’re own applications). During the championship the team keeps on training, but this time it should focus on its flaws or specific matches (for example, getting ready for the match against the leading team). Thus, you can keep on studying books, maybe focusing on your weaknesses and particular troubles you’re handling.

Do not forget Stroustrup‘s (the father of C++) books such as The C ++ Programming Language (the Bible of C++) and The Design and Evolution of C++. In addition to these, you can read:

  • Efficient C++: Performance Programming Techniques, by Dov Bulka and David Mayhew;
  • Josuttis’ The C++ Standard Library – A Tutorial and Reference;
  • Exceptional C++ and More Exceptional C++, by Herb Sutter;
  • Scientific and Engineering C++, by John J. Barton and Lee R. Nackman;
  • C++ Template Metaprogramming: concepts, tools, and techniques from boost and beyond, by David Abrahams and Aleksey Gurtovoy;

Keep in mind to search the Web for topics your books don’t cover. If you’re developing a new program, you should be fast and reliable and, perhaps, you don’t have time to study entire books. Never forget my advice: write your own programs! While writing a program, if you get aware that all you have done is wrong, then you’ve learned something new!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s