8 ms·
Self-healing code is the future of software development
- groby_b 3y agoYeah, no. Improved tooling to address common problems is absolutely the future. "Self-healing" is a long way off, because LLMs lack reasoning abilities to determine if a fix is good. And "makes the test pass" isn't a great indicator - because flaky tests exists, and the plugin mentioned at the end is a great way to introduce random mutations. Unless you'd like to re-run the full test suite, it's dangerous malpractice, and even then it's high risk. Human-in-the-loop continues to be a necessary criterion for applied stochastics in code production.
- slillibri 3y agoSelf-healing code along with package hallucinations will be great - https://vulcan.io/blog/ai-hallucinations-package-risk https://vulcan.io/blog/ai-hallucinations-package-risk
- vsareto 3y ago>because LLMs lack reasoning abilities to determine if a fix is good You will at least need to build a feedback loop where it checks that 1) the code can actually compile 2) all tests pass and 3) other code analyses passes. Ideally it shouldn't present a solution if it can't meet those criteria but that also adds a lot of lag time for suggestions when it may not be needed for simple suggestions. What patterns it uses is up to training or examples or reinforcement learning. Good is human/team/company-subjective too (with some obvious hard requirements), so you will have to train specifically for your kind of quality.
- yjftsjthsd-h 3y agoNot even just flaky tests, but tests that don't specify enough to stop a paperclip maximizer; consider an AI told to stop the 500 errors, which blocks all users, thereby stopping the 500 errors. (Prior art: Consider the tetris-playing AI that was told to maximize how long it could go without losing, and which "won" by hitting the pause button.)
- faangsticle 3y agoPrompt: Prevent our webapp from returning 500 http status errors AI: Sure! Just replace your handler method with `(req, res) => res.status(200).send("OK")`
- frodowtf 3y agoI don't like LLMs just pushing code to master.
- jeron 3y agojust prompt it to create a new branch and make a pull request
- Glench 3y agoAlan Kay has talked about this for years. Software right now is relatively brittle — like clockwork. One gear breaks and the whole thing can break. Alan always contrasted this with biological systems which constantly have things breaking but are also constantly healing, often across several orders of magnitude of size. Bret Victor also mentioned this in his talk "The Future of Programming" — link to specific time here: https://youtu.be/IGMiCo2Ntsc?t=582 https://youtu.be/IGMiCo2Ntsc?t=582
- godelski 3y agoLLMs will not achieve this. Full stop. "Healing" code requires significant amounts of nuance. An understanding of the ecosystem both inside the code and outside. This is even a difficult task for humans to get right. LLMs do know a lot, but they don't understand a lot. Hell, ChatGPT still tells me that a kilogram of feathers and a pound of bricks weigh the same, just because it expects a certain pattern. Even explains why they aren't, but insists they are right. (in before "but GPT4") -- Prompt: Which weighs more, a pound of bricks or a kilogram of feathers? ChatGPT: A kilogram of feathers and a pound of bricks weigh the same. One kilogram is approximately equal to 2.20462 pounds. So, in this case, a kilogram of feathers and a pound of bricks both weigh about 2.20462 pounds. -- As a followup -- Prompt: Are you sure that's correct? ChatGPT: Apologies for the confusion in my previous response. You are correct, and I apologize for the incorrect information. A kilogram of feathers and a pound of bricks do not weigh the same. A kilogram is a unit of mass in the metric system, while a pound is a unit of weight in the imperial system. Since weight is affected by the force of gravity, the weight of an object can vary depending on the location. However, if we assume the objects are weighed under the same gravitational conditions, then a kilogram of feathers would weigh less than a pound of bricks. One kilogram is approximately equal to 2.20462 pounds, so a kilogram of feathers would weigh less than a pound of bricks. -- And we can see it does even worse. I had to ask 5 times and it gave me every possible answer (it continues to loop if you keep asking btw. It doesn't converge). You don't know when to stop if you don't already know the answer. It will think it is wrong if you keep asking because that's stochastically what it expects: correct answers are accepted, wrong answers questioned. Memory is not understanding, even though they often look similar. LLMs are great tools, but they aren't a replacement for thinking. They require lots to use them.
- virgildotcodes 3y agoJust tried this with CGPT4: Me: Which weighs more, a pound of bricks or a kilogram of feathers? ChatGPT: A kilogram weighs more than a pound. Specifically, 1 kilogram is approximately 2.20462 pounds. So, a kilogram of feathers weighs more than a pound of bricks.
- pmart123 3y ago
- mepian 3y ago>“People have talked about technical debt for a long time, and now we have a brand new credit card here that is going to allow us to accumulate technical debt in ways we were never able to do before,” said Armando Solar-Lezama, a professor at the Massachusetts Institute of Technology’s Computer Science & Artificial Intelligence Laboratory, in an interview with the Wall Street Journal. “I think there is a risk of accumulating lots of very shoddy code written by a machine,” he said, adding that companies will have to rethink methodologies around how they can work in tandem with the new tools’ capabilities to avoid that. I agree, it's very concerning that the opacity of ML models is now leaking into large codebases and making them potentially even less comprehensible.
- Mockapapella 3y agoI'm looking forward to when processes are in place to create self-healing code. LLMs right now are not great at it, but I blame the processes surrounding the problem rather than the reasoning abilities of a system like GPT4 today. I think all the pieces to create a *basic* version of this tool exist today that could heal simple code bases (like personal projects, one offs, etc).
- Solvency 3y agoWhy are we so caught up on LLMs as the means of a self-healing program though? In fact why has all popular ML conversation lately been reduced down to just LLMs? It just seems like there are so many other wild potential implementations that could be derived from the core math/theory but most of the world typically just waits for something to latch onto (like LLMs), rather than seek to produce something entirely new. There was just a post about convex optimization on HN. I don't understand why researchers aren't creating mathematical/statistical models of programming languages (hell, even Lisp) and creating radically avant-garde self-optimizing processes that run on emergent/generative sandboxed code subsets, which can optimize over time, which then literally be woven back into the operating codebase itself. Hell you could even have it build procedurally generated internal tests and heuristics for itself.
- graypegg 3y ago100%. Based on the headline, I was imagining some kind of jacked-up refactoring tools. Most implementations of Rename Symbol will catch references in strings as well, but will it get a name of a factory method that spits out that object? Or maybe changing the type signature for a method implies that some contant in your ENV should actually be a int and not a string now. I assure you that teams at Jetbrains or Microsoft or wherever are working away on how to integrate more deep learning into their tools. This is just… deploys with added dice rolls.
- croes 3y agoSo after computer viruses we now get the possibility of computer cancer if the self healing goes wrong?
- danwee 3y agoLook, do suggest whatever you want, but if I'm maintaining an important codebase, I'll reject BS like: - features without tests - extraLongNamesJustBecauseYouHaveWorkedTheLastTenYearsInAJavaShop - domain logic in my "Http controllers" - domain logic in my "DAOs" - copy-pasted regexes that you cannot explain - adding 4 unmaintained dependencies from em-pee-em instead of writing the "algorithm" directly (which is at most 50 LOC) - non-deterministic systems commiting to master I know, humans are non-deterministic, but at least they dare to say "You were right. I don't know what I was thinking" when you point out their mistakes (if they don't say that, that's on you: they were a bad hire)
- vorpalhex 3y agoIt's a sign of significant inexperience to be locked into a singular way of doing things and to have such hard rules. The goal is to achieve the end, not enforce a particular style. If long descriptive variable names work for your project, use them. If they don't work, don't use them. If you have to live by such fixed rules, you won't be a very useful developer.
- sanderjd 3y agoAgree with your general point, but I think this specific set of rules (maybe besides the function name length thing) read like experience rather than inexperience. I think this is a list of stuff that all seems fine at first, but has eventually burned anyone who has been doing the job long enough.
- SebastianKra 3y agoAssuming you only maintain a single API, why is domain logic in http controllers so bad? - you have twice as many signatures to maintain, which will become inconsistent with each other - introducing a new layer when you eventually need it, isn't more work than maintaining it now - Unlike other IO, REST frameworks are easy to test in memory
- 3y ago
- rglover 3y agoThe amount of money that will be made from the clean up of messes generated by this stuff will be unreal. And the only way to access it will be to actually know what you're doing (meaning the competition will be thin).
- isoprophlex 3y agoGotta hype up LLMs every step of the way, guaranteed job security!
- fzeindl 3y agoYou should look into BEAM/Elixir for self healing systems, not into LLMs.
- omginternets 3y agoHow does one specify what the ideal state of the code is? That is to say, what do you self-heal to? Surely that will be expressed in some formal language, and surely that formal language can also be riddled with bugs.
- isoprophlex 3y agoIn the case of self-healing CI/CD pipelines: pass all the tests and checks. So if you're an LLM having to fix a broken pipeline, better just delete all the tests :^)
- pwdisswordfishc 3y agoHave they meaningfully responded to the moderation strike yet?