Reddit reviews More Effective C++: 35 New Ways to Improve Your Programs and Designs
We found 14 Reddit comments about More Effective C++: 35 New Ways to Improve Your Programs and Designs. Here are the top ones, ranked by their Reddit score.
We found 14 Reddit comments about More Effective C++: 35 New Ways to Improve Your Programs and Designs. Here are the top ones, ranked by their Reddit score.
A good metric is by how expensive the object you're passing around is to make a copy of. In the case where you're passing by value, you're probably returning by value as well so two deep copies there. An alternative is references which are syntactically similar to pass by value but retain the memory niceties of pointers which don't require a full copy but rather just the passing of a memory address.
Typically my rule of thumb is bigger than a pointer use a const reference unless I need a fiddle with the bits in the object I'm passing then I'll go with a pointer. Given enough practice and seeing enough code you sort of get a feel for when it's best to use what, but you kind of need to understand the tradeoffs between how you throw around data.
Passing references everywhere is bad though because it makes it less obvious to person reading/using your code that the object you're passing in could potentially be different object than the one you passed in. If your function takes a pointer it tells the reader that you probably intend to do something with the object's data in the function to change it. Which comes to the second point of using 'const' everywhere which not only informs the reader that the object will not be changed but also binds your function to a contract to not be able to change the value.
For more stuff like this I highly recommend Effective C++ and More Effective C++
Effective C++: 50 Specific Ways to Improve Your Programs and Design
More Effective C++: 35 New Ways to Improve Your Programs and Designs
I guess I'm going to go ahead and be "that guy".
Don't aim to work with a specific language.
I feel you should reframe your goal to be a "problem solver" that knows how to pick and use various tools to solve a problem. C++ may be one of those tools. Maybe C. Maybe Python. Maybe Java. You want to develop your skill set to be flexible enough to adopt the right tool for a job. Now, that's not to say you can't be a language expert. Language experts are very valuable and becoming one is a perfectly reasonable goal. That said, I think you'll find that you have many more opportunities when you remain flexible.
With that out of the way, I would say good next steps for continued C++ mastery are to read and understand Scott Meyers' excellent books:
Also go through the CppCoreGuidelines.
Beyond the language, make sure you know your standard data structures and algorithms.
Basic:
C++ Primer
Effective C++
Effective STL
Advanced:
More Effective C++
C++ Coding Standards: 101 Rules
C++ Templates The Complete Guide
Large Scale C++ Design
If you haven't read these books already, what are you doing, go and read them now.
Effective C++
More Effective C++
Effective STL
Effective Modern C++
I've posted this before but I'll repost it here:
Now in terms of the question that you ask in the title - this is what I recommend:
Job Interview Prep
Junior Software Engineer Reading List
Read This First
Fundementals
Understanding Professional Software Environments
Mentality
History
Mid Level Software Engineer Reading List
Read This First
Fundementals
Software Design
Software Engineering Skill Sets
Databases
User Experience
Mentality
History
Specialist Skills
In spite of the fact that many of these won't apply to your specific job I still recommend reading them for the insight, they'll give you into programming language and technology design.
You know there already is a second volume called "More Effective C++"?
Effective C++
More Effective C++
and Effective STL
The assembly is rather light at the beginning. In your first year you have to write some assembly to control a little car with infrared sensors, but it's really easy. Later on though, there are pretty interesting classes on assembly which are pre-reqs for classes on optimizing/debugging. Also it never hurts to learn more. But this definitely isn't something I'd be too worried about coming in.
After K.N. King's book, we don't really cover many more C books. But Kernighan and Ritchie's C Programming Language is a good thing to read.
In terms of C++ books we cover, it's a little weird. For one class, we needed C++ Primer and another we needed C++ Primer Plus. We've also needed Algorithms in C++ by Robert Sedgewick and a couple others. However, most of our classes don't have "required" textbooks, just recommended ones. If you send me a message I can compile a list of the recommended ones from my courses this far.
Personally, I'd highly recommend all of Scott Meyers' books, such as Effective C++, More Effective C++, and Effective STL.
These are good, but I would say they're actually better for learning C++ rather than branching to higher level concepts. C++ is one of the easiest languages to implement best practices with and it's intuitive if you're a good programmer. The language and standard itself promotes cleverness and conciseness.
Some books I would suggest for branching to higher level C++ would be Effective C++ and More Effective C++.
Both are wonderfully written and relevant across standards. It focuses on bigger picture C++ rather than exactly current standards.
which books exactly, please guide me.
these ones?
Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition)
Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14 1st Edition
More Effective C++: 35 New Ways to Improve Your Programs and Designs 1st Edition
What is the difference between them? It seems effective cpp 3 is from 2005 and more effective cpp is from 1996. Is there a point in reading more effective cpp after reading the third edition of effective cpp?
Also, what do you think about C++ How to Program?
Effective C++ and More Effective C++?
There is also the follow-up More Effective C++ which I highly recommend as well.
> even some "old but gold" ones are fine
The Scott Meyers book you mentioned, Effective C++, is just that: old but gold.
I'd also suggest you read his other books, Effective STL and More Effective C++.
These 3 books stand out amongst many for me, for their accessibility and effectiveness. It is worthwhile reading them now and getting a solid understanding on pre C++11 design principles etc.
Once his Effective C++11 book comes out, read that too!
Following these, but now moving from intermediate to expert level, the single biggest influence on how I designed and wrote C++ was Modern C++ Design by Andrei Alexandrescu.
It's pre C++11, but the insights into generic algorithm design using templates are just incredible.
Excerpt from the description on Amazon:
> Alexandrescu offers a cutting-edge approach to software design that unites design patterns, generic programming, and C++, enabling programmers to achieve expressive, flexible, and highly reusable code.
If there is ever one book I recommend people to read, it's this one.