by bitwizeshift · 1mo ago · 0 comments
By that I mean that, rather than let the LLM do the entire structure, I take the time to create the full hierarchy of abstractions and actors that I want my code to do. I decide, at the UML level, how abstractions will sit and interact — and then I make the LLM implement those gaps.
The key thing here is that, by doing this, I DO know how the code works. I may not know how each unit is implemented, but I know each unit’s responsibilities and how they interact with one another. I’ve found that LLMs are HORRIBLE at writing decent abstractions, regardless of how much prompting and skills I’ve given it. It will always get the job done, but it will often be unmaintainable and require bigger and heavier refactors as I introduce more and more requirement changes.
But by flexing my basic design skills, I don’t have those issues. Future refactoring fit into easy abstractions that I’ve designed. And by documenting it up front, I also have what becomes a living document on how this work will turn out.
It takes a few hours up front to plan ahead, but it makes the LLMs job easier and use less tokens, and it makes the code better long term. I don’t care if one unit is suboptimal, as long as the abstraction is right — because at worst I can change an implementation for a better one later.
That’s also roughly what I find after a long English-only session with a coding agent. Our conversation covers a lot of ground... and leaves out details at every level. When I look at what got built, the misunderstandings are fractal too.
I agree it’s important to design it yourself, but UML is only one level. Lately I’ve been using a scratch Python file (or even a scratch repo) that Claude and I both edit. Never mind that I’m writing Rust. Python reads like pseudocode, and pass and ... (Ellipsis) let me skip whatever I don’t care about. At any level where I do care, I can say exactly what a method’s signature should look like, what fields a domain model should have, or how it should maintain key invariants. Everywhere else I leave an ellipsis, maybe a docstring, and let the agent decide.
It works both ways: I ask the agent to sketch the current system in Python, with some details elided and others spelled out. Then I edit the sketch and have the agent push the changes back into the much bigger Rust+Tauri app.
Time will tell whether this approach has legs, but when I want to be precise, I find it sometimes pays to just write some code.
I’ve also tried spending an hour or two first before handing over control. That way there’s something pre-existing it can work from.
* Bite sized jobs, about what you would expect for a traditional user story.
* 10-15 minutes discussing the implementation. It's almost the exact same conversation I would have with a human engineer. I'm almost entirely asking questions - "How would you do Xyz? What about this problem? What about that problem?"
* At the end of the conversation, both the AI and I have a good understanding of the problem and the solution.
* I say "do it".
* There are occasions when I don't fully understand what it wants to do. I'll tell it to do the work, then we discuss it afterwards. Sometimes we change things, sometimes I just need to see the code to understand.
* It doesn't commit code. I do.
This has been really effective for me, easily 10X'd or more my pace of development. Sometimes I have to ask for a lot of rework and sometimes it one-shots it. But I never ship something I don't understand and it always feels like "my" code. Very satisfying. More satisfying than typing it all out; the typing was never the fun part of programming.
But that's at the scale of <1kloc. Might be different if you're trying to do a bigger feature all at once.
Guiding the LLM (or humans structuring/guiding juniors) to shape the abstractions help make the overall feature and reliability of the code much better.
The best results for me have been when I write something 100% in a language and when it is done the AI takes my implementation and ports it to another language.
Sometimes the grass really is greener - company culture can be actually incredibly toxic and compensation very below market, but when surrounded by people who normalize it most folks will project that experience out to the rest.
They care a lot about prestige. Or at least did before AI. Don’t know what their current hiring practices look like.
Comfort yourself with the fact that you did not have to sell your soul, sit through endless woke sexual harassment videos where you are taught that the white man is the source of all evil, and in endless management meetings.
Just study and get another job.
I'm old enough now to be a protected class, so I don't want people accusing me of ageism, because that's not where this is coming from - but there's a type of person that clearly is on their last job of their career and knows it and I try to avoid them like the plague, I've seen it too many times.
Yup (and it's not ageism).
I'm young and stupid but forced by circumstance to practice a certain degree of respect for my own stupidity.
My philosophy is, "I write code like I expect it to outlive me".
Because sloppy work --AI generated or otherwise-- has a tendency to come back to haunt you.
By the time the system starts to experience strain under the weight of its technical debt two years later, the original tech lead/architect of the project has already added it to his resume as another bullet point, found a new job at 20% higher comp, and no longer has to ever look at that code, ever again.
Now it's the next asshole's problem. Good luck!
[0] Freeman & Pryce 2009 for the "internal quality" vs. "external quality" dichotomy
I just approve PRs, because I have to. I don't know what else to do. I can barely keep an eye on all my code.
Actively looking, but job market is rough in Northern Europe. I quit caring about quality in any capacity here, the company has clearly chosen its direction, against my very vocal complaints.
My last interview, with what I thought was a great company, failed when I didn't understand what NLP was when they asked me about it.
> NLP? > Natural Language Programming, it's the future. Claude, GPT, etc.
I laughed, he didn't, looked offended and said it was a serious question. I had thought it was a joke, said "oh you mean LLMs". I tried to answer seriously, of course, but that was my third round technical interview and I didn't get a call back.
Just getting a paycheck and producing mediocre work until I get something new. (Senior engineer, 10 YOE, patents, 3 years at a unicorn).
Also considering becoming an electrician.
No one cares at best, or I'm callously told "keep up or fall behind" at worst. When that's not even the problem, it just, sucks now. There's no joy in anything I do professionally.
Can I ask where you went? I'm seriously looking for an exit, I just don't know what yet. Maybe a trade, in Scandinavia the pay is actually comparable, I just don't want to go back to school.
Often, the lack of meaningfully challenging demands being put on you is punishing on its own. It can feel like a relief for a week or month or year, but if you catch a glimpse of that being your whole future, you can come to recognize yourself as being in a mind-eroding secular purgatory.
This anguish is especially common among on highly capable people, high achievers, and those used to some kind of ambition. And by accident of its history, there's a lot of those people in this industry and some of them are going nuts now.
Obviously there are mission critical systems where it matters, but if “your code can be A/B tested” or “slowly rolled out”, chances are, it doesn’t matter.
Sometimes, not enough to believe you that you can do it better. And even if you could, to believe that it's overall worth it to work in that way.
They are only as good as their training data.
I expect them to have badder taste for PHP or JS, than, say, Kotlin or Ruby.
That's be because I prefer the code the latter communities have produced over the former.
Way to come off as incredibly insecure. There's no need to randomly put people down.
That certainly can be true but I would challenge "generally". If you're working on something novel then it's not exactly unusual for even SOTA models to produce a first attempt that makes some very bad assumptions but then get stuck when instructed to use correct axioms instead. This looks a lot like the suduko meme - without any real insight into the problem the models end up just iterating around in circles and never finding a solution.
You probably won't see this very often if you're working on simple CRUD web applications where there are millions if not billions of lines of code in the training data set. IME you will probably see it quite frequently if you're working on - for example - software to control some kind of equipment or analyse the results of some kind of experiment where the LLM might have little if any training data about the field you're operating in.
For example, Li et al. (2023), Emergent World Representations, showed that a GPT model trained only to predict Othello moves developed an internal representation of the board state, without being explicitly taught the rules or board structure.
I don't really care about the code being unmaintainable. Fable 6 or whatever will take care of it, just like Opus 5.5 takes care of our Opus 4.6 slop. The code working and our feature shipping is way way more important.
I would say I am now responsible for more big-picture decisions than I was previously, with Claude taking on the role of SWE (or a team of them). Despite this, there is still way more work than people.
> The code working and our feature shipping is way way more important.
I like that we both use AI very differently (you YOLO, I don't) but can agree that these are basically the important questions. If a company or team answers them like you do, I agree with the conclusion (YOLO). To me that's still a decision to be made though, and to be made wisely. Whether to accept the code may become unmaintainable, to forwardly rely on Fable 6 and to ship above anything (or at least a lot) else.
It can keep patching everything left and right whenever a new requirement comes up so it does not "need" to build abstractions, and it will only do it to please the human reviewer.
A year from now Fable 6 will de-slopify, so I don't really care about having pretty abstractions. That's simply not my job anymore. Sacrilege, I know.
On the other hand, I do some stuff with physics simulations and LLMs will spit out arrays like
static constexpr std::array<int, Q> cx{0, 1, 0, -1, 0, 1, -1, -1, 1};
static constexpr std::array<int, Q> cy{0, 0, 1, 0, -1, 1, 1, -1, -1};
static constexpr std::array<real_t, Q> w{ real_t(4) / 9, real_t(1) / 9, real_t(1) / 9, real_t(1) / 9, real_t(1) / 9, real_t(1) / 36, real_t(1) / 36, real_t(1) / 36, real_t(1) / 36};
static constexpr std::array<int, Q> opp{0, 3, 4, 1, 2, 7, 8, 5, 6};
and it's like ??? I know what these are for, but I have no clue if any of the numbers are right :-)
I was working on a ground-up implementation of a SPICE circuit simulator that would generate code to do realtime simulation of electrical circuits. Much of the work was derived from complex mathematics in a couple of papers that I was using as a guide, and from The Spice Manual (3rd edition) which serves as a guide/standard to the Spice language, including detailed mathematical formulae, expressed in standard mathematical notion (but no code) for most of the simulation operations.
When transcribing formulae into code by hand, I had gotten in the habit of providing references to page numbers and equation numbers in comments in the code, and "footnote" comments that provided URLs to the original material.
Imagine my surprise when Claude also provided correct comment references to pages and equation numbers when I asked it to write code to implement diode models.
This is okay as an end user who only cares about features but can be disastrous when something goes wrong and your only hope is to prompt an LLM that might or might not be (a) available or (b) not read into the context of the codebase.
The scope of the problem worsens when you consider that many teams STILL don't own what they write and have SREs serve as their first-line. These folks NEED to know how the hot paths of the services they support work without the memory or tools that your Claude account has. This is much much harder to do on a codebase that's a billion SLOC for no reason with inconsistent code style and questionable tests littered everywhere
I think that writing the code OR having written a lot of code in the past is the only way to REALLY understand what's going on.
Knowing the codebase is often the difference between proactive resolution ("This keeps happening when that log message keeps appearing; here is the PR that fixes this bug; here is the runbook on what to do if something like this class of problem appears") and reactive resolution (increasing quota, which costs money and might not always be possible; rolling back, which might introduce security concerns; etc.)
This is probably the biggest reason why SREs at big tech companies are usually also SWEs or SWE-adjacent.
Yes, agents, but given that AI-generated codebases grow and change too quickly for humans to keep up, the issue becomes over-reliance on agents over time, a Russian Roulette style of problem when the cost to access to these models keeps increasing...
I quote this just to put extra weight on this! It's surprising, the effect size of this statement.
Are you working on a team? I've found that for solo projects this works but, even when you own the design of your piece, integrating with the work of several people doing this ultimately leads to even the part you initially designed no longer working exactly as you remember it.
A good chunk of my time now is spend working with an LLM to understand how other parts of the code base work and how they relate to and interact with the product features I manage. But I'm still on a small enough team that this is possible. I'm not surprised at all that an engineer at an org the size of Meta would not even be able to perform this level of work in understanding what's happening.
It still has sharp edges but IMO it’s the best we have at the moment, and it works. It also means we deliver larger volumes of code, but we mostly look for alignment with the original review — so our reviews are more focused on what tests say behavior should be
It reminds me of George Fairbanks’ Just Enough Software Architecture. He tells a story about his father, a civil engineer, who didn’t apply every engineering technique he knew when installing a mailbox. He just dug a hole, put in a post, and filled it with concrete.
The idea is simple: the effort you spend on architecture should be proportional to the risks involved. Sometimes you need careful analysis, sometimes you don’t.
Seems even more relevant now with AI coding.
I've been starting in the ChatGPT web UI, having long conversations, having it generate Markdown plans, and then editing those plans; I hand those off to implementation agents.
Do you do this with every repository that's brand-new to you? You refuse to, for example, use an agent to learn where the feature should generally live? This seems absurdly slow for that purpose, because even though humans can still get a deeper understanding of a codebase after several months, an agent can get a much deeper understanding over a timeline of the initial few days. Unless everything is already meticulously documented for you, I suppose.
Yes, new codebase we take the time to learn, as every good developer should. Ramp-up doesn’t have to be that long to get one’s bearings.
Also, changes don’t have to be deadbolted into bad designs. If the code was bad before and you have a change to make, it can sometimes be faster in the long run to redesign it and rebuild it so that it can scale better with future requirements. LLMs make this part fast and easy — but again, requires design, and designs require human brain involvement and understanding of the codebase
In essence you basically say that you don't read or review the code produced in detail, you just know the high level design of how the system works.
Anyone who's ever directed AI at a very large legacy code base will have noticed that AI just gets dumber and slower the worse (larger + inconsistent) the code base gets (just like us humans do). The big difference is that with AI you can get to the point where the code base is an unmaintainable legacy mess in a fraction of the time that it used to take. Directing architecture is the only way to mitigate this to some extent.
Sometimes you do need to see how things are implemented before you know that a design doesn’t work, I’ve never been big on large upfront design work and prefer more iterative development. This can still be perfectly done with LLMs.
In practical terms it probably doesn't matter. But it's still an unsettling feeling.
I’m willing to believe that software you authored or designed yourself is better than whatever Claude spits out. I’m not as confident that the cost benefit ratio pencils out anymore. In fact, I would say most software does not need to be particularly good or well thought out. The vast majority of things I need software to do for me day-to-day at work are so niche and specialized that I tend to prefer AI slop that I can get now for a few tens of dollars at a time and something expertly crafted by a true artisan for thousands of times higher cost.
Of course I only arrived at the framework after trial and error with an LLM showed me the shape of the problem and the framework presented itself to me.
Soon that will be counterproductive and you'll be better off trusting whatever design it comes up with.
I have very particular ideas about how everything must work. Very particular ideas about which should be the tech stack. Meaning I don't have anything that uses nodejs or Rust.
The algorithms used, the abstractions that matter to me. Almost everything is different to what the AI would do if left to its own devices.
And many times I try to patch the code myself, and succeed, before giving up to the AI.
Anything else leads to insanity.
A question I've been struggling with, however, is what are the artifacts that live at this level? Are they design docs? Are they standardized? If I read your design docs, will I understand the code or do I need to "decompile" (use a coding agent to explain) to get back to this level of abstract for me to edit it?
I have found that making the AI look the plantuml and the rendering and reviewing before presenting it to me results in much more legible designs. To me the peak of this would be a shared interactive whiteboard w the ai during design.
I am very much in agreement with you. What language do you do the design in?
I have hand written a bootstrap MD file in English, which guided a Greenfield implementation. Do you actually use a UML language?
I suspect there is a missing language (abstraction) here, English can be a bit unclear and ambiguous. Perhaps an AI dialect?
But yes I agree, I don't let the llm "design" or even "ideate" with it. I have it run validation on my own assumptions and see if those hold up, but even when they don't I am the one to construct the solution.
Planning is fundamentally so critical to ensuring alignment and outcomes, that over time how one plans can be better trained into the process to help do more and more of it.
Just because something makes you comfortable doesn't mean it's actually good.
Coding is however just one small aspect of bringing software into being. We generally start with an intuition. That intuition comes from context.
That context, hard won as it is, for software engineers at least, was mostly a side effect.
You had to buffer a significant portion of the system in your mind to be able to manipulate it. LLMs remove that constraint. Now you can just prompt from the upstream intuition and its passable a good portion of the time.
Notice the catch? If you don't get to the beat of the system your interaction with it will be jarring, for yourself, for the person using the software and for the agent building it.
So I made a tool to help get the context into my head faster. No its not an app (it could be but meh) Its a skill that helps the LLM make a voice narrated walkthrough of the complexity so you retain context Check a demo here if you want https://theronburger.github.io/review-story/
It still needs a lot of back and forth before I'm comfortable it's not doing slop architecture, but once it's on thesame page as me it genuinely is better at it than me.
The pace of AI is literally changing so fast that we can't keep up. Your strategy here was probably true around 3 to 4 months ago. Right now it's no longer true. Not many people understand navier stokes and that's what AI can offer, it can offer some superior problem solving methodology with the level of complexity of navier stokes that you have no hope of understanding without years of study and education to get yourself up that level.
This is not a trivial question with a trivial answer.
Unfortunately your answer is outdated. I think if trendlines continue, the answer is trending violently towards putting more and more trust towards AI.
For those of us with practical budgets not measured in the millions, that bar for stupidity is pretty damn low, and I’m not convinced that there’s enough compute being built to account for every idiot in the world.
I'm saying ask the AI something beyond your intellectual capabilities. Or ask it something beyond your intrinsic knowledge base. It can produce a working machine that does the job, but you won't be able to understand it.
You can still verify the machine works by using the machine... but you won't necessarily understand it. Similar to how you own a smartphone... you know it works, but you will never fully understand everything about it.
Until it doesn’t, and then you’re too stupid to understand why not. Was it that your prompt wasn’t good enough? Does the model not have enough context? Is it even possible for your request to be satisfied?
> What does human stupidity have to do with this?
You answered this yourself:
> but you won't be able to understand it.
And:
> I'm saying ask the AI something beyond your intellectual capabilities. Or ask it something beyond your intrinsic knowledge base.
What’s the limit to this? “Claude build me a nuclear fusion reactor.” Surely we can agree that there’s a limit or we’d already be living in some post-scarcity utopia. So what’s the limit?
I’m suggesting a limit: human stupidity is limitless while compute is finite. We can use the word “ignorance” if the word “stupid” is too inflammatory.