How come The Resume Man/Writer didn't answer a critique of his C++ expertise??

greenspun.com : LUSENET : TB2K spinoff uncensored : One Thread

Nice Heller Head fake on this one but critic makes some serious charges that seem to be unanswered except by the usual "Heller SOP".


LINK


http://hv.greenspun.com/bboard/q-and-a-fetch-msg.tcl?msg_id=003Mpf

-- cpr (buytexas@swbell.net), June 25, 2000

Answers

For those who missed it. The critique includes some rather interesting charges which Mr. Perfect seems to prefer to ignore.


http://www.accu.org/bookreviews/public/reviews/o/o001796.htm

<a href="http://www.accu.org/bookreviews/public/reviews/o/o001796.htm"> ;LINK</a>

Book Review
------------------------------------------------------------------ --------------
Optimizing C++ by Steve Heller
ISBN: 0 13 977430 0 Publisher: Prentice Hall Pages: pp416C Price: #35-99
 
Categories: beginner's c++ optimization
Reviewed by Francis Glassborow in C Vu 11-2 (Jan 1999)
 
Despite quite liking the author's Whose Afraid of C++ I have long harboured a suspicion that he is not a C++ programmer. This book confirms that suspicion despite the C++ in the title.

For example on page 356 the author starts a version of main that covers three and a half pages (and there is a single comment - one of the author's optimisations seems to be to save time by not providing any). The function starts by declaring 26 variables, most are not initialised and 24 of them are for built-in types (or pointers to such). He defines at least another 14 variables during the rest of the program. He makes unnecessary assumptions about the size of an int (if it cannot store 884736 as a value, one of his loops goes into undefined behaviour).
All that is bad but the biggest indicator is that the only C++ specifics in his code are an ifstream instance, an ofstream instance, four uses of new and one use of delete and a scattering of uses of fstream member functions. He isn't even consistent. Sometimes he uses memset() and sometimes he iterates through an array of int setting each to zero. He does this in a loop that iterates 884736 times and he is writing about optimisation. Granted that the gain may be small but why did he do it that way in side a time critical section and used memset() elsewhere. We will never know. Perhaps a good optimising compiler identifiers what is happening and sets memory anyway.

The other problem that I have is the very concept that underlies the book. Too many programmers waste inordinate amounts of time hand optimising. To give the author credit, he does advise you to think before starting to work. If you run your tax program once a year, halving it execution time is unlikely to ever repay the programming effort involved in making the change.

However the most expensive resources in most programming projects are the human ones and the coding style that permeates this book does nothing to optimise use of that resource. In truth I think your time could be put to better advantage than in reading this book.

By the way, the author seems to think this is his third edition of this book. I think he means that it is derived from an earlier book that was itself derived from a book in C. In my opinion this is still a book in C with a light sprinkling of C++ (he even uses some smart pointers, but he forgets to provide a destructor for class that owns dynamic resources.) In conclusion, there are a few interesting ideas scattered through this book but not enough to repay time spent studying it.



-- cpr (buytexas@swbell.net), June 25, 2000.

Maybe he's smart enough not to bother.

-- Carlos (riffraff1@cybertime.net), June 25, 2000.

I've answered it on the other thread.

-- Steve Heller (Steve@SteveHeller.com), June 25, 2000.

"In truth I think your time could be put to

better advantage than in reading this book".

Like reading cpr posts. NOT.

-- (nemesis@awol.com), June 25, 2000.


Moderation questions? read the FAQ