Guiding Principles
Introduction
Welcome to this site recently refactored with Astro + PicoCSS. I will aim to populate its blog with technical posts as I go through new discoveries and projects.
To kick things off, I would like to share an approach to software development that I strive to follow in my consulting work. It consists of an ordered set of principles in which earlier ones apply unless challenged by one of the later ones (for good reasons that must be documented).
1. Simplicity
Software should be as simple as possible.
To write, read, understand, maintain, deploy, and use.
2. Minimalism
Software should be as small as possible.
Less code means fewer bugs, less maintenance, fewer redeploys, a smaller attack surface, faster downloads…
This principle would be trivial if it were limited to the code written by the software’s own developers. It is less so when you include the code of dependencies.
3. Least Surprise
Every element should be as idiomatic as possible in its context (language, paradigm, system of patterns).
You should be able to intuitively understand the structure of the code so you can focus on its semantics.
4. Elegance
Architecture, design, and code should be as regular as possible.
Software should naturally fit the need it seeks to fulfill. Its components fit together logically, and the whole limits accidental complexity.
By accidental complexity, I mean that induced by technical artifacts and constraining choices, as opposed to essential complexity, which is part of the functional domain the software belongs to.
5. Frugality
Software as a whole should consume as few resources as possible.
The resource to optimize can be energy (electricity) as well as hardware infrastructure (RAM, CPU, GPU, NPU, TPU… I/O: storage, network…).
6. Performance
Software should be as fast as possible.
Project requirements may bound response times:
- 200 milliseconds for a “simple” CRUD REST API
- 50 milliseconds to replicate state across all operator stations on a frigate or submarine
These constraints are not always very complex to meet, but they sometimes require a suitable architecture, design, or choice of language or libraries.
Conclusion
These few principles are guardrails to use wisely, since dogmatism often hurts adoption. But if they are relevant and respected, our software will be frugal, maintainable, and suited to its users’ needs.