Post History
In most technology books, a chapter tackles a single subject in depth. For example, "looping" in a language, the FOR loop; WHILE loop, DO WHILE, DO UNTIL, etc. In beginner books, syntax and the r...
Answer
#4: Attribution notice removed
Source: https://writers.stackexchange.com/a/33853 License name: CC BY-SA 3.0 License URL: https://creativecommons.org/licenses/by-sa/3.0/
#3: Attribution notice added
Source: https://writers.stackexchange.com/a/33853 License name: CC BY-SA 3.0 License URL: https://creativecommons.org/licenses/by-sa/3.0/
#2: Initial revision
In most technology books, a chapter tackles a single subject in depth. For example, "looping" in a language, the FOR loop; WHILE loop, DO WHILE, DO UNTIL, etc. In beginner books, syntax and the reason for it are discussed. What is the importance of the semi-colon in C, or the curly braces {}? What is a FUNCTION in C? What is a SUBROUTINE? What is a MACRO? You can have a chapter on COMPILERS vs INTERPRETERS. With COMPILERS, LIBRARIES. Typically, multiple chapters can exists on these topics: One for beginners that show the basics of syntax or functions, another that shows advanced uses of functions. In C, you might want to begin with simple functions, but have functions with variable numbers of parameters (like the PRINTF family), or recursive functions, discussed in a later chapter about more advanced topics. Likewise, a beginner chapter on variables may not get into pointers \* and addresses &, but a later chapter probably would. You could devote a chapter to how to DEBUG a program, both by adding code or print statements, or by using a debugging tool. You could devote a separate chapter to parallelism, including different flavors of it: PTHREADS vs MPI, for example. You could devote a separate chapter to memory handling: MALLOC, CALLOC, FREE, etc. You could devote a separate chapter to File handling, and perhaps a more advanced chapter on DATABASE handling. You could devote a separate chapter to handling time, processing dates, timing operations. You could devote a separate chapter to optimizations; making code run faster. You could devote a separate chapter to sorting. You could devote a separate chapter to constructing and using indexes. In some languages, like Javascript, you might want a chapter on graphics, or using various libraries that provide interactive graphical charts and such. You might want a chapter on DEVICES, capturing sound, snapshots or video, and what you can do with those things. Communicating with a printer or some other external device. ## Chapters group together the things that naturally go together. Once you figure out your topics, you can use your programming ability to arrange them in a dependency tree: Some topics depend upon previous topics, so the previous topic chapters should come first. You don't want to have to explain the rules of syntax when you are explaining how to manage memory.