|
3 of 3 people found the following review helpful:
1.0 out of 5 stars
BOOK WAS NOT READY FOR PUBLISHING, 15 Jul 1999
By A Customer
I have purchased this book with only the desire to learn the C language. What I got was a way to get lured into someone else's schemes of making either a quick buck or a quick fame (neither of which should work in this fashion). It does not serve SAMS reputation at all to have its name behind the undigested book material publishing. FIRST OF ALL, UNLIKE all the other reviews I have read or seen about Tony Zhang's book "SAMS Teach Yourself C in 24 hours" (ISBN# 0672310686) I have CONCRETE points of fault I found with this book and the logic behind it. Before deciding to pour out this criticism of this book I have tried every which way possible to reach either Mr.Zhang or MacMillan technical support by e-mail, regular mail and phone. Needless to say they all were UNRESPONSIVE. Zhang's e-mail is invalid, SAMS e-mail did not reply. I wanted to discuss with the author the glaring problems I encountered while going step-by-step through the his material. SAMS tech support (number is NOT toll-free and is another number you get after you call 317-581-4669) was INSULTING. No recorded voice remains after the call and ONE only assumes he or she is on hold because the line offers no sound to indicate that someone will be with you).Point#1: ALLOCATING MEMORY TEXT AND EXAMPLES. On page 260 (ch.17) author states an incorrect statement: "Because the malloc() function returns a VOID pointer, its type is automatically converted to the type of the pointer on the left side of an assignment operator." IT IS FALSE. It does not work with all the compilers (at least none of those I tested it with which are the included TC and the Visual C++ 4.2) and consequently it should have been phrased with the universally valid approach as the book by K&R "C Programming Language" shows on page 167 Section 7.8. Instead of Zhang's invalid or unexecutable code in his examples that follow such as the line 14 in listing 17.1, K&R show an example of the same function THAT DOES WORK because they use the casting operator:INT *IP; IP = (INT*) CALLOC(N, SIZEOF(INT)); THE KEY IS TO USE (INT*) TO CAST THE RETURN TYPE OF THE MALLOC(). Contrary to Zhang, compiler cannot assign INT to a void type, so it needs a (int*) type casting. Zhang should be more informed and read some of the classics of programming like K&R. I am personally offended and insulted by the treatment I received from SAMS and the deliberate lack of response from Mr.Zhang. I only wanted to contact them because I thought I was doing something incorrect and needed clarification, or if I were right I wanted them to recognize the error so that they do not repeat the same error in the future. They seal-off the reading public. There are other problems--but this malloc() problem that repeats with the other memory allocation function basically invalidates the whole Chapter 17 in his book and misleads the beginner programmers by taking them on the wrong track. Point#2: There are quite a few other examples after chapter 16 that DO NOT WORK AS PRESENTED IN THE BOOK. I.E. listing 18.3 (because of inherent error form ch.16), listing 18.5, listing 19.4 ("floating point formats not linked-abnormal termination-). Some examples in the book are useless with the provided TC compiler but work OK with Visual C++ (4.2). So Mr.Zhang should have done his examples on TC lite rather than on Visual C++ which is not fully compatible with the one his readers are set to use. Example: listing 9.7 is a case in point. It is UNFAIR to them. Some other review raised the point about Appendices (in PDF format you need Adobe Acrobat to read). I called MCMillan customer service and was told to use Appendices of the book loaded onto the accompanying CD WHICH IS WHERE THE SOLUTIONS ARE. Saving on paper for publishing is what it is. Answer to exercise 5 in ch.19 given in the solution Appendix is wrong because it is based on listing 19.7 referred to above. There are also some missing function declarations that make examples unexecutable. Overall, the book is good if one wants to learn how to incorporate ancient wisdom with modern computers (each chapter has a gorgeous selection of proverbs). Overall I feel I did not waste my money simply because the way the book is presented forced me to struggle harder to get to the bottom of problems. It feels good to know that you can troubleshoot on your own the material done by a "masters degree in physics and a [busybody] on solid-state lasers, programming, etc" such as Tony Zhang is stated to be. But had I known this ahead I would still not have bought it. It is not worth the money it costs to me. A good introductory book on C is a book like "Programming in C" by Stephen Kochan 2/88 (ISBN# 067248420x). It is HASSLE-FREE!
|