AI Assisted Programming

December 10, 2025

In recent months, I've increasingly incorporated AI into my coding workflow. I don't believe in using "vibe coding" for anything beyond rapid prototyping and experimentation. I still prefer writing my own code because I don't fully trust AI to implement solutions in a way I can rely on. My intention here is to provide examples of responsible AI usage when writing code. For work, I use Q Developer in VSCode enterprise.

Debugging


1. Errors

As a full-stack JavaScript developer, I write backend services in Node.js and primarily use React and Next.js for the frontend. The Amazon Q plugin excels at many tasks, but its ability to analyze copied error logs from either backend or frontend is particularly valuable. Since Q Developer has access to all code in the VSCode workspace, it can analyze your code even within libraries in the node_modules directory for JavaScript dependencies.

2. Unexpected Output

Often when writing code, I encounter functions or portions of functions that don't provide the expected data or object structure. I frequently work with large JSON objects that need parsing for either data passing or frontend display. When stuck and unable to understand why my code isn't working, I'll ask Q to analyze the code and explain what I expected to achieve. In most cases, it identifies exactly what went wrong. Occasionally it's slightly off and I need to make minor tweaks to the suggested code, but it at least points me in the right direction.

Documentation


1. Documenting Code

This has been an incredibly valuable tool for me. Since I write in JavaScript, I include JSDocs at the top of each function to define and explain its purpose. AI excels at analyzing functions and generating comprehensive JSDoc comments that thoroughly describe what the code does.

2. README.md Generation

Since AI can understand and analyze code, I use it to generate and update README.md files for projects I contribute to. In my experience, most developers fail to update READMEs as code evolves, leaving documentation that no longer accurately reflects the repository's current state. A typical prompt I give Amazon Q looks like this:

The code in this project has recently had significant changes. Please analyze the
code and update the README to reflect these updated changes.

I've encountered many cases where the LLM provided details I hadn't even considered. There have also been instances where the generated README contained unwanted information or required slight tweaks for accuracy.

3. OpenAPI Specifications

As I've mentioned elsewhere on this website, I'm largely responsible for my company's internal developer portal. When I navigate to an API and find a missing API specification, I find it frustrating. This seems to be a common oversight— developers either don't include these files with their API code or leave them so outdated they're worthless. I've had great success generating base OpenAPI specifications through API analysis. As with everything AI-generated, it's important to correct any inaccuracies.

Code Completion


This is one of the most helpful features of AI integration in IDEs like VSCode. Amazon Q, for instance, can read and analyze code as you write, anticipating your next steps. When writing code that follows consistent patterns, it becomes even more reliable. I've found that the more I use it, the better it becomes at suggesting code that matches my coding style.

It's also excellent at replicating code patterns. For example, in the internal developer portal I maintain, there are components that perform similar functions but have enough differences to prevent complete reusability. Q Developer recognizes the patterns I use and provides completions that follow consistent patterns from other components while remaining contextually aware enough to generate fairly accurate suggestions for the current component.

Conclusion


AI is an excellent tool for software development, but it's just that—a tool. It's not an experienced developer who will consistently provide high-quality code that always works well and follows best practices. I've encountered many instances where it attempted to undo fixes, break existing functionality, or reverse recent upgrades because changes conflicted with code it was trying to generate. When AI gets stuck and can no longer effectively assist me, I turn to primary sources for answers, such as consulting official documentation. For example, when the AI assistant can't solve a Next.js problem I'm facing, I'll reference the Next.js documentation directly.

Always exercise caution and pay close attention to AI suggestions. Never fully trust that it's correct, and use your best judgment when you sense it's leading you astray. If you remain careful and understand the code AI generates, you'll generally be fine.