Live data from Hacker News

Master C++ Programming with Open-Source Books

ossblog.org

71–80 of 106 posts

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

#71
post #32
post #23

Earlier quoted context omitted.

What do you use it for? It's such a complex language brimming with idiosyncrasies that I'd be inclined to really test anyone claiming to be a master. The standard is one thing, then there's the compiler you're using...

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.

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

#72
post #14

Earlier quoted context omitted.

> It has a few standards, which is the problem. You mean C++03, C++11, C++14, C++17? Or something else? If you mean those, I fail to see the problem. The language isn't dead, so it's not static, and it evolves over time. Publishing a new standard every few years is the only way to keep all compilers aligned, rather than each going off in its own "with extra features!" direction.

Yes, those. The differences between standards aren't trivial, and often the older standards have to be maintained. The standard already has lots of features, including a turing-complete sub-language. It is difficult to write code to standard (nothing that works, but is undefined either), that is safe, no segfaults, memory issue, secure, and all within a practical budget/timeline. Just being able to reason about the c…

So?

Do you know by heart the differences between each Ruby, Python, C#, Perl ..... version?

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

#73
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.

> Sometimes people think they know their favorite language, but most would fail a language puzzle quiz.

But that is especially true for C++. People who are confident in knowing it often lack the fundamental C knowledge (i.e. pointer arithmetic, the complete C type system, the subtle conversion and promotion rules, etc.), but would insist on knowing C++ very well just because they know how to define classes, virtual functions and throw a shared_ptr or a vector or a map at every problem.

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

#74
post #59
post #56

Earlier quoted context omitted.

That's not entirely fair - it's not just about being first. K&R may be archaic now, even obsolete. However, for decades it has was held up as a an example of what a good technical/language book could be. You don't have to agree with the assessment to agree with the fact - that this was touted as a very good technical book for various reasons. There never was a "K&R" of C++. That's not unusual, many languages are in t…

I first studied the K&R in the early 90s, and it was already terrible by then. Especially if you wanted to teach anything other than quirky systems programming. From the software engineering point of view, almost every single code example is terrible. Abundant implicit casts depending on the OS, loops that leak buffered reading between iterations, etc etc. Just no. Never, ever recommend K&R to anybody as a general pr…

Sure, it was a snapshot in time. By the nineties it was already old. I'm not defending it at all as book to learn C from.

There is, however (like or not), a reason we even now say "X is the K&R of Y". As such it is a bit silly to claim that the only reason K&R succeeded as well as it did was by being early....

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

#75
post #33

Earlier quoted context omitted.

I would consider using Chromium internal libraries as a boost equivalent. Theres a lot of good stuff in there.. Just get: src/base, src/ipc, src/net (and something else you are interested in) and you are good to go

> There's a lot of good stuff in there. Also it can break any time.

But if you are just interested in the core libs.. you can just fork and forget.

Now, if you want more functionality than that.. like access to the last blink/webkit api, than you will suffer a little bit.

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

#76
post #34

Earlier quoted context omitted.

I would consider using Chromium internal libraries as a boost equivalent. Theres a lot of good stuff in there.. Just get: src/base, src/ipc, src/net (and something else you are interested in) and you are good to go

They are awesome as far I know too, but I don't know about their documentation status, Can I find my way out? Boost is very well documented and there is so much book about Boost, But I don't know about chromium internal lib .

Well.. First you can learn a lot from here:

https://www.chromium.org/developers

Then, if you need more, you will have to do it the "hacker way", by reading the chromium source code.

But hey.. you are a C++ dev, source code should be your stack overflow, and primary source of "documentation".

hint: The unit test files, can make the "how to use this" much more obvious

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

#78

Earlier quoted context omitted.

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 it's under active revision and improvement. There are great new things to learn every few years.

I feel like I'm slowly marching toward a mirage. In a way, I dread the c++14/17 changes because it means that much more that I'm going to have to learn. Even if they stopped revising the language today, I'm probably going to learn my last C++ factoid on my deathbed.

For me personally, that would be a positive statement. I don't think any good programming language can stay good unless it keeps evolving (and yes, to me, C++ counts as one despite the occasional gotcha it comes with). That is - any language except for Lisp :-)

And to be frank: I'd say that anyone opposed to continue to learn new things is entirely in the wrong field if he/she works on any technology-related job.

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

#79
post #70

Earlier quoted context omitted.

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.

> Sometimes people think they know their favorite language, but most would fail a language puzzle quiz. But that is especially true for C++. People who are confident in knowing it often lack the fundamental C knowledge (i.e. pointer arithmetic, the complete C type system, the subtle conversion and promotion rules, etc.), but would insist on knowing C++ very well just because they know how to define classes, virtual f…

And most people that say that they know C and how simple the language is, cannot differentiate between their compiler extensions and what is written in ANSI C.

Nor can they correctly point out all the cases of expected semantics, UB and implementation specific behaviour.

Regarding the fundamental C knowledge, part of it just leads to bad C++ code.

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

#80
post #23

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.

What do you use it for? It's such a complex language brimming with idiosyncrasies that I'd be inclined to really test anyone claiming to be a master. The standard is one thing, then there's the compiler you're using...

I was reminded of this yesterday: I work on a research-oriented C/C++ compiler with several people who would certainly be considered C++ "experts". We came across a bizarre bug introduced by static destructor ordering. Even with the lines of code highlighted and a detailed paragraph explaining the error, it took us almost 30 minutes to figure out how the undefined behavior was causing the bug we saw.
Post reply on HN