跳到正文
DEV Community· nayem·· 1 小時前AI 評分41

以前用 Stack Overflow,現在用 GPT

stack overflow then, gpt now

AI 導讀

除錯方式由搜尋 Stack Overflow 上的錯誤訊息,轉為用日常語言向 GPT 描述問題,取得針對程式碼的回答和解釋。Stack Overflow 的投票和留言有助辨別經實際驗證的答案;GPT 回答較快,但可能自信地編造不存在的 API 方法。作者兩者都用:需要經驗驗證的答案時選 Stack Overflow,需要速度時選 GPT,並會自行測試和核實答案。

正文

nayem

Back in my early days, debugging had a fixed shape. Something broke, I copied the error message into Google, opened the first Stack Overflow result, and scrolled past three confident wrong answers to find the one with the green checkmark. That was the whole workflow, and honestly, it worked. Slow, but it worked.

These days I do something different. I describe the problem to GPT in plain words and get an answer written for my exact code, with an explanation attached. It is faster by a lot. But it is not the same thing, and the differences matter more than the speed.

What Stack Overflow got right

The votes were the feature. An answer with 400 upvotes and a green checkmark had survived contact with hundreds of real codebases. The comments were the second feature: someone always showed up to say this breaks on version X, or here is the shorter version. You did not just get an answer, you got the argument around it, and reading the argument is how you actually learned.

What was bad about it

It was slow, and it punished you for not knowing the right words. If you could not name the problem, you could not search for it. The top answer was sometimes from 2014 and wrong for the version you were on. And asking a question yourself meant risking the duplicate shutdown from someone who had been there since 2009.

What GPT changed

The biggest change is you no longer need to know what to search for. You describe the symptom and it guesses the cause. It adapts to your exact code instead of making you adapt a stranger's answer. And it explains, which Stack Overflow answers often did not bother to do.

The bad part nobody talks about

GPT never says I do not know. It will invent an API method that does not exist, cite a library version that never shipped, and present it all with total confidence. Stack Overflow had votes to catch that. GPT has nothing except you.

hallucinated-api.js

// GPT suggested this with total confidence
const first = users.first(); // TypeError: users.first is not a function
// JavaScript arrays have no .first() method. It just looks right.

The other problem is subtler. When the answer works and you do not understand why, you have learned nothing, and the next bug takes just as long. Copy-paste from Stack Overflow had the same risk, but at least the comments usually called it out.

So, what have I learnt?

  • Stack Overflow's real feature was the votes and the argument in the comments, not the answers themselves.
  • GPT's real feature is that you do not need to know what to search for. You describe the problem, it guesses the cause.
  • The skill that matters now is verification. Read the answer, run it, and check the parts that smell off.
  • An answer you do not understand is a bug you have not met yet.
  • I use both. Stack Overflow when I want the battle-tested answer, GPT when I want speed. The tool changed, the job did not.

Originally posted on nayemalam.com/blog.

來源:DEV Community · dev.to