-
Notifications
You must be signed in to change notification settings - Fork 10
cpp notes
Let's keep everything as simple as possible, with simple inheritance hierarchies and clear interfaces.
Set up your development environment to provide detailed errors and warnings-- this will teach you a lot about the language as you cod.
I strive to satisfy clang-tidy as per the associated .clang-tidy file but you will see that I'm not all the way there.
I use vim + ALE + clangd + clang-tidy.
Sane people will use an IDE.
You do not need to pick up some huge C++ programming tome.
- Stroustroup's A tour of modern C++ is small and quite lovely.
- Martin's Clean Code has a lot of thought-provoking information. However, you can get a lot of the main points (as well as some some things that I also disagree with) by reading this review.
These are really great!
Herb Sutter did a 2014 talk where he lays out the C++ core guidelines for using pointers and references. That's really valuable. (We don't use his "always use auto even if you want to specify a type" idiom.)
I have watched most of these, and they are really good.
- All of the Arthur O'Dwyer talks are great (though type erasure is least important and should come last)
- The move semantics talks are good (if quite detailed)
- The C++ code smells talk is very recommended and entertaining
- here is the key several minutes of the "Const as a promise" talk
- The Effective Modern C++ sampler contains most of what you want to know from his book of the same title; there is an entire playlist that appears to go into a lot more detail (e.g. decltype magic)
- CPU Caches and why you care is great for understanding and planning for performance
- Sean Parent's C++ Seasoning talk is a classic. I've listened to a few other talks on the Sean Parent playlist and they are all worthwhile.
- Matt Godbolt's talk about compilers should convince you that you don't have to worry about optimizing little things in your code and should focus on clarity and larger structure