Open-source     Revisões de livros     Blog     Curso de C++     Eu                                                                          
Beautiful Hamburg
Technical Reading
I like to collect books. Normally, I prefer paper ones but I've been experimenting with digital versions. Here are few recommendations... (More topics to come, eventually)

C++

The C++ Programming Language, 3rd and 4th ed. - Bjarne Stroustrup

This book is from the C++ creator, which also happens to be a very good writer. You'll understand a few decisions behind C++'s design and you'll get accurate explanation of language rules. This is probably the most complete book about C++, but it might not be the best one if you're learning how to program. Many areas of C++'s standard library are covered. The text has a personal touch about style and idiomatic C++. As a bonus, you'll get code samples that can be used in real scenarios. One example, which is no longer available in the 4th ed., is a memory pool allocator.

The C++ Standard Library: A Tutorial and Reference, 1st and 2nd ed. - Nicolai Josuttis
Most of the content of this book if focused on the STL. Cool, because I'm a big fan of generic programming. Yet, the book does an excelent job for the remaining parts of C++'s standard library. As expected, the 2nd ed. brings all C+11 additions - a plus, because it dinstinguishes the new stuff. You could read this book just to learn how to use containers, iterators, algorithms, function objects, and the utilities. However, it's an excellent opportunity to inspect the construction principles of the library. If you've been around the old SGI's STL website, I'm pretty sure you'll enjoy this book.

Standard C++ IOStreams and Locales - Angelika Langer and Klaus Kreft
Finally locale and facets made into my brains. The overall architecture of the IOStreams library was always kind of confusing to me. Including the relationship among conversion, transport, buffering, and representation layers. This book makes it easier. Not only it shows how to use IOStream components but how they could be implemented. Ways by which the IOStreams library interacts with the STL are also well described. If you need documentation of every class and method that is related to IOStreams, locales or facets, it's the best reference guide out there.

C++ Templates: The Complete Guide - David Vandevoorde and Nicolai Josuttis
Simply everything (and more) you need to know about templates: function templates, class templates, specializations, traits, policies, type functions, meta-programming, and a lot more. Nice discussion about argument deduction and the instantiation process; Interesting (and fancy) techniques for type mapping and classification; Optimization techniques like the Empty Base Class Optimization (EBCO); An enlightening example on expression templates; The Curiously Recurring Template Pattern (CRTP). Vandervoorde is inside C++'s committe, so the discussion is well supported by the Standard. Awesome book.

Effective C++ - Scott Meyers
This is a classic and a book that can actually take you to a next level of C++ skills. If you're beginning with the language, I'm pretty sure that you'll make at least one discover in each item of the book. Would I be too pretentious if I say that this book has the answers for a lot of the common C++ doubts and questions you can find in the Internet? Anyway, don't begin a project without reading it (unless, of course, you have obtained equivalent knowledge from somewhere else). Scott's writing is attractive and entertaining.

Effective Modern C++ - Scott Meyers
This is the C++11/14 version of Scott's effective C++ series. As fair as I know, the book was originally planned for C++11 only, but somewhere along the way Scott decided to wait for C++14. This decision was great. There are subtle changes from C++11 to C++14, such as the use of auto in lambdas or things like decltype(auto), which are clearly pointed out. The book's discussion about type deduction is, without a question, the most complete one out there. Who thought auto could be so complicated? It was only with this book that I could fully understand rvalue references and their interaction with template parameters. After all, Scott was the one (I believe) that triggered the debate about the rvalue references weirdness - although, I confess that I don't like his universal references terminology and I'm glad that the C++ comitted has ultimately decided to stick with the term forwarding references in C++17.

Effective STL - Scott Meyers
You should read this one if you already have some experience with the STL. It's not that you won't be able to follow it. (A nice characteristic of Scott's books is that he makes sure that you really get what he's saying.) It's just that a few items won't ring a bell. You'll read them and say: OK, that's obvious. Months later you might catch yourself writing code that falls into "traps" mentioned in the book. Bottom line: My impression is that most book items are in the category "Oh, I've seen this before. That error... That doubt... That problem...". And this is exactly what makes the reading pleasant and remarkable.

Exceptional C++ - Herb Sutter
This book has an interesting approach: question and answer. Together with More Exceptional C++ it's the best text I know when it comes to exception-safety. Another topic that is touched very successfully and is commonly seen in many software (at least in the ones I have worked) is the abuses of inheritance. This book opened to me a broader perspective on the influence of namespaces and argument dependent lookup. It also made me realize that I should use pimpl more frequently. Altogether, the books also teaches you about software engineering (best practices, idioms and patterns) from a C++ standpoint.

More Exceptional C++ - Herb Sutter
Continues from Exceptional C++. The topics are related but the content is different. When there is an overlapping it's just for contextualization. It contains the best discussion about multiple inheritance that I've seen in books. I liked very much the chapter on optimization and performance. It analyses implementations of a few string classes with different characteristics like sharing, copy-on-write, and multi-threading. As for Exceptional C++, the book brings detailed information on exception-safety and resource management.

Exceptional C++ Style - Herb Sutter
Although not called Even More Exceptional C++ (or something similar), this book is a continuation of Exceptional C++ and More Exceptional C++. Right at the beginning there is a very useful item covering quite a common subject: What are the available string formatters and how they compare. In the generic programming part, a great discussion about specialization and overloading of function templates is presented. The exception safety content is interesting, but I think that two of three items are somehow enforcements of what has already been said in the other books from the series. Resource management and class design from a C++ perspective are once more well explained. There are things good to know about traps and pitfalls, but they are more like a "curiosities" category for me. On the other hand, the case studies at the end of the book deal with relevant issues.

C++ Coding Standards - Herb Sutter and Andrei Alexandrescu
If I'm a team leader of a large project and I have to choose a single C++ book for inexperienced newcomers, it would be this one. This book doesn't get into many details about anything, but it opens the doors for those who want to investigate them further. It's a straightforward guide: Do this; Don't do that. Its scope ranges from trivial things like recommending prefix versions of ++ and -- (instead of postfix ones) to not so easily detectable problems caused by non-intentional generic code or crashes across modules boundaries due to incompatible types.

C++ Concurrency in Action - Anthony Williams
This book is the complete guide on C++11 threading infrastructure. Anthony has been involved with the threading library since the Boost version (which originated the standard one). In my opinion, the prime advantage of this book is that it also teaches us about multithreading programming in general. The examples used throughout the book are inspired by real-world situations - Anthony's anecdotes used to illustrated threading problems in terms os normal-life episodes are awesome. One thing I haven't made my mind yet is whether the order of the chapters (and sections) is the best one. But anyways, the content is extraordinary.

Modern C++ Design - Andrei Alexandrescu
Tough to read. More than once I happened to stay for a complete hour in order to understand a few lines of code. In fact, just the first chapter provoked an explosion of ideas in my head. It was the first time that I actually thought of class templates as practical building blocks. (It's curious because that's exactly the picture on the cover of the book C++ Templates. Oh... It makes sense.) In the second chapter I started to think that I could construct an entire application just using type mapping and selection. In the third chapter, code gets a bit more complex and even more interesting. Typelists are really cool. Then I only went through some scattered sections until chapter six. If you appreciate design patterns and the GoF book, you'll be familiar with what's coming next: Singletons, factories and visitor. However, this time in the template world.

API Design for C++ - Martin Reddy
The only book I'm aware of on the topic of C++ API design. Surprisingly... Given the fact that, historically, C++ APIs are not considered to be the most friendly ones out there. C++'s rich semantics (pointer, references, stack x heap allocation, etc) deserve more API-related material like this. There's a clear influence of the Qt framework in this book. This is a good thing, since Qt's API is probably one of best documented, designed, and stable C++ APIs in the market - certainly one of the reason for its long life. Software engineering, in general, appears in numerous parts (design patterns, open/closed, Liskov's substitution principle, etc).

C++ How to Program - Deitel
Nice introductory book. Although there are other options available with similar content, this is a good choice if you don't know anything neither about programming nor C++. A friend of mine got the last edition and I was surprised to see some new chapters.

Algorithms and Data Structures

Algorithms in C++ (Parts 1-4) - Robert Sedgewick

This is one of my favorite books overall. It provides an excellent balance between theory and practice. Proofs are well written. Organization and pedagogical "sequencing" stands out. Lots of implementation details are covered, which is relevant if you're really into coding. Basically, everything I ever needed on fundamental algorithms and data structures, I was able to find in it (or at lease a good reference to what I was looking for). The Cormen book, which is also great material, seems to be more popular than Sedgewick's. But if you can't afford to have both, my personal feeling picks this one.

Algorithms in C++ (Part 5) - Robert Sedgewick
The comments I made for parts 1-4 of this book series apply to this one as well, but now in the universe of graphs - algorithms, as the name says, this is not a "graph theory" book. The book doesn't go into advanced stuff like planarity-test or graph drawing/layout algorithms. It does, however, an outstanding job for traditional algorithms like search (BFS, DFS, priority-based), shortest-paths, flows, and minimum-costs. Again, you'll find interesting tips on concrete implementations.

Introduction to Algorithms - Cormen et al.
This is a quite popular books on the subject. Algorithms are in pseudo-code. In general, this is not my preferred style of presentation, but it can be better in certain cases. Particularly, when an concrete implementation would risk deviating the reader due to "circumstantial details" or when the principal idea is simply better expressed in plain English form. When compared to Sedgewick’s book, my view is that this book covers a larger variety of distinct topics, while the other goes into deeper details within a topic (think, for example, on the vast range of search tree design alternatives).

Compiler Construction

Compilers: Principles, Techniques, and Tools - Alfred Aho et al.

Also known as the Dragon book, this is the first compiler book I got. It's a theoretical book, full of formalisms, and well supported by academical background. Probably all significant aspects of compiler development are covered in a quite complete form. For instance, the chapter on lexical analysis includes good background on regular expression, automata, pattern-matchers, generators, and even an specific section on Lex. The backend chapters go beyond simple code generation and touch a wide variety of optimizations and static analyses. Despite being a great book, if you're a practical guy and haven't touched the subject of compilers yet, I'm likely to recommend other alternatives as an initial reading.

Modern Compiler Design - Dick Grune et al.
Underway... Started well, seems to be the ideal mix of theory and practice I was looking for. A positive impression I have so far is that although the text is well refined and theoretically sustained, the reading is quite digestible.

Modern Compiler Implementation in C - Andrew W. Appel
At first I was a bit reluctant to buy this book because I read a few bad reviews about it on Amazon. I got the book and I'm happy I did. This is "the book" if you want to get a compiler up and running. Assumedly, it can be tough to follow it sometimes if you don't have any compiler background, but the overall discussion is very pragmatic. Sections are generally short and typically target an specific practical implementation aspect. Throughout the book you'll write a compiler for the Tiger language. Nevertheless, you'll still get hints on handling features that are not present in that language.

Programming Languages

Programming Language Pragmatics - Michael L. Scott

Such an enjoyable reading. I'm impressed by the writing from this book and the ability the author has to present complex things through simple English sentences. The first chapters discuss compiler's front-end topics in such an insightful that I consider it the best introduction to the subject. The `pragmatics` in the title is in accordance with the text. Real p
rogramming languages characteristics are examined in detail and often through a comparison-based approach. Wide experience in the subject is demonstrated by the author that is constantly pointing out how one or another programming language implements this or that feature.

Types and Programming Languages - Benjamin C. Pierce
This book opened to me an universe I was not familiar with.  My perception on programming languages has substantially broadened after reading it. An interesting pedagogical approach is the introduction of the lambda calculus and its increment by basic extensions and advanced features. In between a few chapters, an ML implementation of type system being studied is discussed. Bringing certain concepts of the text into concrete languages can be subtle sometimes, but it's typically delightful to see them in action on a functional-style programming language - I'm currently studying Haskell. A good companion to this book is the online material of the Oregon Programming Languages Summer School.


Graph Drawing and Computational Geometry

Computational Geometry: Algorithms and Applications - Mark de Berg et al.

Since this is the only computational geometry book I've ever read, I cannot make comparisons. What I can say though, is that I found it a delightful and smart book. It expects knowledge about fundamental algorithms and data structures. Most chapters are preceded by a thorough discussion of a real scenario where a particular algorithm might be needed to solve a problem. In some cases, a naive strategy is initially proposed. Following it, the authors provoke intriguing thoughts of whether or not this would be a good solution and suggest a better approach. The algorithms are in pseudo-code. Usually, I don't like such presentation form, but I admit that in this case I'm perfectly cool with it for at least a few reasons: Each step is precise and well explained. It's not too practical to use a programming language because the code can get long and complex. In addition, it would also have to depend on a precision arithmetic library for the results to be correct. Reading this book increases your options even for general algorithms.

Graph Drawing: Algorithms for the Visualization of Graphs - Di Battista et al.
My master's degree was related to graph drawing algorithms, so I used this book quite a lot. Some pages are falling apart. Surely this is an excellent starting point for people that knows absolutely nothing about graph drawing. The first chapter is basically concerned on explaining what graph drawing is and where it's present. This book is a collection of scientific papers organized in a reasonably pedagogical manner. It's not concerned about implementation details. Major benefits from the book are an overall view of graph drawing methodologies and strategies, a rigorous source of references, and the description of well known graph drawing algorithms.