Plan 9 design rule: if a feature doesn't work for everything, don't do it
twitter.com
twitter.com
And sometimes you can easily identify whether your situation is A or B, and deploy the right algorithm accordingly. Maybe that counts as "working for everything" in the Plan 9 model?
It feels hard to navigate this for more complex problems in general. Is it bad to build a PNG decoder that only supports 8 bits per channel? Does a compositor need to support 32 bits-per-channel CMYK backbuffers just because someone might want them? Some people consider rarely-used features to be "Basic functionality" while others consider them obscure corner cases.
I think you see this in programming languages themselves. I am not criticising C++ or Rust (they do good work, which I admire) but from my perspective the languages have many features that all interact in tricky ways. An example would be coroutines, threads, async, memory management.
There's also social interactions that multiply complexity: see the Python 2 to 3 migration pain that splintered the language for a while. Or Red Hat and its source.
I really enjoy this blog post about writing accidentally writing a compiler and handling the permutations of AST Nodes.
https://rachit.pl/post/you-have-built-a-compiler/
A billing or invoice system, that should be simple? But it isn't because everything interacts: failed jobs, holidays, daylight saving time, timezones, time, business processes, procedures, edge cases.
This is actually a subject that I am investigating as a hobby which is how do you handle interactions between arbitrary behaviours: such as you want a system that is Windows, Linux and Mac and platforms have different semantics that make writing your software tricky.
I think type systems get some of the way there but TLA+ and other formal verification tools help us get another part of the way there. But I am still learning.
On Plan 9, the rule tends to be: if feature(X) can't be implemented in a way that works for everything, don't do it. No special cases allowed; it's why mmap is discouraged. This has led to a system that is quite uniform and a pleasure to use, albeit lower performing than its competitors in many places.
[1] https://groups.google.com/g/comp.os.plan9/c/24mMVoy6wXA/m/JW...
Maybe dark mode was a bad idea based on that rule indeed.