CS Faculty and Students To Write a Creative Commons C++ Textbook 96
Cynic writes "Inspired by an earlier Slashdot story about Finnish teachers and students writing a math textbook, I pitched the idea of writing our own much cheaper/free C++ textbook to my programming students. They were incredibly positive, so I decided to move forward and started a Kickstarter project. We hope to release the textbook we produce under a CC BY-NC-SA 3.0 license and sell cheap hard copies to sustain the hosting and other production costs."
Absolutely fantastic! (Score:5, Informative)
Its that kind of thinking, collaboration, and progress that revolutionizes industries. Best of luck to you!
Re:Absolutely fantastic! (Score:5, Insightful)
Decent books are worth more; your book was junk. (Score:2, Insightful)
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
Re: (Score:3)
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
Re: (Score:2)
OK ... I'll volunteer to update C99 if you take C11.
Re: (Score:2)
There's also the problem that while C is effectively a static language now, C++ is evolving constantly. (See c++0x, c++11)
Evolving constantly? That's one set of changes in 13 years! If anything it was too slow, though it's better for them to make no changes than to have something bad set in stone for ever.
Also, there's C99 and C11. Though those aren't anything like as large in scope as C++11.
Re: (Score:2)
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.
Sounds a little bit harsh, don't you think? Sure, there are many lousy books on C (or any language, for that matter), but what about King's "C Programming: A Modern Approach"?
Best of luck to them (Score:3)
Hopefully the teacher knows his stuff and is a good editor.
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.
The students may be writing with the best of intentions, but there's a good chance they'll give bad information. Learning to not fool yourself about your limits is an underrated skill.
On the other hand, writing documentation for things is one of the best ways I've f
Re: (Score:2)
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!
Re: (Score:2)
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
Re:Absolutely fantastic! (Score:4, Insightful)
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?
Re: (Score:2)
So, did you show your children how to hunt before you told them about supermarkets, so they could understand how much nicer the supermarket is?
Re: (Score:2)
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
Re: (Score:2)
Re: (Score:1)
Its that kind of thinking, collaboration, and progress that revolutionizes industries.
Actually, teaching even more people that ancient monster of a language stifles progress and stagnates industries, it doesn't "revolutionize" anything.
already tons of information out there (Score:1)
are there not already vast quantities of available C++ information ? (besides stackoverflow)
go away dum dum
Re: (Score:2)
are there not already vast quantities of available C++ information ?
Information? Sure.
Good information, not so much.
C++ is (a) old, (b) powerful and (c) very widely used. That means there is an awful lot of dated, misguided and badly written information out there.
There are still substantial amounts treating C++ like C++ circa 1990, ignoring the standard library and doing everything C style by peppering everything with new/delete or (worse) malloc/free.
There's also more than enough trying to teach C++ as an
Re: (Score:3)
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.
The easy part is writing what to do in C++ (Score:5, Insightful)
The hard part is writing the book of what NOT to do in C++. That would easily take several volumes.
As a good comparison, consider O'Reilly's JavaScript: The Good Parts, which is a mere 176 pages.
Re: (Score:2)
Heh you're onto it.
Here's hoping we don't end up with something like:
void main()
{
My String s;
s.read(cin);
}
Re: (Score:2, Funny)
There are many, many programmers working on the cutting edge of what not to do in C++. Unfortunately not documenting their code is one of those things.
Re: (Score:2)
Re: (Score:2)
"Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary."
My favorite CS quote of all time.
Re: (Score:2)
"Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary."
Quite a lot of the new features of C++ are syntactic sugar to make life easier and more pleasant. You can do without them, but I can't think of any language out there without syntactic sugar.
Quite a few of them are also removing restrictions for example by allowing the compiler more access to context specific information (decltype,
Re: (Score:2)
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).
For exampl
Re: (Score:2)
The hard part is writing the book of what NOT to do in C++.
How trite.
You don't need to do that: you write showing only good style.
Bear in mind that you can write terrible code in any language. If you took this approach, then you'd never have any programminb book other than a tome of every way of perverting a language possible.
Re: (Score:2)
The hard part is writing the book of what NOT to do in C++.
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.
Lost me @ CC BY-NC-SA 3.0 (Score:2)
Reconsider the choice of license (Score:2, Interesting)
Richard Stallman gives good reasons why this CC license is the wrong one to use: http://stallman.org/articles/online-education.html [stallman.org]
Re: (Score:2)
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.
Re:Lost me @ CC BY-NC-SA 3.0 (Score:4, Interesting)
NonCommercial is going to make it useless as a textbook. It can't even be included in, for example, Debian or other Linux distributions.
Re: (Score:2)
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.
Re: (Score:2)
It must be written in American, not Finnish !! Imagine if you had to write goto as gehtunblech !!
I thought it was Danish? Or has Mr. Stroustrup stopped eating pastry and started eating hamburgers?
Book written by a comittee (Score:2, Interesting)
A book written by a committee will be a painful read.
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.
Re:Book written by a comittee (Score:5, Insightful)
A book written by a committee will be a painful read.
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 courses
2. 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 hardback
4. The contents of the book are basically open and may be revised at any point without expensive publishing costs
5. You have come here to day to complain that this initiative is a waste of time
Have I got that right?
Peace,
Andy.
Re: (Score:2)
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
Re: (Score:2)
There is no mandate that the poster should share the general opinion of slashdot all the time or that has to believe that a specific instance of what is demanded is easily doable.
So yes, you probably got that right.
Re: (Score:2)
Except that the "easily affordable hardback" gets real, real iffy. Printing and selling one of those things is commercial activity, which is forbidden by the stupid license they're using.
I don't contribute to projects licensed with -NC-. It just causes too many problems.
Re: (Score:2)
A book written by a committee will be a painful read.
Then FORK IT!
Thank you (Score:2)
Re: (Score:2)
Re: (Score:2)
That should be:
I couldn't see any mention of C++11. I'd assume they would use the new standard. Anyone know?
Re: (Score:2)
Bruce Eckel's book is good too (Score:2)
Done (Score:4, Interesting)
Pledged ($50). I don't care if the book turns out crap or not; more people should release books in this manner (IMO) so the decision to pledge was very easy.
Re: (Score:1)
Re: (Score:2)
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 idea (Score:2)
What a stupid comment (Score:2)
Have you even looked at the link you posted? It has a completely different scope.
Re: (Score:2)
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.
Thinking in C++ (Score:2)
"Thinking in C++" is the most famous free C++ book, freely available online.
It's not that great, but can a couple of random programming students really make something better?
Re: (Score:2)
Re: (Score:2)
Most languages should never be anyone's first language. C++ is one of them.
C++ Annotations (Score:2)
I don't know what's the goal of the course, but there already exists a free online book that surveys C++, including the latest revisions. It's called C++ annotations:
http://www.icce.rug.nl/documents/cplusplus/ [icce.rug.nl]
cs books are a waste (Score:2)
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
Re: (Score:2)
cs books are a waste
Rubbish.
Meh....textbooks are expensive as hell,
No, they're not. RTFT: it's about creating a FREE textbook.
but only if you actually buy them.
You don't have to buy it! It's CC
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.
Google will answer questions. You can't learn C++ well from google.
What would be awesome is an open replacement for that damn $500 calculus textbook....
What the hell? I've n
Do it right! (Score:1)
Re: (Score:2)
My CS textbooks have been free (Score:1)
Hope it encourages more (Score:2)
I think it's a great idea, and will pledge some money.
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.
Nature of Code (Score:3)
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.
Good luck with the book.
Re: (Score:1)
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
Re: (Score:2)
Clarify, are you writing a tutorial or a reference (Score:2)
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
Unrealistic (Score:2)
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
Already exists, its called The Web (Score:2)
If you have to learn code through a textbook, you already failed.
Re: (Score:2)
Agree'd
learning the syntax of a language is easy. the challenge lies in learning concepts like linked lists, or object oriented programming
if 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)
sounds like someone just wants a kickstarter (Score:1)
$5000?!
the great thing about kickstarter is there's no accountability.
You want to get funding to write a C++ book? Start doing some grant writing.
Your school doesn't provide any hosting space? Why can't you put it up there?
Also, there are already tons of online resources for c++. What will make yours unique?
Re: (Score:2)
$5000?!
It's $500, not $5000
Re: (Score:2)
my other questions are still relevant
also, $500 is definitely low enough to fund via traditional means (grant writing, etc)
wikibooks (Score:1)
Uh guys... why start a new project? How about just contributing to something that already exists [wikibooks.org]?
Ignorance begets more confidence than knowledge... (Score:2)
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.
I've seen this symptom particularly among profe