If you are someone who already uses AI for coding, you are not the target audience for this post. You should still read it.
If you hate the idea of AI in general or hate the idea of using AI for coding because it’s trained on existing code without permission, I appreciate your view. I’m not going to convince you to use AI. You should still read it.
If you are someone who is skeptical or has thought about using AI but takes pride in writing code line by line, this post is for you. But I’m not going to try to convince you either. I’m going to try to make you consider using AI for coding.
The hardcore programmer’s guide to using AI for coding… sort of
There are many aspects of your job that AI is surprisingly good at. Even if you don’t use it to write the actual code, there are many other use cases for it.
1. Test coverage
We know writing tests is important. Sometimes, we don’t. Or we end up having to own the code someone else wrote and left without tests. Now you cannot make any changes with confidence. You need tests. If tests are there, you need coverage.
You should use AI to write these tests for you.
2. Understand the codebase
If you are working on a large codebase and don’t understand any particular feature, you should ask AI to explain how the feature works. This is especially helpful if you are looking to contribute to open source and want to understand how the project is set up. You should not vibe code and create slop PRs (that’s for the next post though).
3. Rubberducking
If you are someone like me who likes to speak out loud about a complex problem or write things down, you should talk to AI (check out handy) or write your plan in a markdown file and ask AI to find any missing pieces or obvious mistakes. It is good at identifying edge cases you might not have considered or suggesting better solutions.
4. Documentation
Documenting how things work is always helpful. You can explain the feature in a few words and AI can analyze the code to write a clear document. This is especially important when you have other members on your team who might be using AI, or for someone who inherits the codebase from you. Sometimes it can be useful to you when you come back to a feature months or years later.
5. Code review
There are many AI code review products. You don’t have to use any of them. Once you write the code, you can tell AI how the feature works (helps to document, see above) and ask it to review your code for any glaring mistakes. You could go one step further and create a skill with what you look out for during PR reviews.
6. Automate boring tasks
The last one, but my favorite. I do boring things every day. It’s part of the job. Parse an Excel file that’s in a specific format and create a file with just the information you need in an expected output format? AI can write that code. You can test the result by reviewing the output file.
There are other aspects of your day-to-day that AI could help with or fully automate, giving you more time to do what you truly love: write code.
You should use AI for coding.