4 ms·
There's a stark difference between a table saw and an LLM that weakens this argument. A table saw isn't a probabilistic device.
by agentultra 6mo ago
There's a stark difference between a table saw and an LLM that weakens this argument.
A table saw isn't a probabilistic device.
- theshrike79 6mo agoBut I, a woodworker, can immediately see if the piece of wood that came out of the table saw looks like it should. Also I, a programmer, can immediately see whether the "probabilistic device" generated code that looks like it should. Both just let me get to the same result faster with good enough quality for the situation. I can grab a tape measure or calipers and examine the piece of wood I cut on the table saw and check if it has the correct measurements. I can also use automated tests and checks to see that the code produced looks as it should and acts as it should. If it looks like a duck and quacks like a duck... Do we really need to care if the duck was generated by an AI?
- agentultra 6mo agoAlso I, a programmer, can immediately see whether the "probabilistic device" generated code that looks like it should. I highly doubt that. Empirical studies show that humans have very little effect on error rates when reviewing code. That effect disappears quickly the more code you read. Most programmers are bad at detecting UB and memory ownership and lifetime errors. A piece of wood comes off the table it’s cut or it’s not. Code is far more complex.
- theshrike79 6mo ago> Most programmers are bad at detecting UB and memory ownership and lifetime errors. And this is why we have languages and tooling that takes care of it. There's only a handful of people who can one-shot perfect code in a language that doesn't guard against memory ownership or lifetime errors every time. But even the crappiest programmer has to actually work against the tooling in a language like Rust to ownership issues. Add linters, formatters and unit tests on top of that and it becomes nigh-impossible. Now put an LLM in the same position, it's also unable to create shitty code when the tooling prevents it from doing so.
- agentultra 6mo agoA piece of wood is either cut to spec or not. You don’t have to try and convince the table saw with a prompt that it is a table saw. These tools are nothing alike and the reductionism of this metaphor isn’t helpful.
- theshrike79 6mo agoBut how do you know it's cut to spec if you don't measure it? Maybe someone bumped the fence aw while you were on a break, or the vibration of it caused the jig to get a bit out of alignment. The basic point is that whether a human or some kind of automated process, probabilistic or not, is producing something you still need to check the result. And for code specifically, we've had deterministic ways of doing that for 20 years or so.
- skydhash 6mo agoI guess that the point being made by GP is that most software are a high-dimensional model of a solution to some problem. With traditional coding, you gradually verify it while writing the code, going from simple to complex without loosing the plot. That's what Naur calls "The theory of programming", someone new to a project may take months until they internalize that knowledge (if they ever do). Most LLM practices throw you in the role of that newbie. Verifying the solution in a short time is impossible. Because the human mind is not capable to grapple with that many factors at once. And if you want to do an in depth review, you will be basically doing traditional coding, but without typing and a lot of consternation when divergences arise. > And for code specifically, we've had deterministic ways of doing that for 20 years or so. And none of them are complete. Because all of them are based on hypotheses taken as axioms. Computation theory is very permissive and hardware is noisy and prone to interference.
- theshrike79 6mo agoI 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.
- beAbU 6mo agoAnyone who has used a table saw before knows it's anything but probabilistic. Jus a little carelessness and you cut your thumb off. As with LLMs, where careless use results in you dropping prod db or exposing user data.