Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Programming

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."
This discussion has been archived. No new comments can be posted.

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

Comments Filter:
  • by toygeek ( 473120 ) on Friday March 22, 2013 @12:37AM (#43243603) Journal

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

    • by CaptQuark ( 2706165 ) on Friday March 22, 2013 @01:10AM (#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.
      • by Anonymous Coward

        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

        • by Annirak ( 181684 )

          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

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

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

    • 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

      • 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

    • by Rob Riggs ( 6418 ) on Friday March 22, 2013 @09:16AM (#43246177) Homepage Journal

      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

        • by Rob Riggs ( 6418 )
          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
    • 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.

  • by Anonymous Coward

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

    go away dum dum

    • 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

      • by AuMatar ( 183847 )

        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.

  • by MrEricSir ( 398214 ) on Friday March 22, 2013 @12:50AM (#43243647) Homepage

    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.

    • by Old Wolf ( 56093 )

      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)

      by Anonymous Coward

      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.

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

      • by jgrahn ( 181062 )

        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 thing a link was provided. Actually it was the only link I clicked.
  • 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.

    • by six025 ( 714064 ) on Friday March 22, 2013 @02:40AM (#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.

      • 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

      • by drolli ( 522659 )

        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.

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

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

      Then FORK IT!

  • Hey, thanks! I'm a beginner C++ dummie in Finland and will definitely check out your book.
  • 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 (Score:4, Interesting)

    by Psychotria ( 953670 ) on Friday March 22, 2013 @03:03AM (#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.

    • by katsh ( 2760437 )
      likewise. i donated $20. small steps in improving our education system.
      • 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

  • When you already have a high quality one [icce.rug.nl]!
  • "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?

  • 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]

  • 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

    • 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

  • 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
    • by u38cg ( 607297 )
      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 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.

  • by EmperorOfCanada ( 1332175 ) on Friday March 22, 2013 @08:58AM (#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.
    • 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

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

    • 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)

  • $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?

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

  • 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

Genius is ten percent inspiration and fifty percent capital gains.

Working...