C/C++ C++ Primer or PPP Stoustrup: Which Book is Better for Beginner Programmers?

  • Thread starter Thread starter Of Mike and Men
  • Start date Start date
  • Tags Tags
    C++
Click For Summary
The discussion centers on selecting additional C++ programming books for a student who has completed a semester of C++ and Python. The current textbook, Gaddis Control Structures through Objects, is criticized for its lengthy examples and poor explanations, particularly on advanced topics like polymorphism and inheritance. Recommendations include "Programming: Principles and Practice Using C++" (PPP) and "C++ Primer," with a debate on their suitability based on the student's experience. PPP is noted as better for beginners, while "C++ Primer," authored by Bjarne Stroustrup, is favored for its depth and practical coding practices. The student expresses feeling overwhelmed by the complexity of C++ despite achieving high grades, and there is advice to engage in coding intermediate to advanced algorithms to solidify understanding. The importance of assessing one's coding capabilities and the value of advanced texts and design patterns are emphasized, alongside a suggestion to explore online courses for further learning.
Of Mike and Men
Messages
53
Reaction score
3
Hey everyone,

I've been looking to get another C++ book. I'm currently using Gaddis Control Structures through Objects (required at my university). However, I find sometimes their explanations are poor or their examples are too long to really illustrate the point they're trying to make (e.g. a near 300 line program to explain polymorphism -- something that could be done in probably 30 lines of code).

I have I have a semester's worth of C++ under my belt, and a semester's worth of Python under my belt. I've been doing some research on additional books to read, and it seems like Primer or Programming: Principles and Practice Using C++ are the kind of go-to books for beginner programmers. I'm torn. I've heard PPP is more useful if you've never programmed before, while Primer is better if you have. My debate is that I've heard Stoustrup goes into more detail (since he is the creator of C++, which is why I'm leaning towards this book) than Primer -- while Primer teaches better practice on how to actually code (which I'm not sure if this would be more useful for me at this point). I plan on getting both at some point, but what do you recommend for someone in my position with my experience?

If it matters: both semesters I received an 'A' in the course. In Python I felt more confident in my abilities. Whereas in C++ I felt like even though I earned an 'A', I left the course with more questions than answers since C++ is so massive. In the book we used, we covered basics like functions, classes, arrays, pointers, etc. and then covered some more advanced topics like OOP, polymorphism, inheritance, c-strings, and advanced file i/o topics. This latter topics, while I did well on the test, I felt overwhelmed and lost on all of them. I think my book did good explaining the more elementary topics, but these last few chapters were horrendous. Reading the book actually took the fun out of programming through these chapters, and I often resorted to videos just to get the big picture.

Anyways, thanks for any advice.
 
Technology news on Phys.org
Stroustrup is a master, not just regarding C++, but about programming principles more generally. Learn from him.
 
  • Like
Likes Of Mike and Men
Theres also Scott Meyers Effective C++ and the various Design Patterns books too. Design patterns goes beyond the basics and gets into how to use OO effectively while not painting yourself into a design corner with no exit ie poor design that only a complete redesign will fix.

https://www.amazon.com/dp/1491903996/?tag=pfamazon01-20
 
Last edited by a moderator:
  • Like
Likes QuantumQuest
Of Mike and Men said:
Hey everyone,

I've been looking to get another C++ book. I'm currently using Gaddis Control Structures through Objects (required at my university). However, I find sometimes their explanations are poor or their examples are too long to really illustrate the point they're trying to make (e.g. a near 300 line program to explain polymorphism -- something that could be done in probably 30 lines of code).

I have I have a semester's worth of C++ under my belt, and a semester's worth of Python under my belt. I've been doing some research on additional books to read, and it seems like Primer or Programming: Principles and Practice Using C++ are the kind of go-to books for beginner programmers. I'm torn. I've heard PPP is more useful if you've never programmed before, while Primer is better if you have. My debate is that I've heard Stoustrup goes into more detail (since he is the creator of C++, which is why I'm leaning towards this book) than Primer -- while Primer teaches better practice on how to actually code (which I'm not sure if this would be more useful for me at this point). I plan on getting both at some point, but what do you recommend for someone in my position with my experience?

If it matters: both semesters I received an 'A' in the course. In Python I felt more confident in my abilities. Whereas in C++ I felt like even though I earned an 'A', I left the course with more questions than answers since C++ is so massive. In the book we used, we covered basics like functions, classes, arrays, pointers, etc. and then covered some more advanced topics like OOP, polymorphism, inheritance, c-strings, and advanced file i/o topics. This latter topics, while I did well on the test, I felt overwhelmed and lost on all of them. I think my book did good explaining the more elementary topics, but these last few chapters were horrendous. Reading the book actually took the fun out of programming through these chapters, and I often resorted to videos just to get the big picture.

Anyways, thanks for any advice.

The important thing is to assess your real coding capabilities in C++ so far, a thing that - talking according to my own experience in the past, is difficult when you are a student. I would recommend trying to code some intermediate to advanced algorithms yourself with some fairly advanced data structures. What I'm talking about here is things like three way merge sort, quicksort with three way partition just for starters and beyond, to coding complex algorithms in the most efficient way(s)(including proper and efficient use of the necessary data structures) - I'm assuming that you already know the classic merge sort and quicksort very well and again these are just two (not so complex) examples. The reason I recommend this is that it is the suggested way by many well known computer scientists and seasoned programmers - a great such case is Robert Sedgewick recommending it for Java (you can take a look at the free online Algorithms course offered by Princeton University on Coursera) and for very good reason: in order to efficiently code a (fairly) complex algorithm, create a client program to run it and test it for performance you'll find yourself constantly digging through the basic language so you'll grasp things that can't be clear through a simple basic course. This way you'll get a fairly informed picture about what text you need next and the way you must study it. It goes without saying and I'll agree to Dr. Courtney that Bjarne Stroustrup is a real master but what you need heavily depends on where you are right now regarding coding and what is your goal. C++ is a fussy beast to tame and there are relatively few programmers all over the world who are real masters of it, the reason being that this whole software system is really huge and it needs many years of real world experience in order to get acquainted with it. If you find that at some point you really have all the basics under your belt then go with any good advanced text - Stroustrup's books are preferred books for me too.
 
jedishrfu said:
Design patterns goes beyond the basics and gets into how to use OO effectively while not painting yourself into a design corner with no exit ie poor design that only a complete redesign will fix.

This is also a really great recommendation by jedishrfu. I recall the great joy I had in the past to take some online courses in mobile programming by Douglas Schmidt - one of the persons involved in the books of design patterns and it was a tremendous experience and a real call for further reading.
 
Last edited:
The dissenting opinion: you might want to browse the C++ FQA before deciding how much of your life you want to invest learning C++. (If nothing else it's wonderfully sarcastic -- you won't be bored.)
 
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

Replies
69
Views
10K
  • · Replies 25 ·
Replies
25
Views
774
  • · Replies 1 ·
Replies
1
Views
616
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 15 ·
Replies
15
Views
8K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
81
Views
7K
  • · Replies 49 ·
2
Replies
49
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 17 ·
Replies
17
Views
5K