That's not really how agentic ai programming works anymore. Tools like cursor automatically pick files as "context", and you can manually add them or the whole ckdebase as well. That obviously uses way more tokens though.
But then, as now, it won’t understand what it’s supposed to do, and will merely attempt to apply stolen code - ahem - training data in random permutations until it roughly matches what it interprets the end goal to be.
We’ve moved beyond a thousand monkeys with typewriters and a thousand years to write Shakespeare, and have moved into several million monkeys with copy and paste and only a few milliseconds to write “Hello, SEGFAULT”
I'm being pretty resistant about AI code Gen. I assume we're not too far away from "Our software product is a handcrafted bespoke solution to your B2B needs that will enable synergies without exposing your entire database to the open web".
It has its uses. For templeting and/or getting a small project off the ground its useful. It can get you 90% of the way there.
But the meme is SOOO correct. AI does not understand what it is doing, even with context. The things JR devs are giving me really make me laugh. I legit asked why they were throwing a very old version of react on the front end of a new project and they stated they "just did what chatgpt told them" and that it "works". Thats just last month or so.
The AI that is out there is all based on old posts and isnt keeping up with new stuff. So you get a lot of the same-ish looking projects that have some very strange/old decisions to get around limitations that no longer exist.
It gives you the right picture when you asked for a single straight track on the prompt. Now you have to spend 10 hours debugging code and fixing hallucinations of functions that don't exist on libraries it doesn't even neet to import.
Maybe the code the AI wrote works perfectly. Maybe it just looks like how perfectly working code is supposed to look, but doesn't actually do what it's supposed to do.
To get to the train tracks on the right, you would normally have dozens of engineers working over probably decades, learning how the old system worked and adding to it. If you're a new engineer and you have to work on it, you might be able to talk to the people who worked on it before you and find out how their design was supposed to work. There may be notes or designs generated as they worked on it. And so-on.
It might take you months to fully understand the system, but whenever there's something confusing you can find someone and ask questions like "Where did you...?" and "How does it....?" and "When does this....?"
Now, imagine you work at a railroad and show up to work one day and there's this whole mess in front of you that was laid down overnight by some magic railroad-laying machine. Along with a certificate the machine printed that says that the design works. You can't ask the machine any questions about what it did. Or, maybe you can ask questions, but those questions are pretty useless because the machine isn't designed to remember what it did (although it might lie to you and claim that it remembers what it did).
So, what do you do, just start running trains through those tracks, assured that the machine probably got things right? Or, do you start trying to understand every possible path through those tracks from first principles?
God, seriously. Recently I was iterating with copilot for like 15 minutes before I realized that it's complicated code changes could be reduced to an if statement.
AI can't imagine an image full glass of wine because there are barely any images of that in any dataset out there. AI can't think, just massage it's dataset into something vaguely plausible.
I personally find copilot is very good at rigging up test scripts based on usings and a comment or two. Babysit it closely and tune the first few tests and then it can bang out a full unit test suite for your class which allows me to focus on creative work rather than toil.
It can come up with some total shit in the actual meat and potatoes of the code, but boilerplate stuff like tests it seems pretty spot on.
I believe that, because test scripts tend to involve a lot of very repetitive code, and it's normally pretty easy to read that code.
Still, I would bet that out of 1000 tests it writes, at least 1 will introduce a subtle logic bug.
Imagine you hired an intern for the summer and asked them to write 1000 tests for your software. The intern doesn't know the programming language you use, doesn't understand the project, but is really, really good at Googling stuff. They search online for tests matching what you need, copy what they find and paste it into their editor. They may not understand the programming language you use, but they've read the style guide back to front. They make sure their code builds and runs without errors. They are meticulous when it comes to copying over the comments from the tests they find and they make sure the tests are named in a consistent way. Eventually you receive a CL with 1000 tests. You'd like to thank the intern and ask them a few questions, but they've already gone back to school without leaving any contact info.
I think I would more picture planes taking off those railroads when it comes to AI.
It tends to hallucinate API calls that don't exist. if you don't go check the docs yourself you will have a hard time debugging what went wrong.
LLMs can be great for translating pseudo code into real code or creating boiler plate or automating tedious stuff, but ChatGPT is terrible at actual software engineering.
It depends. AI can help writing good code. Or it can write bad code
I'll give you a hypothetical: a company is to hire someone for coding. They can either hire someone who writes clean code for $20/h, or someone who writes dirty but functioning code using AI for $10/h. What will many companies do?
Many companies chose cheap coders over good coders, even without AI. Companies I heard of have pretty bad code bases, and they don't use AI for software development. Even my company preferred cheap coders and fast development, and the code base from that time is terrible, because our management didn't know what good code is and why it's important. For such companies, AI can make development even faster, and I doubt code quality will suffer.
You can get decent results from AI coding models, though...
...as long as somebody who actually knows how to program is directing it. Like if you tell it what inputs/outputs you want it can write a decent function - even going so far as to comment it along the way. I've gotten O1 to write some basic web apps with Node and HTML/CSS without having to hold its hand much. But we simply don't have the training, resources, or data to get it to work on units larger than that. Ultimately it'd have to learn from large scale projects, and have the context size to be able to hold if not the entire project then significant chunks of it in context and that would require some very beefy hardware.
Well, not exactly. For example, for a game I was working on I asked an LLM for a mathematical formula to align 3D normals. Then I couldn't decipher what it wrote so I just asked it to write the code for me to do it. I can understand it in its code form, and it slid into my game's code just fine.
Yeah, it wasn't seamless, but that's the frustrating hype part of LLMs. They very much won't replace an actual programmer. But for me, working as the sole developer who actually knows how to code but doesn't know how to do much of the math a game requires? It's a godsend. And I guess somewhere deep in some forum somebody's written this exact formula as a code snippet, but I think it actually just converted the formula into code and that's something quite useful.
I mean, I don't think you and I disagree on the limits of LLMs here. Obviously that formula it pulled out was something published before, and of course I had to direct it. But it's these emergent solutions you can draw out of it where I find the most use. But of course, you need to actually know what you're doing both on the code side and when it comes to "talking" to the LLM, which is why it's nowhere near useful enough to empower users to code anything with some level of complexity without a developer there to guide it.
I gave it a harder software dev task a few weeks ago... Something that is not answered on the internet... It was as clueless as me, but compared to me, it made up shit that could never work.
I tried to give it a piece of ~200 lines of JS I was positive there was an error in, and it tried to gaslight me into thinking there wasn't any... I tried everything, pointed it specifically to suspicious bits, asked for breakdowns, assertions, test cases... which it then promptly copy-pasted to me straight from my own code... Took me a few hours to find, but there was, in fact, a rookie mistake in it, just hard to spot at a glance.