Hacker News new | ask | show | jobs
by CraigJPerry 21 days ago
I clearly identify with the problem the author raises, which is: the bottleneck is understanding.

I don't go along with their mitigations though.

In programming we have one tool for this: abstraction. Decomposition, pattern recognition, even data structures and algorithms are all down stream of abstraction. Collectively, we've never truly mastered abstraction, but it's what we have and we collectively wield it well enough that it's usually somewhat effective.

We are in dire need of a better abstraction.

2 comments

The "right" abstraction seems like quite an art. Sometimes it's not obvious, or it takes multiple rounds of exploration and testing (I'm thinking here of the mental shift moving from HTML + JS, via jQuery, Backbone, Knockout and up to React/Vue or Angular). At all points, we thought we had reasonable abstractions for a while. Vue and Svelt, or NextJS, now are so far from the mental model of early 00s "DHTML".

And I'm not sure how this relates to TFA's point. Are you saying we collectively need to get better at abstraction so that LLMs get better at abstraction (either by training, or our prompting), so that their code is easier to read?

>> I’m losing control over the code I write when I work with agentic code generation

> Are you saying we collectively need to get better at abstraction so that LLMs get better at abstraction (either by training, or our prompting), so that their code is easier to read?

No - our current abstraction for coding agents is a loop where we express some freeform specification of a goal, then a sub loop kicks off where an llm takes a stab at what good looks like for the next step (make an edit, search for info, run a command to cause some side effect etc etc), it iterates in this loop and when it's finished its sub loop, it declares end of turn and the loop returns to the user for steering input.

That inner agent loop can make it quite hard to stay in control.

What if instead of only these low level free form prompts we additionally had some higher level primitives to work with?

Yes. And indeed, abstraction is not what LLMs are offering.
It very much is. But it's a non-deterministic, more-lossy-than-usual abstraction: english to code.
2 different meanings of abstraction at work here.
Nope, the same single meaning.

English to program is the same kind of abstraction as going from assembly to program to C to program to high level scripting to "4G languages" and so on, and hiding all kinds of details behind a much terser layer. It's just that it's a qualitative jump at it.

Here's a ChatGPT provided answer asked to "define abstraction in programming, like when going from assembly to C to scripting, etc":

"Abstraction in programming is the process of building layers where each layer hides the details of the layer below".

In math/computers abstraction has a technical meaning that requires deterministic behavior for the abstraction to work. It isn't a proper abstraction if it doesn't always do the same thing underneath.

Abstraction as a layering idea without regard to how it works is like the pop-pych version in that it is "right" but misses nuance.