Picture of author.

Robert J. Traister

Forfatter af Beginner's Guide to Reading Schematics

36 Works 179 Members 4 Reviews

Værker af Robert J. Traister

Mastering C pointers :tools for programming power (1990) — Forfatter — 28 eksemplarer
The joy of flying (1981) 6 eksemplarer
Going from BASIC to C (1985) 5 eksemplarer
The Master Handbook of Telephones (1981) 4 eksemplarer
Leaping from Basic to C (1994) 3 eksemplarer
Cave exploring (1983) 3 eksemplarer

Satte nøgleord på

Almen Viden

Køn
male

Medlemmer

Anmeldelser

The author, Robert J. Traister, does an excellent job of explaining pointers very clearly. His pedagogical style is quite instructive, straightforward, and understandable.

There are times the pedagogical style is more pedantic, particularly when Robert gets into the subject of code style, and comes off as unreasonably grumpy, with a "kids these days" attitude, set in old ways. Good source code style is very important for readability (and thus maintainability) of software, but the tenor of Robert's writing on the subject is off-putting and more focused on specific personal preferences as if they were universal absolutes than on the important principles of code clarity one might employ to ensure source readability.

This book addresses its topic in decent depth, though I found it disappointing that it did not delve much into the specifics of certain techniques that should really be more common (and commonly understood) in general C programming practice, such as declaring and using pure-pointer lists/arrays; practical uses of function pointers; and conscious trade-offs for readability, performance, and efficiency of various ways of assigning a variety of C objects' memory addresses to pointer variables (some of which might trade things off in ways contrary to simplistic assumptions of many programmers, including me). All in all, it seems like it should have a title more like A Substantial Introduction To C Pointers or something to that effect, instead of Mastering C Pointers.

Its approach starts with how one might use pointers as references to non-pointer variable types and data. This makes sense if you assume all C programmers start with C books and classes that do not pay enough attention to pointers, and do not start teaching them early enough (a somewhat reasonable assumption, unfortunately). I think it might be improved for at least some readers (like me) by teaching direct and more focused use of pointers first, then tying it back into references to other C objects later. This is a pretty minor matter in the overall value and quality of the book, though, and did not much affect my impression of its quality as a whole.

There are some errors in the book that detract from its immediate value if the reader takes everything directly with little investigation. At the time it was published (with a copyright date of 1990), these errors would be much more catastrophic; today, with the ease of online research, identifying and correcting errors in what the book teaches is a much more trivial exercise. System call and library function manpages on any reasonable Unix-like system (e.g. FreeBSD, many Linux distributions, and especially OpenBSD) can clear up some errors (see example 1 below), and a web search should be able to help with others (see example 2 below).

Finally, the author's focus on DOS as the assumed platform for learning and using the C programming language, and on the particulars of Turbo C (a proprietary compiler now obsolete), is in some ways just a sign of the time in which it was written. In other ways, it seriously damages the accessibility and applicability of examples and even explanations in the book. The entire chapter on direct memory access relies heavily on assumptions around the author's compiler, hardware, and operating system choices, though it effectively introduces the reader to the relevant principles at least.

The book's instructional value for introducing practical pointer use balanced against the above described shortcomings leads me to give a three star review here at Goodreads. I liked the book, but it was neither deeply revelatory nor exceptionally good.

EXAMPLES:

The following examples of errors in the book might not apply to a particular, non-standard C compiler in use at the time the book was written. I am not familiar enough with the author's apparent favorite compiler (Turbo C) from the time of the book's publication to be sure that these were erroneous code examples with the compilers and platforms Robert used while writing this book. I do know they are incorrect now, with standards-compliant C compilers, and the reader should be aware such problems exist in the text.

1. Explanation and use of the strlen() function leaves the reader with the misunderstanding that it returns the number of characters including the terminating ' ' in a string. This is incorrect. It does not include the terminating NULL of a string in its character count. Without correcting this error, a reader could introduce errors into software.

2. An example of writing a function that takes a variable number of arguments (i.e. a variadic function, also known as a function of indefinite arity, though Robert does not use these technical terms) simply does not work. Standards-compliant compilers (starting with ANSI/C89), such as Clang/LLVM with the "-std=c89" option will produce warnings (like too many arguments in call to 'add'). Though the code still compiles with those warnings, it produces garbage output rather than provide the expected functionality using the author's example.
… (mere)
 
Markeret
apotheon | 2 andre anmeldelser | Dec 14, 2020 |
Whether you're thinking about taking flying lessons or already are a student, this refreshing guide focuses on everything you need to know about becoming a pilot. Find out how to choose a flight instructor who's right for you. Learn what type of aircraft you want to fly. Get the facts on medical and FAA requirements, radio communications, pilot ratings, partnerships and clubs, aviation organizations, and more.
 
Markeret
MasseyLibrary | Apr 17, 2018 |
I skimmed this without a computer in front of me, plus its ancient, but it gave me a basic idea of what a pointer is. I would recommend something more current.
 
Markeret
jcrben | 2 andre anmeldelser | Aug 16, 2012 |
Chapter 7 "Pointers and Memory Allocation", pages 102 & 103:
"The strlen() function returns the total number of bytes in the string including the NULL." This is completely incorrect. Any reading of the ANSI-C standard or even K&R will tell you this function never includes the null-terminator in the count. Further exacerbating the situation are the listings written to allocate memory based on this faulty statement.

Chapter 7 "Pointers and Memory Allocation", page 135:
The author attempts to show how one can [incorrectly] write a function to accept a variable number of integer arguments. Any compiler would return an error stating something to the effect of "too many arguments to function 'add'".

Chapter 7 "Pointers and Memory Allocation", page 146:
This last example from the book intends to show [again - incorrectly] how to return a pointer from a function call. The code listed has a subtle but common error most beginners make - returning a reference to a local variable.

char *combine (s, t)
char *s, *t;
{
int x, y ;
char r[100] ;

strcpy (r, s) ;
y = strlen (r) ;

for (x = y ; *t != ' ' ; ++x)
r[x] = *t++ ;

r[x] = ' ' ;
return (r) ;
}

There are many, many more errors like this that render the book useless. In addition, these same errors can be found repeated almost line for line in his other published works ("Master C Pointers" ISBN 0126974098, "Conquering C++ Pointers" ISBN 0126974209). One would be better advised to spend their money on something more factually correct and readable such as:

The C Programming Language, Brian W. Kernighan & Dennis Ritchie, ISBN 0131103628
C: How to Program (any edition), Harvey Deitel & Paul Deitel, ISBN 0132404168 (5th Ed)
C Programming FAQs: Frequently Asked Questions, Steve Summit, ISBN 0201845199
C Programming: A Modern Approach (any edition), K. N. King, ISBN 0393979504 (2nd Ed)
The Standard C Library, P.J. Plauger, ISBN 0131315099
… (mere)
 
Markeret
erik.library | 2 andre anmeldelser | Jun 5, 2007 |

Måske også interessante?

Statistikker

Værker
36
Medlemmer
179
Popularitet
#120,383
Vurdering
3.0
Anmeldelser
4
ISBN
68
Sprog
2

Diagrammer og grafer