It's been some time that I had my hands on C++. I made up my mind to brush up my knowledge and OOPS design skills. I thought I could easily skim through Professional C++ which used to be my favourite book once upon a time when I learnt C++. Now, the same book turned out to be a difficult one, not because that I forgot C++ or the stuff in it is too advanced. It's because of good experience in software industry. The same book seems to be very much convoluted and stretched to explain a simple concepts and design thought processes.
Specific lookout: I wanted to dig into polymorphism part of C++. Wanted to learn design techniques around it.
I picked up a book called Thinking in C++ (my stupidity IMO). It turned out to be a story book. Realized that it takes ages to understand simple ideas which you already know. I will not recommend this book even for beginners. It is suited for people from non computer background. I call it a story book because it's too huge to cover same topics covered by other thinner books. Uses lot of words to explain concepts which have certain standard definitions and terminologies.
I shared my disappointment with one of my colleagues at office. He suggested me to check out Effective C++. This books showed some hope but I coudn't get exactly what I was looking for. The book is good for people who already know C++. It''s a good read to know what not do when using C++. It primararily focusses on improving program design.
Checked out a lot of websites, still couldn't exaclty figure out internals of inheritance and why C++ implements it the way it is.
I recalled the way I learned C upto my satisfaction long time back in college. I had already been through such struggle when I was learning C. Book by Dennis Ritchie and Brian Kernighan - C Programming Language, is the best book still to get into depths of C. The best thing about the book is, there are no unnecessary examples, stretched with bombastic words. It's plain, neat, simple and straight to point which makes sense. Creator is the best source of knowledge. Hence, picked up C++ Programming Language by Bjarne Stroustrup. It's on the same lines as the C book by Dennis and Brian.
Two points from Chapter 12 of the which I could not find in any other book on C++ I referred, which impressed me are:
I. "Thus, as is explained in detail in §15.2, C++ can express a directed acyclic graph of classes"
II. Given a pointer of type base*, to which derived type does the object pointed to
really belong? There are four fundamental solutions to the problem:
[1] Ensure that only objects of a single type are pointed to (§2.7, Chapter 13).
[2] Place a type field in the base class for the functions to inspect.
[3] Use dynamic_cast (§15.4.2, §15.4.5).
[4] Use virtual functions (§2.5.5, §12.2.6).
Especially point II, which is written so messy in other books. Even with examples, other books couldn't explain the concept straight and as simple as in point II.
Conclusion: Learn C++ from the creator's book and don't waste your time reading story books on C++. Hats off to Bjarne Stroustrup who wrote the book in a lucid, crisp and straight to the point style.
Specific lookout: I wanted to dig into polymorphism part of C++. Wanted to learn design techniques around it.
I picked up a book called Thinking in C++ (my stupidity IMO). It turned out to be a story book. Realized that it takes ages to understand simple ideas which you already know. I will not recommend this book even for beginners. It is suited for people from non computer background. I call it a story book because it's too huge to cover same topics covered by other thinner books. Uses lot of words to explain concepts which have certain standard definitions and terminologies.
I shared my disappointment with one of my colleagues at office. He suggested me to check out Effective C++. This books showed some hope but I coudn't get exactly what I was looking for. The book is good for people who already know C++. It''s a good read to know what not do when using C++. It primararily focusses on improving program design.
Checked out a lot of websites, still couldn't exaclty figure out internals of inheritance and why C++ implements it the way it is.
I recalled the way I learned C upto my satisfaction long time back in college. I had already been through such struggle when I was learning C. Book by Dennis Ritchie and Brian Kernighan - C Programming Language, is the best book still to get into depths of C. The best thing about the book is, there are no unnecessary examples, stretched with bombastic words. It's plain, neat, simple and straight to point which makes sense. Creator is the best source of knowledge. Hence, picked up C++ Programming Language by Bjarne Stroustrup. It's on the same lines as the C book by Dennis and Brian.
Two points from Chapter 12 of the which I could not find in any other book on C++ I referred, which impressed me are:
I. "Thus, as is explained in detail in §15.2, C++ can express a directed acyclic graph of classes"
II. Given a pointer of type base*, to which derived type does the object pointed to
really belong? There are four fundamental solutions to the problem:
[1] Ensure that only objects of a single type are pointed to (§2.7, Chapter 13).
[2] Place a type field in the base class for the functions to inspect.
[3] Use dynamic_cast (§15.4.2, §15.4.5).
[4] Use virtual functions (§2.5.5, §12.2.6).
Especially point II, which is written so messy in other books. Even with examples, other books couldn't explain the concept straight and as simple as in point II.
Conclusion: Learn C++ from the creator's book and don't waste your time reading story books on C++. Hats off to Bjarne Stroustrup who wrote the book in a lucid, crisp and straight to the point style.