Over the past year, I have gradually integrated AI into my workflow. I began with ChatGPT, explored solutions that directly integrate into VSCode, and finally settled with Raycast AI (powered by GPT-4).
The significant shift occurred when I joined Sana earlier this year and embarked on a new journey with Kotlin. Instead of the traditional web search for documentation and tutorials, I turned to ChatGPT. I pasted code snippets from the codebase (ensuring nothing sensitive or business-critical) and asked it to explain parts of the code and its syntax. While coding, I requested it to review my work, provide feedback, and suggest potential refactoring to write idiomatic Kotlin code. The feedback loop proved to be enjoyable.
In my experience, AI truly shines as a virtual ‘rubber duck’. It listens, decodes, and helps refine ideas, even when they appear too abstract. It’s a fantastic tool for refactoring, which is a frequent task when working on an existing codebase. It boosts my coding efficiency in a similar way that Grammarly improved my English. (Although, I have since stopped using Grammarly, relying solely on AI to fix spelling and grammar errors.)
AI also excels as an error decipherer. Have you ever squinted at TypeScript error types? They can seem like cryptic riddles. But with AI, they transform into straightforward instructions.
It’s important to have coding knowledge to catch when AI starts to ‘hallucinate’. A quick web search can validate its suggestions or identify inaccuracies. However, with clear tasks in mind, AI proves to be a smart assistant, providing solid suggestions.