News for hackers. Stuff that matters.
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by kgeist on Saturday March 01, 2025 @02:49PM (#43222943)
I use LLMs for writing generic, repetitive code, like scaffolding. It's OK with boring, generic stuff. Sure it makes mistakes occasionally but usually it's a no-brainer to fix them.
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by Terr_ on Saturday March 01, 2025 @03:04PM (#43223094)
> I use LLMs for writing generic, repetitive code, like scaffolding. It's OK with boring, generic stuff.

In other words, they're OK in use-cases that programmers need to eliminate, because it means there's high demand for a reusable library, some new syntax sugar, or an improved API.

Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by hombre_fatal on Saturday March 01, 2025 @04:08PM (#43223694)
Boilerplate and plumbing code isn't inherently bad, nor do you improve the codebase by factoring it down to zero with libraries and abstractions.

As I've matured as a developer, I've appreciated certain types of boilerplate more and more because it's code that shows up in your git diffs. You don't need to chase down the code in some version of some library to see how something works.

Of course, not all boilerplate is created equally.

Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by andix on Saturday March 01, 2025 @04:12PM (#43223723)
Boilerplate is better than bad abstractions. But good abstractions are far superior.
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by pertymcpert on Saturday March 01, 2025 @04:21PM (#43223795)
The best abstraction is no abstraction.
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by andix on Saturday March 01, 2025 @04:31PM (#43223890)
No.

Edit: I'm not going to code asm just to be cool.

Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by brookst on Saturday March 01, 2025 @11:09PM (#43227178)
asm? Why would anyone use that useless abstraction over byte code?
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by nuancebydefault on Sunday March 02, 2025 @05:08AM (#43228991)
bytes are abstractions. Only use them if you know upfront how many bits you need.
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by xmprt on Saturday March 01, 2025 @05:10PM (#43224255)
I agree with you but as I've matured as a programmer, I feel like it's very hard to get abstractions for boilerplate right. Every library I've seen attempt to do it has struggled.
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by Spivak on Saturday March 01, 2025 @10:33PM (#43226977)
Even Rails went with codegen despite being backed by the language most amenable to abstractions.
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by int_19h on Sunday March 02, 2025 @01:15AM (#43227895)
I would consider deterministic codegen to be a valid abstraction (or rather a valid implementation of some abstraction). It's not really any different from a regular library wrt ability to test & validate. The problem with any human- and LLM- handwritten code is that even the best coders make mistakes.
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by bubblyworld on Sunday March 02, 2025 @03:24AM (#43228488)
Abstractions are like mutations - most of them kill the host =P
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by airstrike on Saturday March 01, 2025 @04:24PM (#43223820)
"A program is like a poem. You cannot write a poem without writing it." — Dijkstra
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by MaxikCZ on Saturday March 01, 2025 @03:28PM (#43223327)
You can use niche libraries and still benefit from AI, basically anything I want to code is something that I don't think exists, and to bend API in a way that makes a generic library do just what I want means basically writing the same code, just instead of contributing to library its immediate, because the "piping" around it magically appears. I bet if it keeps improving at a current late for a decade, the occupation "programmer" will morph into "architect".
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by mvdtnz on Saturday March 01, 2025 @05:21PM (#43224341)
I'll take boring scaffolding code over libraries that perform undebuggable magic with monkey patches, reflection or dynamic code.
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by woah on Sunday March 02, 2025 @12:16AM (#43227622)
With LLMs, I hope we move towards libraries that make code easier to read, not easier to write.
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by TeMPOraL on Sunday March 02, 2025 @04:58AM (#43228942)
We won't be eliminating anything until we give up on only ever working directly on plaintext single source of truth code. AI is automating tedium that's otherwise impossible to automate because we're stuck in a 1970s Unix paradigm and can't let go.
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by anonzzzies on Sunday March 02, 2025 @05:17AM (#43229037)
But people, especially here on HN, are saying it's the only way to go.
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by anonzzzies on Sunday March 02, 2025 @05:23AM (#43229062)
> because it means there's high demand for a reusable library

Every 'modern' project takes bucket loads of (annoying) setup and plumbing. Even in rather trivial 'start' cases, the LLM has to spend quite a bit of time to get a hello world thingy working (almost all of that is because 'modern programmers' have some kind of brain damage concerning backward compatibility; move fast and break things between MINOR versions that have no use or reason for those changes whatsoever but 'they liked it better', so stuff never works as it says on the product page; heaven help you if you need something exotic to be added). It's a terrible timeline for programming, but LLMs do fix at least that annoyance by just changing configs/slabs of code it until it works.

Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by andix on Saturday March 01, 2025 @02:52PM (#43222964)
I try to keep "boring" code to a minimum, by finding meaningful and simple abstractions. LLMs are especially bad handling those, because they were not trained on non-standard abstractions.

Edit: most LLMs are great for spitting out some code that fulfills 90% of what you asked for. That's sometimes all you need. But we all know that the last 10% usually take the same amount of effort as the first 90%.

Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by rafaelmn on Saturday March 01, 2025 @03:16PM (#43223208)
This is what got me in most sleepless nights, crunch and ass clenching production issues over my career.

Simple repetitive shit is easy to reason about, debug and onboard people on.

Naturally it's balancing act, and modern/popular frameworks are where most people landed, there's been a lot of iteration in this space for decades now.

Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by andix on Saturday March 01, 2025 @03:50PM (#43223546)
I've made the opposite observation. Without proper abstractions code bases grow like crazy. At some point they are just a huge amount of copy, paste, and slight modification. The amount of code often grows exponentially. With more lines of code comes more effort to maintain it.

After a few years those copy and pasted code pieces completely drift apart and create a lot of similar but different issues, that need to be addressed one by one.

My approach for designing abstractions is always to make them composable (not this enterprise java inheritance chaos). To allow escaping them when needed.

Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by Spivak on Saturday March 01, 2025 @10:38PM (#43227009)
> At some point they are just a huge amount of copy, paste, and slight modification.

I mean is that bad? Unless you keep having to have huge MRs that modify every copy/paste could you just let the code sit there and run forever?

I only say this because I've been a maintenance programmer and I could only dream of a codebase like this. The idea that I get a Rollbar with a stack trace and the entirety of what the code actually does is laid bare right at the site of the error in a single file is amazing. And I can change it without affecting anything else?! I end up having to "unwind" all of the abstractions anyway because the nature of the job means I'm not intimately familiar with the codebase and don't just know where the real work happens.

Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by notpushkin on Sunday March 02, 2025 @02:15AM (#43228137)
There is a balance. Too much abstractions isn’t necessarily better than not enough abstractions. The optimal amount is usually non-zero, though.
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by rafaelmn on Sunday March 02, 2025 @05:33AM (#43229119)
But the point is that modern/popular frameworks picked the low hanging fruit of abstraction, we had several iteration cycles over two+ decades of mainstream web tech.

The landscape (browser capabilities, backend stacks) has settled over last ten years.

We even had time to standardize on things somewhat.

Building new abstractions at this point is almost always the wrong move. This is one of the points that LLMs will improve in software dev - they will kill the framework churn because they will work best on stuff already in training data.

Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by simion314 on Saturday March 01, 2025 @05:02PM (#43224167)
>most LLMs are great for spitting out some code that fulfills 90% of what you asked for. That's sometimes all you need. But we all know that the last 10% usually take the same amount of effort as the first 90%.

The issue is if you have an LLm write for you 10k lines of code, where 100 lines are bugged. Now you need to debug the code you did not write and find the bugged code, you will waste similar amount of time. The issue is if you do not catch the bugs in time, you think you gain some hours but you will get upset customers because things went wrong because the code is weird.

From my experience you need to work withan LLM and have the code done function by function, with your input and you checking it and calling bullshit when it does stupid things.

Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by xmprt on Saturday March 01, 2025 @05:13PM (#43224277)
In my experience using LLMs, the 90% is less about buggy code and more about just ignoring 10% of the features that you require. So it will write code that's mostly correct in 100-1000 lines of code (not buggy) but then no matter how hard you try, it won't get the remaining 10% right and in the process, it will mess up parts of the 90% that was already working or end up writing another 1000 lines of undecipherable code to get 97% there but still never 100% unless you're building something that's not that unique.
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by andix on Saturday March 01, 2025 @05:43PM (#43224625)
Exactly my experience. It's always missing something. And the generated code often can't be extended to fulfil those missing aspects.
Re:Making o1, o3, and Sonnet 3.7 Hallucinate for Everyone by deterministic on Saturday March 08, 2025 @06:56PM (#43304736)
I use a custom code generator for that. It works much better than trying to explain to an AI exactly what I want. Yes it’s a it more work up front but worth it IMHO.