I have used AI for coding *a lot* in the last couple of months β mainly Copilot and Replit Ghostwriter (my favorite) β because I wanted to write about it in the newsletter.
My take is that it is not a silver bullet β here are 7 use cases that worked for me and 4 that didn't π
π₯± Boilerplate / Repetitive code β AI truly excels here. Creating the stubs for new components, common config, or adding libraries (e.g. add Tailwind to your project).
π Write tests β AI can write good tests for your code, but expect to have to add more cases yourself. However, you will never have to write another test stub in your life.
π Explain / document code β AI is very good at explaining code and creating docs for you. I have tried it with complex stuff and it always handled it well. Obscure code seems like a thing of the past. You can also try mintlify.com or theneo.io to auto generate docs.
π οΈ Refactor small functions β for when explaining is not enough! AI is surprisingly good at splitting functions, refactoring them for better performance, and other small-scale maintenance.
π SQL queries β letβs admit it: SQL is no oneβs favorite language. Queries created with AI look very good as long as you provide a schema. You can also try mason.app for this.
β¬οΈ Pull Requests β AI can create automatic descriptions for PRs and scan code to propose improvements, before it gets merged. This is a no-brainer and I expect it to become commonplace. You can use ai.codacy.com for this.
π» Terminal β I am using warp.dev as my main terminal because, other than having a great autocomplete, it includes an AI assistant that can suggest and run commands for you. I always forget how to do shell things, so this is super useful.
But it hasnβt been all sunshine and rainbows.
There have been times where I had to spend more time debugging AI-generated code than I would have probably spent writing the full thing myself.
The main problem is that AI almost never tells you βI donβt know how to do thisβ β it rather hallucinates and gives you the wrong answer.
So, I have learned to watch out for these situations:
β Very recent stuff β If you ask for something that is relatively new (<2 years), there is a higher risk of hallucinations because 1) AI might not have seen it in the training data, and/or 2) examples of it were few.
β Niche libraries β same as above!
β Specific library versions β AI isnβt good at keeping consistency between function signatures and the library versions you are using. Keep that in mind if you need something very specific.
β Complex functions with a lot of context needed β AI is generally good at creating complex functions when they work in isolation (e.g. algorithms, math stuff, etc.) but it isnβt the best when it has to keep into account dependencies from a lot of other code.
You can find the full article with more use cases below π
We'll recommend top publications based on the topics you select.