Five Good C++ Books

C++ BOOKS IS something I’ve read quite a few of during the years. Having learned my lesson on buying Python books, I would like to share the five C++ books I value the most, and which I would not hesitate to recommend to others. The books target audience range from absolute beginner to advanced programmer.


I learned C++ programming from the book Teach Yourself C++ in 21 Days. Everything that the book Core Python Programming does wrong, this book does right. It starts with very easy first steps and by top quality examples and well written texts, it gradually adds layer upon layer of increasingly more advanced C++ knowledge. This may in fact very well be the best, and most well written, programming book I’ve ever read (note that I got the 1994 edition, and haven’t read later updated reprints).
Target audience: beginner.
Rating: ★★★★★


No serious C++ work can be done without the C++ Standard Library. The book The C++ Standard Library: A Tutorial and Reference is a perfect combination of a tutorial and reference book (as the title also states). Don’t leave home without it.
Target audience: intermediate, advanced.
Rating: ★★★★★


The C++ book The C++ Programming Language is written by its inventor himself, Bjarne Stroustrup. I actually got this book before Teach Yourself C++ in 21 Days but this book is not suited for beginners. This is for advanced C++ understanding, and an indispensable reference book when doing serious C++ programming.
Target audience: intermediate, advanced.
Rating: ★★★★★


Having read – and understood – the books above, one might get the urge to learn some advanced techniques on templates. For that the cult book Modern C++ Design: Applied Generic and Design Patterns is highly recommendable. This relatively thin book is written precise and to the point. Even though the topics covered are advanced, the author takes great care of explaining the details. (Sadly I seldom get the opportunity of doing such C++ hacking covered in this book).
Target audience: advanced.
Rating: ★★★★★


A bit of a joker is the book The Informit C++ Reference Guide: Techniques, Insight, and Practical Advice on C++. This book is a gold mine of tips, tricks and examples spanning the entire spectrum of C++ programming – the title covers the contents pretty well. Its a very informative book that covers a lot of topics but concentrates intelligently on areas that often causes doubts. I find it a real joy to read every time.
Target audience: intermediate.
Rating: ★★★★★

Core Python Programming

I CONSIDER MYSELF at beginner level on Python programming. I’ve played with Python before at a very basic level, but my experience is, that to really learn a programming language, you have to get a book written by a writer that knows the language well. Looking around the world wide web, the Core Python Programming (2nd edition) by Wesley J. Chun came highly recommended from various Python and book review sites – so I bought it.

The book covers a lot of things. Starting with a chapter giving a quick Python tour with a page or so introduction to most aspects of the language. It then moves on to the type system, file handling, conditionals, error handling, functions and classes. Finally more advanced things as regular expressions, networking and web programming is covered.

From the above, and from its contents table, it looks like a neatly structured book, but in reality all chapters have a little of everything tossed in.

The book is presented as a book for the technical person already familiar with programming and/or students. This book tries to ride two horses at once. Many things are explained for the absolute beginner in painstakingly long stories, however the incoherent chronology of the book demands programming knowledge and is just flawed from a beginners point of view. Furthermore, a mistake constantly made in this book is the use of explaining things or showing examples with topics not covered yet. Two examples could be introducing list comprehensions and generator expression by using lambda’s and yield examples. Lambda’s and yield statements however aren’t treated until chapters later and no explanations or forward references are given. Trying to grasp Python from self studying a book, then explaining new stuff with other new non-explained stuff is just plain stupid.

Another frustrating thing of structure in this book, is how topics are scattered though out the book. A dedicated chapter exists for all topics, but it is often quite shallow. Tragedy is that almost exclusively the index only lists the dedicated chapter pages. After quite some reading in the book I had doubts whether Python supported function/method overloading. Given the dynamic type nature of Python, I would expect not – unless different amount of arguments could differentiate definitions. In the index “overloading” only exists in parentheses along side “overriding” and none of the pages listed there gives a direct answer. Reading the book cover to cover, the first direct answer I found was a tiny sentence at page 412 “Because overloading is not a feature …” in the chapter “Return Values and Function Types”. An obvious place to put such information – if you live in Bizarro World! The statement is repeated a couple of times, along with a note the functionality can be achieved by introspecting the types. For a book constantly comparing Python to C++ and Java, I find it quite a shortcoming that no example of this is given at any point.

The second time around its actually better, cos then your not absorbing introductions to new stuff, but rather exploring things, and in that situation it can sometimes be beneficiary, memory and/or inspiration wise, that other topics are tossed in the mix. What might tick you off though, if using the book more for referencing, are the suspicious lacks in some summary tables. Example: A table of special class attributes are given in chapter “Special Class Attributes” at page 524. At page 595 in a chapter “Advanced Features of New-Style Classes (Python 2.2+)” one discovers that several other special class attributes and methods were added when Python 2.2 was released back in December 2001. This renders the table at page 524 incomplete (and somewhat useless) just because the author hasn’t escaped from the past yet. The crappy index of course only lists page 524 for class attributes.

Finally, I use color markings a lot (but wisely) when reading technical books. Efficient color marking is not easy in this book. First of all, the prime sentences and points made are not clear cut and to the point, but often bloated with filler text (the book suffers badly from the well known “American book syndrome” of using many many words to tell almost nothing). Secondly the paper is very transparent. It’s not particular thin paper – just highly transparent? Yellow marking is fairly visible on the backside of the marked page – and forget about using other colors. I would have preferred the publisher had cut 10% of the [filler] words and printed the book on less transparent paper.

From the above (rant?) its obvious that I don’t like the way the book is structured. But its not all bad. Especially there are some excellent diagrams and charts in the book that give good overview and understanding; and in fairness, I did gain Python knowledge from it. It covers nearly all aspects of Python, and on completion you have a solid base for Python programming. A word of advice though if planning on using this book for self studying. If your a beginner to Python buy another book, read online tutorials, or even ask your grandmother – just don’t buy this book! If your intermediate or advanced do the same – your money would be wasted.

Rating: ★☆☆☆☆

Beginning Lua Programming

I BOUGHT THIS book as a supplement to Programming in Lua, second edition in hope of getting things explained with more practical examples.

Beginning Lua Programming

Thankfully this is also the case for this book. There are many programming samples in this book that all takes great effort in elaborating the features or problems of the topic at hand.
The book starts out with the usual history lessen, but there after gets straight to the business of teaching Lua programming at beginners level. Beyond the explanation of variables, program flow controllers, calculation with numbers and string operations the writers spend lots of time explaining the immanent dynamic nature of Lua. Lua provides only a few versatile variable types and enforces only a few rules to what can’t be done, but for people not used to static language programming, it sometimes can be hard to wrap your mind around the dynamic possibilities. Luckily this book excels with thorough explanations along with carefully designed samples, all together giving great help during the learning process.

Overall I think this is a very good book for Lua beginners. It starts out with the basics and progresses to more advanced Lua programming topics. Especially the chapters explaining the inner workings of Lua and how to debug Lua applications are excellent qualities of this book. Otherwise the book covers in more or less details, just about all thinkable aspects of the Lua language, ranging from simple scripting to embedding Lua in C/C++ applications. And as a good jumping board into further Lua adventures, the book finishes of with some very good chapters describing how Lua can be used and extended with various 3rd party libraries.

A bit disappointing about this book however, is the minimal attention devoted to explain the object oriented capabilities of Lua. This is a powerful feature set of the language that deserves much better exposure than what is included in this book.
Another negative remark to the book is that the writers sometimes derail the context flow, and suddenly explain topics in sections or chapters where the topic otherwise seems unrelated and not directly associable.

Regarding the object oriented features of Lua, I have personally used this feature to convert some Python and Ruby scripts to Lua, and this was done with minimal effort thanks to the simple but versatile object system offered by Lua. Some would argue that OO issues would belong in a professional edition of the book but I disagree. There is not much more to tell about Lua than otherwise covered in this book. Except for the OO system, the rest is more a matter of “practices makes perfect”.

Rating: ★★★★☆

Programming in Lua, Second Edition

THIS BOOK IS indispensable when it comes to Lua programming.

Programming in Lua, Second Edition

It is written with great insight of the Lua language and its history (not surprisingly as it’s written by the creators for the official Lua implementation). The book starts of with the simple stuff and then progresses into the more advanced features, and even though the book is one of the thinner programming books, it manages to cover all aspects in Lua in great detail. This is possible due to the concise and to the point explanations supplemented with programming examples of equal qualities. The Lua concept of a multipurpose variable type called tables is thoroughly explained, also in the regards of utilizing tables for object oriented concepts in Lua.
The chapters of embedding Lua into C/C++ programs are very strong chapters, giving invaluable insight and information on the topic. I find myself returning to these chapters when in doubt on Lua and C/C++ interaction principals.

I would not recommend this book as the sole learning book if one is totally new to the Lua language. Several times one is urged to look topics up in the official reference book to totally grasp the situations highlighted. Also no repeating of previously learned facts is done in later pages. This is great if you are on top of things, but if being a complete beginner, repetition helps remembering.
The beginner will probably get a more gentle introduction to Lua with the book Beginning Lua Programming, but “Programming in Lua” is absolutely a must-have for the Lua enthusiast.

Rating: ★★★★☆

Copyright © All Rights Reserved · Green Hope Theme by Sivan & schiy · Proudly powered by WordPress