I am currently available as a freelance Senior Perl Programmer. Download my up-to-date resume (PDF)
John Bokma MexIT
freelance Perl programmer

(Re)learning C++

Thursday, September 1, 2011 | 0 comments

Recently I decided to relearn C++ programming. I used to do some C and C++ programming back in the 90's but somehow I kept getting more and more Perl and Java programming work, so after some time I stopped improving both my C and C++ skills.

For several years I have been wondering which additional language to learn so I can offer my customers more besides Perl. Nearly five years ago I decided to learn Python. While I can find my way in this language; I have done several projects in it already, and while it's a fine language to program in, it doesn't give me the same form of pleasure Perl does. And no, this has nothing to do with knowing Perl longer, or that Perl is the only language I have been exposed to, as someone in a personal attack on Usenet tried to imply. It's just that I really like Perl. And yes, Perl is messy, Perl has a lot of "line noise", etc. But still, if one is willing to write great code, the language shouldn't matter for the same reason an more expensive photo camera doesn't make one a better photographer just like that.

While the above may sound like bad news for Python, I haven't given up on the language. I still want to do new projects in Python if it's an option. On the other hand, I hope that one day Perl 6 will be good enough to use in production, and maybe I will stick with Perl if Perl is a good option for the problem I am asked to solve.

So why C++, you might wonder. Well, in my case for two reasons: compiled executables (small, and fast) and GUI programs. While it's quite possible to do the latter using Perl; I have been writing Perl programs using WxWidgets, I do think, maybe wrongly so, that writing UI programs is easier in a language like C++. As for the compiled executables; while Perl has tools which make it possible to pack all required files into a single, stand alone, executable, the resulting binary file is also quite large (several megabytes) and does include the actual source. While I don't have a problem with that, some of my customers do.

As for learning C++ I have decided to work through 6 books at a speed of one book a month. With some of the thinner books this means about 10 pages a day, every day, in a given month. With other books, this means I have to work (much) harder than that, so no idea if I am going to manage to finish 6 months from now. The list of books I want to work through is, in current planned order:

  1. Effective C++: 55 Specific Ways to Improve Your Programs and Designs - Scott Meyers, Addison-Wesley Professional. 3rd edition, 2005, ISBN-13: 978-0-321-33487-9
  2. The C++ Programming Language: Special Edition - Bjarne Stroustrup, Addison-Wesley Professional, 3 edition, hardcover, 2000, ISBN-13: 978-0-201-70073-2
  3. Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library - Scott Meyers, Addison-Wesley Professional, 2001, ISBN-13: 978-0-201-74962-5
  4. Design Patterns: Elements of Reusable Object-Oriented Software - Erich Gamma, Richard Helm, Raplh Johnson, John Vlissides, Addison-Wesly Professional, 1st edition, hardcover, 1994, ISBN-13: 978-0-201-63361-0
  5. More Effective C++: 35 New Ways to Improve Your Programs and Designs - Scott Meyers, Addison-Wesley Professional; 1 edition 1996, ISBN-13: 978-0-201-63371-9
  6. Elements of Programming - Alexander Stepanov and Paul McJones, Addison-Wesley Professional, 1st edition, hardcover, 2009, ISBN-13: 978-0-321-63537-2

And "work through" as in reading each book, page for page, away from the computer while making handwritten (yes!) notes into a notebook. Of course, at one point I want to write code as well and practice what I've read, so besides the six above books I want also to read and try out, as in actual programming, selected parts from the following two books on Qt:

  1. C++ GUI Programming with Qt 4 - Second Edition - Jasmin Blanchette and Mark Summerfield, Prentice Hall, 2nd edition, hardcover, 2008, ISBN-13: 978-0-13-235416-5
  2. Advanced Qt Programming: Creating Great Software with C++ and Qt 4 - Mark Summerfield, Prentice Hall, 1st edition, hardcover, 2010, ISBN-13: 978-0-321-63590-7

I've already read selected parts from Mark Summerfield's "Rapid GUI Programming with Python and Qt" in the past, and actually written a Pyhton Qt application with help of this book. On top of that, I've also read most of the first edition of "Programming in Python 3: A Complete Introduction to the Python Language" and my conclusion is that Mark is a fantastic writer, so I have little doubt that the above two books are going to be of great help. The first book in the above list also comes with an appendix D: "Introduction to C++ for Java and C# Programmers", which I already have read and which did a good job re-familiarizing me with the C++ language.

The above plan does sound like a lot of work, the first 6 books alone add up to well over 2,000 pages. Am I going to be able to do work through all this? I don't know, but I am going to do my very best to try. And if I can't make it in 6 months I am OK with 8 months, or even more.

C++ Related Links

Also today

Please post a comment | read 0 comments | RSS feed