Or it has good boundaries and I never have the need to load the whole system in my head.
You're not loading the whole OS kernel in your head every time you call fopen(), do you?
> Photoshop file format parser
Would you say that PSD format is an example of good design? Is complexity inherent to the problem domain, or is it accidental?
You are forced to replicate complexity created by other engineers. Woe is you.
My bet is that Adobe also has a lot of unit tests, and contrary to what unit-testing advocates claim, it resulted in a terrible design you are dealing with.
I strongly disagree on the ratio. If you're building Mastodon client, most of your effort should be spent on features and UX, not on OAuth and the like. If half of your time is spent on those, either you're at the beginning of the project, or you're at the beginning of your career. Or maybe you just care about engineering itself more than the end product.
Here's a talk where Jack Diederich mentions it: https://youtu.be/o9pEzgHorH0?t=870
It is indeed complex: 200+ classes. Plenty of unit tests and mocks.
And then there's his implementation:
- 0% unit test coverage.
- Lightweight at less than 200 lines, including blanks and docstrings.
QED.
I've written a Photoshop file format parser twice, and trust me—between byte alignment changing constantly throughout the spec, at least three different string encodings, sub-formats and errors in the spec—it does not "fit in your head." Certainly not enough to confidently add features without worrying that you've broken the blend mode parser.
And of course, if you can and do fit a complex system in your head when no one else on the team can, congratulations: you've made yourself into a bottleneck and flight risk.