Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I kinda like the analogy of travelling here.

With normal artisanal coding you take your time getting from A to B and you might find out alternate routes while you slowly make your way to the destination. There's also a clear cost in backtracking and trying an alternate route - you already wrote the "wrong" code and now it's useless. But you also gained more knowledge and maybe in a future trip from A to C or C to D you know that a side route like that is a bad idea.

Also because it's you, a human with experience, you know not to walk down ravines or hit walls at full speed.

With LLMs there's very little cost in backtracking. You're pretty much sending robots from A to B and checking if any of them make it every now and then.

The robots will jump down ravines and take useless side routes because they lac the lived in experience "common sense" of a human.

BUT what makes the route easier for both are linters, tests and other syntactic checks. If you manage to do a full-on Elmo style tunnel from A to B, it's impossible to miss no matter what kind of single-digit IQ bot you send down the tube at breakneck speed. Or just adding a few "don't walk down here, stay on the road" signs on the way,

Coincidentally the same process also makes the same route easier for inexperienced humans.

tl;dr If you have good specs and tests and force the LLM to never stop until the result matches both, you'll get a lot better results. And even if you don't use an AI, the very same tooling will make it easier for humans to create good quality code.



That would be great if you were a research lab with unlimited funding. But most business needs to grapple with real user data. Data they've been hired to process or to provide an easier way to process. Trying stuff until something sticks is not a real solution.

Having tests and specs is no guarantee that something will works. The only truth is the code. One analogy that I always take is the linear equation y = ax + b. You cannot write tests that fully proves that this equation is implemented without replicating the formula in the tests. Instead you check for a finite set of tuples (x, y). Those will helps if you chose the wrong values of a or switch to the negative of b, but someone that knows the tests can come up with a switch case that returns the correct y for the x in the tests and garbage otherwise. That is why puzzle like leetcode don't show you the tests.


Of course tests can't be perfect, but even a flimsy guardrail and a warning sign before a ravine is better than nothing.

The optimal solution would be to encase the whole thing in blast-proof transparent polymer, but nobody has the money to do that :)

Trying stuff until something sticks was not a solution when a human had to do the trying and every line of code cost money.

Now you can launch 20 agents to do slightly different things to see if something sticks - and still do the manual work yourself for the 21st path. The cost for those extra 20 attempts is next to nothing compared to the price of an actual programmer.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: