If you were to teach a C++ class...?

Started by
23 comments, last by GameDev.net 19 years, 4 months ago
Quote:Original post by Trap
Oluseyi and Zahlman i guess you both don't know Accelerated C++, it does a lot of the things you are suggesting.
It probably does, but it doesn't invalidate any of our comments.

Besides, I have no personal use for learning C++ texts. If it's not a reference, then don't bother. I buy topical introductions and essays instead.
Advertisement
Quote:Original post by Oluseyi
I buy topical introductions and essays instead.


Elaborate please.
Quote:Original post by benutne
Elaborate please.
Gladly.

Books like An Introduction to Genetic Algorithms by Melanie Mitchell, or an old graphics programming text I used to have (can't remember the author; it was, I think, part of an IBM System Programming series, and the author was British), neither of which contain a single line of code. They introduce and illustrate concepts through sound theory and algorithmic proposals, and then leave implementation as an exercise to the reader. This allows any language to be used, and reinforces the fact that language skills are a distinct set from, say, graphics programming skills.
Hi,

I teach C++ at my university. I like to use Deitel - C++ How to Program, nice book.

Luck!
Guimo
Here is the book I used at school.

C++ Programming Today
By Barbara Johnston.
Published by Prentice Hall.

I liked the book because it's written by a programming teacher. She is the one who taught the class.

I think, therefore I am. I think? - "George Carlin"
My Website: Indie Game Programming

My Twitter: https://twitter.com/indieprogram

My Book: http://amzn.com/1305076532

I would grow my hair long to compensate for my receding hairline and to let people know that even though I'm a hacker, I can still "hang." Then I'd tuck my old t-shirt into my worn, straight-legged rustlers. I'd play hackysack with the other nerd sycophants in the university courtyard. I'd plan my morning commute to pass by at least two Starbucks. I'd join the local LUG and make fun of people who program with Visual Basic.
I would use a book that used the STL, and the boost library. I have never seen such a book myself. Then again, I stopped reading programming books (which for the most part were poorly written) quite awhile ago, before boost came into existance prehaps I think.
Why would you torture a beginner with STL? The idea of beginning programming is to learn how to program, not how to use blackboxes. The karate kid could just as well have used a hose but what would he have gained from it?

"Confusing a numeric type with a textual type is bad mojo"

Understanding that all is numbers is the zen of programming. There is no textual type.

The sooner you understand that the sooner you're able to understand how to see data seperate from any sort of visualization and understand how data can be visualized in a variety of ways. Char is not text until you put it on the screen. Just like every other data type.

If you want to keep kids interested in programming you need to invent projects that interest them. That's the whole trick. Interesting projects that require learning the concepts you want to teach them.

The two projects I'll use are Blackjack and a Wolf 3D clone. Both games teach many of the same concepts but a raycaster will be more of a challenge to those students who want to take it on.
Quote:Original post by Anonymous Poster
The karate kid could just as well have used a hose but what would he have gained from it?

The ability to solve a problem using appropriate tools, for one. That, after all, should be the central theme to any introductory programming course.

Any book that teaches introductory C++ without using the STL is not worth using. Why teach people bad habits before they know enough to recognize them as such?

CM
Quote:Original post by Anonymous Poster
Why would you torture a beginner with STL?


Teaching someone how to use a std::vector can be easier than explaining new/delete, even without trying to teach them RAII. I hardly call that torture. Plus, they won't have so many memory leaks in their programs!! I hardly call that "torture". And I mention boost because of it's format library, the perfect alternative to adding printf functionality to their programs later on.

Quote:The idea of beginning programming is to learn how to program, not how to use blackboxes.


Define a blackbox. I would consider every library known to man a black box of sorts - just as much as a vector at least. With this, I would consider using blackboxes very essential to learning to program anything remotely useful. printf is an even worse blackbox, you have to explain all sorts of mumbo-jumbo assembly, or teach them to use va_*, which is a horrible mis-service to your beginning programmer.

This topic is closed to new replies.

Advertisement