Live data from Hacker News

Master C++ Programming with Open-Source Books

ossblog.org

81–90 of 106 posts

Re: Master C++ Programming with Open-Source Books

#81
post #71
post #32

Earlier quoted context omitted.

I claim on my CV to be an "expert" C++ programmer, but I'm quick to point out the curve that I imagine being graded on. At least in my head, there's an implied context around someone's C++ proficiency. An expert Java programmer should be able to answer most questions about Java. An expert C++ programmer should simply get to the "I have no idea" answers when the questions get interesting.

I do Java, .NET and C++ consultancy and I bet an Java expert would fail most Java Puzzle questions. Also a programming language is not used alone and C++ standard library is quite tiny when compared to Java's standard library.

That's true, but there's virtually no aspect of the C++ language or library that doesn't have a wealth of "gotcha" questions one could ask.

Even parts of C++ that are "normal user" features can be remarkably tricky. I know tons of C++ programmers who I'd happily trust to write code for me who would fall flat on their faces if asked to explain some detail of what std::forward does with an rvalue reference parameter bound to an lvalue argument.

There's a reason why a very common recommendation is to pick a subset of C++ and stick to it, and I've never heard of such a recommendation for any other language (outside of perhaps for portability reasons).

Re: Master C++ Programming with Open-Source Books

#82
post #81
post #71

Earlier quoted context omitted.

I do Java, .NET and C++ consultancy and I bet an Java expert would fail most Java Puzzle questions. Also a programming language is not used alone and C++ standard library is quite tiny when compared to Java's standard library.

That's true, but there's virtually no aspect of the C++ language or library that doesn't have a wealth of "gotcha" questions one could ask. Even parts of C++ that are "normal user" features can be remarkably tricky. I know tons of C++ programmers who I'd happily trust to write code for me who would fall flat on their faces if asked to explain some detail of what std::forward does with an rvalue reference parameter bo…

> explain some detail of what std::forward does with an rvalue reference parameter bound to an lvalue argument

std::move?

Re: Master C++ Programming with Open-Source Books

#83

The best place to master c++ is StackOverflow. Many people share knowledge accumulated from experience and they explain much better than Herb Sutter or any gray beard people in C++ community. Another important thing, no matter how many books you read, you can't be a master without actually solving a lot of problems.

SO is a great resource but it's about as good a place to learn something as Wikipedia is to do serious research.

Questions from learners are often poorly formulated and then poorly answered. Since many people are just looking for getting their code to run or finishing their homework, this sort of stuff just piles up without getting fixed.

If you're trying to learn anything non-trivial, don't rely on SO alone.

Re: Master C++ Programming with Open-Source Books

#84
post #81
post #71

Earlier quoted context omitted.

I do Java, .NET and C++ consultancy and I bet an Java expert would fail most Java Puzzle questions. Also a programming language is not used alone and C++ standard library is quite tiny when compared to Java's standard library.

That's true, but there's virtually no aspect of the C++ language or library that doesn't have a wealth of "gotcha" questions one could ask. Even parts of C++ that are "normal user" features can be remarkably tricky. I know tons of C++ programmers who I'd happily trust to write code for me who would fall flat on their faces if asked to explain some detail of what std::forward does with an rvalue reference parameter bo…

> I know tons of C++ programmers who I'd happily trust to write code for me who would fall flat on their faces if asked to explain some detail of what std::forward does with an rvalue reference parameter bound to an lvalue argument.

That is true.

I can also remember other ones like differences between auto and decltype, or between auto and template parameter deduction across language revisions.

However, Java puzzles like the ones presented at Java ONE, or .NET changes in how native error handling changed on .NET 4.0, among many other examples, are also interesting as quiz questions.

Re: Master C++ Programming with Open-Source Books

#85
post #70

Earlier quoted context omitted.

And that's the real problem with C++. You can spend 20 years solving real problems with it and still feel like a noob when you take a look at "idiomatic" template code from the standard headers. On the other hand, people like Scott Meyers have spent their lifetime and careers explaining its intricacies, without solving any real problems.

Unless we are speaking of Go, all programming languages are like that. Sometimes people think they know their favorite language, but most would fail a language puzzle quiz.

> Unless we are speaking of Go, all programming languages are like that.

Right, I'm sure Go is the one and only language out there without a single pitfall or quirk.

Re: Master C++ Programming with Open-Source Books

#86

Earlier quoted context omitted.

What's a good book for learning current C?

I can recommend "C Programming: A Modern Approach 2nd Ed."[1]. 1 - http://knking.com/books/c2/index.html

Even though it was published in 2008?

Re: Master C++ Programming with Open-Source Books

#87

Can you ever really master C++? I've been at it more than 20 years and I'm still delighted to learn new things about the language and the library.

And that's the real problem with C++. You can spend 20 years solving real problems with it and still feel like a noob when you take a look at "idiomatic" template code from the standard headers. On the other hand, people like Scott Meyers have spent their lifetime and careers explaining its intricacies, without solving any real problems.

You can spend 20 years solving real problems with it and still feel like a noob when you take a look at "idiomatic" template code from the standard headers.

It can be misleading to think of standard header code (especially template code) as "idiomatic C++". It'd be better described as "idiomatic standard-library-implementor C++", since the folks implementing stuff in std are operating under a whole set of constraints that don't affect ordinary C++ programmers. Arbitrary user-defined symbols that could be in scope, user-provided types that could have overloaded operator-comma, etc.

Re: Master C++ Programming with Open-Source Books

#88
post #66

I have some C programming experience and I wanted to learn C++ so I bought and started reading Stoustrop's book, thinking it's the K&R of C++. It's the worst programming book I have ever read! It's introduction made me hate C++ and if I didn't had to work with other C++ libraries, I would have avoided C++. The text is full of bloat, for the lack of better word. It's the opposite of crisp writing. I read some good lan…

> The text is full of bloat, for the lack of better word. It's the opposite of crisp writing. You mean somewhat similar to the programming language the same person developed?

[jeff goldblum laugh]

Re: Master C++ Programming with Open-Source Books

#89

I have some C programming experience and I wanted to learn C++ so I bought and started reading Stoustrop's book, thinking it's the K&R of C++. It's the worst programming book I have ever read! It's introduction made me hate C++ and if I didn't had to work with other C++ libraries, I would have avoided C++. The text is full of bloat, for the lack of better word. It's the opposite of crisp writing. I read some good lan…

Bjarne's text is just that, a text, not a read. It should be referred to as a reference. I completely agree with all your accounts because I did EXACTLY what you did a few years ago. I'm still working through the book, but I kinda said "eph it" and enrolled in a solid course. Worth the G I spent? absolutely. THat said, the 'effective' and 'Exceptional' books are well written.

Re: Master C++ Programming with Open-Source Books

#90

Earlier quoted context omitted.

I can recommend "C Programming: A Modern Approach 2nd Ed."[1]. 1 - http://knking.com/books/c2/index.html

Even though it was published in 2008?

Absolutely!

There's not a whole lot that's changed in C11, (C is kind of "done" at this point) and there's not been a newer book that teaches the language so well.

Post reply on HN