My favorite use case for AI in software development

My favorite use case for AI in software development

As I wrote in my post on the state of AI-based software development, AI still has many limitations when applied to software development. However, I found one case in which it improved my productivity tenfold without any meaningful downsides.

It's learning a new code base.

It's similar to the search engines first introduced for the web. Only it works with a repo copy you fetch on your machine.

Learning a new code base

Let's say you start working on a new project. Before you start making meaningful contributions, you have to familiarize yourself with it and explore it. You can do this by reading the documentation and code and fiddling with small bits. Step by step, you build familiarity and create a mental map of the project within your head.

Now imagine you have a dedicated assistant you can ask any question about:

  • What's the top-level architecture?
  • How do I initially go about compilation issues or errors?
  • How do I implement feature X using this library?

Patching an open-source library

You have a dependency in your project that limits the usability of the application necessary to you, or you have a good old bug staining your day with frustration. If you initially feel some resistance about patching a separate library and creating a fork for yourself, you're certainly not alone in this. It involves learning the library's internals and thinking of making a change that would fit well with the overall design, which you must internalize to address correctly. And I'm not even speaking of interacting with maintainers to make a case for your change.

You can ask LLM to:

  • verify you need to patch it by asking to find a different solution to your problem using the library
  • locate the scope that needs a change
  • locate the scope that can be affected by the change
  • figuring out the considerations that may be important to check before opening the pull request
  • rubber-ducking your approach all the way

Caveats

Using a third-party service or API provider will leak code, and that's not appropriate with closed proprietary codebases.

However, Deepseek R1 and LLaMa weights are open to running a model on your hardware. Given the amount of computing power necessary, this may be a stretch, but it became feasible recently, which is groundbreaking.

Get ahead

This approach is a significant productivity booster, a better search + rubber-ducking tool. Save some time for yourself!