Beta

Slashdot: News for Nerds

×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

CS Faculty and Students To Write a Creative Commons C++ Textbook

samzenpus posted about a year ago | from the write-it-yourself dept.

Programming 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."

cancel ×

96 comments

Absolutely fantastic! (4, Informative)

toygeek (473120) | about a year ago | (#43243603)

Its that kind of thinking, collaboration, and progress that revolutionizes industries. Best of luck to you!

Re:Absolutely fantastic! (5, Insightful)

CaptQuark (2706165) | about a year ago | (#43243745)

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.

Decent books are worth more; your book was junk. (2, Insightful)

Anonymous Coward | about a year ago | (#43243843)

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 original authors, keeping the original style. (not possible anymore)

Re:Decent books are worth more; your book was junk (2)

Annirak (181684) | about a year ago | (#43244671)

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 actual language syntax, e.g. use of the STL or other container classes to prevent rewriting commonly used containers is almost as important as being able to write said containers if you need them.

Re:Decent books are worth more; your book was junk (0)

Anonymous Coward | about a year ago | (#43245141)

K&R doesn't cover C99 or C11, which is unfortunate. Somebody needs to update it.

Re:Decent books are worth more; your book was junk (1)

Skapare (16644) | about a year ago | (#43245419)

OK ... I'll volunteer to update C99 if you take C11.

Re:Decent books are worth more; your book was junk (1)

serviscope_minor (664417) | about a year ago | (#43245307)

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:Decent books are worth more; your book was junk (1)

K. S. Kyosuke (729550) | about a year ago | (#43246565)

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"?

Re:Decent books are worth more; your book was junk (0)

Anonymous Coward | about a year ago | (#43246841)

You realize that C has a few revision since K&R, right? Hell, the last one was only two years ago! The same year as the last C++ update.

Best of luck to them (2)

PhrostyMcByte (589271) | about a year ago | (#43245447)

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 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.

Re:Best of luck to them (1)

K. S. Kyosuke (729550) | about a year ago | (#43247337)

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:Best of luck to them (1)

semi-extrinsic (1997002) | about a year ago | (#43259219)

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 with more people.

Re:Absolutely fantastic! (3, Insightful)

Rob Riggs (6418) | about a year ago | (#43246177)

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:Absolutely fantastic! (0)

Anonymous Coward | about a year ago | (#43249031)

Exactly the opposite.

The basic C components should be taught first in a pure form so that you know /why/ all of the standard library elements are so much nicer to use as well as the performance trade-offs involved in using them.

Further anyone who can't wrap their head around what pointers are and how they operate really has no business programming in a language that uses pointers. If they're that inept they should instead focus on problem specification and exclusively high level languages which implement garbage collection and come equipped with excellent documentation. Python comes to mind as being more useful, but even at least Java could be used with a sufficient IDE to bash out some kind of hurts like legos sideways to walk on monstrosity that technically gets some business thing automated.

Re:Absolutely fantastic! (1)

Njovich (553857) | about a year ago | (#43249513)

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:Absolutely fantastic! (1)

bzipitidoo (647217) | about a year ago | (#43253437)

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 some of those Borland bugs. Their compilers from Turbo C++ 2.0 up to Borland C++ 4.5 for sure, and I think 5.1, would all screw up the segmentation. In the debugger, you'd see two variables change when only one was supposed to, because the compiler had assigned the same memory location to both. Didn't matter what memory model you picked, Borland C++ couldn't keep segments straight.

Re:Absolutely fantastic! (1)

Rob Riggs (6418) | about a year ago | (#43260287)

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 corresponding format character. The main reason to shun stdio is that it is a constant source of buffer overflows and stack-smashing attacks. It requires way too much effort to use securely. A couple innocent maintenance changes years after the original code was written can results in a remote exploit. No thanks.

Re:Absolutely fantastic! (0)

K. S. Kyosuke (729550) | about a year ago | (#43246445)

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 (1)

Anonymous Coward | about a year ago | (#43243605)

are there not already vast quantities of available C++ information ? (besides stackoverflow)

go away dum dum

Re:already tons of information out there (0)

Anonymous Coward | about a year ago | (#43243613)

LEARN C++ IN FIVE DAYS LOLOLOLL

why not try 10 years instead of 10 days http://norvig.com/21-days.html

Re:already tons of information out there (1)

serviscope_minor (664417) | about a year ago | (#43245035)

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 explosion in a pattern factory (perhaps by ex java coders who felt they'd done all they could to contaminate the Java ecosystem with such hideousness and wish to move on?).

There is very, very little out there that teaches C++ Stroustrup style: i.e. everything in moderation and a little application of taste. STL where possible, classes/templates only where necessary, etc.

I've been asked to rccommend C++ books to novice programmers before, and it is really hard. Every book I've looked at has been basically terrible.

Anyone here read Stroustrup's book on learning C++?

I strongly suspect it's good, but there seems to be no opportunity to look inside on Amazon or Google, so I've not recommended it to anyone.

Re:already tons of information out there (2)

AuMatar (183847) | about a year ago | (#43249141)

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++ (5, Insightful)

MrEricSir (398214) | about a year ago | (#43243647)

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:The easy part is writing what to do in C++ (1)

Old Wolf (56093) | about a year ago | (#43243807)

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:The easy part is writing what to do in C++ (2, Funny)

Anonymous Coward | about a year ago | (#43243869)

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:The easy part is writing what to do in C++ (0)

Anonymous Coward | about a year ago | (#43244619)

Can't agree more. And it's getting even worse: newer C++ versions always have to fix flaws from the previous C++ version. Life is too short to learn C++.

Re:The easy part is writing what to do in C++ (0)

Anonymous Coward | about a year ago | (#43244909)

Maybe you're just incompetent.

Re:The easy part is writing what to do in C++ (1)

robthebloke (1308483) | about a year ago | (#43246167)

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.

Re:The easy part is writing what to do in C++ (1)

K. S. Kyosuke (729550) | about a year ago | (#43247353)

"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:The easy part is writing what to do in C++ (1)

serviscope_minor (664417) | about a year ago | (#43248191)

"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, auto, unrestricted unions and R-value references) are all examples of exposing more of what's already there to the user.

And then there's things like threads, which are certainly a brand new feature, and is impossible to implement portably and reliably without support from the compiler.

So in terms of C++11, I'd say that most of the work involved is on (a) syntactic sugar and (b) removing those restrictions to which you refer.

Of course it's all tempered by the need to maintain 99.999% backwards compatibility.

Re:The easy part is writing what to do in C++ (1)

serviscope_minor (664417) | about a year ago | (#43248085)

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 example.

Lambdas make the STL much nicer to use. But it's not obvious how it was possible to desiger the STL to be nicer to lose without lambdas in the language. The thing is that lambdas are now a pretty much expected feature in languages because they make many things nicer. That's not STL specific.

Range based for: could be argued that this works round design deficinecies in the STL, except that again, it's not clear how the STL could have been designed to make that work well. There's a reason most newish languages have an iterate over a container construct.

Threads. Well, the compiler has to understand them in order to get memory semantics correct. Nothing to do with the STL.

decltype / auto: they make generic programming so much easier. Nothing STL specific, but they certainly make iterator usage easier. Nontheless, many modern languages have some sort of type inference. New function declaration syntax (necessary for using inferred return value).

Rouble right angle bracket! Finally!!! But nothing STL specific.

New class stuff (override, delete, inheriting constructors) make writing classes safer, less verbose and less boilerplaty. Nothing to do with the STL.

Move semantics, certainly improves the STL but it also improves things across the board. It might be that you consider the STL's use of value semantics to be a design flaw, but that would take some justification.

And so on.

The thing is that all of these (a) make the language more modern bringing the kind of usability that we expect these days (b) make it safer and more efficient and (c) make writing user defined libraries much easier.

About the only things that have made my STL life easier is range based for (hardly though, since I rarely iterate across anything except std::vector) and passing lambdas to algorithms.

Re:The easy part is writing what to do in C++ (1)

serviscope_minor (664417) | about a year ago | (#43245043)

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:The easy part is writing what to do in C++ (1)

jgrahn (181062) | about a year ago | (#43252771)

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.

Good luck with that (0)

Anonymous Coward | about a year ago | (#43243673)

You're gonna need it! The scope of C++ is huge!

I hope you don't just stop at the language, though. The common libraries are frequently ignored...

Re:Good luck with that (0)

Anonymous Coward | about a year ago | (#43243887)

C++ is a large language, but a lot of it can safely be ignored. In fact, ignoring some of the more anachronistic parts is mostly beneficial. #include is essential, but you could skip a lot of the pre-processor in favor of more modern constructs: consts instead of #defines for example. It's unfortunate that there are more esoteric parts that you need to be aware of, even if you never, intentionally, use them. Trigraphs and line-splicing for example. Use of high-level types, and less emphasis on built-in types. More about std::string and less about char *.

Lost me @ CC BY-NC-SA 3.0 (1)

slackware 3.6 (2524328) | about a year ago | (#43243695)

Good thing a link was provided. Actually it was the only link I clicked.

Reconsider the choice of license (1, Interesting)

xaxa (988988) | about a year ago | (#43244119)

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:Reconsider the choice of license (1)

chrylis (262281) | about a year ago | (#43244689)

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 (3, Interesting)

Drinking Bleach (975757) | about a year ago | (#43244165)

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:Lost me @ CC BY-NC-SA 3.0 (1)

j-beda (85386) | about a year ago | (#43246767)

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.

C++ IS AMERICAN !! NOT FINNIISH !! (0, Funny)

Anonymous Coward | about a year ago | (#43243731)

It must be written in American, not Finnish !! Imagine if you had to write goto as gehtunblech !!

Re:C++ IS AMERICAN !! NOT FINNIISH !! (0)

Anonymous Coward | about a year ago | (#43247345)

goto = mene

gehtunblech sounds like german, not finnish.

Re:C++ IS AMERICAN !! NOT FINNIISH !! (1)

K. S. Kyosuke (729550) | about a year ago | (#43247437)

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 (2, Interesting)

Animats (122034) | about a year ago | (#43243751)

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 (4, Insightful)

six025 (714064) | about a year ago | (#43244043)

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:Book written by a comittee (1)

Psychotria (953670) | about a year ago | (#43244211)

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, a vote for the idea.

So this is the third time I've "put my money where my mouth says." I wrote a book and published it as CC also (and it took about 9 months to write) and I am proud to support this shift in direction for academic and textbook publishing.

Re:Book written by a comittee (1)

drolli (522659) | about a year ago | (#43244295)

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:Book written by a comittee (1)

david_thornley (598059) | about a year ago | (#43251323)

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:Book written by a comittee (1)

Beorytis (1014777) | about a year ago | (#43245963)

A book written by a committee will be a painful read.

Then FORK IT!

Thank you (1)

jones_supa (887896) | about a year ago | (#43243801)

Hey, thanks! I'm a beginner C++ dummie in Finland and will definitely check out your book.

Re:Thank you (1)

Jamu (852752) | about a year ago | (#43243895)

I couldn't see any mention of C++11. I'd assume they would. Anyone know?

Re:Thank you (1)

Jamu (852752) | about a year ago | (#43243901)

That should be:
I couldn't see any mention of C++11. I'd assume they would use the new standard. Anyone know?

Re:Thank you (1)

jones_supa (887896) | about a year ago | (#43243943)

That's certainly something I'd like to see there too.

Bruce Eckel's book is good too (2)

m.alessandrini (1587467) | about a year ago | (#43243989)

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!

Done (3, Interesting)

Psychotria (953670) | about a year ago | (#43244115)

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:Done (1)

katsh (2760437) | about a year ago | (#43253073)

likewise. i donated $20. small steps in improving our education system.

Re:Done (1)

Psychotria (953670) | about a year ago | (#43279247)

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 wonderful time to be alive.

Nice initiative (0)

Anonymous Coward | about a year ago | (#43244193)

The world can always use more free information.

Just be sure to check the legal details with a lawyer first. You don't want the university claiming ownership of your hard work and selling it after the fact, due to the fact that you and your collaborators are employed/enrolled there.

Green Tea Press (0)

Anonymous Coward | about a year ago | (#43244255)

While it is certainly good to have a variety of textbooks, similar efforts already exist.
Check out http://greenteapress.com/

What a stupid idea (1)

aglider (2435074) | about a year ago | (#43244353)

When you already have a high quality one [icce.rug.nl] !

What a stupid comment (1)

serviscope_minor (664417) | about a year ago | (#43245067)

Have you even looked at the link you posted? It has a completely different scope.

Re:What a stupid comment (1)

aglider (2435074) | about a year ago | (#43247275)

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.

Re:What a stupid comment (0)

Anonymous Coward | about a year ago | (#43249541)

It's a course text that is designed for those already familiar with C or a similar language. The Finnish one is for an intro course. As a comparison, consider a probability book that assumes calculus vs. one that doesn't. They will be quite different in scope and intended audience.

Thinking in C++ (2)

loufoque (1400831) | about a year ago | (#43244449)

"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:Thinking in C++ (1)

robot5x (1035276) | about a year ago | (#43244535)

maybe not - but at least they tried.

A real textbook for beginners (0)

Anonymous Coward | about a year ago | (#43244511)

I've always wanted a good textbook really made for beginners. Too often I pick one up that says "coding for beginners" then on the inside is says "you should already be familiar with..."

No I'm not familiar with anything. I want a textbook that teaches it like you would to a 10 year old. No assumptions, define everything. Every new concept is accompanied by an example AND a tutorial.

If anyone can recommend me one of those, especially for objective C, I'd be very happy. And no. the for dummies, o'reilly, and Apress books are not good enough.

Re:A real textbook for beginners (1)

Skapare (16644) | about a year ago | (#43245469)

Most languages should never be anyone's first language. C++ is one of them.

C++ Annotations (1)

guacamole (24270) | about a year ago | (#43244547)

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 (1)

Urza9814 (883915) | about a year ago | (#43244917)

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 beyond absurd...

Re:cs books are a waste (1)

serviscope_minor (664417) | about a year ago | (#43245115)

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 never heard of a $500 calculus textbook. There are plenty of maths textbooks available. Just visit a reputable academic publisher/bookshop and browse around.

Re:cs books are a waste (0)

Anonymous Coward | about a year ago | (#43245173)

You can't learn C++ well in college at all.

The only way to truly know C++ is to be thrown in at the deep end, where you need to help maintain a gigantic messy codebase that dates back decades, where the original authors have long since switched jobs/retired/died.

That's the only real way to work up a good healthy loathing for C++ and learn where its multitude of potholes and trapdoors and dark corners are.

CS coursework assignments are mostly done solo and are pretty much all "from scratch". Any language can be pretty nice to use under those circumstances.

Re:cs books are a waste (0)

Anonymous Coward | about a year ago | (#43245347)

I thought this was obvious, but my comments were on textbooks in general, not necessarily this one specifically. But there are good resources for actually learning languages online too, though they are a bit harder to find sometimes. My introductory java class in college used the lessons on Sun's website rather than an actual textbook. And back in highschool I taught myself C++ from cplusplus.com, which had some great lessons. Besides, teaching is what the lecture is for, the textbook should just be a reference.

  And yes, I was required to use a $500 textbook for calc. You'd probably fail the course of you didn't have that book and the right edition, because homework was assigned from it for every single class. Of course, that book was used for all three semesters of calc that I took -- if you were only going to take one you could buy just the first half. Which puts it at around $160 per semester, which was about on par with other science/math textbooks...

Thinking In C++ (0)

Anonymous Coward | about a year ago | (#43244919)

Didn't Bruce Eckel already do this? Do a search for "Thinking in C++".

Do it right! (1)

skyraker (1977528) | about a year ago | (#43244965)

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 30 exercises in behind a bunch of boring "write a loop that adds 5 to each member of an array" type questions.

Re:Do it right! (0)

Anonymous Coward | about a year ago | (#43245081)

Stan Lippman's C++ Primer. Lippman worked on the CFront compiler at Bell Labs when C++ was first being developed, and was an editor of C++ Report (*the* foremost C++ journal that had a great run in the '90s before it collapsed under the Java/web tidal waves). It's not free but it's not $100 either, or anywhere close.

Re:Do it right! (1)

u38cg (607297) | about a year ago | (#43245207)

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 textbooks have been free (1)

Spinalcold (955025) | about a year ago | (#43245677)

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 difficult to follow but the professor that wrote the first class is teaching the second for the first time, he never wrote the notes and I can tell he wants to rewrite it all so that it's much easier to follow. By doing this, they can structure the notes around the class, not trying to fit the class to the textbook. I think it works much better.

Critics to this project (0)

Anonymous Coward | about a year ago | (#43245785)

First of all, why NC? I don't think it's fair, especially if he is going to write it with commercial support from the kickstater guys.
Second: what's wrong with this book, for example? http://www.icce.rug.nl/documents/cplusplus/
Duplication is not something desirable. Instead he could just contribute to that book.

So NO, DONT support it on kickstater!

Hope it encourages more (1)

thoth (7907) | about a year ago | (#43245875)

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 (2)

EmperorOfCanada (1332175) | about a year ago | (#43245973)

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.

Good luck with the book.

Re:Nature of Code (1)

omershapira (2446398) | about a year ago | (#43246507)

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 fancy narrative. Nature of Code is not a language book.

P.S
That "C++ like syntax" may be known better as Java.

Re:Nature of Code (1)

EmperorOfCanada (1332175) | about a year ago | (#43254367)

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 solved by micro bits of knowledge. These microbits have retention rates that are orders of magnitude better with the student having a far greater ability to apply the knowledge. That way you run up against things like how keeping things in L1 cache is better than when you start bouncing back and fourth into RAM, later studying how a floating point works in memory will suddenly make a while lot of sense of various oddities you would have already encountered.

If you skip straight into the structure of an executable with its data segments and whatnot then you will turn the students into test passing zombies. Whereas if you had a contest later on in the course where you had the students make the smallest executable that they can by stripping out all the extraneous crap needed then they would probably have an ah ha moment that would set the knowledge in stone.

I have been programming for a zillion years but wasn't solid on some of the innermost areas of modern CPUs and how they processed instructions. So I watched a lecture series from one of the better universities. While the students were mostly quite smart they frequently asked really really stupid questions. A frequent classic was about uninitialized variables and why they were so bad. I easily heard 10 variants of that question. This was a course where the nitty gritty explaining pretty much how registers are actually architected on the CPU yet the students still didn't grasp something so simple as uninitialized variables and their potentially wonky contents. I really felt bad for them having to basically memorize all this crap without having any feel for what they were learning. My guess is that even after they progressed on to more project related work that they would not necessarily connect the arcane knowledge that they had so diligently crammed into their heads with problems they will eventually encounter.

That about sums up my distaste for most CS teaching and most CS related textbooks. Nature of code is a wildly refreshing exception.

Re:Nature of Code (0)

Anonymous Coward | about a year ago | (#43246689)

You have ideas, Go help!

Clarify, are you writing a tutorial or a reference (1)

bored (40072) | about a year ago | (#43246475)

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, similar to many of the online tutorials that can be found. It might not sound impressive, but a student probably should be spending the majority of their time writing code, not reading about writing code. So, with that said, a tutorial that covers the usual variables, arrays, loops, functions, classes, and stops before getting into multiple inheritance, operator overloading, templates, exceptions and dozens of other C++ concepts that are deep dark holes (especially when combined) isn't really going to be that large. The problem of course is, that if you choose to ignore 50% of the keywords that aren't strictly necessary to write useful programs, the students will be left in the dark about a lot of the ugly edge cases. Take exceptions, its entirely possible to go a whole semester or two, and not have to teach anything about C++ exceptions. Of course, the resulting code won't be checking for new/construction failures.

Frankly, teaching one of the large programming languages (like C++, Java, C#, etc) at the university is going to be helpful for industry, but the vast majority of the students aren't even going to score "proficient" in those languages after just a couple semesters. The whole CS program is going to have to standardize on C++ for all the classes, and even then a graduating student simply isn't going to have the time to learn enough about C++ that they won't have to be on a tight leash for the first year or 5 of their career. C++ is a fantastic language for professional development. Its problem is that your average programer probably has to write 100k lines of C++ code and read a similar amount of other peoples code before they are proficient enough to be trusted. Part of the problem is the environment C++ programs run in. POSIX and windows both are full of gremlins, just waiting for the newbie programmer to miss some esoteric edge condition that happens on real hardware..

It's allready being done. (0)

Anonymous Coward | about a year ago | (#43246747)

I don't see the point of this. It's a kickstarter to fund a reduplication of already existing projects.
Specifically: http://en.wikibooks.org/wiki/C%2B%2B_Programming

Military (0)

Anonymous Coward | about a year ago | (#43246777)

Is everything in the US part of the military?!
Yuck.

Unrealistic (1)

anyaristow (1448609) | about a year ago | (#43247183)

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 already available because it's free, then you're just pawning reverse progress off as principle.

Already exists, its called The Web (1)

TheSkepticalOptimist (898384) | about a year ago | (#43247239)

If you have to learn code through a textbook, you already failed.

Re:Already exists, its called The Web (1)

jehan60188 (2535020) | about a year ago | (#43247655)

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 (0)

jehan60188 (2535020) | about a year ago | (#43247701)

$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:sounds like someone just wants a kickstarter (2)

phaedryx (1826532) | about a year ago | (#43247931)

$5000?!

It's $500, not $5000

Re:sounds like someone just wants a kickstarter (1)

jehan60188 (2535020) | about a year ago | (#43250075)

my other questions are still relevant
also, $500 is definitely low enough to fund via traditional means (grant writing, etc)

Free Advertising. . .thanks. . . . (0)

Anonymous Coward | about a year ago | (#43250551)

Great, just because some guy is familiar with /. then he gets a round a free advertising.

Guess he doesn't know about Khan Academy. Sal has been there, and done that, so good luck with your little project. Thanks though for at least being honest about using the free labor of students for your own gain.

Steal from the best, would ya? www.khanacademy.org for your programming (and other) educational needs. Hmm, I think MIT has probably released something too.

What school are you from again?

Re:sounds like someone just wants a kickstarter (0)

Anonymous Coward | about a year ago | (#43250965)

Right. There are tons of online resources for just about any programming language and plenty are free. Trying to make money off of this seems cheap.

wikibooks (1)

Anon8---) (1981904) | about a year ago | (#43252003)

Uh guys... why start a new project? How about just contributing to something that already exists [wikibooks.org] ?

Ignorance begets more confidence than knowledge... (1)

recrudescence (1383489) | about a year ago | (#43253707)

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 professionals like scientists or doctors: just because they're good at what they do (and well-respected for it), they automatically assume that they can make amazing teachers without a day's worth of educational training. Result? Usually they suck at transmitting their ideas and they take it out on the students

Nice project though, I pledged, for what it's worth. The open (and reviewable) nature of the book alone promises that it has good potential :)

Check for New Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Create a Slashdot Account

Loading...