A non-standard book list for software developers

< Home

Summary

[March, 2022] I view the field of software development as a big logical system with highly interconnected and complex parts. Understanding such a big system naturally requires having an excellent grasp on the tools used to build them. And the most fundamental one is logic itself. What follows from what, what are the starting-points or the elementary parts, what are the ways of composing these into more complex ones, ways to spot complete non-sense in the system and how to decompose the complex parts back to more fundamental ones to check their consistency and truth. The following book list contain titles that are all playing fields for one to start experimenting with such systems and gain the required confidence that one can master them.

Euclid's Elements

8170ZmxQfNL.jpg

Inasmuch as many things, while appearing to rest on truth and to follow from scientific principles, really tend to lead one astray from the principles and deceive the more superficial minds, he (Euclid) has handed down methods for the discriminative understanding of these things as well, by the use of which methods we shall be able to give beginners in this study practice in the discovery of paralogisms and to avoid being misled.

— Proclus (412-485 AD) - A Commentary on the First Book of Euclid's Elements

Looking back at the 15 years that have passed since I've first read this opus, I can honestly say it has had the most lasting impact on the way I approach big systems, be it mathematics, software and even politics. If I pay close attention to the discussions taking place around me, and observe the thought patterns of the speakers, I can tell which of them definitely haven't read or paid attention to Euclid. Their logic is usually all over the place. They draw true conclusions from one set of assumptions but false ones from a set of similar ones, or there are no clear assumptions to start with and the logical conclusions are based on gut feeling. The Elements fixes that.

A book about Geometry, on the surface, but a book about logic through and through. Aristotle applied this kind of logic to understand Politics, for example, and countless other disciplines have paid homage over the centuries to it by devising logical systems inspired by it in the search of God, the ultimate ethics and philosophy systems. In short, it is one of the Western Philosophy's pillars that has shaped our thought even though we're not aware of it and most of the time we only have bits and pieces at our disposal. This is the best place to start and gather all the pieces in one place and devour it whole.

Reading Euclid, additionally, has put me into a certain mindset, a mindset of always going back to first principles or even more importantly, realizing that there really are first principles from which everything is built and the confidence that I can find them with the right tools and enough time. Once I got into this mindset, I began questioning and exploring everything, not only doubting, but analyzing, going back, applying the learned tools of logic to reach explanations and a deeper understanding.

Spivak Calculus

0521867444.01._SCLZZZZZZZ_SX500_.jpg

Since the foundations of analysis provided the arena in which modern modes of mathematical thinking developed, calculus ought to be the place in which to expect, rather than avoid, the strengthening of insight with logic.

— Michael Spivak - Calculus (1967)

I remember the high-school years and the calculus classes quite vague but reading through this Calculus book much later in life, accompanied by Herbert's Gross excellent Calculus video lectures from the '70s, has left me with a long lasting feeling that "yes, those were the days!". Another book about strengthening your thinking and not necessarily your calculus knowledge. Even if your interest lies into that field or not, similarly to geometry, the most important thing to learn is the method. That is, to develop a method for thinking, based on demonstration following a fixed and known set of starting-points or axioms, and to start learning how to guide one's thoughts so as not to fall badly in side road ditches and start to believe in fairy tales. Or, going the other way around it, having a system, a theorem or any kind of fact already before one's eyes, to be able to deconstruct it into its constituent parts using the tools of logic. And if you can't, then maybe that "theorem" is really someone trying to deceive you.

A big advantage to these systems is that they are completely understood and open so they're ripe soil for training sessions at your leisure. You do not get into the boxing ring on match day completely unprepared and hope to train your jabs and uppercuts. If you haven't trained them before with a boxing bag or a partner day and night you surely won't get a chance to practice them with an adversary bent on knocking you out. This applies to any other sports and to the practice of software development as well. You have to be trained when you have clients, bosses, deadlines, crashed software and high expectations. Hopefully, when that time comes you can with a calm inner voice say to yourself, yes, I know how to approach this situation, I've learned and practiced the tools in my free time. I don't need pretty pictures that half-explain the system to me but leaves me unsure of how or why I do what I do.

Operating System Design: The Xinu Approach

1498712436.01._SCLZZZZZZZ_SX500_.jpg

Ironically, few operating system textbooks or courses explain underlying patterns and principles that form the basis for operating system construction. Students form the impression that an operating system is a black box, and textbooks reinforce the misimpression by explaining operating system features and focusing on how to use operating system facilities. More important, because they only learn how an operating system appears from the outside, students are left with the feeling that an operating system consists of a set of interface functions that are connected by a morass of mysterious code containing many machine-dependent tricks.

— Dougles Comer - Operating System Design: The Xinu Approach (2015)

The book about Operating Systems to understand all the other Operating Systems. On the surface, a simplified UNIX system, but between its pages and through its fully-available, buildable and BeagleBone-installable software, there one finds the OS Emperor stripped of his clothes.

Reading, tweaking and building Xinu countless of times, has left a deep impression on me since whenever I find myself plagued by questions, among others, of multithreading which is notoriously difficult to understand and apply correctly, I go back in my mind and think: "How did Xinu do it?" And almost by instinct I unravel the big onion bit by bit until I get down to context switching, process stacks and the OS watching over all of them like the king he truly is. And again, like in the Elements, this kind of exercise pays off and it is the stuff on which your mind needs to get used to. That is, there is no vodoo, you get the complete system, all its basic parts and the elements holding it together. Any question you might have does not get answered by appeal to holy spirit, but by going back and thinking about its constituent parts, its starting-points and its assumptions. Once you get in this habit of mind, you get a feel for how it plays out and most importantly you get the confidence in yourself that you can understand it, that the system is understandable and it is you that can unravel it, you will not wait for some self-proclaimed guru with nice pictures and pretty stories to help you along. No. You have the confidence of figuring out yourself, testing it and bending it to your will. Once you are in that position, you'll soon find out you'll discover things that cannot be explained and could not have been found by looking at those nice pictures.

Muad'Dib learned rapidly because his first training was in how to learn. And the first lesson of all was the basic trust that he could learn. It's shocking to find how many people do not believe they can learn, and how many more believe learning to be difficult.

— Frank Herbert - Dune (1965)

Similar to the Elements, this book is also not really about the usefulness of Xinu in real life as surely as the Elements was not about Geometry. "To be inquiring everywhere about usefulness is least of all fitting for those who are great-souled and free", after all. Here you have a stripped down version of a fully functional, commercially available OS that has been prepared for teaching purposes since the 1980s. And it shows. Besides the clean code that will teach something about the age-old and ubiquitous C programming language and some pointers kung fu to last you your whole life, there is talk and implementation of a scheduler and context switching. These take care of all the processes on the OS and make sure each gets its own share of the limited HW resources. There is also a memory manager, that takes care of your malloc'ed calls, assigns each process its own memory, takes care to free that memory when the process dies, among others. There are interrupts, device drivers, an IP protocol stack, file systems, and all that is needed for the good functioning of this fundamental piece of software we use daily.

Lisp in Small Pieces

0521545668.01._SCLZZZZZZZ_SX500_.jpg

This book was inspired partly by two earlier works: Anatomy of Lisp (1978), and Operating System Design: The Xinu Approach (1980), which gave all the necessary code without hiding any details on how an operating system works and thereby gained the reader's complete confidence.

In the same spirit, we want to produce a precise (rather than concise) book where the central theme is the semantics of the applicative languages generally and of Scheme in particular […] We'll "tell all" so that you, the reader, will never be stumped for lack of information, and standing on such solid ground, you'll be able to experiment with these concepts yourself.

— Christian Queinnec - Lisp in Small Pieces (1994)

Ah, what a nice introduction and homage to Xinu and one that I've completely missed on my first reading but with which I've come to agree with after studying this book for a while. That is, it is indeed similar to Xinu and the rest of the books on this short list. There is nothing hidden in them. You get the real deal, the complete system with which you can play to your liking. They all give you building blocks and not ready-built cozy houses. You get the "whys" and "hows" not the "whats". That last part is left as a lifelong exercise to the reader.

I have read SICP, The Little Schemer, the K&R, etc, but none has provided the level of insight and naked truth regarding programming languages as this one has, even though those are the more popular ones. To be sure, this should not be first Lisp reading even though it starts from the beginning and does not assume anything. For full pleasure though, it is best to have a love of Lisp before venturing in. For the veterans though, it does not only present complete implementations of different styles of interpreters, where changing even one bit has tremendous repercussions on the whole system (and you get to play with that and understand why), but it does so in clear and beautiful language. I don't think I've seen even one useless joke in there and each sentence is packed full of meaning, words are chosen carefully for their biggest impact. That does mean a re-reading is often necessary, but this is not a competition for who reads the fastest. The information is there, you just have to read it carefully, go back and forth multiple times. It's a book for study, actually, and not for casual reading, as all the great books are. As all the books on this short but heavy list.

lispy   lispy