I work at a C++ shop, and out of all the hardcopy programming references we have floating around, the most common, by far, are copies of all of Scott Meyer's books.
When 'Effective Modern C++' was released, we formed a reading group to convene bi-weekly to discuss an item from the book. His works have been an invaluable resource to us.
While I am sad to hear that he will no longer be involved in the C++ community, I look forward to seeing what he does next.
A good example of why I am opposed to HN's "original title" policy. (Namely, the title of this submission is no help for deciding whether you might want to click on it.)
It is extra-frustrating as titles are written for audiences: this title, in the context of Scott's blog, is amazing. This is an awesome title for someone who is looking through your new content and is presumed to have pre-decided to read the article. In the disconnected context of Hacker News, it barely works: I only clicked on it because I love programming languages and it involved syntax. The article, of course, had no syntax. It turns out I am glad I clicked on it, but it was complete luck. As a content author, I would personally choose a different title for content on Hacker News than I would choose not only on my own website, but for different individual subreddits. On Google+, at least when it launched (I didn't pay much attention to it later), the format didn't encourage or really even support titles. I posted something there (a commentary on some aspects of Google+), and of course submitted it to Hacker News with the title I would have given it were I to give it a title, and I seriously had people who didn't notice I had written the article (which came up when I responded, and they apologized) saying I had editorialized the title somehow... it is utter madness. I don't even know what to do anymore when I post articles: if I expect Hacker News to be an important consumer of my content I have occasionally added an awkward note under the title saying "this is what the title should be on Hacker News". :/
I understand the intention behind the policy but yes there are exceptions like this one.
I missed this and somehow assumed that it has something to do with Go language -- didn't even bother to check the website. Nothing against Go - just not my piece of cake ATM.
Instead noticed it on another site where it had a better title and then realized what an important blog I was going to miss.
Maybe. Or maybe you just aren't interested that much in C++ and don't care if some Scott Meyers guy retires. Or maybe you are very much into C++ world and surely know who is Scott Meyers, but it suffices for you to be notified that he "retires".
That's why titles exist, after all: to give you an idea if you actually want to proceed.
Sometimes a group thinking produces good results. Any aggregating site is an example of groupthinking. I read HN because I like the way this group thinks and the results.
Wow. Best wishes to Scott in his new endeavors and a huge thank you. His books transitioned me from someone just playing around with C++ to an actual programmer. The breadth of topics covered, as well as detailed rationale behind every advice given, has profoundly impacted all my programming, regardless of language, and dare I say, even the more abstract engineering-thinking skills.
I still have paper copies of those books and lend them to people who are learning C++.
In the post he says that the C++ training market is bustling.
I'm an experienced java guy looking to get in person C++ training. Hopefully something which moves quickly through the basics and addresses advanced concepts in memory management, concurrency and other low level topics.
Anyone have recommendations? The web is full of listings for HOTT, Learning Tree, GlobalKnowledge style mega training companies. Are they actually worth the $3k-$5k they charge? I'm afraid it will be a mediocre programmer droning on for 5 days in front of a power point.
From my perspective it better and cheaper to spend a few weeks reading a well written C++ book, by one of the big names in the field. Rather than make due with some average guy who teaches C++.
I wouldn't recommend any book written before 2012, simply because the language changed a large amount with the C++11 standard. Its like a different language.
I also wouldn't recommend any book that starts off by teaching low level C first, only to get to high level STL last. Its better and more productive to do it the other way around. If you learn C first, you will learn a style that is hard to break out of. You want to learn to program C++ the right way, piece by piece, from the start.
"Programming: Principles and Practice Using C++ (2nd Edition)" by Bjarne, is a good book that teaches it the right way around.
Another excellent C++ book that does this "the right way around" is "A C++ Primer" by Lippman, Lajoie & Moo. The 5th edition is rewritten for C++11. Disclaimer: I've only used the 4th edition.
It is a reflection of the way C++ came to be the size it is. Stroustrup included everything and the kitchensink so c++ ended up being a fairly large and complex language.
Mind you, it's a learn programming book and doesn't assume prior programming experience; you can skim over a lot of material if you already know how to program. See the table of contents at http://www.stroustrup.com/PPP2_TOC.pdf
On the other hand if you don't do C++ first, you inevitably become pretty turned off by it once you try it. It has some neat qualities in the small (zero cost abstractions etc) but in the large with package/module management it's a horrible experience if you are used to Java/C#/Python/Python or even Node. I have a hard time picking up C++ because I'm
spoiled by other languages.
C++ has plenty of good sides (I've been using it since 'cfront', which makes me wonder who would downvote my comment that it isn't a good first language, I think I have enough experience in it (and other languages) by now to make that call), but the learning curve is extremely steep compared to say python.
Which makes me wonder what the very best beginners programming language is.
For a first lamguage I think kids should use something instantly rewarding. Something that lets you write gui:s or hack minecraft etc. It should be something that lets you accomplish things quickly but still teaches good practices.
If you are a first year CS student it's different. Then you need a few langs - One functional, one OO, one low level, at least.
I did Haskell/Java/C which I think was great, but 20 years later I'd choose F#/C#/C (or even Rust).
I second petke here. I was in a similar situation once (although I was much younger and came from Python), and "Accelerated C++"[1] along with Meyers' "Effective C++"[2] helped me immensely.
The first couple chapters in the first book might bore you a bit since you are an experienced programmer, but hang on tight :)
I find it hard to believe you could really deep grasp anything after a week of training. You can learn a bunch of tricks and gotchas!
Does your career let you dive into a C++ job for a year or two? Nothing will give you more C++ exposure than doing it for a job, and being good lets you do cool tricks in Java (looking at you sun.misc.Unsafe)
On the second point I have to disagree. I worked with plenty of C++ who have been programming for years but never read a C++ book. Many of them are stuck doing hacky "C with classes" programming, much like they did from day one. The attitude is if it ain't broken, don't fix it.
I was one of those programmers. Then I picked up "Effective C++" by accident. It was a mind shift. I started coding differently after all these years. I got hooked and read every popular non beginner C++ book out there (I would guess around 50 of them).
So I think reading books, is a better way of learning to program than just blindly going your own way, or the blind leading the blind.
Most of the time, "C with classes" is exactly what the problem calls for. I cringe every time I see classes whose functionality can be replaced by a simple function. Those shouldn't even be classes. They should be free functions. And this happens quite often.
What I mean by "C with classes" is the worst side of both languages. Type-unsafe C coding (pointers, casts., manual memory allocations, etc), with OOP (highly coupled complex class hierarchies, virtual calls, etc).
The modern C++ way is to use RAII, value semantics, and STL everywhere.
I don't know much about the current state of training courses but here's some advice for self study.
A lot of things will be very similar to Java but with subtle differences. This means you'll be able to get up and running quickly but your code will not have the same nuances. Look for coding standards used at big companies. I believe Google has one that's publicly available. Epic Games also has one for UE4. Hopefully they should have some explanation for the choices they made. If not, do some googling of the relevant areas and see if you can figure out why they chose what they did. Spend some time reading code. GitHub has lots of repositories you can check out.
For books you won't do badly if you pick up anything by Scott Meyers or Herb Sutter. They also both have good blogs. Meyers's books tend to be broken down into about fifty main points with discussion on each. I like to use them by reading one point and then trying to apply it specifically in my work. Doing this at one point a week I can go through about a book a year. C++ Coding Standards by Sutter and Alexandrescu or Effective C++ would be my top two recommendations for someone with your background. I'd stay away from Alexandrescu's other work for now since it tends to be more advanced and potentially dangerous.
YouTube videos of talks by any of the authors I mentioned may also be useful to you.
You specifically mentioned memory management and concurrency so I'll throw in some specific advice for them. Modern C++ uses smart pointers for dynamic memory. If you're allocating dynamic memory and not using a smart pointer you're almost certainly doing something wrong. If you want to get into really low level stuff with memory management look at how malloc or new are implemented and do a search for "small block allocator". For concurrency your best bet is probably to find resources devoted to threading and asynchronous execution. I haven't looked into that in a while so I don't have specific recommendations for good resources.
Some of the template meta programming stuff he gets into isn't very portable and is very hard to debug when things go wrong. My rule of thumb is if I think I need to implement something from Modern C++ Design I am probably better off thinking about the problem a bit more and doing something else instead. Since it's been a while since I last looked at it I'd guess that some of the portability issues have gone away as compilers implement new features.
The implementations are very different. The implementations in Modern C++ Design used a lot of tricks to work around features the language didn't have. This isn't an issue when those features are part of the language. I'd also point out that even now there are parts of the newer standards that aren't fully supported by all compilers. Something being part of the standard doesn't mean you can use it on every platform.
I made the move from Java to C++ at one point in my career. I'd actually programmed C++ before Java, but it had changed so much it was almost like starting again. The language itself is not that hard to pick up, but at the time I kind of found the memory management aspect daunting. It wasn't as bad as I'd made it out to be in my head though.
I've always learnt from books, and there are a lot of good C++ books. Reading a few of them and then some practical experience, maybe with a side project, should be the best way to get started, especially as you are already an experienced programmer. That's what I'd do anyway.
Make sure you choose modern C++ books as the language has evolved a lot, and you don't want to be learning outdated ways of doing things.
The library code is another thing that is quite different to the Java world, there are many good frameworks, but they all tend to manage memory differently, have different conventions, and sometimes even have different string implementations. That's just a fact of the C++ world, but it is getting better all the time.
Also, I started out using http://pocoproject.org/, and that gave me a lot of examples on how to do things well, it suited me as it matched my view of good OO programming, but there are a lot of opinions on that one too.
I graduated in '04 with a CS degree and had programmed everything in C++ and haven't been able to find an entry level programming job since then. I think it just comes down to the people you know.
There's a good reason Scott is at the top of the C++ world. He's the hardest working C++ person I know, and the most committed to perfection and delivering the best value to his clients and customers.
All of us in the C++ world owe him a large debt of gratitude.
I don't know about hardest working, but certainly most effective (and no pun intended.) I got more out of his books than any others, possibly except for "The Unix Programming Environment" and "Unix Network Programming." And while the latter were technically very interesting, Meyer's books did more to make me a better developer.
I don't enjoy working in C++ much, and haven't spent significant time working with it, but found Effective C++ really good and helpful back when I was working on a codebase that was being converted from C to C++.
I wonder if he'll move onto another language, or do something else entirely different. He doesn't say...
I agree. I don't like C++ much and I feel some very strong, objective arguments can be made that it is often not the right tool for many of the jobs that it is chosen for. And yet, Effective C++ was one of the pivotal development books I read, and has affected the way I think about programming in any other language or tool that I use.
Yeah, the writing style of the Effective C++ was so influential that there were bunch of "Effective" books follow. Effective Java, Effective Ruby, Effective JavaScript...
This influence is invisible, but possibly the most important impact he made so far. Looking forward to what's coming next.
Effective C++ was one of the most purely useful programming books I've come across. I no longer actively use C++ but it stays with me. Thank you Scott.
P.S. Is the cartoon character referred a defender of the secrets of Castle Greyskull? I must know...
Scott Meyers' C++ books weren't just a great guide to the language, they were my first exposure to the idea of programming as a craft.
Before that there was just appeasing the angry demon in the compiler or having the right result; after there was a bigger picture of doing things the right way that would have good results beyond the next trial execution.
I'm the same way. Until someone loaned me a copy of Effective C++, I simply hacked code. The best practices in that book opened my mind a great deal, and really started me down the path to developing software and building systems. Now I'm the one handing junior developers my copy of the book to read, and hopefully helping them in the same way.
thanks for sharing your expertise and the great memories Scott. Your books were clearly influential on a generation of developers on writing good, concise C++ code. Cannot wait to see what you do next.
When 'Effective Modern C++' was released, we formed a reading group to convene bi-weekly to discuss an item from the book. His works have been an invaluable resource to us.
While I am sad to hear that he will no longer be involved in the C++ community, I look forward to seeing what he does next.