logoalt Hacker News

CharlieDigitaltoday at 4:16 PM5 repliesview on HN

    > One of the most useful things about AI is also one of the most humbling: it reveals how clear your own judgment actually is. If your critique stays vague, your taste is still underdeveloped. If your critique becomes precise, your judgment is stronger than the model output. You can then use the model well instead of being led by it.
Something I find that teams get wrong with agentic coding: they start by reverse engineering docs from an existing codebase.

This is a mistake.

Instead, the right train of thought is: "what would perfect code look like?" and then meticulously describe to the LLM what "perfect" is to shape every line that gets generated.

This exercise is hard for some folks to grasp because they've never thought much about what well-constructed code or architectures looks like; they have no "taste" and thus no ability to precisely dictate the framework for "perfect" (yes, there is some subjectivity that reflects taste).


Replies

bambushutoday at 9:29 PM

This matches my experience exactly. I built a tool that sends code to three different AI models for review because the model that wrote the code can't critique it honestly. It has all the context and actively suppresses objections. The second model, with zero context, immediately finds things the first one rationalized away. Taste isn't just knowing what good looks like, it's being willing to say "this isn't it" to your own work. AI can't do that to itself yet.

sodapopcantoday at 4:20 PM

> Instead, the right train of thought is: "what would perfect code look like?" and then meticulously describe to the LLM what "perfect" is to shape every line that gets generated.

I think this goes against what a lot of developers want AI to be (not me, to be clear).

show 3 replies
aaaronictoday at 5:06 PM

I've worked in too many large codebases where no one can point to any _single file or class_ and label it "correct," ("the right way") yet management is amazed when the lack of a "North Star" means the codebase is full of overlapping, piecemeal patterns that are lucky to work together at all.

show 1 reply
dist-epochtoday at 4:29 PM

> Instead, the right train of thought is: "what would perfect code look like?"

That's the classic 2nd-system effect - "let's rewrite it from scratch, now that we know what we want". And you throw away all the hard-learned lessons.

https://en.wikipedia.org/wiki/Second-system_effect

show 1 reply
subhobrototoday at 6:24 PM

> Instead, the right train of thought is: "what would perfect code look like?" and then meticulously describe to the LLM what "perfect" is to shape every line that gets generated.

I don't think there's perfect code.

Code is automation - it automates human effort and humans themselves have error, hence not perfect.

So as long as code meets or exceeds the human output, it's "good enough" and meets expectations. That's what a typical customer cares about.

A customer will happily choose a tent made of tarp and plastic sticks that's available at their budget, right now when it's raining outside, over an architectural marvel that will be available sometime in the future at some unknown pricepoint.

Put another way, I don't think if you built CharlieAI CharlieGPT today, where the only differentiating factor over ChatGPT was that CharlieGPT was written using perfect code, you would have any meaningful edge.

I am yet to see any evidence where everything else being equal, one company had an edge over another simply due to superior code.

Infact, I have overwhelming evidence of companies that had better code succumb and vanish against companies that had very little, if any code, because those dollars were instead invested in better customer discovery, segmentation and analytics ("what should we build?", "if we did one thing that would give our customers an unfair advantage, what would be that thing?")

Software history is full of perfect OS, editors, frameworks, protocols that is lost over time because a provably inferior option won marketshare.

You are using a software controlled SMPS to power your device right now. You have 0 idea what the quality of that code is. All you care about is whether that SMPS drains your battery prematurely and heats up your device unnecessarily. It's extremely unlikely that such an efficient, low overhead control system was written using well abstracted modules. It's more likely that control system is full of gotos and repeated violations of DRY that would make a perfectionist shudder and cry.

show 1 reply