Slashdot Mirror


Errata in Programming Books?

WgT2 asks: "I recently have set my mind to learning to code PHP. Not being a programmer, yet, I went out and got myself a book on the subject from a very trusted, at least in my eyes, publisher (and they still still are). So far so good. However once I got down to trying the code out myself I have found too much errata for someone who has just scratched the surface in learning the ins and outs of programming. I was wondering just how common place Slashdot readers have found errata in the code examples of programming books they have purchased?"

14 of 55 comments (clear)

  1. Frequently... by stefanlasiewski · · Score: 4, Interesting

    Tough subjects, tight deadlines, and the profit-first additude lead to bad books.

    I recently purchased Learning Java from Oreilly. Usually I've had a good experience with Oreilly books, but this one was horrible. Several of the examples in the first chapter of the book didn't work because they had typos!

    Few things are more frustrating then debugging a "Hello World" program that doesn't work. I went over every character, bit by bit, and my program matched their text exactly. I couldn't find the damn bug. Was I so stupid that I couldn't see the obvious? No! I viewed the Online Errata, and found that a zillion other people were having similar problems with examples throughout the book! Typos galore!

    If there are too many mistakes in the book, then let the publisher note. Return the book, get your money back, send a note to the publishers, and buy an alternative book.

    --
    "Can of worms? The can is open... the worms are everywhere."
  2. It's very common by Hanashi · · Score: 2, Informative
    It's quite common to find errors in technical books. Some of them are simply typos, others are more complex. In the process of producing a book, the text goes through several hands. The author writes it, of course, then various editors all have their fingers in it. Generally they make it better (that's a plug, if my editors are reading 8-) but sometimes mistakes happen. Overall, writing a book is just such an enormous amount of work and there are so many people involved, mistakes are a given.

    Many (most?) books publish errata on their web pages or on their publisher's site. I've even got a few books that had printed errata folded up and stuck into the cover. I don't mind seeing a reasonable number of errors in a book, especially a very technically dense book, as long as I see that the author and/or publisher makes the errata sheets easily available. After all, we're all only human.

    --
    Check out my eclectic infosec blog at InfoSecPotpou
  3. obligatory by Satai · · Score: 3, Interesting

    Someone has to make a Knuth joke. I tried, couldn't come up with anything. Come on people!

    Here's his errata.

    My favorite is the Random Number error. It took a while, but someone discovered that apparantly one of the portable random number generators behaves poorly during the first 2000 or so of each seed number. So, naturally, Dr. Knuth corrected it almost immediately.

    Never have I seen a man so humble that so amply deserved to be arrogant...

  4. Thoughts from an O'Reilly Author by Anonymous Coward · · Score: 4, Interesting

    The book I wrote had quite a bit of errata with some simple topics, and not much on the hard topics. I simply didn't spend enough time on the first half of the book, and I regret it.

    What really killed my time was adding more content to the book than initially planned. I should have left it all out, but at the time I thought I had the rest of the book nailed down. I should have spent more time reviewing, and getting more feedback from the reviewers.

    If any of you write a book, be sure to stick to the initial plan, and do no more. You might even want to cut out some of the content... don't just write to add more pages to the book. That is one thing I hate about Wrox books, imho, and I did a little bit of that myself :-(

    Of course, there are always second printings, and second editions to incorporate the fixes, but that doesn't fix the disappointment of finding the errors in your own book the first time around.

  5. Don�t necessarily blame the author� by (H)elix1 · · Score: 2, Interesting

    More often than not, it is the editors who are at blame rather than the authors. First off, my bride was a technical writer. I'm still not quite sure what that means, but as an English / Math double major without any coding experience, some of the results were quite comical. A while back she was fixing the Engrish descriptions, code fragments, sql scripts, and a mix of other stuff. She went back to the developer because they possibly misspelled pseudo as sudo. She had the sense to not 'spell check' the scripts, but another friend who wrote a Perl book said his editors were not quite as thoughtful.

  6. Re:PHP by tha_mink · · Score: 2, Funny

    yeah...learn perl so when there is a REAL explosion at the punctuation factory, you'll know what to do.

    --
    You'll have that sometimes...
  7. One Recent Problem by TheWanderingHermit · · Score: 2, Informative

    I haven't done any programming in over a decade. I recently had to start learning a lot of new information and bought several stacks of books. I found the O'Reilly books to be VERY helpful. In the past I always found Sam's to be informative and helpful as well, but I found Sam's MySQL in 24 Hours to be rather frustrating because of little errors here and there.

    Above and beyond the errors, I don't know if it's because the book is a "in 21 Days" format or not, but I've found it rather frustrating and useless in the long run because it does not work well as a reference book and it seems there is A LOT that has been left out.

    I will not likely buy another book in any "in 21 Days" or "in 24 Hours" or any similar format again. While they may provide a quick intro, it seems to be a week format if you plan to continue in the subject.

    1. Re:One Recent Problem by Bradee-oh! · · Score: 2, Funny

      I will not likely buy another book in any "in 21 Days" or "in 24 Hours" or any similar format again. While they may provide a quick intro, it seems to be a week format if you plan to continue in the subject.

      I disagree. Isn't the "In 7 Days" format the week one?

      --
      "This is Zombo Com, and welcome to you who have come to Zombo Com" - www.zombo.com
  8. All right, I'll give it a try. by Henry+V+.009 · · Score: 2, Funny

    He's complaining about too much errata? Knuth's $2.56 checks were my goddamn college beer budget!

  9. Look to the publisher's site by babbage · · Score: 4, Informative
    Most (all?) of the publishers today will have a web site dedicated to each title, and the better ones (all again?) will have an errata page somewhere in there. Look for it. Consider basing purchasing decisions on the presence & quality of that errata page:
    • If it has such a page, and it's short (all books will have at least some typos -- that's life), then you're in good shape.
    • If it looks like the errata page is updated often, that's also a good sign -- it means the publisher is paying attention. That may be even better.
    • If it has an errata page, and it's really long, then maybe the book is just sub-par: be careful here.
    • If it has no errata page, the publisher is lying, or hasn't gotten around to it yet: be careful here, too.

    I don't know which book you got, but O'Reilly's Programming PHP has its own confirmed and unconfirmed errata pages. If this is the book you've got, feel free to go over the corrections noted on these pages and jot them down in your copy -- I've done that with a couple of my books, and would have missed many of the glitches without that hint. If you see an error that isn't on this page, O'Reilly offers a error submission form that you can use for that book (and others of course) -- so use it! If the publisher doesn't find out about these mistakes, they aren't going to get fixed. A good publisher will offer revised printings -- not that that helps you once you've got a copy, but it will prevent other learners from having to hit the same obstacles you did. :-)

    You can't, unfortunately, expect books to be perfect & pristine. (Well, maybe Knuth's books, but everyone else has to deal with typos & thinkos :-). You can, however, and should expect the publisher to own up to their little mistakes and offer you corrections on their site. Go find that info and get the fixes into your copy and you'll be a happier camper.

  10. Errata Schmerrata by tres · · Score: 3, Insightful
    Errors in examples give you the responsibility of thinking about the code. You've got to understand what it is doing, rather than just mimicking the examples.

    Believe me, I've spent my fair share of time and frustration trying to debug bad examples. It took a long time to learn, but when I don't trust the author, I find that the errors are more challenging than frustrating.

    A couple of O'reilly books in particular, Steve Oualline's Practical C Programming and his Practical C++ Programming purposely have errors in the examples for just this reason.
    The difference is, Steve tells you that the errors are there. It's a good learning technique, and forces you to pay attention to the concepts rather than the examples.

    --
    Notes From Under *nix: blas.phemo.us
    1. Re:Errata Schmerrata by tres · · Score: 2, Interesting

      I have two kinds of programming books on my shelves. One kind is an introductory book, the other is a reference. My reference books I use all the time. But the introductory books are darn near disposable. After reading them, they become paperweights. Don't get me wrong, they are a necessary part of learning, but after I've learned what they have to give, it's a rare case that I might pick them up again.

      The reference books I have are always a source of new information. These always seem to be much more accurate than the introductory books in the code examples that are given.

      The point I'm trying to make is not that the student has done something wrong, but that the student should not trust the author of an introductory book. Interpreting the information with a sceptical eye means that the student, rather than being frustrated by mistakes, can look at the mistakes in code as a challenge.

      It may make someone feel good to have made something that works, but in the end, feel-good programs don't really teach you that much. It's the concepts behind the program that are important.

      I agree that experimenting really does a good job of teaching, but experimentation is going above and beyond what the book has to offer.

      --
      Notes From Under *nix: blas.phemo.us
  11. Favorite statement by michael_cain · · Score: 2, Interesting
    Many years ago (pull it off of the "old textbook" shelf, copyright is... 1976, I am getting so old), Kernighan and Plauger wrote "Software Tools." One of my favorite statements made in the introduction is
    Every program in this book has been run and carefully tested, directly from the text itself, which is in machine-readable form.
    I suppose some of the code fragments can't be checked this way, but at least testing the bigger pieces of code can be automated. Of course, this assumes that at some point the files are turned over to the publisher who does not mess with them any more. Not a safe assumption -- I wrote an article for an IEEE journal and approved the "final" version, which was then mangled by another editor and sent to press. I spent weeks trying to explain to people that I could write better than that...
  12. May not be coding in the book by Merlin_1102 · · Score: 2, Informative

    Personally I have come across few typing errors in books (then again I RARELY try any of the code they offer in books). I personally have several PHP books and if you are just starting to learn PHP please be aware that the language goes through like 4 updates a month or something like that. I remember when I first tried to learn PHP I attempted some of the code and it would not work. This was because from the time the book was published to the time I got it the PHP language had changed. Some of the defaults were changed etc... so things did not work the way i intended them to (changing it so all variables were not global by default drove me nuts until I firgured out what was wrong).

    Basically the point I am trying to make is that with PHP some times the problem may not be with errors in the code, but may be with the fact that the language has changed and no longer supports what you are trying to do... Having saying this if you cannot get a "Hello World" Program to work then I would be a bit suspicious as to whats wrong.