Remix.run Logo
godelski 6 days ago

This felt like a very weird read to me. As someone who is very pro writing flexible software.

IME getting LLMs to write flexible code is not easy and one of my biggest turnoffs for coding agents. The code they tend to produce is usually more standardized and lacking of context. It'll "work" but that doesn't mean it "works".

And I think almost everyone is aware of malleable software, it isn't very niche. If you took a programming class your teachers probably told you to write functions and make them small and self contained. A lot like the Unix Philosophy[0].

One thing I find different about this style is that it tends to shift time away from writing lines of code to planning. Which, again, the planning part is what the LLMs tend to be weak at[1]. You can't plan everything but a benefit of flexible code is that you can adapt to new challenges and requirements. It's a good style because a constant in software development is that the requirements by the end of the project (does it end?) are going to be different from those you started with. If your code is inflexible then you have to hack around your existing code. But if it is flexible you add the new routines and leverage existing ones as much as possible. But for that to happen the existing routines should be decently singular in purpose. Function call overhead tends not to be the bottleneck but if the profiler says they are then yeah, fuse functions as need.

[0] https://en.wikipedia.org/wiki/Unix_philosophy

[1] I find their strengths are in writing generic routines, helping narrow in on fuzzy or difficult to describe things that are hard to google, helping you get up to speed on a novel codebase, ditto for a library or language, or simply just throw away code. But not for things where foresight is necessary. But yes great when your job is to glue things together. It's just that if you're doing a lot of gluing there's probably a better way