Agreed!! One of the major costs of college was the $100 text books that showed the basics of a language and example code, but it wasn't something that I would keep as a reference for future study. I think a Creative Commons book that can be updated and improved each year will be attractive to both the professors and the students. Asking each class that uses the book to send in the top 5 suggestions will help give feedback on what can be improved each year. Not every suggestion will be used, but it can keep the book improving each year. The hard part will be getting the professors to agree to teach from the book until at least the second year it is available.

One of the major costs of college was the $100 text books that showed the basics of a language and example code, but it wasn't something that I would keep as a reference for future study.

Your book was junk. There are too many programming books that are bloated and meandering. Granted, C++ itself is bloated and meandering, but still...

I still have my K+R ANSI C book 20 years later. I actively used it for a good while, perhaps a third of that time. This book is well under 1 cm thick, not much over 1/4 inch, and it delivers the goods.

A much fatter book that also delivers the goods is Advanced Programming in the UNIX Environment. I so wish that the these books could be properly updated by their

K&R ANSI C is the only usable C reference. If you have a prof require a book other than K&R for a C course, you need to file a complaint with your CS dean, alleging incompetence.

C++, on the other hand, doesn't seem to have a similar significant tome. I tried reading Stroustrop... it's just not the same. There's also the problem that while C is effectively a static language now, C++ is evolving constantly. (See c++0x, c++11)

In addition, many of the C++ concepts are libraries, rather than the actua

Speaking from experience, C++ is complex enough to fool you into thinking you're good at it early on when you've really only just began to scratch at the surface to see what's underneath.

...which is something *at least* one member of the C++ standardization committee learned the hard way while participating in said C++ standardization committee. I'm not sure that this whole C++ thing was a good idea in the first place!

On the other hand, writing documentation for things is one of the best ways I've found to really flesh out my understanding of something, so I bet these students will come out of the project with a significantly improved understanding of the language.

Agreed. Some years ago, me and four classmates wrote a 100-page "compendium" (less ambitious than a textbook, more like supporting material) for our C++ course. This was the summer after we took it; we sold it to subsequent classes for $15 per copy, with the proceedings going to our student society. It improved my understanding of the subject a lot, even though I had aced the exam. The only thing I would have done differently today is write it in English, not our native language, so that we could share it w

Here's hoping that arrays and pointers end up near the end of the book. I've seen more CS students completely hosed by profs teaching pointers, char[] and other arrays in Chapter 1, along with having them design linked lists, bubble sorts and such in their first few weeks of learning to program and their intro to C++. Teach <iostream>, <string>, <vector>, <map>, <algorithm>, etc. While doing that, teach about control structures: if, while, for, switch, and so on. Teach exceptions from the start. Then teach (properly) OO and inheritance. Drill the Liskov substitution principle into their heads when doing this. Explain about static vs. dynamic polymorphism. Then teach about pointers, arrays, data structures and algorithms. Start at the high-level and then drill down to the important stuff. Make sure that they see how fast and efficient <algorithm> is and ensure that they compare their algorithmic efficiency to what is in the standard library. I don't want to find another bubble sort or linked list implementation in production C++ code ever again.

If you want an indication of the sad state that C++ education is in, hang out on a C++ beginner forum for a while. Many schools are still teaching using pre-C++98 tools -- using Borland compilers from the early '90s. Why do that when there are really good, modern, free C++ compilers available?

iostream? Teach that piece of garbage? stdio is much better. stdio is faster, and a better known standard. It's used in lots of places outside C/C++. For instance, if you know stdio, you have a leg up on Python. Perl has a printf library function. There's even a printf Unix command line tool.

Are people still using early 90's Borland compilers? When g++ is freely available, why?? They have a nice IDE, but they're very buggy. Try to manipulate more than 64K of data, and you'll quickly run into som

The primary reason to use iostreams is polymorphism -- something stdio does not support. And if you find iostreams slow, it is likely because you have not explored it much beyond cin/cout. Providing a reasonably sized buffer puts it on par with stdio performance. It is certainly not without it's faults. But with the Boost Format library, formatting no longer completely sucks. At least with iostreams I don't see random core dumps when someone changes a variable type and forgets to change the correspondi

Stroustrup's book is practically unreadable. Unorganized, stream of conscious writing style. Hard to find anything, and absolutely unsuitable for a reference. Given how great the C book by K&R was, I thought reading from the author for C++ would be great. In reality it was a waste of money.

I'd argue that many of the new features of C++ are there to work around flaws in the design of STL, rather than flaws in the actual language itself.

I'd love to hear your arguments for that, becuase I'm having a hard job thinking them up. One of the best things about C++ is it's amazingly designed library (not perfect, nothing is but it is very good). I'd argue the opposite. The new features make the language much more pleasant across the board and are entirely orthogonal to the STL (more or less).

How trite.
You don't need to do that: you write showing only good style.

Not with the readers being exposed to real-world C++ code, which tends to be based on either "I'm a C programmer and this is what I remember from a C++ course in 1997" or "I'd really like to pretend this is Java" at least as often as idiomatic C++.

Not that this is hard. I could probably throw together a brief chapter titled "A warning to C programmers" tonight.

Stallman's actually right on this one for practical reasons, and esr agrees for the same reasons [ibiblio.org]. Among other things, determining what's "commercial" activity is notoriously difficult (write a hobby blog and put AdWords on it?), and there's not a lot of evidence to indicate that the NC licenses do anything helpful.

It would seem as though "share alike" would be sufficient protection - if you want to use it, anyone else can use your derivative too. Sell it if you want, but anyone else can still build on your improvements. No need to prevent commercial activities.

If you want to do something useful, create one of those single plastic sheet two page guides to the language. Boiling the language down to two pages of small type with a few diagrams is a useful exercise. More useful than another thousand page book of blithering.

If you want to do something useful, create one of those single plastic sheet two page guides to the language. Boiling the language down to two pages of small type with a few diagrams is a useful exercise. More useful than another thousand page book of blithering.

So let me get this straight.

1. This is Slashdot, where we routinely see articles decrying expensive textbooks required for university courses2. A professor and a group of students are actually DOING SOMETHING to address this problem by writing text book for C++3. The aim is to make this book freely available via the web, or as an easily affordable hardback4. The contents of the book are basically open and may be revised at any point without expensive publishing costs5. You have come here to day to complain that this initiative is a waste of time

My thoughts exactly. Which is why I didn't hesitate to pledge. As I said in my comment I don't really care about the final quality of the book (well, I do, but it's not my main reason for pledging). I put my $ into the project because of each point you listed. I support the idea, the ethos and those behind the project. In my opinion text books should no longer be expensive and "closed". I feel the same way about academic journal papers. So, my pledge was not so much about getting this book done but, instead

Bruce Eckel publishes free (freeware?) books about several languages, and the one on C++ was one of my most read. Just a suggestion to check the existing state of the art and to not duplicate efforts. Anyway, a very good idea!

A (very) belated response. I echo your sentiments. Small steps do make a difference. If this specific project doesn't make a difference, then so be it. But, the steps are being made and others can follow those few "small" and tentative steps into the unknown. So, even if the project is a "flop" it's not a failure. It's time for change and I think (I really do) that the momentum has been gathered and more and more progress will be made in this revolution of education, access to knowledge and learning. What a

What a stupid stupid!
Have you read the contents? Have you checked the quality?
Only code examples are missing.
That document is not just a (yet another) language reference.
It's a real life course text.

Meh....textbooks are expensive as hell, but only if you actually buy them. By junior year I'd realized that I had never once opened the textbook for any if my comp sci class and stopped buying them. It's just faster to Google what you need, and if they assign homework from the book (which I found very rare in CS,) you just go to the library.

What would be awesome is an open replacement for that damn $500 calculus textbook....math textbooks are one that you generally do actually need, and those prices are bey

Having earned my degree in CompSci, I can say I was severely disappointed in my C++ texts. While the Deitel text is very comprehensive, it is so much so that it loses any effect. What is really needed is a multi-function text. One part deals solely with teaching the language constructs along with basic examples. The second part needs to focus on "real-world" style code. Current texts focus so much on the constructs, do a moderate job at best at tackling them, then leave any real examples as exercises buried

I actually think Stroustrup's introductory textbook does this quite well. He clearly separates out the simple drills that get you familiar with syntax and assigns more complex exercises, and frequently relates it back to real world operations.

My CS department writes their own 1st year notes and posts them online for free (yes, it'll cost if you want to print them, but most people have laptops now). The school kinda 'forced' them to put a textbook down for website, the first class my prof said that we'll not be following that book so we can return them, or keep them if we want extra reference material. My experience has been quite good, the first class was extremely well structured and the notes very easy to understand. My second class is more

I also think other subjects could use a basic text as well - say math textbooks. All those high schools and colleges spending fortunes for textbooks when the basic material hasn't changed appreciably in hundreds of years. School districts could save money on book purchases and focus on teaching, contributing homework problems, etc.

First these guys need to read The Nature of Code; full stop. I have never read a better book on coding. The language covered in that book is the obscure Processing (a C++ like syntax) but it doesn't matter. That guy explains everything you need from pretty well zero to Genetic Algorithms in ways that I have never seen done so simplistically. Most shelf computer books meander through the usual OOP stuff such as circle and square inheriting from the shape base class but without really explaining why the hell you would need any of that.

CS textbooks can't wait to show off the writer's math skills and while explaining one thing will throw in lambda calculus just for laughs. Also CS textbooks often contrive the need for something like a doubly linked list instead of leading the student up to where they hit a problem that is nicely solved by the topic. This is where you find the critical difference between obtaining knowledge to regurgitate on a test and building a skill set for life.

One of the keys to the nature of code is that the writer is almost always doing something graphical. The result is that you can get a feel for what your code is doing while at the same time having concrete goals. I am sick of textbooks where they will introduce a vector blah and then get you to sort and print the results. I doubt there is a person on earth who went into a CS course wanting to sort a list of names. But if you have a graphical bunch of rectangles and you put each rectangle in a vector and then have the student sort them that way and display them stacked, still useless but the student will probably get more satisfaction.

I would argue that "Nature of Code" has nothing much to do with "Programming" more than it has to with simulation. Maths ans Physics enthusiasts will find a LOT of use in it, as well as people trying to understand things like Cellular Automata and Genetic Algorithms - but not "learning to code". When you pick up a language book, you want to know how the language handles memory, where the data structures are, and what happens when you flick this switch as opposed to that one. Language books are manuals with

Learning about how memory and whatnot works would be like learning metallurgy down to crystal formation as a first step when you are trying to learn how an engine works enroute to designing cars. Yes you will be a crap mechanical engineer if you don't know material science inside and out; but many many studies have shown that a far better way to learn is to jump in and get your hands dirty doing something on the macro scale that is generally fun and interesting where you will run into problems that are solv

Because, its not the same thing. Because, writing another "The C++ Programming Language" is a huge task, and probably not particularly useful for a student outside of a reference book. "Programming: Principles and Practice Using C++" is probably a better book for a student, and its only ~$40 and can probably be resold for $20. So, as textbooks go that's pretty inexpensive.

All that said, its probably possible to expand the teaching curriculum and distil a semester or two of C++ into a few dozen pages, simila

There are already excellent C++ and algorithm and CS books available at consumer (as opposed to university) prices. What are the chances a committee of non-authoring experts will better what's already available? If you produce "free" texts that aren't as good as inexpensive texts, you're doing a disservice to everyone who will spend time reading them.

Now if you're willing to toss out your work if it doesn't turn out to be excellent, then go for it. But if you're going to declare it better than what's alread

learning the syntax of a language is easy. the challenge lies in learning concepts like linked lists, or object oriented programmingif you want to do something useful make a 2-page cheat sheet on the language, and then host a website with coding challenges (or just donate to project euler)

I like how all of them in the video when asked "do you think you can do better than seasoned C++ professionals in writing a textbook" answer yes without hesitation.

That's not to say I frown upon their enthusiasm, but there is something to be said about the humility of recognising someone's expertise and efforts put into a project, rather than assuming than you can do it better without training or special knowledge, just because you think you're smart and stuff.