Get tips and best practices from Develeap’s experts in your inbox

In my previous article, I talked about the general techniques and practices we found to be effective when using an AI-assisted coding tool such as CursorAI.

In this article, I would like to share some very specific tasks that benefit substantially from using AI-assisted dev tools and are often overlooked.

1. Writing code generators

One of the first things that coders try out with AI, is to get it to write code for them. The results are usually good for a well-defined problem but are inconsistent and require careful definition of the problem. This is not an issue if it is a one-time effort, but what if this is a recurring challenge?

Using AI to quickly build a template-based, deterministic generator is highly effective, and once it builds the template, you can improve it gradually and generate well-known, tested code with minimal effort.

So don’t write code that just solves the problem – write code that generates code to solve many identical problems.

2. Learning APIs

When using a new API, there are always hoops to jump through (e.g., authentication methods) and a multitude of confusing API-specific terms. Ever met an API that has both update, insert, patch and upsert – and you need to figure out which to use and how?

Feed the AI with the documentation link and gradually walk it through the process of connection, authentication, and performing key tasks you expect to use. Ask it about its choices and about fine points you want to make sure. Is the operation transactional? What are the limits, and what happens if I exceed them between tasks? Etc.

In record time, you will be ready to actually use the API for real-world stuff and understand the decisions you make. And you will probably write the real code using the same AI and context…

3. Test coverage

One of the most scary things in the acceleration of development is the feeling that tests are not keeping up with development.

The answer for this has been known for years – automated testing as part of the development process, but in practice, many programmers shirk this responsibility in the early stages of development and then never get the time to close the gap.

But what if you had a programmer who is happy to write unit tests?
Well, turns out you do. Creating extensive test coverage of your code is much much simpler with AI-assisted coding.

At last, you can follow the well-known best practice: “Write a test that fails before you fix the bug”

4. Error handling

We are often most effective when we enter the “flow” of programming and focus on the various business-related aspects of a problem, the “happy trails.”

Writing all the pesky boundary cases and error conditions is a drag, and at best, we leave a minor comment. And pay dearly in production…

Asking AI to review the code and add error handlers is extremely effective and is easy to review and improve. It allows us to use our creative time wisely and our “garbage time” with an effective helper on this mundane but ultra-important task.

Core Principles

The common thread for all aforementioned tasks is the nature of the work. Tasks in which the current state of AI excels and fuses well with our own human challenges are:

  • Focused, well defined
  • Mundane
  • Peripheral (though often important)
  • Easy to review

Talking to others, many more such tasks were mentioned, which I did not write about as I am not sure I fully agree with: Writing ETLs, Configuration files, Migration scripts.

While YMMV on any specific task, I believe these guidelines hold well when searching for “quick wins” in the use use of AI today.

We’re Hiring!
Develeap is looking for talented DevOps engineers who want to make a difference in the world.
Skip to content