News for hackers. Stuff that matters.
Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by jstanley on Monday April 21, 2025 @11:48AM (#43753286)
How do you understand the problem without writing any code?

It's possible that people's experiences are different to yours because you work on a specific type of software and other people work on other specific types of software.

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by vlovich123 on Monday April 21, 2025 @11:54AM (#43753357)
By building a high level abstract understanding of how things operate & then understanding how that abstractions need to be expressed. Writing code certainly is more concrete and can highlight mistakes like when there's a gap in your understanding vs spots where details matter more specifically.

At many big tech companies I've worked out, an abstract design proposal precedes any actual coding for many tasks. These design proposals are not about how you lay out code or name variables, but a high level description of the problem and the general approach to solve the problem.

Expressing that abstract thinking requires writing code but that's the "how" - you can write that same code many ways.

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by codr7 on Monday April 21, 2025 @12:02PM (#43753479)
If you haven't solved exactly the same problem before, specifying a solution before writing code is a bad idea imo. More often than not, it turns out that the prematurely defined general approach isn't very optimal.

Which points at a pretty substantial limitation of LLM coding...

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by skydhash on Monday April 21, 2025 @12:09PM (#43753557)
The solution is always out there. The code is just an automated way to get it without the error prone way of humans doing manual calculations. But sometimes, your understanding is flawed, so the code you write is not the correct way to have the solution. Which is why you have to get actual correct answers (specs) before writing code.

Correctness is not embedded in software. It's embedded in the real world.

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by vlovich123 on Monday April 21, 2025 @01:04PM (#43754086)
Typically I find a novel problem domain requires roughly about 3 attempts from scratch to get a maintainable longer-term solution. However, that still requires having some idea in mind to try before just writing code. Of course you might also do some prototyping on certain subparts of the problem but there’s only so much of that that can be done and you’re still trying out what expressing high level ideas looks like / how it works.

I don’t think there’s anything where the first step is writing code. It’s like saying the first step of solving a math problem is writing down equations.

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by skydhash on Monday April 21, 2025 @12:05PM (#43753512)
> By building a high level abstract understanding of how things operate & then understanding how that abstractions need to be expressed. Writing code certainly is more concrete and can highlight mistakes like when there's a gap in your understanding vs spots where details matter more specifically.

The whole argument behind TDD is that it's easier to write code that verify something than actually implement the code. Because it only have the answer, not the algorithm to solve the question.

So for any code you will be writing, find the answers first (expected behavior). Then add tests. The you write the code for the algorithm to come up with the answer.

Static typing is just another form of these. You tell the checker: This is the shape of this data, and it warns you of any code that does not respect that.

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by vlovich123 on Monday April 21, 2025 @01:08PM (#43754137)
And an even stronger approach than TDD would be to develop a formal proof in something like Coq. At some point you have to define your algorithm and it’s easier when you actually have some inkling of how it would work rather than just trying to blindly get a test suite to pass.
Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by immibis on Monday April 21, 2025 @07:18PM (#43757558)
This is the extreme end of the static checking spectrum - so extreme that you can spend hours or days per line of code, and it's so slow that about five people in the world do it on production code (and their customers pay handsomely for knowing it has been checked this way).
Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by vlovich123 on Monday April 21, 2025 @07:33PM (#43757624)
Sure. But even there you start with an understanding of how you want to solve the problem and then spend all your time writing the proof in a way that the computer can prove that you have indeed solved it correctly. At all times you generally start with an idea of a solution - you might prototype stuff to test out different solutions and how you like them but with things that are less pure R&D you need to prototype less.
Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by tsimionescu on Tuesday April 22, 2025 @04:19AM (#43760094)
TDD in this sense of building a test suite before ever having working code, or even worse, the style of TDD that Uncle Bob presents in his book, where you write some test code, then some production code to make the test pass, then some more test code, then some more production code etc. is a fantasy and/or a disaster. Especially if we're talking at the level of unit testing: unless you have a very clear outline of the code that you're going to write, and unless the problem is very well specified, you'll throw away 90% of the tests you've written as your code evolves, wasting inordinate amounts of time in the process.

Regular static typing (assuming you don't go to the level of dependent types or something) has the advantage that it is extremely quick to write, compared to an equivalent test. So even if you get the types wrong 90% of the time on the first pass, you've still wasted only a trivial amount of time (consider how long it takes to write "int foo(int x)" versus tests that fail if "foo(x)" accepts anything except an int, or returns anything except an int for any int input - and how much work you'd throw away if you later realize you have to replace int with string).

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by pydry on Tuesday April 22, 2025 @04:51AM (#43760217)
>unless the problem is very well specified

Why wouldnt you decide what your code should do before writing it?

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by jstanley on Tuesday April 22, 2025 @10:54AM (#43762943)
Why wouldn't you just get everything right the first time and never need to learn anything new?
Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by pydry on Tuesday April 22, 2025 @02:02PM (#43764736)
Getting everything right the first time != deciding what you're trying to achieve before you write the code to achieve it.
Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by tsimionescu on Wednesday April 23, 2025 @01:59AM (#43769074)
If you write unit tests for what you're trying to achieve, and then after you achieve it it turns out you didn't get everything right and the code was supposed to do something different, then those unit tests were almost pure waste: you have tests that assert your code is doing the wrong thing (which you thought was the right thing intially). So not only is the code wasted, the unit tests that tested it, which are likely much more code overall, are added waste.
Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by pydry on Wednesday April 23, 2025 @07:14AM (#43770749)
>If you write unit tests for what you're trying to achieve, and then after you achieve it it turns out you didn't get everything right and the code was supposed to do something different, then those unit tests were almost pure waste

And the code changes were pure waste too.

That's why it's important to try and reduce the risk of building to the wrong requirements wherever possible - fail fast and often, use spikes and experiments, use lean, etc.

It's why it's important to reduce the cost of writing tests and code as much as possible too.

Writing the test itself and showing bits of it to others can actually help uncover many requirements bugs too. That's called BDD.

However, if it turned out it was the right thing and you didnt write a test you've just made it much harder to change that code in the future without breaking something. The cost of code changes went up.

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by tsimionescu on Wednesday April 23, 2025 @01:28PM (#43774511)
> And the code changes were pure waste too.

Yes, I said so as well. Though it's also important that the code changes are likely to be the thing that reveals that the feature is misunderstood/badly specified. Lots of people can take a working feature and tell you if it addresses their problem. Much fewer can look at a set of unit tests and tell you the same.

> However, if it turned out it was the right thing and you didnt write a test you've just made it much harder to change that code in the future without breaking something. The cost of code changes went up.

Very much debatable. If the code needs to change because requirements themselves change in the future, the tests that are validating the old requirements are not helpful. And many kinds of refactoring also break most kinds of unit tests too.

From my experience, unit tests are most useful for testing regression cases, and for validating certain constrained and well defined parts of the code, like implementations of an algorithm. They're much less useful for testing regular business logic - integration tests are a much better solution for those.

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by carlmr on Monday April 21, 2025 @11:55AM (#43753377)
>How do you understand the problem without writing any code?

Not OP, but I find this a very good question. I've always found that playing with the problem in code is how I refined my understanding of the problem. Kind of like how Richard Feynman describes his problem solving. Only by tinkering with the hard problem do you really learn about it.

I always found it strange when people said they would plan out the whole thing in great detail and code later. That never worked for me, and I've also rarely seen it work for those proposing it.

It may be because I studied control systems, but I've always found you need the feedback from actually working with the problem to course correct, and it's faster, too. Don't be scared to touch some code. Play with it, find out where your mental model is deficient, find better abstractions than what you originally envisioned before wrestling with the actual problems.

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by 6510 on Monday April 21, 2025 @12:09PM (#43753553)
If I have any representation of the problem in front of me the mind seems to attack it all by it self. I strongly suspect someone with more (or different) experience doesn't need this or gets better results by writing out a representation.
Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by mixmastamyk on Monday April 21, 2025 @12:02PM (#43753478)
This is true when breaking new ground, but it’s a rare occurrence. Most business problems are a few thousand years old. Yes, there were taxes paid in the ancient world.
Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by Espressosaurus on Monday April 21, 2025 @12:13PM (#43753611)
They weren't solving hard realtime nonlinear control for hardware running on a custom ASIC in a domain only a literal handful of companies even operate in.

Not everything has been solved for ten thousand years.

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by mixmastamyk on Monday April 21, 2025 @12:27PM (#43753752)
You misread. Also, that tech has been around for decades.
Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by gitremote on Tuesday April 22, 2025 @01:03AM (#43759199)
Most solutions to business problems are proprietary, not open source.

Tax rules depend on an interaction between national and local laws that can change from year to year based on the ruling government. You can't just take tax rules from ancient Rome to generate 2024 tax software for Quebec, Canada.

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by mixmastamyk on Tuesday April 22, 2025 @11:03AM (#43763066)
Doesn’t matter, tweak a few constants. One for you nineteen for me… Taxman!
Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by corytheboyd on Monday April 21, 2025 @12:21PM (#43753682)
I’ve grown weary of people repeating absolutisms they hear online, too.

As is usually the truth in practice, it’s a mess, which is why I’ve seen combinations of upfront planning and code spiking work the best.

An upfront plan ensures you can at least talk about it with words, and maybe you’ll find obvious flaws or great insights when you share your plan with others. Please, for the love of god, don’t ruin it with word vomit. Don’t clutter it with long descriptions of what a load balancer is. Get to the point. Be honest about weaknesses, defend strengths.

Because enterprise corporate code is a minefield of trash, you just have to suck it up and go figure out where the mines are. I’ve heard so many complaints “but this isn’t right! It’s bad code! How am I supposed to design around BAD code!” I’ll tell you how, you find the bad parts, and deal with them like a professional. It’s annoying and slow and awful, but it needs doing, and you know it.

By not doing the planning, you run the risk of building a whole thing, only to be told “well, this is nice, but you could have just done X in half the time.” By not doing the coding, you risk blowing up your timeline on some obvious unknown that could have been found in five minutes.

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by skydhash on Monday April 21, 2025 @12:26PM (#43753739)
It's not building the whole architecture before coding. It's about getting all the answers before spending time coding things that will probably have hidden bugs.

Sometimes you don't have a way to get the exact answers, so you do experiments to get data. But just like scientists in a lab, they should be rigorous and all assumptions noted down.

And sometimes, there are easy answers, so you can get these modules out of the way first.

And in other cases, maybe a rough solution is better than not having anything at all. So you implement something that solves a part of the problem while you're working on the tougher parts.

Writing code without answers is brute-forcing the solution. But novel problems are rare, so with a bit of research, it's quite easy to find answers.

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by hnthrow90348765 on Monday April 21, 2025 @12:44PM (#43753906)
>And in other cases, maybe a rough solution is better than not having anything at all.

POCs are better for customer-facing, product management driven work. This is because they can be bad at describing what they want. There's more risk of building the wrong thing.

POCs can be okay for system design or back-end work (or really anything not involving vague asks), but chances are planning and deeper thinking will help you more there because the problems you solve tend to be less subjective. Less risk of building the wrong thing.

Re:Why LLM-Powered Programming Is More Mech Suit Than Artifi... by skydhash on Monday April 21, 2025 @01:19PM (#43754246)
Rough solution in this case is more like a sketch compared to a painting, a few hours of work instead a week or two. The painting can be the main goal, but a sketch can be useful for some part.

Kinda like scaling. Instead of going for Kubernetes, use a few VPS and a managed database to get your first customers.