惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
WordPress大学
WordPress大学
U
Unit 42
I
InfoQ
A
About on SuperTechFans
宝玉的分享
宝玉的分享
J
Java Code Geeks
博客园 - 司徒正美
爱范儿
爱范儿
Engineering at Meta
Engineering at Meta
G
Google Developers Blog
人人都是产品经理
人人都是产品经理
小众软件
小众软件
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
aimingoo的专栏
aimingoo的专栏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI
腾讯CDC
Recent Announcements
Recent Announcements

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Use AI Like a Senior Engineer: Actually Fixing Bugs, Not ...
Learn AI Resource · 2026-06-19 · via DEV Community

Learn AI Resource

Use AI Like a Senior Engineer: Actually Fixing Bugs, Not Just Asking Questions

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.

Here'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.

The Problem With Generic Debugging

When 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.

The best debugging happens when you've already done 70% of the thinking.

How Senior Engineers Actually Debug

  1. Reproduce it consistently. Not "sometimes breaks." Exact steps.
  2. Narrow the scope. Is it the network? The parser? The database? One component or five?
  3. Check assumptions. Did the data actually load? Is the API returning what we think?
  4. Read the error. Not just the message — the stack trace, the context, what was happening before.

Then they ask smarter questions. Not "why is this broken?" but "I'm seeing X, expected Y, and here's what I've already tried."

Using AI for Real Debugging (With Examples)

Bad Approach:

My React form isn't updating. Help?

Error: 
TypeError: Cannot read property 'value' of null

Claude gets: "Check if your ref is set up correctly."
You get: Frustrated.

Good Approach:

React form with controlled input. onChange updates state, form displays wrong value.

Here's my component:
[paste actual code]

When I type in the field:
- Input value changes visually
- React DevTools shows state DIDN'T update
- No errors in console

I've tried:
- Checked onChange is attached
- Logged the event object (it's there)
- Verified handleChange is defined in the class

What am I missing?

Now Claude can see:

  • The actual code structure
  • What you've already eliminated
  • The specific disconnect between UI and state

Answers become specific. "Oh, you're binding the handler wrong" or "That's a closure issue" — actual solutions.

Real Example: API Race Condition

You've got a search input that fetches results. Sometimes you type fast, results come back in the wrong order.

Don't say: "My search is broken"

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?"

Claude can now give you the exact pattern:

useEffect(() => {
  const controller = new AbortController();
  fetch(`/api/search?q=${query}`, { signal: controller.signal })
    .then(res => res.json())
    .then(setResults);

  return () => controller.abort(); // Cancel on cleanup
}, [query]);

You didn't ask for it. You understood the problem first, then asked the smart question.

The Pattern

  1. Understand the symptom. Not "it's broken." What does broken actually look like?
  2. Narrow it down. Is it input, processing, or output?
  3. Show your work. Code + what you've tried.
  4. Ask specific questions. Not "fix this" but "does this pattern work for X?"

This works with every AI tool — Claude, Copilot, ChatGPT, whatever. The tool doesn't matter as much as the thinking.

Why This Matters

Senior engineers don't know everything. They're good at debugging because they isolate problems, eliminate assumptions, and ask answerable questions.

Using 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.

Plus, 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.

Quick Checklist Before You Ask AI

  • [ ] Can I reproduce it consistently?
  • [ ] Have I narrowed the scope (component, function, data)?
  • [ ] Have I checked obvious stuff (typos, imports, bindings)?
  • [ ] Can I show a minimal example (or the actual code)?
  • [ ] Can I say specifically what I've already tried?
  • [ ] Am I asking a question, not just describing the problem?

If you hit all of those, Claude will give you answers that actually work.


More dev resources: Check out LearnAI Weekly for practical guides on AI tools, productivity hacks, and the kind of stuff that actually saves you time.