Steve Eaton
asked
Jonathan Eaton:
How did Kernighan and Ritchie influence your careful mis-en-scene construction in The Prairie Martian?
Jonathan Eaton
Ha! I wondered who would read my list of “influences” and know who Kernighan and Ritchie were. Now I know. To answer to your question:
First, for the non-software developers who might read this, BASIC and C are two very different computer programming languages. Writing a BASIC program is like taking a bus (in a city with darn good public transportation): Advantages: You can get where you want to go without having to know anything about stoplights or one-way streets or speed-limits, etc. Disadvantages: you don’t get to pick the route, or exactly when you are going to arrive. Writing a C program is like driving a car. Advantages: You get to pick the route (presumably the shortest, or quickest, or most scenic), and can determine (more-or-less) when you’re going to leave and when you’re going to get there. Disadvantages: You _do_ have to understand traffic signals and other rules of the road, and perhaps, most importantly, you have to keep an eye on the gas and temperature gauges.
In short, C is a more technical, less human-friendly, language than BASIC, and requires a better understanding of fundamental concepts of computers and information processing. You would think, then, that a manual for the C programming language would also be less human-friendly. But what struck me about Kernighan and Ritchie’s classic “The C Programming Language” was that it was clearly written with the humanity of software developers in mind. It is not simply a list of keywords and a grammar definition. It includes examples of usage, and comments on how those code snippets might be improved or revised for different purposes—but more importantly, it addresses the reader as though he/she were human. Take, for example, the operation of _while_ and _for_ loops: The manual could have described a particular circumstance as follows:
“if the ‘while’ or ‘for’ loop test fails when first encountered, the body of the loop will never be executed, and execution will proceed with the next statement outside the loop”
But, instead, the manual says: “One of the nice things about ‘while’ and ‘for’ is that they test at the top of the loop, before proceeding with the body. If there is nothing to do, nothing is done.”
Simply by using the word “nice”, K&R let the reader know that _they_ know they are addressing a human being, not some mindless programming automaton. In other words, K&R’s “The C Programming Language” is human-friendly interface on an inhuman/human-unfriendly construct.
Now, about the influence of K&R on “The Prairie Martian” . . .
First, for the non-software developers who might read this, BASIC and C are two very different computer programming languages. Writing a BASIC program is like taking a bus (in a city with darn good public transportation): Advantages: You can get where you want to go without having to know anything about stoplights or one-way streets or speed-limits, etc. Disadvantages: you don’t get to pick the route, or exactly when you are going to arrive. Writing a C program is like driving a car. Advantages: You get to pick the route (presumably the shortest, or quickest, or most scenic), and can determine (more-or-less) when you’re going to leave and when you’re going to get there. Disadvantages: You _do_ have to understand traffic signals and other rules of the road, and perhaps, most importantly, you have to keep an eye on the gas and temperature gauges.
In short, C is a more technical, less human-friendly, language than BASIC, and requires a better understanding of fundamental concepts of computers and information processing. You would think, then, that a manual for the C programming language would also be less human-friendly. But what struck me about Kernighan and Ritchie’s classic “The C Programming Language” was that it was clearly written with the humanity of software developers in mind. It is not simply a list of keywords and a grammar definition. It includes examples of usage, and comments on how those code snippets might be improved or revised for different purposes—but more importantly, it addresses the reader as though he/she were human. Take, for example, the operation of _while_ and _for_ loops: The manual could have described a particular circumstance as follows:
“if the ‘while’ or ‘for’ loop test fails when first encountered, the body of the loop will never be executed, and execution will proceed with the next statement outside the loop”
But, instead, the manual says: “One of the nice things about ‘while’ and ‘for’ is that they test at the top of the loop, before proceeding with the body. If there is nothing to do, nothing is done.”
Simply by using the word “nice”, K&R let the reader know that _they_ know they are addressing a human being, not some mindless programming automaton. In other words, K&R’s “The C Programming Language” is human-friendly interface on an inhuman/human-unfriendly construct.
Now, about the influence of K&R on “The Prairie Martian” . . .
More Answered Questions
Raymond Elmo
asked
Jonathan Eaton:
19th century Texas trivia question: turnvereins. I was in the back end of Houston, saw a ruined building with the word 'turnverein' carved over an ornate door. Asked my mom. She said it was a dance club in the '30s. Apparently in her grand-parents time it was a political/social movement. Ever heard of them?
About Goodreads Q&A
Ask and answer questions about books!
You can pose questions to the Goodreads community with Reader Q&A, or ask your favorite author a question with Ask the Author.
See Featured Authors Answering Questions
Learn more