views:

244

answers:

9

1) I checked out the C++ recommended reading list. I'm probably still a beginner. So, would I still start with a beginner book, and go from there? And, do you recommend reading one book for each level, or all of the books in one level before moving up?

Obviously, I can only start on one book. Which one should I begin with?

2) What kind of projects could I do in my spare time to practice and improve upon my skills?

I'm particularly interested in designed web applications. Is that possible as a beginner? Examples would be great.

A: 

1: I'd say find a good beginner book and read/work through it, then a more in depth one. The O'Reilly "Learning" books are good beginner-reads in my experience (the C++ In A Nutshell maybe for those with prior programming experience), and Bjarne's book (The C++ Programming Language) is probably a good choice for a not-quite-so-beginner but not deep magic book.

2: When I learn a new programming language I like to write copies of common Unix/Linux commands I use (wc, grep, sort, etc). This allows me to learn control structures, file and console I/O, and other necessities within the context of always having the original version to compare my results with. I don't program on Windows machines, but I'm sure there are some comparable commands, or you could use the ones in Cygwin.

alesplin
+4  A: 

If you're a complete beginner to programming, I have no idea of what book could get you started with C++ -- I'd recommend just about any other language as simpler for somebody who's never programmed before.

If you're a reasonably experienced programmer at some other language, just a beginner at C++, I'd start with Eckel's Thinking in C++ -- it has the big advantage of being freely available online, so you can at least get started with it (if you decide to buy the paper+CDROM edition, which is IMHO advisable if you have the money and like the book, it will be done with fully open eyes and not just a "gamble" of many of your $$$ on somebody else's opinion;-). Once you're done with both volumes of Eckel and the exercises, you will know enough C++ to pick and choose the high-intermediate, to advanced, to expert, books and projects you desire to continue your study.

(Of course I'm biased, because Bruce's a friend and a fellow Python enthusiast, but his books on Java and C++ are very and justly popular on their own anyway, quite apart from my bias;-).

Web apps are not the typical field for C++ use (although of course you can use any language you prefer, I don't even know of a popular/widespread C++ framework for web apps -- and I'm pretty expert at C++, even though these days I do much more Python [[excellent language for web apps btw;-)]] than I do C++).

Alex Martelli
A: 

If you want to build web pages, you're barking up the wrong tree with C++. C#/ASP.NET is better for websites, but if you're really a beginner, you'll want to start by learning HTML and then Javascript, PHP, C#/ASP.NET and/or Python. While C++ can be used for websites, it's uncommon and far from easy. All the languages I named are common web languages and easier for the beginner. But if you're just looking to put up a simple website, start with HTML, that's the prerequisite for all the rest.

Scott Stafford
A: 

I started with the "Thinking in C++" series and quickly found myself in need of projects to actually apply what I was learning. Those are a good start because you can get them free from the author's website.

I went out a picked up a textbook style book, C++ Programming by D.S. Malik as it had problems in each chapter to solve. Doing this is what I feel is the best way to learn as you will not be as successful if you jump into a full blown project right away. Going the textbook route gives you the material followed by a bunch of problems that you can solve with that knowledge and it builds on itself as you get to the end of the book. You can generally buy older editions of the textbooks on Amazon for < $10.

The best projects I found are to get started doing basic text file I/O and go from there. You can also get into image processing at a fairly early level with C++, generating images and doing add/subtract operations, color alteration, etc.

Finding projects seems to be one of the more difficult things for me which is why I liked the textbook route.

amarcy
Malik's book did not get a very good review on accu.org : "The main complaint I had with the book is the actual content. Why was there no mention of polymorphism (other than a passing definition)? Why were three chapters dedicated to the implementation of linked lists, queues and stacks, with no mention of the STL outside the appendices? A description of the concepts would have its place - but the full source code seems over the top."
Alexandros Gezerlis
A: 

When researching/studying any technology I am unfamialiar with, I start with introductory material and read until I am bored/already know the material at that level and then move to more intermediate material and repeat the process (along with hands-on expirmentation) until I am comfortable.

I don't spend a lot of time choosing which books to read, but rather start many books and drop them if they are not for me. This isn't practical if you are buying the books, but I subscribe to several online libraries so I can sample a variety of material.

Jim Anderson
+2  A: 
  1. I'm not sure what list you're referring to, but in general reading more than one "beginner book" would be redundant; just pick a good one and stick with it; when you're comfortable with the basics you can move on to something more advanced (and you'll have a better idea which direction you want to go).

  2. I find "programming challenge" websites help a lot in giving me stuff to do while learning a new language; I learned Python while working through Project Euler. A good list of these is here and here.

Also, I'll echo Scott's suggestion that if you want to do web app stuff, C++ is the wrong way to go; it really lacks the framework support. I'd go for Python, C#/ASP.NET, or even Java instead.

tzaman
+1 for the links
TiansHUo
+2  A: 

1) I am assuming that when you say you're a beginner, you mean a beginner in programming in general. You may want to look at Bjarne's Stroustrup's new book:

Programming: Principles and Practice using C++

alt text

This book is very pedagogical and assumes essentially zero background. I would recommend doing a large fraction of the exercises as you go along.

See also Stroustrup's page on the book.


2) Another introductory C++ book that is written for those with minimal background in programming is Francis Glassborrow's:

You Can Do It!: A Beginners Introduction to Computer Programmin


3) If you have a solid background in another modern programming language then (as mentioned in the relevant SO question) Andrew Koenig and Barbara Moo's:

Accelerated C++

is definitely a great choice for you. Once again, work through most of the exercises.

Alexandros Gezerlis
+1  A: 

For a clean-slate C++ beginner I'd recommend Accelerated C++, Practical Programming by Example by Andrew Koenig and Barbara E. Moo - an excellent introduction.

Nikolai N Fetissov
+1  A: 
  1. Eckel's Thinking in C++ is the way to go!
  2. Do mathematical projects.
Rajendra Kumar Uppal