#24 in Computers & technology books
Use arrows to jump to the previous/next product
Reddit mentions of Effective C++: 55 Specific Ways to Improve Your Programs and Designs (Professional Computing)
Sentiment score: 45
Reddit mentions: 67
We found 67 Reddit mentions of Effective C++: 55 Specific Ways to Improve Your Programs and Designs (Professional Computing). Here are the top ones.
Buying options
View on Amazon.comor
- Addison-Wesley Professional
Features:
Specs:
Color | Paperback, |
Height | 9.25 Inches |
Length | 7.35 Inches |
Number of items | 1 |
Release date | May 2005 |
Weight | 1.2345886672 Pounds |
Width | 1 Inches |
I would highly recommend the Effective C++ books to anyone who is learning C++. It should be mandatory reading once you grasp the basics of C++. These books are easy to read, and the "holy shit, this could have bit me in the ass hard" factor is high.
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++
You have a long journey ahead of you, but here goes :D
Beginner
C++ Primer: One of the better introductory books.
The C++ Standard Template Library: A Tutorial and Reference: Goes over the standard template library in fantastic detail, a must if you're going to be spending a lot of time writing C++.
The C++ Programming Language: Now that you have a good idea of how C++ is used, it's time to go over it again. TCPPL is written by the language's creator and is intended as an introductory book for experienced programmers. That said I think it's best read once you're already comfortable with the language so that you can full appreciate his nuggets of wisdom.
Intermediate
Modern C++ Design: Covers how to write reusable C++ code and common design patterns. You can definitely have started game programming by the time you read this book, however it's definitely something you should have on your reading list.
C++ Templates: Touches on some similar material as Modern C++ Design, but will help you get to grips with C++ Template programming and how to write reusable code.
Effective C++: Practical advise about C++ do's and dont's. Again, this isn't mandatory knowledge for gamedev, but it's advice is definitely invaluable.
Design Patterns: Teaches you commonly used design patterns. Especially useful if you're working as part of a team as it gives you a common set of names for design patterns.
Advanced
C++ Concurrency in Action: Don't be put off by the fact I've put this as an "advanced" topic, it's more that you will get more benefit out of knowing the other subjects first. Concurrency in C++11 is pretty easy and this book is a fantastic guide for learning how its done.
Graphics Programming
OpenGL: A surprisingly well written specification in that it's pretty easy to understand! While it's probably not the best resource for learning OpenGL, it's definitely worth looking at. [edit: Mix it in with Open.gl and arcsynthesis's tutorials for practical examples and you're off to a good start!]
OpenGL Superbible: The OpenGL superbible is one of the best ways to learn modern OpenGL. Sadly this isn't saying much, in fact the only other book appears to be the "Orange Book", however my sources indicate that is terrible. So you're just going to have suck it up and learn from the OGL Superbible![edit: in retrospect, just stick to free tutorials I've linked above. You'll learn more from them, and be less confused by what is 3rd party code supplied by the book. Substitute the "rendering" techniques you would learn from a 3d book with a good 3d math book and realtime rendering (links below)]Essential Mathematics for Game Programmers or 3D Math Primer for Graphics and Game Development: 3D programming involves a lot of math, these books cover topics that OpenGL/DirectX books tend to rush over.
Realtime Rendering: A graphics library independent explanation of a number of modern graphical techniques, very useful with teaching you inventive ways to use your newly found 3d graphical talents!
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.
Hi PizzaPartify,
I believe that different companies/teams will place emphasis on different skills. When I was helping to hire software engineers for EA's motion capture studio, I liked to see candidates who showed a strong aptitude for engineering code to be maintainable. For me, this meant a familiarity with design patterns and software development processes (like Test Driven Development or Extreme Programming). In my department, much of our code was in C++ and Python. However, other departments would use languages like Java, C# or ActionScript - depending on the project.
It would be helpful to know what role you are applying to.
To answer your specific questions:
Regardless of the language you're working in, I would also recommend Design Patterns by the gang of four (http://www.amazon.ca/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612).
A game-specific recommendation is Game Engine Architecture by Jason Gregory (http://www.amazon.ca/Game-Engine-Architecture-Jason-Gregory/dp/1568814135). It doesn't matter if you intend to write an engine or not, it is immensely helpful to understand how they work.
I own all of the Game Programming Gems books but use them more as a reference library. The books above will be more helpful right now.
I hope that helps.
Books are still the best way to learn C++! C++ Primer, 5th Ed. covers all the basics of C++11 from functions and standard library usage to OOP and templates. Effective C++ reinforces good practices and idiomatic C++ that, despite being written for C++98, is just as relevent today as it was then, some of its contents even more so than ever before. Then Effective Modern C++ then does the same for C++11 and C++14 features, building on top of what C++ Primer covers about C++11 and introducing the subtle changes brought about by C++14. This is my primary recommendation for learning modern C++ from the ground up.
But we live in the internet age! Best make use of it! So many wonderful talks from conferences such as CppCon, C++Now, Meeting C++, ACCU and Code::Dive are all available for public viewing. With regards to modern C++, Herb Sutter's CppCon 2014 Back to the Basics! Essentials of Modern C++ Style and CppCon 2016 Leak-Freedom in C++... By Default are great videos to watch. For more specific topics, here is a list of videos that I've seen and personally found engaging, educational, and worth my time to watch (multiple times!):
rand()
Considered Harmful and What C++ Programmers Need to Know about Header<random>
for random number generation,auto
anddecltype(auto)
(I miss Scott :'( ).There are also shows such as CppChat and CppCast where interesting events, projects, papers, and people related to C++ are brought up and discussed. There are so many interesting blogs to read!
And there is always people on IRC (##c++, ##c++-basic, and ##c++-general) and the Cpplang Slack Channel for live updates, discussions, debates, questions, answers, and/or just plain fun with a group of people that ranges from complete noobs who are learning the basics, to committee members and library authors whose names are known across the community. If you ever have a question or need help, these are the places to go and ask (/r/cpp_questions is nice too! :P ).
And finally, links to videos, blog posts, articles, papers, interesting Stack Overflow questions, almost everything mentioned above is constantly being shared at isocpp.org and on /r/cpp. Subscribe to both to get a constant stream of links to anything and everything about C++.
Edit: as for C++17 material, the standard is not technically completed/published yet, but that hasn't stopped the community from creating material about it! This paper lists all the changes from C++14 to C++17, with links to relevant papers, and this Git repo provides a simple "then, and now" comparisons of the major changes to the language. Talks describing the changes in breadth and in depth have been given at conferences, and blog posts have been written for a more textual description of the changes. C++17 is not a major update like C++11 was to C++98, but full of fixes, conveniences, more language flexibility and utility, and new toys to play with! If you have a solid foundation in C++11, C++14 and in turn C++17 should be relatively easy to pick up compared to the shift from classic (C++98) to modern C++.
TL;DR Learn C++11 the best you can. Once you are comfortable with C++11, the transition to C++14 will feel natural, and C++17 will be waiting just around the corner.
Or you could get the 3rd edition:
http://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876/
with 5 more ways to improve your C++
Scott Meyers Effective C++
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're looking for books that contain info on auto, lambdas, and any other new C++11 stuff, you're going to have to wait a little bit, as the standard is still very new.
If you're looking to get started though, I would suggest something like Effective C++ which contains a bunch of specific things you can do to write better C++ code. For learning the language, something like Programming - Principles and Practices using C++: it's an intro to programming textbook that focuses entirely on C++. I know you're not a beginner ;) but I've heard really good things about that book.
For the fundamentals of "thinking in C++" as opposed to other languages I always recommend Effective C++
And I guess if you're in visual studio 12 make sure you're not doing anything in C++11 as I don't know any game studio or library using that as the standard yet even though it's an option in visual studio.
http://www.amazon.ca/Effective-Specific-Improve-Programs-Designs/dp/0321334876
http://www.amazon.ca/Exceptional-Engineering-Programming-Problems-Solutions/dp/0201615622
http://www.chapters.indigo.ca/books/product/9780321563842-item.html?s_campaign=goo-PLATest&gclid=Cj0KEQjw7b-gBRC45uLY_avSrdgBEiQAD3Olx_bYE3l0XHUbXJd3feWejZ9321b_f1fWkYm-L9WobiAaArYu8P8HAQ
Those are widely considered to be the definitive resources on modern C++ programming.
The correct answer to:
Q. Should I learn C or C++ first?
Is:
A. Yes.
WARNING: Highly Opinionated Analysis of C vs C++
I see a lot of people recommending one way but no one offering an analysis of BOTH the Pro's & Con's.
I've been using C++ since ~1990. I've briefly worked on a PS3 C++ compiler when I worked for Sony. I've seen 2 major problems over the years with C++ programmers:
1. People don't exercise discipline and restraint in K.I.S.S.
They use (and abuse) every language feature because they can. There is this tendency to over-engineer even the simplest things. Take a look at this complete clusterfuck of CRC in the Boost library.
1109 lines of over-engineered C++ crap for a simple CRC32 function instead of a mere 25 lines of code!?!?! The C version would:
The trade-off would be is that it is less flexible, but WHEN was the last time you needed to use a custom CRC polynomial!?!? One would instead use a different algorithm such as MD5, SHA, etc. that:
This excellent SO on hashing is but one example of focusing on the big picture.
2. People lack a basic understanding of the cost let alone the implementation of C++ expressions.
I've seen people stick a virtual function inside an inner loop and wonder why their performance is crap. I've seen people fail to grasp a basic understanding of pointers. I've seen people not understand memory management and how to guarantee zero memory leaks. I've seen people spend more time on writing an "über" template and waste hours debugging that instead of just writing something in 1/10 of the time and move on.
IMO, due to the bloated, over-excessive verbose nature of C++ it is for these reason that I strongly recommend a beginner learn C first and then learn C++. You'll have a better understanding of why C++ is designed the way it is, what the design trade-offs are/were, what C++ hacks are, and how to best use the languages to their potential.
However, this is ignoring the benefits and disadvantages of the Pro's/Con's of why one would learn C++ or C first.
Learn C++ first
Learn C first
{
{
With that said there are numerous C++ books I would recommend to ALL C++ programmers. They are sorted from beginner to expert:
If you can get only one book, get the The C++ Programming Language.
Even though Bruce's book is ancient he keeps it simple and is a fun easy read. Remember this is before C++98 where the language is much simpler.
You can find it online for free
Lastly, just because you can, doesn't imply you should. Use balanced C++ and you'll be fine.
I'll start off with some titles that might not be so apparent:
Unexpected Fundamentals
These 2 books provide much needed information about making reusable patterns and objects. These are life saving things! They are not language dependent. You need to know how to do these patterns, and it shouldn't be too hard to figure out how to implement them in your chosen language.
 
Good General book
 
This book is great if you're going to make a browser based game
 
General Knowledge books
 
Provide a working moveable 3D model with C++ and DirectX, Very cool.
 
More general game base building
 
Working product results books, little if any modification needed
Releasing in a couple months (hopefully) 2 Very good books using C++ to develop by.
 
Not presented in the best manner but still noteworthy:
 
I used to love XNA...but now it's not feasible for commercial development. If you're a beginner to game design...starting out with XNA might actually be useful. It's easy to pickup and put out a working product. XNA is C#
 
 
Working product books, modification needed to make run on current systems
Provides a working FPS game in C++ on DirectX 9. Good for some starting out knowledge for an FPS
 
Good for 3D Terrain rendering in DX9...however much of this is outdated...some concepts still apply, and it's not the worst idea to see a working example.
 
TLDR: Click links starting at top, buy, read, profit
So this is what I would consider the "Core" reading list for anyone interested in programming games. None of this is really game specific though. These are just the fundamentals you need in order to be an effective Software Engineer.
Learn about...
C++ syntax: Programming: Principles and Practice Using C++ by Bjarne Stroustrup
Software Engineering: Code Complete by Steve McConnell
C++ gems: Effective C++ by Scott Meyer
Software Teams: The Mythical Man-Month by Frederick P. Brooks Jr.
Why we love Joel: Joel on Software by Joel Spolsky
Problem Solving: The Pragmatic Programmer by Andrew Hunt
Common Code Solutions: Head First Design Patterns by Eric Freeman
Pearls!: Programming Pearls by Jon Bentley
I'll do a supplemental on this in a few days that dives into specific topics related to engine development. All of this is generic enough that it will help you regardless of what you do. You'll notice that very little here is actually language specific. Almost all of this is about the art of making software and process of working with a team. These 8 books alone will make you think about making software in a whole new way.
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 just looked through all my books. It's actually hard to find a book with large segments of good code. This is probably the worst book when it comes to good c++:
http://www.amazon.com/Numerical-Recipes-The-Scientific-Computing/dp/0521750334/ref=pd_sim_sbs_b_15
The best is probably scott meyer's effective c++. It gives small sections of good code and all 55 tips are gold (or silver)
http://www.amazon.com/dp/0321334876/ref=rdr_ext_tmb
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.
It's going to be hard, make no mistake about it. Most places won't want to interview you just based on the fact that you haven't worked for 10 years after graduating. There's going to be some level of disappointment and you'll need to be ready for it.
If your knowledge of C++ comes from school, it's likely at a basic level. Improving on C++ is generally harder than just learning .Net, Java or python.
But if you do feel comfortable with C++, I would suggest getting a more advanced level book rather than relying on online tutorials. My favorite one is Effective C++ from Scott Meyers. Try finding a used version to save money.
You will also need to meet recruiters and be confident but open with them. This is a trial and error with a low hit rate but I would suggest doing it anyway.
You could also sign up for a coursera or udemy course on web development and start creating a project. Make sure you get a github account to showcase your web development skills to any potential employer.
Effective C++
More Effective C++
and Effective STL
Python seconded. Learning multiple languages, especially ones that differ significantly from the ones you already know, is one of the keys to being a good programmer. This is some of the advice in Peter Norvig's Teach Yourself Programming in Ten Years.
How to think like a computer scientist is an OK introduction to Python and programming, but it's very undeserving of that title as it really doesn't touch on what one might call computer science. In fact the more computer-sciencey parts are pretty poor – for example, the section on tail recursion is complete crap that will just confuse someone who doesn't already know the what and why of tail recursion.
If you're dead set on Windows and C++ you don't need VS Pro, MS have a free version. It's unlikely you'll really need the extra features that come with the pro version. Also once you're past learning the basics, read a copy of Effective C++ and Exceptional C++. And try not to get sucked too heavily into the weirdisms of the Windows style of C++ programming, they do funny things over there.
C++ is a complicated, technical language. I'd recommend hitting the books for it. Learning C++ properly will teach you a lot about almost any language.
Accelerated C++ is the place to start if you don't know how any of the syntax works (pointers, const, templates, etc). Read a bit of it and write some C++.
When you've written some files and feel comfortable in C++'s syntax, read Effective C++. It will teach you good practice with many points from it transferring over to other languages.
C++ isn't that hard, unless you're trying to learn all of it. When I deal with unfamiliar (complex) APIs, part of the struggle is learning what I can ignore--what pointer parameters should usually be NULL, for example, or what typedef/macro is really just a char or int.
Another thing that used to confuse me is that some APIs want the address of a function as a parameter, while others want an object that performs a function (usually, it's because the object has operator()() defined). This is used when the API you're using assumes your function will want to remember state in a more sophisticated manner than is possible with a simple function (and the object is kept alive and its operator()() is called several times). If you really want to understand C++ (I'm not sure you do), I'd recommend Scott Meyers' Effective C++.
Sorry that I don't have any great advice, but these are a couple things that I struggled with when learning new APIs.
These are books I read many years ago, they can be helpful but may be dated and will not include newer features. But as an introduction they worked well.
Thinking in C++ Voume 1 and 2 by Bruce Eckel
https://www.amazon.com/Thinking-Vol-Introduction-Standard-2nd/dp/0139798099/ref=dp_ob_title_bk
https://www.amazon.com/Thinking-C-2-Practical-Programming/dp/0130353132/ref=pd_sbs_14_1
And Scott Meyers
Effective C++ - https://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876/ref=pd_sbs_14_2
Effective STL - https://www.amazon.com/Effective-STL-Specific-Standard-Template/dp/0201749629
if you have yet to, read THIS book!
Many C++ interview questions are lifted right out of here, and for good reason. It contains so many pitfalls and good habits.
There's OO design, and there's particulars as to how to implement things in C++. I'm totally with unapersson as to, that the Os you make are as often conveniences or design helpers as representing real world objects. Ie that it's implementation objects. I don't remember how much OO design advice Effective C++ has, but it's a good book to get someone to intermediate C++ programmer. C++ Coding Standards by Herb Sutter and Andrei Alexandrescu talks at a fast clip about a lot of taste and design issues; I haven't looked at the 3rd edition of Eff. C++ but, from earlier editions, the difference is that Coding Standards is more dense, and sophisticated; Eff. C++ more basic (from what I can see, Coding Standards does cover the same material as Eff C++, but in a very compressed form, only the most minimal discussion; maybe not what you want when you're seeing the material for the first time.
As for pure OO design, I've heard that straight-up Grady Booch is still the best, but I have no experience of it.
I will say, if you want to be good at C++, you'll have to spend money on books (but get your company to buy them perhaps - compared to programmer time, books are free), and time on reading them; there are a lot of best-practices, technicalities and real pitfalls that are not immediately obvious.
edit:
> Also, should I be studying data structures/algorithms in unison with OOP?
Definitely. Have you learned the basics, stack, tree, queue, hash tables (or set, map, vector, unordered_set, unordered_map)? You /must/ know these. (priority_queue and list too, less so maybe.) If you can though I'd read (somehow) about other data structures, spatial ones especially in your case; they can really make your program more efficient and thus able to do more.
edit edit:
I have to say, the above books are for long-lasting code; probably for games your best bet is to look at how other programmers write their games (smaller, simpler, even in other languages - it can be hard to understand large, sophisticated codebases) and, just the necessary experience you gain from writing your own.
Effective C++
Also Effective C++, because it's full of gotchas and important but subtle language features that are ideal for interview questions. A lot of it will be too advanced for a jr. level interview, but you should read it anyway because it's a great book.
This Book. Read it. It's fantastic
I'm starting to learn C++ and a good text is difficult to come by, some I find fall into "C with <vector>" while others read like reference documentation without sufficient information. I don't even particularly like Bjarne's own "Programming: Principles and Practice Using C++" as his examples tend to be convoluted.
My current strategy is to go through Discovering Modern C++ which appears compact, concise and modern. Probably complementing this with Effective C++ for good practice. Most importantly having a good linter keeping my code looking nice and proper.
These are books I actually own and would recommend. Of course there are other great/better books out there, but I'm going to stick with what I've actually bought and read or "read".
I say "read" because several books are NOT meant to be read cover-to-cover. These typically have about 1/3 that you should read like normal, and then skim the rest and know what's in the rest so that you can quickly reference it. These books are no less important, and often even more important. I've marked these kind of books as #ref for "read for reference". Normal books that should be read cover-to-cover are marked #read
For learning your first language: This is really the hardest part and unfortunately I don't have any books here I can vouch for. I started with "C++ for Dummies" and am not including a link because it's bad. Your best bet is probably "Learning <language>" by Oreily. I also love the Oreily pocket books because you can carry them and skim while on the bus or the john, but you can just do the same with your smartphone. Pocket Python, Pocket Java, Pocket C++
Top Recommendations:
Accelerated C++ #read Made for people who already know another language and want to pickup C++. Also great for people who need a refresher on C++. I really like how it doesn't start with OOP but gets you familiar with the imperative parts of C++ before diving into OOP.
The Algorithm Design Manual #ref This is my new favorite book and the first I would send back in time to myself if I could. Each algorithm & data structure is given a mathematical breakdown, pseudocode, implementation in very readable C, a picture (very helpful), and an interesting war story of how it Saved The Day.
Cracking the Coding Interview #read I originally avoided this book like the plague because it represented everything I hate about coding interviews, but many interviewers pull questions straight from this book so this book can equal getting a job. Put that way, it's ROI is insane.
The Pragmatic Programmer #read Must-have for any profressional software engineer that covers best-practices for code and your growth. You can also find the raw tips list here
Head First Design Patterns #read Many prefer the "GoF/Gang of Four" Design Patterns which is more iconic, but Head First is a modern-version using Java to cover actual design patterns used day-to-day by programmers.
For Intermediates:
Effective Java or Effective C++ and Effective Modern C++ #read When you're ready to go deep into one language, these books will give you a huge boost to writing good Java and C++.
Design Patterns #ref You'll want to get this at some point, but early on it's too much for a beginner and many of the patterns are obsolete.
The Art of Computer Programming #ref The programming "bible" but like Design Patterns you should hold off on this iconic book until you've got your basics covered. It would make for a great purchase with your first paycheck or first promotion :)
It's a start. It will teach you the syntax, which is good, but there's a lot more to C++ than just the syntax. Learning the rest on your own can be very painful. One very important thing it's missing is the Standard Template Library. It's extremely useful, and knowing how to use it properly makes C++ much more manageable. There are a few very big books on the subject, but often cplusplus.com has all the information you need about the STL. I often wish every language had an equivalent to that site, I almost always have a window open to some part of it when I'm working.
Once you're comfortable with C++ syntax, I highly recommend you look at Effective C++ by Scott Meyers. It teaches you how to avoid a lot of the (many!) pitfalls with using the language. I hated using C++ before I got this book, and now it's one of my languages of choice. It's what got me to switch my roguelike project from Python to C++.
hmm, do you know something about RAII? If not, go searching for that. And, I think all excellent C++ books would mention that, like this and this
That does not cover C++ as comprehensively as K&R covers C.
What about:
http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html
Or:
http://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876
Thinking in C++ is good and available online, great for getting started.
Once you've got the syntax, OO concepts, and enough of the standard library down enough to be conmfortable, get a copy of Effective C++. It's basically the bible of how C++ programs should be written.
Other online references
cplusplus.com a good quick reference
C++ FAQ quick, thorough explanations of how random things work in C++
Hey, I highly recommend checking out the code academy courses on programming. At the level you're at, pretty much starting with any language will be beneficial since most of the beginning concepts are universal.
https://www.codecademy.com/
C++ has a larger learning curve past the beginner stage than other languages (in my opinion). It's a wonderful and extremely powerful language but memory management concepts can be challenging for a large majority of learners.
If that doesn't deter you, then you may find this book useful. I've used quite a few C++ books in college and this one was my favorite. Once you feel comfortable with object oriented design with class building, dynamic memory allocation, basic generic programming and basic data structure then I cannot recommend enough:
effective C++
You can definitely find a PDF of that if you just google the ISBN number and "pdf"
Coding is so much and it can really take a lot of time to finally make anything practical so patience is also incredibly important. Also, you must acknowledge and accept that you will NEVER know everything you want to know. You will learn new things all the time and you will work with people who think they know everything. Those are the ones who know the least, trust me.
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.
C++ has been around for exactly 30, what i mean by that is that it's still widely used in production until this day, and doesn't look like it's gonna change any time soon. it's more then any other language out there, with C as an exception. I'm not sure C# would be valid in 10 or 20 years, but C++ would.
Your best resource for learning C++ would be good books. Like i mentioned, i highly recommend The C++ Programming Language, 4th Edition, it's updated and very complete reference to the language. there's also Effective C++ - it's not for beginners.
There's right, you won't find too much resources about C++ at first glance, but you will if you will dig a bit deeper.
Here's few sites that you should use:
You also might find some useful stuff and links in the Google+ C++ Community
Other people and myself have mentioned learning C++ is not easy, partly is because the lake of documentation on the web. but once you know the language well, you will enjoy it's benefits. It's not for everyone though. I also recommend looking into new technologies like emscripten, it allows to compile C++ code into JavaScript, understand the implications of that, and maybe you will also have my POV.
I have to say linux profiling has seemed to me to be a fast-moving target, meaning you'll get scattered results if you search. But, there's this which seems up-to-date: http://en.wikipedia.org/wiki/Perf_%28Linux%29
Then there's Ulrich Drepper's 'What every programmer should know about memory' (long series, but worth skimming at least, if your code is memory intensive. At least read about cache-coherency and cache-lines): http://lwn.net/Articles/250967
But the biggest thing is to get the algorithms right. Sounds like you want image-processing books. Also, GPUs are just absolutely the right place to do this stuff, and there are probably libraries already out there for it; speaking of which, did you know about OpenCV? It even has some stuff implemented on the GPU (as CUDA). I root for OpenCL, but the fact is, almost everything out there, libraries, and books, is written for CUDA.
> All the software is written in C++: I am interested in unlearning bad habits and writing better and easier to maintain code.
I suggest Effective C++ if you haven't read it yet. Also, Herb Sutter's 'Exceptional C++' series (a 'digest' version is C++ Coding Standards: 101 Rules, Guidelines, and Best Practices).
Never read it myself, but I hear 'Code Complete' is good. Maybe, too, Martin Fowler's Refactoring book - it shows lots of little awkward, problematic patterns and what to do about them, with good discussion. Each cleanly separated out - it will refer back and forth, but you can read the bits one-at-a-time. Good bathroom reading :)
Re: algorithms: Ugh, I don't know. It sounds like you'll want some metric data structures, dealing with space as you do. There's http://www.amazon.com/Foundations-Multidimensional-Structures-Kaufmann-Computer/dp/0123694469, and I don't know what else, maybe some Knuth? But probably, you should learn undergraduate-level data structures and algorithms, Big O stuff. Any used CS Data Structures + Algorithms book should help with that.
Do not fear spending money, as a former boss said, "books are free" ie they pay for themselves if they save you an hour's debugging later. Good luck!
I'm looking for something similar - not so much a 'learn ruby' book as a more technical 'best practices' type of book - something more in line with Effective Java or the Effective C++ series.
Effective C++: 55 Specific Ways to Improve Your Programs and Designs by Scott Meyers.
For language-specific "clean code" and design advice, it's hard to go wrong with an "Effective" book:
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?
For starters: http://c.learncodethehardway.org/book/
Then for some advanced material (Books, sorry they cost $ but they are written by a king C++ con$ultant) : Everything this guy writes. Namely his "...Tips for Effective C++" series, of which he has several. He released one very recently, actually.
He's got other books, although these are his true gems.
Lastly, I think it's valueable to find read blogs of C++ industry programmers-- using C++ in an effective matter is not trivial, and requires a nontrivial commitment. By the time I started realizing the benefit of blogs, I started moving away from C++ to other languages (Because HEY! You can actually get stuff done in other languages!!) The main one I (did) read is this Casey Muratori's blog posts - link is to the start of a really good series of about 3 of his blog posts. He talks about specifically, "how to give birth" to objects. and it's great.
Vecchia edizione, ma in italiano.
http://www.amazon.it/Linguaggio-libreria-standard-principi-programmazione/dp/8871920783
Completa con (in inglese):
http://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876
http://www.amazon.com/Modern-Design-Generic-Programming-Patterns/dp/0201704315
Effective C++ and More Effective C++?
Highly recommend this book: https://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876
Once Scott meyers has you hooked, checkout his modern effective c++ book. He's a great writer and teacher
That's the old edition. This is the new one.
In addition to going out and actually getting your hands dirty as others have suggested, make sure that when you're doing it, you're using the best design principles you can muster.
Also, do some reading! There are lots of good books out there that can help you learn common conventions and good design principles.
I'm going through Effective C++ right now, and I've learned more about how to write C++ in the first quarter of the book than I had in the previous 2 years of my life.
Effective Java is a good source, too, but obviously it's going to depend on which framework and languages you're using. Either way, though, you'll learn a lot of essential concepts for how to write maintainable code and prevent common design mistakes.
Also, if you're planning on writing a lot of Object Oriented code, read up on Object Oriented Design Principles/Patterns. Even if you never use them, other people will. If you start working in bigger codebases, you'll see them in action, and it'll make learning the code a whole lot easier if you're familiar with the patterns they're using.
I'm in the same situation as you and can recommend some good books I started reading:
The C++ Programming Language
Effective C++
Effective Modern C++
You can also find other good books here -> http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list
Meyers' Effective (Modern) C++ really is a good place to start, assuming he understands the basic syntax and concepts. The basics of C++ don't change just because there's a new standard out. Start with Effective C++ to get the basics quirks of the language down then go to Effective Modern C++ to add in the new things from C++11 and C++14.
I'd say buy a good text book. Read it, and apply the material daily. You'll get a lot more skill than a simple 2 day course.
https://smile.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876/ref=pd_bxgy_14_img_2/134-6675713-7342336?_encoding=UTF8&pd_rd_i=0321334876&pd_rd_r=b3c01114-72c5-40e8-93c4-acd6664cfeea&pd_rd_w=fJMRu&pd_rd_wg=KLYsl&pf_rd_p=09627863-9889-4290-b90a-5e9f86682449&pf_rd_r=CTRRDNJQM8JZVCKSH0H8&psc=1&refRID=CTRRDNJQM8JZVCKSH0H8
"Effective C++: 55 Specific Ways to Improve Your Programs and Designs" - took a "professional C++" course where this was the textbook and still have the paperback somewhere for borrowing
http://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876
For those that code in C++, I highly recommend the book "Effective C++".
There are a ton of good books out there that teach you how to write maintainable, well designed code, and I recommend doing some reading, especially if you're an indie developer or haven't taken upper level Computer Science courses.
Sorry but there's no cheat sheet and no reasonable way of making one. C++ is a rather large and complex language laid atop C, which is effectively laid atop an assembly language, which is compiler manufacturer and target platform dependant.
The best way to learn C++, or any programming language for that matter, is to use it, learn from your mistakes, and of course researching and reading everything you can. And of course, have fun with it!
Many popular books exist covering C++ things. Here are a couple good starter ones, in my opinion:
A couple popular C++ sites:
If you're simply starting to learn programming, start small. I suggest beginning with an object-oriented scripting language like Ruby, Python or Javascript. Most concepts will transfer to C++, but beware that the syntax will not - you will quickly see the difference!
There is a series of books called C++ In Depth Series.
https://www.informit.com/imprint/series_detail.aspx?ser=334643
There are books in there which could help you.
I've seen people recommending this one too: http://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876/
Even the TC++PL gives you advice on that matter.
C++ is openly multi-paradigm in such a way people don't recommend claiming there is a single good way of writing code. This is important to keep in mind because different books will talk about different good ways to code in C++.
I'd not discard the old books, like Coplien's, although they're pretty old. C++11 is out there and lots of the old stuff is not recommended anymore.
http://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876
Effective C++ doesn't go into the basics of the language, but it's a must read for anyone who wants to be a 'good' C++ programmer...
I was on my phone earlier so here are some reference links.
Highly recommended programming books.
MIT has an Intro to Programming course online. They teach it in Python. Here's a decent book to teach you Python, and be sure to check the sidebar in /r/Python for more suggestions.
Project Euler is a great way of trying out new languages when you've learned a bit more.
When you can write competently in Python and are ready to move on, here are two highly recommended books on C++. The reason I've suggested C++ is because it's what ROOT is written in.
As far as math goes, use Khan Academy to supplement your lectures your first two years. In conjunction with the tips outlined on the blog I linked you earlier, you will destroy your math classes.
> 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.
When I started, the most memorable three resources I know I had were the following:
After you're done with the two above required books, here are some useful readings:
The above readings will probably be a solid 6-12 months to read and absorb assuming you spend a couple hours a day, but I think it'll be well worth it in the long run since this type of stuff sticks with you for a long time. I read the above around 2013, and I can still talk about the CFS/other schedulers, software interrupts, and how the CPU cache works. It'll also make converting to other languages even more of a breeze because you'll know how everything works underneath the hood.
This is really cool! Thank you.
>A common question is whether the book is still relevant. After all it's over ten years old
I find that some old(ish) books can really hold some great significance, for example: Effective C++ and Clean code have both given me some brilliant tips on making better code. I'm also readingWrite Great Code. If you have any more books i'd love to see them :) Thank you, again.
Read Effective C++ and Effective modern C++. In my opinion, theses books are miles away from any online guides. There's some pdf of those books on some (not legal) webite, but they are a very good purchase.
S.O. has a list of books:
http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list
Both options appear to be well-received.
Personally, I learned C++ initially with this book as it was the class textbook:
http://www.amazon.com/How-Program-Early-Objects-Version/dp/0133378713?ie=UTF8&amp;keywords=deitel%20c%2B%2B&amp;qid=1465331530&amp;ref_=sr_1_2&amp;sr=8-2
Maybe you can pick from the list for the introductory stuff, and pick up Effective C++ by Scott Meyers for recommendations and best practices after you are more comfortable with C++.
http://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876?ie=UTF8&amp;keywords=effective%20c%2B%2B&amp;qid=1465332161&amp;ref_=sr_1_2&amp;sr=8-2
If you're mainly interested in Java, I would recommend Effective Java by Joshua Bloch. It's a great guide with recommendations for best practices in the language.
For C, the best book is The C Programming Language by Kernighan and Ritchie. I would recommend that you read that before ever looking at C++ because C++ is based on C. In fact, it's such a great book that I would recommend reading it before you read anything else on any language. You can skip the file system and Unix stuff though.
For C++, I have never found a good beginner book, so my suggestion would be that after you read the above C book, read the stuff in this tutorial and then read Effective C++ by Scott Meyers. It's another best practices book.
For Python, I've heard good things about Learning Python but I don't really know. I actually found it more useful to just go through the Python tutorial and then start making fun little scripts.
Hope that helps!
[Book1] (http://www.amazon.com/C-Programming-Language-4th/dp/0321563840/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1451948095&amp;sr=1-1&amp;keywords=the+c%2B%2B+programming+language )
[Book2] (http://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1451948117&amp;sr=1-1&amp;keywords=effective+c%2B%2B )
Book3
Here is a good resource to learn/improve your C++ skills.