I gave a talk at FOSSY two weeks ago. I think there is a video, but I won't share it because, let's say, I'm rusty. So this issue will summarize what the talk was about. Thanks to Richard, Alyssa, Stefano, and Nicole for coming out. :)
How AI can help sustain open source, not destroy it.
Hi, my name is Justin Dorfman, and I worked in the office of the CTO at Sourcegraph. I've been a FOSS contributor since 2011. I have contributed code and non-code to projects of all sizes, including Bash, Zsh, Bootstrap, jQuery, and many more. I also like to consider myself maintainers best friend 24-7-365.
On November 30th, 2022, OpenAI released ChatGPT. My first thoughts were
- This is cool
- This is scary
- The maintainers...
How will AI affect maintainers?
Will it make their lives easier or harder? Before we can answer that question, we must understand what they are dealing with now.
One thing maintainers are dealing with is issues and PR (pull requests) overload. How many times have you seen a popular project on GitHub and felt anxiety by looking at the multiple issues and PRs that are open? Imagine how the maintainers feel! Most of us feel sympathetic, but that doesn't help the numbers decrease.
Another thing maintainers deal with is toxicity. Since I'm maintainers best friend, this type of abuse not only upsets me, it worries me. This is what causes maintainers to abandon their projects, and in return, that is what makes the FOSS supply chain more vulnerable.
Because when popular projects die, we all feel it. If you remember, one maintainer pretty much broke the npm ecosystem by deleting a tiny module. That is how fragile the FOSS supply chain is.
Since 1-2 maintainers manage most projects, a small bus factor is created. A 2015 study of popular GitHub projects across language ecosystems found that nearly two-thirds have just one or two maintainers. Toxicity is a threat to the FOSS supply chain.
How AI can help maintainers
Before we begin this section, I need to make the following crystal clear:
- FOSS needs people to work
- AI/LLMs (large language models) are tools, not human replacements
AI coding assistants increase productivity. At the time of this presentation, there were 84 to choose from. One study by GitHub found that 88% of developers using a coding assistant felt more productive.
With the number of issues and PRs stacking up, the more productive maintainers are, the less burnout we will see. That is better for the FOSS community and ecosystem.
Coding assistants automate tasks by generating unit tests, pr descriptions, and release notes, improving code quality by finding/fixing bugs, optimizing code, variable renaming, etc. Naming things is a hard problem in computer science, so this is a big deal!
Bots are nothing new. Bots using LLMs are relatively new. They can help maintainers get clarity on what users are having issues with. They can free up maintainers to work on more critical issues. They can also help detect toxicity, one of the biggest threats to the free and open source ecosystem.
Safe space is a GitHub action created by Charli Gerard. It uses ML to detect toxic comments in issues and PRs. This bot can save maintainers from quitting the project, and in return, that helps keep the FOSS supply chain from bit rot and dependency hell.
Wrap up
- FOSS needs people to work
- AI/LLMs are tools - AI can help with productivity
- Less burnout
- Sustain FOSS, not destroy it - New tooling for maintainers
- Automate tasks
- Improve code quality
- Suppress toxicity
Will AI make maintainers' lives easier or harder?
I believe it will help, but time will tell with everything in life.
Curious to see how code assistants work? Try Cody for free.