Expert C Programming Quotes
Expert C Programming: Deep C Secrets
by
Peter van der Linden851 ratings, 4.33 average rating, 48 reviews
Expert C Programming Quotes
Showing 1-10 of 10
“You can count in binary on your fingers up to 1023.”
― Expert C Programming: Deep C Secrets
― Expert C Programming: Deep C Secrets
“Never forget that when you point the finger at someone, three of your own fingers are pointing back at you...”
― Expert C Programming: Deep Secrets
― Expert C Programming: Deep Secrets
“The keyword const doesn’t turn a variable into a constant! A symbol with the const qualifier merely means that the symbol cannot be used for assignment. This makes the value read-only through that symbol ; it does not prevent the value from being modified through some other means internal (or even external) to the program.”
― Expert C Programming: Deep C Secrets
― Expert C Programming: Deep C Secrets
“Virtual Memory If it’s there and you can see it—it’s real If it’s not there and you can see it—it’s virtual If it’s there and you can’t see it—it’s transparent If it’s not there and you can’t see it—you erased it! —IBM poster explaining virtual memory, circa 1978”
― Expert C Programming: Deep Secrets
― Expert C Programming: Deep Secrets
“Some, perhaps most, of the IBM decisions about the PC were definitely made on non-technical grounds. Before deciding on MS-DOS, IBM arranged a meeting with Gary Kildall of Digital Research to consider CP/M. On the day of the meeting, so the story runs, the weather was so good that Gary decided to fly his private plane instead. The IBM managers, perhaps annoyed at being stood up, soon cut a deal with Microsoft instead.”
― Expert C Programming: Deep Secrets
― Expert C Programming: Deep Secrets
“A master was explaining the nature of the Tao to one of his novices. “The Tao is embodied in all software—regardless of how insignificant,” said the master. “Is the Tao in a hand-held calculator?” asked the novice. “It is,” came the reply. “Is the Tao in a video game?” continued the novice. “It is even in a video game,” said the master. “And is the Tao in the DOS for a personal computer?” The master coughed and shifted his position slightly. “That would be in the stack frame Bob, and the lesson is over for today,” he said. —Geoffrey James, The Tao of Programming”
― Expert C Programming: Deep Secrets
― Expert C Programming: Deep Secrets
“When Arrays Are Pointers The C standard has the following to say about the matter. Rule 1. An array name in an expression (in contrast with a declaration) is treated by the compiler as a pointer to the first element of the array1 (paraphrase, ANSI C Standard, paragraph 6.2.2.1). 1. OK nitpickers, there are a few minuscule exceptions that concern arrays treated as a whole. A reference to an array is not replaced by a pointer to the first element when: • the array appears as the operand of sizeof()—-obviously you want the size of the whole array here, not just a pointer to it. • the array’s address is taken with the & operator. • the array is a string or wide-string literal initializer. Rule 2. A subscript is always equivalent to an offset from a pointer (paraphrase, ANSI C Standard, paragraph 6.3.2.1). Rule 3. An array name in the declaration of a function parameter is treated by the compiler as a pointer to the first element of the array (paraphrase, ANSI C Standard, paragraph 6.7.1).”
― Expert C Programming: Deep Secrets
― Expert C Programming: Deep Secrets
“When the ANSI C standard was under development, the pragma directive was introduced. Borrowed from Ada, #pragma is used to convey hints to the compiler, such as the desire to expand a particular function in-line or suppress range checks. Not previously seen in C, pragma met with some initial resistance from a gcc implementor, who took the “implementation-defined” effect very literally—in gcc version 1.34, the use of pragma causes the compiler to stop compiling and launch a computer game instead! The gcc manual contained the following: The “#pragma” command is specified in the ANSI standard to have an arbitrary implementation-defined effect. In the GNU C preprocessor, “#pragma” first attempts to run the game “rogue”; if that fails, it tries to run the game “hack”; if that fails, it tries to run GNU Emacs displaying the Tower of Hanoi; if that fails, it reports a fatal error. In any case, preprocessing does not continue. —Manual for version 1.34 of the GNU C compiler”
― Expert C Programming: Deep C Secrets
― Expert C Programming: Deep C Secrets
“Abstraction is useful in software because it allows the programmer to: • hide irrelevant detail, and concentrate on essentials. • present a “black box” interface to the outside world. The interface specifies the valid operations on the object, but does not indicate how the object will implement them internally. • break a complicated system down into independent components. This in turn localizes knowledge, and prevents undisciplined interaction between components. • reuse and share code.”
― Expert C Programming: Deep Secrets
― Expert C Programming: Deep Secrets
“Abstraction is the notion of looking at a group of “somethings” (such as cars, invoices, or executing computer programs) and realizing that they have common themes. You can then ignore the unimportant differences and just record the key data items that characterize the thing (e.g., license number, amount due, or address space boundaries). When you do this, it is called “abstraction”, and the types of data that you store are “abstract data types”. Abstraction sounds like a tough mathematical concept, but don’t be fooled—it’s actually a simplification.”
― Expert C Programming: Deep Secrets
― Expert C Programming: Deep Secrets
