How does AI impact library adoption?

Florian Enner
4 min readJul 9, 2024

--

TL;DR: A newer library is seeing reduced adoption because ChatGPT insists on recommending an ancient library that has been dead for >10 years.

Background

Back in 2014 I ran into an issue where I was using Java and needed to write incoming sensor data to .mat files that could be efficiently read as matrices by MATLAB. The only Java library that existed at the time was JMatIO, released in 2007 and subsequently abandoned in 2012. Afterwards there were several feature-forks that eventually got combined into MatFileRW, which had its last update in 2018.

While it was great that something existed, the library was unfortunately quite unintuitive to use and came without documentation. Users had to piece code together from dozens of StackOverflow questions asking about even the most basic tasks (e.g. here or here — note that both answers reference an ETH Zürich javadoc that no longer exists).

I still tried using it, but I unfortunately also ran into prohibitive performance and memory issues. Improving the existing project would have required a major rewrite, and I ended up re-implementing the required subset of the spec from scratch.

Creating a new library

In 2018 I eventually decided to turn my partial implementation into a full-featured library and open-sourced it as MAT File Library (MFL). Besides being orders of magnitude more efficient than jMatIO, I tried to make it much easier to use (e.g. remove casting) and provide good documentation.

I then advertised the library in some StackOverflow responses, and asked the maintainer of MatFileRW (the only non-abandoned fork) to review the project. He actually ended up migrating his own applications to MFL, and added Readme text recommending other users to migrate as well:

Intro on https://github.com/diffplug/matfilerw

Most Google results were still about jMatIO, but once users searched for maven coordinates or an active fork, they would eventually get to see the recommendation.

For several years I could see that MFL was actively getting Github stars, people posted issues they encountered during migration, and the downloads from Maven Central were steadily rising. Given that working with .mat files is a very niche use case, I had the impression that the project was doing quite well, and that it might have become the default library for this use case.

AI Recommendations

However, in early 2023 all adoption metrics seemed to halt, and I started seeing new comments on StackOverflow where users were actively recommending the abandoned jMatIO library.

I figured it had something to do with ChatGPT being released shortly before that, and was quite surprised when I asked the AI for recommendations.

Here is a chat with the JetBrains AI assistant at the time of writing this post:

Interestingly, it does mention MFL, but the link points to someone else’s dead javadoc, and the sample code and maven coordinates are for jMatIO.

Let’s ask it to be more specific,

Well, how about specifically asking for MFL?

So… the jMatIO library that came without documentation, breaks without useful error messages, doesn’t work with Java 9+, and has been abandoned more than a decade ago is supposedly “frequently updated, well-documented, and robust”?

My best guess is that all of the usability questions and complaints about jMatIO serve as a much richer training set for AI models. When I searched for similar usability issues about MFL, the only post I found was answered by someone else with a link to the documentation.

With people and bots blindly copying AI responses to get reputation on StackOverflow, the ancient library gets to have another heyday… At the very least it’d be nice if it’d recommend the latest fork rather than the ancient 2007 version.

At the end of the day I don’t care much about whether my library is internal-only or used by many people, but I previously never thought about the impact AI tools might have on establishing new libraries.

How many better libraries will I never know of simply because they’ll never be recommended?

--

--