KISS 00:00:00 Make a prediction You will choose the smallest design that meets the measured requirement and identify a case where a shortcut would break correctness. A menu has forty items and measured lookup is already fast enough. If we add a cache, which new failure can occur when an item is renamed? The cache can return the old name. A fast-enough direct lookup already meets the stated target without a second copy to invalidate. 00:00:27 One marble for each guest A host drops one marble per guest into a jar. The count can be checked directly. Replacing the jar with three linked counters gains little unless the crowd outgrows the simple method. Start with a representation whose state you can explain and test. Optimize when the actual constraint identifies what should change. KISS means keep it simple, stupid. Simplicity is a goal of the design, and complexity that serves no requirement is removed. Kinder readings exist, such as keep it short and simple. A reader must hold the parts of a program in their head. With each layer there is one more file to open, one more name to learn and one more place where a bug may sit. 00:01:13 Count votes with one clear rule A small poll accepts one vote per ballot and counts by option. A plain map from option to count expresses the core operation directly. Vote twice for tea and once for coffee. Tea leads two to one. Decide explicitly how ties or duplicate ballot identifiers should behave. Add a persistence layer only if durability is required. Keeping the model small makes the tie rule and duplicate rule easy to test. Count the three ballots by hand, then check the program. Tea wins two to one. Add one coffee ballot. The important new question is the tie rule. A hierarchy of ballot classes will not answer it, while one explicit branch and test will. 00:01:58 Measure before adding a cache A directory of forty entries can often use a straightforward lookup. A cache adds invalidation rules each time a name changes. Measure real latency first; if ordinary reads meet the target, eliminating the cache also eliminates stale answers. Measure a scan over forty entries before adding a cache. Rename one entry and immediately look it up. The plain scan sees the change, but a cache introduces an invalidation job. It has to earn that new failure mode through a measured gain. Accepting every ballot without handling a required duplicate-identifier rule is incorrect rather than simple. Keep necessary correctness even when the implementation grows. For a real measured hot path, use an index or cache with defined update behaviour and tests at the invalidation boundary. Unix tools. McIlroy's advice of 1978 was to make each program do one thing well, and to expect its output to become another's input. Pipes join small tools. SQLite. Its documentation says that there is no server to start, stop or configure. It names simplicity among its aims, and says that it competes with opening a file, and not with client/server databases. 00:03:18 Try an interview follow-up A team wants a new database for one feature. How do you respond? I ask what the databases we run cannot do, in numbers, and what the new one costs in backups, upgrades, alarms and knowledge. If the need is real and it is a place where we want to be different, yes, with an owner. Otherwise we use what we know. The simple system is judged over years, not at the start. A checkout currently supports one currency and one fixed fee. Sketch a design with one function that computes the total. Run it on a zero quantity and a discounted item. If it handles the agreed rules, identify the specific future requirement that would justify adding interchangeable strategies. 00:04:05 What to take with you KISS asks for the fewest parts that do the whole job. Not fewer lines at any price, and not fewer edge cases. Give each part an owner among the requirements. A class, layer or option without one goes out. If you cannot say in one sentence what the code does, look again.