Lurker News
Do you have some good advice or know any useful resources to learn in a proper way how to code in C++? For the context, I know some C, but C++ seems a different kind of beast, and it's easy to get lost in the huge variety of features and libraries it offers.

Comments (173) 47 threads

Show all comments

Showing thread 1 of 47

pjmlp7 replies#
- Tour of C++ (http://www.stroustrup.com/Tour.html)

- Principles and Practice Using C++ (http://www.stroustrup.com/programming.html)
- From Mathematics to Generic Programming (http://www.fm2gp.com/)
- The Scott Meyers books
Some of the Bjarne Stroustrup videos,
"Learning and Teaching Modern C++" - https://www.youtube.com/watch?v=fX2W3nNjJIo
Some of the Herb Sutter videos,
"Writing Good C++14... By Default" - https://www.youtube.com/watch?v=hEx5DNLWGgA
"Back to the Basics! Essentials of Modern C++ Style" - https://www.youtube.com/watch?v=xnqTKD8uD64
Some of the Kate Gregory videos,
"Stop Teaching C" - https://www.youtube.com/watch?v=YnWhqhNdYyk
"10 Core Guidelines You Need to Start Using Now" - https://www.youtube.com/watch?v=XkDEzfpdcSg
"It's Complicated" - https://www.youtube.com/watch?v=tTexD26jIN4

zerr#
Are these tips mostly "Google-style" C++?
bloodorange1 reply#
I agree with this completely :)

I would also like to add that it helps to read "The Design and Evolution of C++".
I found that I plateaued early in my C++ journey. However, I was always reading from the experts and it really helped to read material from Dr. Stroustrup. Once I began to see the common thread behind what he was saying and understood why some things were the way they were, it helped understand when it's a good time to use/not-use certain things. This helped break past that barrier and to improve my skill further.
Also, it helped to write a _lot_ of c++ code and think about how that could be better.
I'm afraid I didn't read a tonne of good C++ code in that period but somehow, I managed to keep growing and at some point, it became my "go to" language and I really started to like it.
Long story, short: Read books from the experts, esp. Dr. Stroustrup.

krylon1 reply#
> I would also like to add that it helps to read "The Design and Evolution of C++".

I think that book is worth reading even to people who have no intention of going anywhere near C++, as long as they are interested in programming language design and evolution. I wish there were more books like this one to explain the kind of thinking that went into the design of a language and to tell its history.

vram224 replies#
Agreed.

I had commented on the book on HN about a month ago:
https://news.ycombinator.com/item?id=16275341
Excerpt from it:
"I found that book very interesting in many regards. I had bought and read it several years ago (out of interest, though I have not worked on C++ professionally).
Stroustrup goes into a lot of details about the reasons for many design decisions in the language."
That's one of the reasons that make the book interesting. He even goes into human and cultural aspects of programming.

Continue this thread — 4 replies

frankzinger#
Sean Parent, that is.
se30b1 reply#
Would not recommend Principles and Practice Using C++, it is a fluff loaded book seemingly made to sell to university students.
bewuethr1 reply#
I think it's a great introduction to Programming, but if you already know some other language, it tends to be verbose - but Stroustrup always tends to be verbose. I, for one, really like his style.
zerr#
I used to like Bjarne's style when I was just starting, but nowadays it seems way too verbose. Even talks, you can "compress" his 1+ hour talks to 15 minutes, lossless :)
i45_n51 reply#
As for "Stop Teaching C" video one should also consider this book https://www.amazon.com/Accelerated-C-Practical-Programming-E... Alas, it is c++03. On the other hand it's relatively thin and it begins with the standard library (std::vectors, std::sort, std::string) from the first chapters. So I guess it was the first good book that didn't begin with C language from the start.
colin_mccabe1 reply#
Good to see that three decades later, C++ still has a massive inferiority complex about its older brother, C.
pjmlp#
It is not an inferiority complex, rather to stop people learning about writing bad code, open to security exploits by default, something that C is pretty good at.
jasonx1e#
Is there a progression to this one might follow?