Programming Books C Java PHP Python Learn more Browse Programming Books
Buy New
$19.01
Qty:1
  • List Price: $24.95
  • Save: $5.94 (24%)
FREE Shipping on orders over $35.
Only 2 left in stock (more on the way).
Ships from and sold by Amazon.com.
Gift-wrap available.
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

How Not to Program in C++: 111 Broken Programs and 3 Working Ones, or Why Does 2+2=5986 Paperback – March 1, 2003

ISBN-13: 978-1886411951 ISBN-10: 1886411956 Edition: 1st

Buy New
Price: $19.01
45 New from $8.72 49 Used from $2.04
Amazon Price New from Used from
Hardcover
"Please retry"
Paperback
"Please retry"
$19.01
$8.72 $2.04
Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student


NO_CONTENT_IN_FEATURE

Shop the new tech.book(store)
New! Introducing the tech.book(store), a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Product Details

  • Paperback: 280 pages
  • Publisher: No Starch Press; 1 edition (March 2003)
  • Language: English
  • ISBN-10: 1886411956
  • ISBN-13: 978-1886411951
  • Product Dimensions: 9.2 x 7.1 x 0.8 inches
  • Shipping Weight: 1.2 pounds (View shipping rates and policies)
  • Average Customer Review: 3.6 out of 5 stars  See all reviews (14 customer reviews)
  • Amazon Best Sellers Rank: #1,405,133 in Books (See Top 100 in Books)

Editorial Reviews

Review

". . . a unique book that is fun to read while still providing valuable information." -- CodeGuru.com

". . .[like] cross training with the drill sergeant of debugging. . ." -- Chris Pelsor, Flash Developer

"If you have been programming in C++ for a while, this book is and excellent addition to your bookself." -- Gerard Beekmans, DevChannel.org

About the Author

Steve Oualline lives in Southern California, where he works as a software engineer for a major phone company. In his free time he is a real engineer on the Poway Midland Railroad. Steve has written almost a dozen books on programming and Linux software. His web site is http://www.oualline.com .


More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

Now, if you learn by other peoples mistakes you should buy this book immediately.
Jack D. Herrington
Page 32 would be clear from syntax highlighting (and has needless use of pointers and alters comment style part-way though so that the 'broken' one will compile).
Yaverot
This is a book that I find myself picking up over and over to read just a little farther.
Bradley Jones

Most Helpful Customer Reviews

55 of 59 people found the following review helpful By A Customer on April 4, 2003
Format: Paperback
The concept of this book is good, but the execution is seriously lacking.
The "bugs" in Mr.Oualline's programs are the kinds of errors only the most unskilled novices would make: a missing space character in a format statement; accessing a 5-element array with index values of 1 thru 5; a class whose constructor allocates storage but whose destructor doesn't release the memory. Trivial, easy-to-spot errors that don't really expand anyone's grasp of C++.
To add insult to injury, large portions of the book are filled with Mr.Oualline's tiresome war stories and aphorisms.
A much better source of knowledge is "C++ Gotchas", any of Scott Meyers' books, or the "C++ FAQ".
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
13 of 14 people found the following review helpful By David Minogue on May 8, 2003
Format: Paperback
This book illustrates several common errors that every C++ programmers will encounter. There is no substitute for learning from your own mistakes, but forewarned is forearmed. If you read this book before you make the mistakes, you will save yourself some time. The humor scattered through the book helps keep the subject light.
Unfortunately, the book is flawed beyond those bugs which were introduced intentionally. In one case a program was unintentionally corrected, leaving no errors to be found. Some of the programs seem unnecessarily long for the bug they are illustrating. Like most computer programs, this book would have benefitted from peer review prior to its release.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
14 of 16 people found the following review helpful By Bradley Jones on March 31, 2003
Format: Paperback
Okay, maybe I should say, just plain fun in a geeky kind of way. This book is relatively inexpensive, thus making it well worth the price. If you programm in C++ (or even in C, C#, or Java), then you will most likely enjoy this book.
Unlike most computer books, this is not a book you read in order to learn how to to something. Rather, this is a book you read (1) to see if you already know how to do something, (2) if you like solving puzzles, (3) if you want to learn about a number of typical 'gotchas'.
This book presents listings (about 111+). Each seems to have something specifically wrong with it. You try to figure out the issue with a hint. You are can then get additional hints using a jump table. You are also given the answer as to what the gotcha is.
The book also contains a large number of trivia type information. This is folklore, funny stories, and more.
This is a book that I find myself picking up over and over to read just a little farther. It is fun. It is interesting. I'm even learning a thing or two. I've enjoyed it so much, I'll be writing a review on it for CodeGuru.com!
Congratulations to Steve Oualline on putting together one of the few fun-to-read computers books.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
6 of 6 people found the following review helpful By W Boudville HALL OF FAMETOP 1000 REVIEWERVINE VOICE on March 1, 2004
Format: Paperback
Are you the type of programmer who also likes logic puzzles, or chess problems and crosswords in newspapers? Did you ace the logic part of an SAT or GRE exam? Then this book is for you!
You are learning C++. Or perhaps you need a refresher. You may not be facile with all the nuances. Learn by doing. The book has 111 programs that don't quite work. All you need is enough discipline to work through the programs without peeking at the answers until you have give it your best try. The book assumes that you are already mostly familiar with the syntax of C++. While some programs explore the subtleties of this, the author expects that you can at least code a simple C++ task.
The programs are not antipatterns, though. I could not discern any higher level structure across the programs to suggest this.
Perhaps the best way to regard this book is as a cheap refresher exam. Mental stretching exercises.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
4 of 4 people found the following review helpful By Yaverot on January 15, 2010
Format: Paperback Verified Purchase
I am not a C++ expert by any means, but whoever titled this book didn't attempt to read it.
And I may be completely unfair, I am reviewing a computer book 7 _years_ after publication.
The title clearly indicates a book, where a sample program is given, and then an explanation of how and why it is wrong, and finally how to avoid those mistakes.
Instead, you're given a program listing (in standard black&white like most books instead of the color highlighted of a modern editor or IDE), and basically told there is a problem within the category of the chapter. Then it gives a hint & answer number (but not the page number those items reside on). Occasionally in the hints you receive the output of the program. A programming puzzle book of this nature could be quite interesting, but if that is the goal, mark it as a puzzle book and give it a difficulty rating.

Some of the problems with this book include the fact that the publisher's spellcheck fixed the bug on page 30, so that there is none to find. Page 32 would be clear from syntax highlighting (and has needless use of pointers and alters comment style part-way though so that the 'broken' one will compile). Chapter 5 is about C, not C++, while much C appears in C++ the book is about the later, not the former. Many of the bugs come from ignoring basic features of the language or coding idioms. In C++ you avoid the preprocessor as much as possible because C++ gives you language tools (templates to replace macros, global consts to avoid #DEFINEs). The book avoids const correctness and RAII.

So, what is good about the book?
The humor posted between the puzzles, including indicating what of the story is folklore. "This page left unintentionally blank." 'BASIC programmer: if I type WALK will it go slower?' Given the Marketplace price (instead of Amazon's new) it could be a 5 star computer humor book, with a bunch of other junk also in it, if you have that mindset when you pick it up.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Customer Images

Most Recent Customer Reviews