{
  "id": 5308678,
  "title": "How to Stop Fighting Your AI Coding Assistant",
  "url": "https://urgent.news/2026/09/03/how-to-stop-fighting-your-ai-coding-assistant",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-03T11:00:56.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ntty/how-to-stop-fighting-your-ai-coding-assistant-3f8o"
  },
  "original_language": "en",
  "account": "For many developers, AI coding assistants are a source of frustration. They often feel like they're talking to a junior developer who has only superficially understood the documentation. The key to unlocking their potential lies in changing how you interact with these tools. The biggest mistake developers make is treating AI assistants as oracles. They ask vague questions, get generic responses, and then get annoyed when the results don't meet their expectations. AI assistants are probabilistic text generators. They don't have knowledge of your codebase or your architectural preferences unless you explicitly provide them. Here's a workflow to get usable, production-ready code from an AI assistant.\n\nFirst, context is crucial. Never start a conversation with a generic request like \"Write a function to parse JSON.\" Instead, define the environment. For instance, say you're building a Node.js backend using Express and need a middleware function to parse JSON bodies. You also specify that the application uses TypeScript and that error handling should follow the standard Express error middleware pattern. By setting these parameters, you guide the AI to generate code that fits your specific needs.\n\nNext, break down complex tasks into smaller steps. If you need a REST API for user management, don't ask the AI to \"Build me a user API.\" Instead, break it down into steps: design the database schema, write a TypeScript interface for the User model, and write an Express route that accepts a POST request to create a user. This approach allows you to review each step, catch errors early, and ensure the code aligns with your project's standards.\n\nAI assistants excel at pattern matching. If you show them a pattern you like, they'll follow it. For example, if your project structures API responses as `{ data: ..., error: null }`, provide examples of this pattern in your prompts. The AI will mimic your style, making the code feel like it was written by you. This consistency helps integrate AI-generated code smoothly into your existing system.\n\nWhen providing examples, show the AI how you name variables and handle logging. This helps the AI generate code that aligns with your coding style. Additionally, it's essential to tell the AI what it should not do. For instance, specify that you want to avoid external libraries and only use standard Node.js modules. Also, state any constraints, such as not writing tests, keeping functions under a certain number of lines, or excluding certain features.\n\nRemember, the first answer from an AI assistant is rarely perfect. Treat it as a draft and iterate to refine the code. Provide feedback to guide the AI towards the desired outcome. Use AI for tasks like writing boilerplate code, exploring new libraries, or handling repetitive tasks. However, avoid using AI for critical business logic or security-sensitive code without careful review. Do not rely on AI to hide your lack of understanding. If you can't explain why the code works, it's not safe to ship it.\n\nIn conclusion, AI coding assistants are powerful tools, but they require clear guidance and structured interaction. Stop asking for magic and start providing context. Stop accepting generic code and start constraining the output. Treat the AI as a collaborator rather than a black box. By integrating these tools properly, AI coding assistants can save you hours of work and streamline your development process.",
  "summary": "I used to hate AI coding assistants. They felt like talking to a junior developer who had read the documentation once and forgot the rest. You ask for a complex system design, and they give you a for loop and a comment that says \"// add error handling here.\" Then I changed how I talked to them. The tool didn't change. My expectations and my prompt structure did. The biggest mistake most…",
  "key_points": [
    "Treat AI assistants as probabilistic text generators, not oracles",
    "Break down complex tasks into smaller, manageable steps",
    "Provide clear context, style preferences, and constraints to guide AI"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}