by tekacs · 4mo ago · 0 comments
I feel like that gives an even more literal tower-rising metaphor, and that's what it feels like people using agents naively (and software engineers of lower skill or earlier-career), end up violating.
Agents are getting better at folding things into themselves, especially if you direct them to... but unfortunately I've found that the architectural instincts, even of Fable and 5.6 Sol, are still wildly behind what I reflexively achieve, say.
For sure there is an ability to have agents go back over work and try to fold it into better and better abstractions until it's sort of annealed into something good. I've done something similar on codebases that I have, but the 'high reaches' of architecture with great _prediction of how the software will evolve in the future_ in _subtle_ ways – those are, for now, out of reach of agents.
There is a part of me that wonders if it's partly just how much they can hold in their head right now, though. Even with the greatest articulation and high density of feeding them, the current setups don't allow them to hold a high-quality, sparse, 'zoomable' model of the world in their head that well yet, which we can do pretty well.
But the fact that I'm talking about it in terms of that kind of subtlety is itself promising, I guess?
We need some way to make AI-driven coding strive for parsimony.
A meaningful risk of course is that the tools available to the model (ripgrep + fancier semantic approaches) allow it to do a good job of reasoning over things much larger than its context window, and so it doesn't pay the penalty sufficiently to fix it.
What's more profitable, optimizing for inference time or optimizing to increase inference time by increasing token count?
I cannot remember who it was but there was an author who was traveling with their dog. They noticed that their dog would always pee on various tree to mark them as their territory. On their travels they ended up need some giant Red wood trees and figured, "I want to give my dog the ultimate claim of territory."
So he took his dog up to the Red wood tree and it did nothing, instead the dog wandered over to a smaller sapling and peed on that instead. The problem was the Red wood was so big and alien to the dog, it didn't recognize it as a tree.
I do wonder how many things are like that in our universe, that even if we could see them, we just wouldn't be able to understand it because it just goes beyond what we are capable of understanding. We think we have a grasp of the universe and use models to codify it but that is no guarantee that we can truly 'get it'.
Could higher level AI code be like that, would we know when we see it?
It doesn't look like we are that bright, at least collectively. And if they are individual which are really above everyone else on that matter and the rest, like maybe you but definitely not me, then their individual power seems to be unable to move us all away from our collective ill habits.
Maybe for simple one-person projects. We've long since developed methods and models to allow us to make things bigger than ourselves. Linux, SAP, etc. These software projects are not held in the mind of a single developer. But we use structure, rules, and other tools so that the pieces still fit together.
I do worry what that will mean for projects such as Linux though. Not that I think it will die or anything, but rather that it will become so fragmented that forward movement ceases.
This is the single reason why my experience with agentic development honestly kind of sucks, and wastes so much of my time.
The simplest prompt can result in the most verbose garbage ever produced, and scope-creep nobody's every seen before.
AI has a huge cognitive load problem right now. It's no wonder why so many devs say they're completely exhausted after a few hours, and not in ways they were before they picked up agentic dev.
It's the infinite AI monkeys at a computer keyboard phenomenon.
Or the car on the highway that bumps left and right on the guardrails until, eventually, it arrives at its destination and nearly everybody is amazed at that great success.
The AI kool-aid drinkers are going to answer: "but that's how human code too".
And I'm really not sure about that.
So: better modularity.
https://blog.metaobject.com/2019/02/why-architecture-oriente...
What happens if we take the most abstract libraries in any given field - and:
1. Bound to the llm to only use those as building blocks. Does it affect his reasoning ? Will it think more abstractly ?
2. Train the llm on those, so maybe it will get a feel for abstraction ?
The codebases using technologies I have no idea about tend to quickly become unmaintainable and buggy, because the LLM still doesn't make good architectural choices, but the codebases that use technologies I'm familiar with basically never devolve into unmaintainability.
The difference between the two is massive, and that's why I think that a competent engineer steering an LLM in their area of expertise gets two orders of magnitude more productive, whereas someone steering an LLM in an area they know nothing about are basically producing tech debt at the speed of thought.
Great metaphor. When I hear people claim 20x productivity with AI assistance, I imagine a Tetris game where pieces fall 20x faster.
As you say, those lines still have to clear.
That probably would not be a fun game to play lol
I love this analogy, and I find it darkly hilarious that most sibling commenters don't seem to understand. Maybe you need to have worked within a million-line codebase to get it.
The only way to "clear the lines" in software is to eject them from the main codebase and into imported libraries with stable, well-documented, well-tested APIs that you very rarely if ever (security vulnerabilities?) need to touch after "stabilizing" them. Great public examples: the Go standard library, https://github.com/spf13/viper , https://github.com/uber-go/zap . Viper and zap combined are more than 20,000 lines of code (according to cloc) that I don't need to read or understand how they work - their lines have been "cleared" and all I need to know is the abstraction.
Half the joy to be found when working within massive codebases is successfully clearing lines.
Maybe not exactly the same thing, but I think one related representation of this in any good codebase is documentations in the code: Good documentation always focuses on the why and not the what. i.e. things that are not represented by or representable in code. It may describe not only why a certain choice was made, but also why not something else. In general, the whole point of these documentation is to account for things that are beyond what can be understood from just reading the codebase including other existing documentation, that you may never even imagine with all the tokens in the world otherwise, which were yet a critical part of our coding choices.
If we are to believe that LLMs can build complex systems, then it's equivalent to saying that LLMs can make similar decisions equally well without any of that... which also then implies that we essentially never needed these documentation to begin with other than as redundancy for human needs.
We do have a mechanism similar to LLMs but it provides existing knowledge; it's a search mechanism, basically. New knowledge happens when we turn that mechanism off.
I am pretty sure rate of improvement will be there quite long in the future — even if it will be smoke and mirrors ;)
My personal experiments show that giving them tools to access to all past sessions over a codebase helps a lot. When I coded "feature X" 2 months ago i likely specifically mentioned some constraints expressed as abstractions and, if the coding agent checks not only the code/feature it needs to implement/change but also the past sessions over that, it picks them up, and ships code that better fits the overall project.
At least, more than "architectural/design guidelines", since they are more "concrete", to the point for the task at hand.
Sessions self-preserve them for following sessions, which helps, but might also carry over stale things, so some "pruning" helps, and can be automated. Overall, as long as corrections were also made via agents and hence in sessions, they are picked up automatically.
It's not the "human zoom" you refer to, which as humans we can drive/control, but the effect seems to be similar: I read autonomous sessions where it picked up from the past the very design/architecture/abstraction points i would have driven, had I been in the loop.
In team contexts it should not be impossible to share sessions, but I not working in teams right now :D So maybe it's also a "single dev quirk".
Another point is that in a sense, learning to code goes from being told "you are using the_wrong_abstraction/this_abstraction_the_wrong_way/no_abstraction_where_you_should_have", to telling it to others/ourselves.
Since the number of knowable abstractions seems to be "at least one more than I already know", agents can actually be helpful in learning.
After a certain threshold, it basically zeros in a specific domain, but on novel domains agents taught me abstractions, when nudged towards doing that.
I assume one can't benchmaxx multi-year long efforts, clean architecture, taste etc as easily as these "make tests pass" tasks
Sorry, the lines have to clear what? Surely there must be some kind of constraint on "lines" that they have to overcome.
In code the thing has to become stable, can't just keep packing more and more noise onto it.
Although I suspect models from Google, Facebook and Microsoft can be trained on their massive internal codebases. Whether they are is another question.
But, you would probably see a difference of scale and architecture. Larger projects that need better organization are probably more likely to be in private codebases (Linux excluded). So you might be right about the lack of private code in LLM being an issue.
At least in the past (before LLM-based code contributions got socially acceptable in some circles), in open-source project you often got very direct comments on code that was of bad quality. Yes, this was always a little bit abrasive, but it did a lot for the code quality.
For internal applications used at companies, such an abrasive behaviour is typically not accepted ("not a team player" (as if this is something bad), offended snowflakes, "not socially adept" etc.). Thus the code quality suffers quite a lot for internal applications.
Have you ever thought why salespeople have such an easy time selling some LLM for coding to big companies? Because the code quality of many internal applications is so bad, which makes even shitty LLM slop code often better than what is there.
In other words, if you can’t design a modular monolith, you can’t design a set of microservices.
I somewhat disagree:
Yes, it is possible to design a modular monolith, but thinking about the system in terms of a "minimum viable service" (but keep an eye on "viable", otherwise you can easily get into the "interaction problem") makes it much easier.
This is very similar to how you can write programs with no implicit state in a imperative programming language, but doing this in a pure functional programming language such as Haskell is much easier.