Google Cloud Blog
Follow
Five Best Practices for Using AI Coding Assistants
Accessing AI coding assistants, like kitchen knives, doesn't guarantee proficiency. Effective use requires learning specific techniques and understanding the tools. Engineers from Google Cloud Developer Experiences shared five best practices after using Gemini CLI, Gemini Code Assist, and Jules on complex projects. The first practice is to consider your use case and choose the appropriate AI tool for specific tasks. For instance, use inline generation for new functions and agents for larger migrations.Next, train the AI tool with foundational work, such as documenting the codebase, generating READMEs, and creating unit tests. This early documentation improves the quality of AI output. Subsequently, make a plan by iterating on requirements, analyzing source code, and defining tests. Break complex assignments into manageable components and ensure the AI seeks approval before executing milestones.Prioritize prompt engineering by providing relevant details, just as you would for a new teammate. Be specific about your requests and desired outcomes to improve iterative results. Finally, connect the dots between sessions by creating context files at the end of each working session. This context file, containing instructions and project details, helps the AI understand the project and your working style for more accurate planning and execution.