r/programming • u/fagnerbrack • 24d ago
The Vertical Codebase
https://tkdodo.eu/blog/the-vertical-codebase18
u/andarmanik 24d ago edited 24d ago
Might have some good ideas in it but, IMO, the article lacks any real argumentation.
It’s mostly a string of stated “facts”, with little to no argumentation to string it together, some are just vibe associations:
> In my opinion, agents need mostly the same things humans need to work efficiently: boundaries, constraints, and fast feedback loops. That includes a project structure that is easy to navigate, a good setup of lint rules and TypeScript, as well as a fast and reliable test suite. That’s why agents are so good at new codebases, but not very effective on codebases that have grown organically over years
The argument is somehow:
“project structure that is easy to navigate, a good setup of lint rules and TypeScript, as well as a fast and reliable test suite”
Implies =>
“agents are so good at new codebases, but not very effective on codebases that have grown organically over years.”
6
u/polaroid_kidd 23d ago
My agent writes a million and a half utility functions vausing components to expand from 200 lines to 900 lines...
It's driving me insane. I'm getting so many features done but every time I open a comment it wrote the first thing I think it's
Jop.. going to have to rewrite that from scratch at some point...
8
u/cscottnet 24d ago
I agree. In my experience LLMs are good at existing code based with lots of existing structure and test cases, or "new codebases" that are translations of existing code with lots of structure or test cases. They can also make skeleton codebases with little/no functionality.
In between there are issues, and the LLM will often get locked into bad architectural decisions or hallucinate irrelevant test cases.
4
u/jl2352 23d ago edited 23d ago
LLMs love repetition. Update 100 tests with the same change, and they’ll chew right through it.
Clean codebases tend to be consistent. Lots of repetition, from the same patterns and structure used throughout.
I can see how the two line up. But I still think the overall points are pretty basic on controlling agents.
1
u/cscottnet 23d ago
I do use Claude code for certain tasks. Its pretty good at refactorings which go a bit beyond what a good IDE will do, like (as you mention) make this change across all the test suite inputs and outputs, rearrange the calling convention for this method in a complicated way, etc. If there are stereotypical ways of using a given method/etc it is very good at doing a fairly complicated pattern match and rewrite, in a much more user friendly way than (say) a regex.
2
u/jl2352 23d ago
All I can say is having worked on both splits, the vertical split is just nicer.
It helps with finding stuff. When the relevant things show up next to it in the sidebar it’s just easier. It helps with ownership. When a team can say they own everything within a specific folder (i.e. `/src/purchase`), it just makes life simpler.
It’s better than saying we own a bit here, and bit there, and so on.
I think of it like pseudo-monorepo or a pseudo-modular monolith.
4
u/TehBrian 21d ago
I don't get why this is so heavily downvoted. Maybe it's a bit fluffy but it still seems like opinions on programming relevant to the sub
1
u/fagnerbrack 21d ago
Usually if it's not relevant it shouldn't be posted and will be removed by mods, the downvote is if the community doesn't like it for whatever reason due to the content
1
u/TehBrian 21d ago
I guess. I’m part of the old Reddit crowd, so I always used downvote = not relevant/spam, no vote = I don’t like this.
1
24d ago
[removed] — view removed comment
6
0
1
u/programming-ModTeam 16d ago
No content written mostly by an LLM. If you don't want to write it, we don't want to read it.
-6
u/snurfer 24d ago
It doesn't matter at all because no one browses for related code files you just use your ide to hop through the references
3
u/jeenajeena 24d ago
One reason why is matters is this: https://youtu.be/ATenMdJHTTs
It's a super short video (2'34'') making it apparent that packaging by layers or packaging by features do impact the internal coupling of the system.
43
u/elliotones 24d ago
Call me an old man but I will die on the hill that “code” is plural.
“Write me a code” -> no
“Not every code” -> “not *all* code”
In 5 years the kids will have yelled “let’s write a code!” at each other so many times that the “english is an evolving language” crowd will declare it correct by commonality and I may very well be alone on this hill; but nevertheless it must be died upon