🧵 👇
* "simple", yes, in nature; consistently applying them requires discipline
Don't try to read all input into memory. Process as a stream.
When implementing e.g., an HTTP API, don't generate all data in one go. Paginate results.
Don't leak tokens or passwords. Separate config from secrets.
Don't trust input outside of your control. Assume a hostile environment.
Don't ignore what your tool chain tells you. Enable, then fix all warnings.
Don't explode when things go wrong, nor futilely plod on. Fail early, explicitly, gracefully.
Don't try to make your docs match the tool. Write the fine manual, then make the tool match the docs.
Don't use comments to describe _what_ your code does. Use it to explain the unobvious, _why_ it does what it does.
Simplify. Build filters.
Worse is better.
"Program maintenance is an entropy-increasing process, and even its most skillful execution only delays the subsidence of the system into unfixable obsolescence."
🎤 🖐
(To be continued...)