> If code can be mechanically generated, that is a sign that abstractions in the program or the language itself are not strong enough. I think this isn’t a good way to think about it. In general, there is code that should be: 1. Abstracted away (happening implicitly) 2. Hidden behind config (happening implicitly based on declarations somewhere) 3. Explicit In your example, option 3 doesn’t exist. But in the real world, it does. If some module adds new routes, I WANT those routes to appear in some file I can import. If some module adds new controllers and models to my app, I WANT to get pretty standard controllers and models to appear so I can hack on them. If some extension changes database, I WANT database migrations to be created. If something generated requires config, I WANT those config statements to appear in my config files. -- We shouldn’t dumb down on our code however, 100% agree on that.
I think there's room for both here, and it involves moving to a more declarative programming model. For example, in some frameworks a route is already more akin to a configuration line than it is a line of code. And you can view a declarative program as all configuration, Concretely, specifically for your example: In 2025 I think we should be writing standard webapps entirely as OpenAPI (or similar) specifications, and let "the system" map them to the few functions or middleware that are actually unique. Standard CRUD stuff is so boilerplate that we shouldn't have to write it or even see it (except to debug and override if we realize we do need something different)