Sign in to follow this  

Books

This topic is 2844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, today I just got my first programing book, sams teach yourself C++ in 21 days, I got it for $1.99 from barns and nobles website, I heard good things about it, so I got it... I got the fourth edition though, and while I knew it was an older book when I got it, I just learned it was written in 2001 (yikes!) keep in mind, that I have already done some basic stuff in C++, I understand how compilers work and such I first realized it was an older book when it was talking about writing in a text editor that just saves the text, and talking about using the linker, and compiling and such... but that was easy enough, (so far, I just finished the first "day"). my biggest question is, have the standards really changed? I know how to write and compile stuff today, and I know what its talking about when its talking about how it was done in 2001... but I find it hard to believe much has changed sense then. so my first question is, is it really worth buying the fifth edition? are there "bad habits" taught in this book, that, back then where normal? (this one is for those of you who have read this book) and my second question is, I know this book is not going to teach me everything, so can you recommend more C++ books? I know that this book is enough to get me going in game programing, but I would also like to get even more advance than what this book covers... and yes, I know what book I am going to read next, Focus on SDL, but I would still like to learn more about C++ sorry for the horrid formatting of my post, I am tired, and I really wanted to get this question out their because I plunge more into this book (that, mind you, is bigger than my bible, and is EXTREMELY heavy...) tomorrow. Trey.

Share this post


Link to post
Share on other sites
In all honesty, c++ has not changed much since then except for the more advanced parts and APIs involved. However, I've actually heard bad things about that book. Anyway, the basic concept and standards are the same, so don't fret too much. Lots of books don't recommend using an IDE initially so I see nothing out of place.

Share this post


Link to post
Share on other sites
Quote:
Original post by Fuji
In all honesty, c++ has not changed much since then except for the more advanced parts and APIs involved. However, I've actually heard bad things about that book. Anyway, the basic concept and standards are the same, so don't fret too much. Lots of books don't recommend using an IDE initially so I see nothing out of place.


thats what I figured...

I heard bad things about it too, but the praise seems to outweigh the negativity. most of the bad things I heard where: "Don't buy this book! Jesse is a terrible writer!" not explaining anything, and those where mostly for the earlier editions, i.e. the third edition, the fourth one seems to get more praise...

anyways, so what books do you think could be a good option to get more advanced then after I finish this one?

Share this post


Link to post
Share on other sites
Many books, such as the "teach yourself c++" book, focus on a tiny subset of the language to get started on. They don't cover much of the actual language, and often times rely on compiler-specific behavior rather than correct behavior.

Based on Google searches, that particular book started getting things right around the third edition.


In other words, it took them three editions before they *finally* reached something resembling the actual C++ language, and they still haven't reached their goal. It will teach you some things, and most of it will be correct.



It will take a lot more than 21 days to master them, but here is the "standard" c++ book list:

• "Accelerated C++" Andrew Koenig & Barbara Moo
• "The C++ Standard Library" Nicolai Josuttis
• "Effective C++", "More Effective C++", "Effective STL" Scott Meyers
• "Exceptional C++", "More Exceptional C++" Herb Sutter
• "Modern C++ Design" Andrei Alexandrescu
• "C++ Templates" Vandevoorde & Josuttis
• "Standard C++ IOStreams and Locales" Langer & Kreft

Read them mostly in order. The last one really doesn't really apply to game development, but you'll need it if you enter the world of business software. Most of the authors have been on the c++ standards committee, some still are.

About halfway through you will probably want to buy an electronic of the c++ language standard. It was $21 when I last checked, they might have bumped the price since then.

Work through those and you will have a very solid knowledge of the *actual* C++ language. You will understand how to use it, and how to avoid using it.

Share this post


Link to post
Share on other sites
Quote:
Original post by frob
Many books, such as the "teach yourself c++" book, focus on a tiny subset of the language to get started on. They don't cover much of the actual language, and often times rely on compiler-specific behavior rather than correct behavior.

Based on Google searches, that particular book started getting things right around the third edition.


In other words, it took them three editions before they *finally* reached something resembling the actual C++ language, and they still haven't reached their goal. It will teach you some things, and most of it will be correct.



It will take a lot more than 21 days to master them, but here is the "standard" c++ book list:

• "Accelerated C++" Andrew Koenig & Barbara Moo
• "The C++ Standard Library" Nicolai Josuttis
• "Effective C++", "More Effective C++", "Effective STL" Scott Meyers
• "Exceptional C++", "More Exceptional C++" Herb Sutter
• "Modern C++ Design" Andrei Alexandrescu
• "C++ Templates" Vandevoorde & Josuttis
• "Standard C++ IOStreams and Locales" Langer & Kreft

Read them mostly in order. The last one really doesn't really apply to game development, but you'll need it if you enter the world of business software. Most of the authors have been on the c++ standards committee, some still are.

About halfway through you will probably want to buy an electronic of the c++ language standard. It was $21 when I last checked, they might have bumped the price since then.

Work through those and you will have a very solid knowledge of the *actual* C++ language. You will understand how to use it, and how to avoid using it.


I understand it takes longer than 21 days, but I assume I will still learn quite a good bit from it...

so I should start "accelerated C++" after this book? or is that more of the basics, and I should just move on to the next?

Share this post


Link to post
Share on other sites
Quote:
Original post by TreyRust
so I should start "accelerated C++" after this book? or is that more of the basics, and I should just move on to the next?
Amazon has a "look inside" for Accelerated C++.

Compare the excerpts with your book.


The 21 days book excerpts that I can see show that it mostly treats the language as "C with classes". The 21 days spend a lot of time on unnecessary topics. The code samples show several bad habits, such as fixed size arrays, magic numbers, frequently naked pointers, and more. It appears to not go beyond the very basics of the c++ standard library until "day" 19, or 90% of the way through the course, and never touches it after.

I disagree with some of the choices the book makes.

It looks like the 21 days book spends around 50 pages, from 440-490, (a significant amount of book space) showing you how to implement a linked list. This is a fundamental data structure, but it already exists in the standard library's list class. If they were trying to teach about data structures there are less confusing ways to do it. If they were trying to show how to implement an algorithm, there are simpler versions. It seems a poor teaching decision.

The 21 days book also spends a lot of effort developing a String class. Like the list class, the standard library already has a comprehensive set of string classes. Similarly, it does provide a way to explore some of the language concepts, but there are less confusing and simpler ways to cover the topics, and it seems a poor teaching choice.

Rather than having examples that rewrite portions of the standard library, the authors could have developed something more intuitive and useful and demonstrate how to use the standard library in the process. Using more understandable examples with implementations that use the standard library is a wiser teaching decision. This would have both taught the concepts and the language.



So yes, I would read Accelerated C++ next.


I'd not quite go so far as to say to stop reading the 21 days book, but I would give it a little thought. You already have it and that is an edition that fixed most of the glaring errors. As an analogue, imagine it as an auto mechanics book that covers the "classic" cars in the 1960's. The concepts are still mostly valid and you can gain knowledge, but you will spend a lot of effort on things that don't necessarily apply today. You will also spend effort learning some outmoded practices that are now considered bad behavior.

I would be prepared to un-learn several of the habits and patterns learned in the 21 days book, or at least be prepared to rationally contrast the differences and evaluate how quickly you can accomplish your goals in the two different programming styles. It is useful to learn from both good code and bad code to help you appreciate the difference.

Share this post


Link to post
Share on other sites
Two other books I can recommend are "C++ Primer" and "Programming: Principles and Practices using C++". They don't require any previous knowledge, and they teach modern C++, not C with classes.

Quote:
Original post by frob
About halfway through you will probably want to buy an electronic of the c++ language standard. It was $21 when I last checked, they might have bumped the price since then.

Or you could cheat and download the current draft from the WG21 website.

Share this post


Link to post
Share on other sites
I currently use Sams 5th edition as my main reference. 5th is very good imho. I have not read 4th but [ Pirated e-book link removed ] is a pdf version 5th. Easy to go through and such, its what I use when I am out and don't have my hard copy handy.

As for SDL, I don't recommend trying it until you understand the basics very well. I am still a novice but I thought after awhile with the books 2d would be easy. Its like a whole other world. 3D (OpenGl/D3D) is even more insane. Don't take it from me though, I am a very novice coder and can't offer a professional opinion.

As for SDL, I use SFML (http://www.sfml-dev.org/). Its like SDL but I think better (from my limited experience with it). However you will find many others who will say SFML is better then SDL, and many who say SDL is better then SFML.

In the end I don't think relying on any one book is wise. I use Sams 5th, 2 others I got through a web course, cplusplus.com, Gamedev forums, and various articles I have found over time as my reference material for learning c++.

[Edited by - Sneftel on March 3, 2010 8:03:01 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Mr C
I currently use Sams 5th edition as my main reference. 5th is very good imho. I have not read 4th but [ link removed ] is a pdf version 5th. Easy to go through and such, its what I use when I am out and don't have my hard copy handy.



I not sure if you are allowed to post a link to a copywrited book. If the book has been made freely publicly available then I apologise for pointing it out. If not then maybe deleting the link would be the best choice.

[Edited by - Sneftel on March 3, 2010 8:54:19 AM]

Share this post


Link to post
Share on other sites

This topic is 2844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this