News for hackers. Stuff that matters.
Re:Master C++ Programming with Open-Source Books by saurabhjha on Thursday February 16, 2017 @09:16AM (#13659990)
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 language books like K&R's C, Joe Armstrong's Erlang book. I loved them and I thought this would be in same league. It's not.

I would like to learn C++ systematically, like not cut-and-paste stuff. "How to think like a computer scientist: C++" seems like a good book. I read the book "How to think like a computer scientist", which is an introduction to programming in Python. I think that would be a good start. Is it a good book for experienced programmers wanting to learn C++?

To people wanting to learn C++, please avoid Stoustrop's book like Plague.

EDIT: I read "The C++ programming language 4th edition" which explains C++11 https://en.wikipedia.org/wiki/The_C%2B%2B_Programming_Langua...

Re:Master C++ Programming with Open-Source Books by _cx2w on Thursday February 16, 2017 @12:00PM (#13661490)
> 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?

Re:Master C++ Programming with Open-Source Books by drharby on Thursday February 16, 2017 @01:49PM (#13662450)
[jeff goldblum laugh]
Re:Master C++ Programming with Open-Source Books by a3n on Thursday February 16, 2017 @02:42PM (#13662911)
I'm glad I'm not the only one.
Re:Master C++ Programming with Open-Source Books by smhenderson on Thursday February 16, 2017 @11:55AM (#13661432)
I find Stoustrop's writing quite the opposite, concise, informative and a touch entertaining at moments. But I can understand why you might see it otherwise, to each his own.

You may find his book "Principles and Practice Using C++" [1] more accessible.

[1] http://www.stroustrup.com/programming.html

Re:Master C++ Programming with Open-Source Books by flatline on Thursday February 16, 2017 @09:44AM (#13660169)
As someone who knows a number of programming languages more or less fluently, I found that book to be invaluable when I started working in C++ professionally. It's not a book to teach you programming or any of the General concepts of OOP, FP, or the like. It is, however, a great resource for learning C++ assuming you know the high level concepts already.
Re:Master C++ Programming with Open-Source Books by strmpnk on Thursday February 16, 2017 @10:17AM (#13660484)
While it's rather introductory, "A Tour of C++" is a much more concise book. Read that and then maybe look at some Scott Meyers books (I haven't read "Effective Modern C++" but the other entries in the series are good and I'd expect this to be a good place to start after the tour book).
Re:Master C++ Programming with Open-Source Books by muyuu on Thursday February 16, 2017 @10:16AM (#13660472)
>thinking it's the K&R of C++.

You nailed it with that analogy though.

K&R is a "first book" and important historically, but right now it's an atrocious book if you want to learn current C and this has been the case for a long, long time.

Sometimes these first books don't withstand the test of time.

Re:Master C++ Programming with Open-Source Books by ska on Thursday February 16, 2017 @11:05AM (#13660971)
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 the same boat. If you want to go back to the "firsts" it would be a combination of The C++ Primer and Strousoup, putting them together gave you something that was both more and less that K&R was for C.

Re:Master C++ Programming with Open-Source Books by muyuu on Thursday February 16, 2017 @11:19AM (#13661106)
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 programming book neither for C or in general. Only the intro descriptions of language characteristics and important functions of the standard library are any use, and then again even these are extremely obsolete now.

Re:Master C++ Programming with Open-Source Books by ska on Thursday February 16, 2017 @12:34PM (#13661828)
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 by 77pt77 on Thursday February 16, 2017 @11:15AM (#13661078)
True, but it maintains a cult following, for lack of better wording.
Re:Master C++ Programming with Open-Source Books by mlmlmasd on Thursday February 16, 2017 @11:05AM (#13660973)
> but right now it's an atrocious book if you want to learn current C and this has been the case for a long, long time.

Strongly disagree.

Re:Master C++ Programming with Open-Source Books by jdhopeunique on Thursday February 16, 2017 @10:35AM (#13660659)
What's a good book for learning current C?
Re:Master C++ Programming with Open-Source Books by AsyncAwait on Thursday February 16, 2017 @12:07PM (#13661551)
I can recommend "C Programming: A Modern Approach 2nd Ed."[1].

1 - http://knking.com/books/c2/index.html

Re:Master C++ Programming with Open-Source Books by ChristianGeek on Thursday February 16, 2017 @01:45PM (#13662413)
Even though it was published in 2008?
Re:Master C++ Programming with Open-Source Books by AsyncAwait on Thursday February 16, 2017 @02:03PM (#13662566)
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.

Re:Master C++ Programming with Open-Source Books by curiousgal on Thursday February 16, 2017 @10:56AM (#13660883)
Ben Klemens' 21st Century C is good.
Re:Master C++ Programming with Open-Source Books by RotsiserMho on Thursday February 16, 2017 @07:41PM (#13664988)
That's his reference book. It's not designed for systematic learning. It's designed as a reference, as in "cut-and-paste stuff". You want one of his other books, meant to take you from zero to literate in not just C++11 but programming in general: https://www.amazon.com/Programming-Principles-Practice-Using...
Re:Master C++ Programming with Open-Source Books by drharby on Thursday February 16, 2017 @01:51PM (#13662459)
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 by pjmlp on Thursday February 16, 2017 @12:10PM (#13661593)
Maybe I suffer from Stockholm syndrome since I read all Bjarne's books, but I really like the book, to the point of having multiple editions of it.
Re:Master C++ Programming with Open-Source Books by ylk on Thursday February 16, 2017 @09:19AM (#13660011)
Would you please define which of his books you read? Just saying "Stoustrop's book" doesn't really help anybody. He wrote a few books, as you can see here: http://www.stroustrup.com/books.html
Re:Master C++ Programming with Open-Source Books by saurabhjha on Thursday February 16, 2017 @09:22AM (#13660028)
Edited original comment. Sorry for the confusion.
Re:Master C++ Programming with Open-Source Books by manaskarekar on Thursday February 16, 2017 @10:37AM (#13660684)
That book works well as a reference, as a supplement to the C++ Primer, 5th Edition.

Not to be confused with C++ Primer Plus.

Re:Master C++ Programming with Open-Source Books by emmelaich on Friday February 17, 2017 @09:43PM (#13673336)
I think you'd like Accelerated C++ by Koenig and Moo. It's by far my favourite C++ book and it's nice and short.

One drawback may be it's age; it's 17 years old. On the other hand it was way ahead of it's time and good writing doesn't get old.

(ps. I quite like Stroustrup's books but to each their own)