https://stackoverflow.blog/2023/06/07/self-healing-code-is-the-future-of-software-development
In the blog post above
- Google uses AI to suggest code improvements from revisions requested in pull review comments. Employees seem to like it, and say that their creativity is soaring because they don't need to do boring work.
Google is already using this technology to help speed up the process of resolving code review comments. The authors of a recent paper on this approach write that, “As of today, code-change authors at Google address a substantial amount of reviewer comments by applying an ML-suggested edit. We expect that to reduce time spent on code reviews by hundreds of thousands of hours annually at Google scale. Unsolicited, very positive feedback highlights that the impact of ML-suggested code edits increases Googlers’ productivity and allows them to focus on more creative and complex tasks.”
- Self-Healing Code
-
- This has existed for a while, with people implementing algorithms that free up space when they get a 90% utilization warning, and so on.
-
- A twitter user has experimented with a CI/CD Workflow where failing code was 'auto-healed', ie, fixed using AI and was then re-deployed.
Recently, we've seen some intriguing experiments that apply this review capability to code you're trying to deploy. Say a code push triggers an alert on a build failure in your CI pipeline. A plugin triggers a GitHub action that automatically send the code to a sandbox where an AI can review the code and the error, then commit a fix. That new code is run through the pipeline again, and if it passes the test, is moved to deploy.
https://twitter.com/minchoi/status/1643215812298260480
"We made several improvements in the mechanism for the retry loop so you don’t end up in a weird scenario, but that’s the essential mechanics of it," explains Calvin Hoenes, who created the plugin. To make the agent more accurate, he added documentation about his code into a vector database he spun up with Pinecone. This allows it to learn things the base model might not have access to and to be regularly updated as needed.
-
- The blog post provides an example. A Kubernetes Pod fails (a Pod is like a Docker Container, Kubernetes is like Docker-Compose. You define a bunch of services connected to containers, and Kubernetes spins them up, restarts them on fail, load balances, etc. A pod refers to one service/container.), and an AI inspects the error message. While the original container is re-spun for availability purposes, the AI rewrites the program for that pod to fix the error, and the new container is deployed upon completion.
-
- Use Generative AI to ease Technical Debt
Itamar Friedman, CEO of Codium, currently approaches the problem while code is being written. His company has an AI bot that works as a pair programmer alongside developers, prompting them with tests that fail, pointing out edge cases, and generally poking holes in their code as they write, aiming to ensure that the finished product is as bug free as possible. He says a lot of tests for code quality focus on aspects like performance, readability, and avoiding repetition.
Self-healing code is the future of software development
Self-healing code is the future of software development