{"slug": "use-ai-like-a-senior-engineer-actually-fixing-bugs-not-just-asking-questions", "title": "Use AI Like a Senior Engineer: Actually Fixing Bugs, Not Just Asking Questions", "summary": "A developer argues that engineers get the most out of AI coding tools like Claude, Copilot, and ChatGPT by treating them as senior colleagues rather than search engines. The key is to do 70% of the debugging work first—isolating the problem, eliminating assumptions, and providing context—so the AI can give specific, actionable solutions instead of generic advice. The post emphasizes that this approach sharpens debugging skills and deepens codebase understanding.", "body_md": "You're staring at a stack trace that makes no sense. Three console.logs in, still confused. So you copy-paste it into Claude and wait for an answer. Sometimes it works. Sometimes you get generic debugging advice you already knew.\n\nHere's the thing: the devs who get the most from AI tools don't treat it like a search engine. They treat it like a senior engineer sitting next to them. Which means they do the prep work.\n\nWhen you dump a stack trace with zero context, you get zero-context answers. Claude might guess at what's happening, but it's flying blind. You get suggestions like \"add console.logs\" or \"check your imports\" — stuff you've probably done already.\n\nThe best debugging happens when you've already done 70% of the thinking.\n\nThen they ask smarter questions. Not \"why is this broken?\" but \"I'm seeing X, expected Y, and here's what I've already tried.\"\n\n```\nMy React form isn't updating. Help?\n\nError: \nTypeError: Cannot read property 'value' of null\n```\n\nClaude gets: \"Check if your ref is set up correctly.\"\n\nYou get: Frustrated.\n\n```\nReact form with controlled input. onChange updates state, form displays wrong value.\n\nHere's my component:\n[paste actual code]\n\nWhen I type in the field:\n- Input value changes visually\n- React DevTools shows state DIDN'T update\n- No errors in console\n\nI've tried:\n- Checked onChange is attached\n- Logged the event object (it's there)\n- Verified handleChange is defined in the class\n\nWhat am I missing?\n```\n\nNow Claude can see:\n\nAnswers become specific. \"Oh, you're binding the handler wrong\" or \"That's a closure issue\" — actual solutions.\n\nYou've got a search input that fetches results. Sometimes you type fast, results come back in the wrong order.\n\n**Don't say:** \"My search is broken\"\n\n**Say:** \"I fetch data in an onChange handler without canceling previous requests. When I type fast, response order doesn't match request order. I've tried [thing 1, thing 2]. Should I be using AbortController?\"\n\nClaude can now give you the *exact* pattern:\n\n``` js\nuseEffect(() => {\n  const controller = new AbortController();\n  fetch(`/api/search?q=${query}`, { signal: controller.signal })\n    .then(res => res.json())\n    .then(setResults);\n\n  return () => controller.abort(); // Cancel on cleanup\n}, [query]);\n```\n\nYou didn't ask for it. You understood the problem first, then asked the smart question.\n\nThis works with every AI tool — Claude, Copilot, ChatGPT, whatever. The tool doesn't matter as much as the thinking.\n\nSenior engineers don't know everything. They're good at debugging because they **isolate problems, eliminate assumptions, and ask answerable questions.**\n\nUsing AI the same way doesn't make you dependent on it. It makes you sharper at the thing you're already supposed to do: actually understanding what's breaking.\n\nPlus, the time you spend narrowing down a bug is never wasted. You learn your codebase better. You catch edge cases. You write better code next time.\n\nIf you hit all of those, Claude will give you answers that actually work.\n\n**More dev resources:** Check out [LearnAI Weekly](https://learnairesource.com/newsletter) for practical guides on AI tools, productivity hacks, and the kind of stuff that actually saves you time.", "url": "https://wpnews.pro/news/use-ai-like-a-senior-engineer-actually-fixing-bugs-not-just-asking-questions", "canonical_source": "https://dev.to/learnairesource/use-ai-like-a-senior-engineer-actually-fixing-bugs-not-just-asking-questions-3c2b", "published_at": "2026-06-19 15:00:26+00:00", "updated_at": "2026-06-19 15:07:24.733453+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "large-language-models"], "entities": ["Claude", "Copilot", "ChatGPT", "LearnAI Weekly"], "alternates": {"html": "https://wpnews.pro/news/use-ai-like-a-senior-engineer-actually-fixing-bugs-not-just-asking-questions", "markdown": "https://wpnews.pro/news/use-ai-like-a-senior-engineer-actually-fixing-bugs-not-just-asking-questions.md", "text": "https://wpnews.pro/news/use-ai-like-a-senior-engineer-actually-fixing-bugs-not-just-asking-questions.txt", "jsonld": "https://wpnews.pro/news/use-ai-like-a-senior-engineer-actually-fixing-bugs-not-just-asking-questions.jsonld"}}