AI Programming Assistants are Good at...

AI has taken the world by storm over the last two years. Since Chad Jippity launched at the end of 2022 we have seen an onslaught of startups and service extensions built around API wrappers to the latest model that Sam wanted to release. Most of these from a tech perspective were laughably bad (Rabbit R1 is a great example...) but some were too good to ignore. 

One of those was code completion. A major force multiplier for an engineer is a good LSP and if trained correctly, LLMs are just LSPs on crack. Back then I severely underestimated just how much crack...

My Experience with LLMs

The first LLM-powered programming assistant I tried was Copilot in the spring of 2023. It was first to market and highly debated on release. Lots of people claimed, "You shouldn't use it because it makes bugs and you can't trust it". They were 100% right. The early versions of these tools were far from perfect but neither was Web 1.0. Despite all of this, I looked at Copilot with a sense of wonder and excitement I hadn't felt since my first "Hello World" app as a kid.

I used Copilot personally and professionally for the next year to better understand how it can benefit my day to day. Everything I read and everyone I talked to who used it during this year showed me one thing: No one had a freaking clue how to use these tools properly because no one knew what they were good at.

I've since switched to Cursor using Claude. Cursor is a branch of VSCode that adds powerful tools such as project-wide context, file(s) specific context, and a composer that lets it manage your project files and directories. I look at Cursor like I used to look at Copilot... (insert "Distracted Boyfriend" meme here). It increases my productivity by an order of magnitude for most tasks. Let's dive into what I've found Copilot/Cursor useful for and where it can get in the way

In my personal/professional experience, I find AI assistants to be most useful for mundane tasks such as boilerplate code, documentation, tests, and last but not least refactoring. All of these tasks require the reapplication of established patterns and strategies usually found within the project itself. AI is just a fancy way of predicting what patterns it sees in the provided context, making it a great tool for these kinds of tasks.

Before we continue, let me address everyone who is thinking "aI iS nOt ReLiAbLe!" or "HoW cAn YoU TrUsT tHaT cOdE?!". I have two words for you: Skill Issue. I'll elaborate more below.


AI Programming Assistants are Good at...

Boilerplate code

AI programming assistants can significantly reduce the effort needed to write boilerplate code. Tasks like setting up classes, methods, and repetitive configurations are tedious, but AI can quickly generate these based on simple prompts or predefined templates. This allows me to focus on the core logic and functionality, while the assistant handles the monotonous groundwork.

This is not to say you can blindly tab your way to the perfect project skeleton. Using AI for boilerplate code moves the work required by the engineer from writing the function names and structures to reviewing proposed code changes. Having a tight feedback loop and clear code diffs (such as Cursor's composer) to course correct or polish a result you don't love is vital to practicality.

Documentation

When it comes to documentation, AI assistants excel at generating docstrings, comments, and even entire sections of user manuals. They can interpret code and produce documentation that adheres to best practices, ensuring consistency and reducing the time spent manually writing detailed explanations. This is especially useful for large codebases where thorough documentation is crucial.

I have saved countless time documenting functions. This is work you can "double dip" on (so to speak) as it provides clearer context for later AI assistants interpreting your project and lets you generate web API docs for easier browsing (swagger for example) further empowering the team.

Testing

For testing, AI assistants can help generate unit tests, integration tests, and edge case scenarios by analyzing code and predicting potential failure points. They can automatically create boilerplate test structures, suggesting common assertions and helping ensure code reliability without requiring the developer to manually define every test case.

This one is incredibly important for the ongoing maintenance of tests in established projects too. Everyone has done the thing where they have 5/7 passing tests on a PR, so they push a new commit, and now they have 5/5 passing tests on that PR. Don't be this dev. AI assistants make it easier to get up-to-speed with tests we did not write ourselves (Which for most of you is all of them).

Refactoring

Refactoring is another area where AI assistants shine. They can identify redundant code, suggest optimizations, and improve readability by restructuring functions, renaming variables, or applying design patterns. This improves code maintainability without the need for extensive manual review, making it easier to adapt and evolve codebases over time.

Everyone has tech debtty issues in their projects, and no one likes dealing with them. Not the engineers, not the managers, and especially not the C-Suit. I've been able to passively refactor an insane amount of tech debt using these assistants. The most helpful has been Cursor by far. The project-wide context and referencing exactly the files you want to be included in the context are insanely powerful. This lets you scaffold out a solution, provide that template as context along with the files/code to be refactored, and let the LLM do its predicting.

Finale Thoughts

AI-powered programming assistants have revolutionized the coding landscape since tools like Chad and Copilot debuted. Initially flawed and met with skepticism, these tools have evolved to become invaluable in my day to day. Tools like Cursor, which enhances VSCode with project-wide context and file management, have especially proven their worth by significantly boosting my productivity. AI excels at automating repetitive, mundane tasks, enabling engineers to focus on higher-level logic and innovation. While some still question the reliability of AI in programming, its benefits, when used thoughtfully, are undeniable.

Popular Posts