daru.se

My current understanding of Mr Casey Muratori's advice.

CAUTION:This is out of memory from various sources. Use carefully, very vulnerable to out-of-context misunderstandings!

Write non-pessimized code. Meaning no waste. Meaning no interpreters. Meaning write the simplest most straigthforward damn thing in C (or C-style C++) FOR the CPU.

Simple in terms of call graph structure. While talking about profilers (hand rolled vs. iprof). Opposite of that would be LLVM.

Learn to read assambly.

Hard to measure code quality. But one thing that is easy to measure is line of code (LOC). Now, he does not mean to write clever one-liners. He means that after new code is written and works, it can often be expressed in significantly less lines of code. Because now the problem is known. And less code is always preferable because it's easier to reason about both for humans and compilers.

"Predictive design, except one in a million, fails!". Basically don't plan for the future, write code to understand and solve todays problem.

Use conventions. For example, when calling some piece of code it always succeeds. How? It always either return the thing (wanted data) or a zeroed out dummy object. Handling errors within a part/module of the system.
This way things tend to get fairly predictable and manageable (opposed to throwing exceptions right, left, up and down).

Programmer stages of mental development wrt architecture:

and then he goes on with pearls of wisdom like this: "n) 100% of code written in this style sucks".
See https://youtu.be/f4ioc8-lDc0?t=4452 for why..