How I use coding assistants

TLDR; If I have a clearly defined software need, I can use Aider to build something that works well enough for me in under 15 minutes.

Coding assistants boost developers’ productivity to exceptional levels. They are particularly effective for small products or prototypes and they are getting better by the day.

I tried Copilot but it did not stick with me. Lately, I tested both Aider and Cursor. Aider resonates with me more. It just feels right, and I keep coming back to it. It runs on the terminal independent of your IDE. At the moment, I am using it with Claude Sonnet and find it very reliable. Sometimes I don’t even bother to open the editor anymore.

I use frontier commercial models. This is a problem for me because at work I don’t own the codebase and my clients so far don’t have team/business accounts with any of the big AI providers. My experience is based on experiments I do on the side.

Given the confidentiality and privacy issue when using commercial AI tools, I run the numbers for setting up your own personal AI infrastructure for coding assistance. If you compute the cost of hardware, the output in tokens per second, how much it costs to keep it running and the quality of the output you can expect from vanilla open source models, it financially makes no sense to run models in your infrastructure.

If I were to work with a product on a critical industry the calculation would be different, both because of the risk of leaking secrets and because the risk of hitting altered malicious models that introduce well hidden security issues or backdoors.

I don’t really use LLMs to complete implementation details (Copilot style). The game changer for me is prompting as a product engineer.

Here are some prompts I have used lately:

  • “The date on the birthday column should be rendered in YYYYMMDD format, unless it happened less than 30 days ago then humanize it as XX days ago”
  • “When I GET items, all notes attached to each item should arrive on a notes[]”
  • “Add an edit button to each row of the table, when clicked, open a form to edit all fields of the item to the right of the table”
  • “Give me an example payload for the POST endpoint to create items”
  • “Generate a docker compose”

Rarely will things work on the first try. Often I get compilation errors. Then you can mindlessly feed the error back to the model till Aider finds a solution that works. Then I test to make sure it does what I need. And only then do I look at the code and more likely than not I will leave the way it is. On average the output is terrific.

I see huge productivity gains because my job is not mission critical. Web development these days is about gluing together a puzzle of battle tested third-party packages with your own code. Generated code helps with the thin layer of business logic that provides value for you.

It works better if you use standard tools and follow modern best practices. Similar to the way traditional paper-based processes changed to be compatible with what ERP products offered, you should change your standards to make your code palatable for code assistants. Expecting the models to appreciate your uniqueness will be possible, but expensive and frustrating.

Therefore the tools work much better with strongly opinionated popular framework. If your project follows modern conventions, Aider knows where things should be and will request access to those files. From now on, the most important factor for your architectural decisions should be ‘does this tech make automated maintenance and feature generation more reliable’.

More tips from my experience so far: Confined environments work better. Keep Aider focused on a small surface area. Prompt for small scoped changes.

Enjoy.