Computer Books Worth Reading
I’ve read a lot of computer books. Most of them are useless.
Here’s why.
They try to explain things I already know or don’t need to know. They take the approach that I’ve never seen a computer program before and start with HelloWorld.xyx. From there, they go on and on with details of the programming language’s types, syntactic idiosyncrasies, and how the if statement and iteration works. Could I care less? No.
So let’s get down to business with hints for authors of programming books from an occasionally humble reader.
Hints for Authors:
Most of your audience will already know how to code.
Unless you are writing an introductory programming book, that’s a different article, but read Moo & Koenig (see below) before you start writing.
Many learned programming in grammar school. You don’t need to copy the outline of a CS-101 textbook.
You don’t need to cover the basics of coding applications except to tell how your presentation material covers the basics
No one cares what print or for statements look like
It’s enough if you show working examples that demonstrate with sufficient coverage of variations and refer to documentation for those variations not covered that you consider important. In short, stick to your topic, and leave most syntactic discussion out.
Nobody needs to see a Hello World example. Ever.
- Avoid HelloWorld.abc like the plague. It’s a useless tradition. Start with something more substantial.
The Preface
- Encourage the use of git and online repositories
- Be agnostic about platforms and IDEs, but demonstrate with VSCode and your choice of OS. Avoid examples using proprietary products unless that is the topic you are writing about. If usage is really different between operating systems, explain the differences as needed.
- Mention all IDE add-ons that will be useful. Briefly explain what they’re for and how to obtain them.
- If a browser is involved, cover setting up recommended debugging extensions in selected browsers.
- Cover creating a directory to work with the book’s materials, getting and cloning the book’s code, and setting up a mirror directory for the user’s copy of the code.
- Explain that typos are a big part of how we learn a framework or library. The reading and reaction to error messages are crucial learning steps.
- Encourage the reader to create a mirror of the book’s code mostly by typing in the code instead of copying snippets from the book.
First Chapter
Please start with a real-world example with some meat on its bones.
Your example in Chapter should demonstrate more than one part of what you are writing about. Just enough to fit a chapter. At the end of the first chapter, the reader has built and is executing a program that does more than just one thing. It won’t be feature-complete, and you may want to explain what will be needed to make it production-ready eventually.”If you do mention the chapters that will add specific features
Start with an empty but completely production-ready directory structure.
The very first example should involve more than one file and a real project directory structure, complete with support for an IDE, with source, test, build, install, and other directories as needed.
If whatever you’re writing about won’t create this for you, do it manually as a command line code example with annotations explained in text below the example.
The first example should mirror the directory structure of a complete, polished, professional, production-ready application, even if some directories are left un-populated in the early chapters.
Toolchains, Other Libraries and Other Frameworks
If you are writing about a library or framework, tell me how it integrates with common toolchains, other libraries, or other frameworks.
Most of your code examples should be several lines long. Most of what we programmers do is done in similarly sized chunks. Show me annotated examples explained fully below the example. Explain what’s going on behind the scenes at each important step. If the step involves an iteration, tell me why we’re iterating, but don't explain how iteration works. If your example can be broken into steps, do so, but don’t cut it down to single-line examples except in rare cases where the single line deserves a lot of explanation. You want chunks of code that can be explained in detail in, at most, a couple of paragraphs. Tell me where the examples go in a specific filename and the order or scope in which it should appear.
Explain CSS? Sure. A couple of sentences or a short paragraph might serve, unless your book is ABOUT CSS! Instead, tell me how to integrate CSS into what your examples and my work based on what I learn from you..
If your examples use CSS, recommending CSS extensions for VSCode, and explaining where to place and how to refer to CSS for the environment you are writing about is useful. You may want to give general advice about CSS libraries and frameworks in the context of your topic.
This is an article under development. Feel free to contact me with suggestions for changes and things that need saying.
If you are aware of books that meet the following criteria, please let me know the author and title. I’m looking for outstanding books that go beyond just covering the basics.
- No more than a few hundred pages
- Focus on a set of frameworks or libraries
- Cover IDE tool usage in context
- Emphasis on and naming of Patterns applied
- Direct comparison of good and bad (or incomplete) practice
There are very few books I keep on my bookshelf and recommend others read before anything else.
Books that work
The best books cover just one thing, but do it in a way the topic in multiple real-world contexts. They also have an agenda that includes teaching me how to think like the authors in useful ways.
There are several examples which have earned their place on my bookshelf.
Accelerated C++: Practical Programming by Example
by Barbara Moo and Andrew Koening © 2000
You read that right, Copyright 2000, and it’s still relevant. This should be your first book if you are learning C++. Read it before you take CS101; you’ll be ahead of the game. If you missed it and are a beginning C++ programmer, pick up a used copy dirt cheap and read it this week. It’s only about 250 pages.
Vue.js 3 Design Patterns and Best Practices: Develop scalable and robust applications with Vite, Pinia, and Vue Router
by Pablo David Garaguso (Author), Olaf Zander (Foreword)
Want to build a Vue.js app and don’t know where to start? Want to know what a design pattern is? Have read GOF but remain clueless? This is the book for you. It inspired this article. I’m on chapter four.
A Little Java, A Few Patterns
by Matthias Felleisen, MIT Press 1997
This one is a bit of fun. I like its style, Programmed Learning, otherwise known as the Socratic Method.