Code doesn’t have to be a mess
In my experience people refactor code to their own understanding of the problem and not all refactorings improve the code.<p>People abstract before an abstraction is necessary.<p>I find single file dense leetcode style code easier to understand and follow the flow. Algorithmic code I can reason around. A large mature codebase is far harder to get to know.<p>One of the first things I do when I study a new codebase is find all the entry points and follow the flow of code from beginning to the thing I am interested in.<p>One person's beauty is another person's mess.<p>It's harder to change an existing codebase than to write a simple program that does the new thing but not in the context of the original program. A reference implementation of the various components is far easier to understand than one big ball of mud. Fitting problems together is hard. You need to understand the old thing before you can introduce the new thing and it ends up being forced or hacked in if the design doesn't support the new thing.<p>I tend to write reference implementations of everything, then combine them together as a separate project.<p>I find an empty file far more reassuring than a large codebase.