Hacker News new | ask | show | jobs
by impalallama 1249 days ago
ChatGPT help me solve a refactoring bug today. I had spent hours messing around trying to figure out what the issue was until I realized, via asking ChatGPT, that I had misunderstood a piece of the code and the docs. It was able to answer and provide examples (until it had error and crashed) in a way a senior engineer might have been able to.

The funny thing is I had tried just pasting in code and saying "find the bug" and it wasn't helpful at all, but when I posted in a portion and asked it to explain what the code was doing I was able to work backwards and solve the issue.

Its nice anecdote where the AI felt additive instead of existentially destructive which has been a overbearing anxiety for me this last month.

4 comments

Sounds a lot like “rubber duck” debugging.
If you’re willing to overlook the small detail that it is the duck explaining to you how your code works rather than you explaining to the duck then sure
Except that the duck is an unreliable confabulator, and will cheerfully make up plausible-sounding fake information when “explaining”.
Shrug. Precision seems like a low importance metric when suggesting interpretations of code for the purpose of debugging.
It’s been said that the best way to get the correct answer from somebody is not to ask for it, but to instead give them an obviously incorrect answer. This annoys people enough for them to do the necessary research to come up with the correct answer, in order to prove the incorrect answer to be wrong. It might be that ChatGPT can be used to weaponize this tendency.

Maybe Stack Overflow should have an automatic pinned answer from ChatGPT (clearly labeled as such) on all questions, in order to goad people into providing the actually correct answer?

I feel the smugness in this post overlooks that fact that most of the time ChatGPT is going to be correct.
That works for a really small amount of code (like 100 lines).
From Star Trek: First Contact: "When you build a machine to do a man's job, you take something away from the man."

You surrendered the need to think to the machine. You are lesser for it. I don't think these AIs are just removing drudgery, like, say, a calculator. They actually do the work. Or more correctly, they produce something that will pass for the work.

Wholesale embracing of this sort of technology is bad for us.

That sounds pretty Luddite to me.

I don't think the average person wants to be doing the menial work, vs architecting a grander vision IE the purpose for the work.

many AI is designed for doing research, medical and writer work.
That's how Socrates thought about books. Yet here we are 2400 years later and our minds are mostly fine.
"When and Why Did Human Brains Decrease in Size 3,000 Years Ago?" https://neurosciencenews.com/evolution-human-brain-collectiv...

Coincidence? ;)

"the brain shrinkage parallels the expansion of collective intelligence in human societies."

It looks like we are due for another brain shrinkage.

I disagree with this being an example of your point. OP tried to be lazy “find the bug”, but that failed because the machine could not think for them. Then OP used a tool that helped them better understand the code, and found the bug. That’s not lazy, that’s smart.
That’s the message of Frank Herbert in the Dune universe regarding machines. They’re useful up until you start letting them do the thinking for you. Which leads to laziness, stagnation and control by an elite. So did reliance on spice for that matter.
> Once men turned their thinking over to machines in the hope that this would set them free. But that only permitted other men with machines to enslave them.

- - - -

This is good and well for existing minds, but I think a lot of people will let these machines raise their children and that might cripple them. Like if you let your kids use a wheelchair instead of learning to walk? It's an imperfect metaphor.

The new movie M3GAN raises that question. It's not a great movie, but even without the eventual horror elements, it would raise disturbing implications for creating doll robots that can do the work of parenting so parents can focus on what they really care about, like work.
Similar to using GPS vs the cognitive load not to and learning navigation with maps and memorization.

Or back up cameras in a car.

I don't know about you but if I had the ability to dictate requirements and to get a program out the other side that matches those requirements, the process of coding has become mere busywork that can be eliminated for the benefit of me and everyone else.

I'm sure the buggy whip makers had pride in their work as well.

Yep, it'll free us from the tedium of code writing and give us more time for meetings.

And as everyone knows, meetings are what get real programmers excited.

An every-day all-day all-hands code review, in a feeble attempt to keep up with all the code being cranked out by the A.I.
But none of what you are talking about has happened today and even the buggy whip reference doesn't make sense because the buggy whip market disappeared because we stopped using horses. The buggy whip equivalent would be the IDE.
Does this mean pair programming makes you a worse engineer?

Or even just "asking for a second opinion"?

If you do pair programming and the other person always does all the work, then yes.
I don't think other people count as "machines."
Meh. I'd rather find out where it can take us. That sounds more fun and interesting.
I'm pretty sure that quote is from Star Trek: Insurrection.
Yep. You are right. Insurrection.
Would you mind noting what language you were working in?
It was a problem with my gitlab-ci config but I wasted a lot of time wondering if the problem was the scripting portion.