SIDDHARTH S. JHA

AI for Coding

Jan 8 2025

Lately, I’ve been enjoying coding with AI. I wasn’t an early mover in AI by any means. Publicly available consumer AI models have been around since 2022. I took ChatGPT, Dall-E and others for a test drive when they were released, but I’ve only started using AI for my daily use cases since autumn of last year.

Perhaps, the turning point for me was delving deep into the workings of Transformer architecture in a course offered by the University of Waterloo called Foundations of LLMs I completed just about a month ago. Gaining a general understanding of what goes on behind-the-scenes when you interact in natural language with an AI model, from word embeddings to how information gets encoded and decoded, the concept of self-attention, the effect of augmenting through information retrieval from documents at inference time and many other small ideas captured my fascination.

When you know what’s generally going on inside a system, you gain a sort of trust and familiarity with it. A genuine sense of curiosity sets in for how different parameters invoke different outcomes.

My current set up for AI-assisted coding is made possible through two tools. The first one is ChatGPT Plus. I use GPT 4o and o-1 models to get directed towards how one might accomplish a task with a best practice or modern approach, typically appending my request with a brief idea for the technology or feature of a coding language I’m interested in using. The second one is Cursor. I use Cursor as a lightweight alternative to Visual Studio Code. While you can provide context through file upload with OpenAI’s Plus subscription, you get that built-in with Cursor’s Chat & Composer. Cursor figures out the context on its own. I’m on the free version of Cursor so I use it sparingly, but it’s useful in automating tasks that are overly mechanical (e.g. “make all the child elements in this container follow this structure”). I turned off the auto-complete because frankly I found it quite annoying.

A lot of the barrier around these assistants for coding seems to be in crafting the right prompt. Prompt engineering isn’t easy. And neither of these tools do complex software development tasks very well. Though, occasionally, they can and it feels magical when that happens. At the very least, they provide a much better starting point than the mental drain of parsing Google search results and stackoverflow threads. There are no ads or links to click. All the information it can provide is in well-structured natural language (e.g. English for me) with a friendly & helpful attitude instead of overly opinionated and arrogant like on stackoverflow.

Right now, AI feels helpful in coding. And down the line, it can be transformational. It’s not the hype, but the productivity gains are what currently make me optimistic about AI augmenting human intellect (in the spirit of Douglas Engelbart’s visions) over the long run. But my opinion is subject to change as these technologies rapidly evolve.