3 ms·
> AI is being sold as the ultimate tool that will replace artists/programmers/writers/whomever I see a potential risk here. This is HN, so let's consider prog
by Ancapistani 3y ago
> AI is being sold as the ultimate tool that will replace artists/programmers/writers/whomever
I see a potential risk here.
This is HN, so let's consider programmers in isolation for a moment. Today, I can issue the following prompt to ChatGPT and get a solution that works:
> Using Python, generate an example unit test that uses monkey patching.
That gives me a runnable, valid example test. I can then ask it to refactor it to use pytest instead of unittest:
> regenerate the above code sample using pytest instead of unittest.
Here's the resultant code:
# A simple class that we want to test
class Calculator:
def add(self, a, b):
return a + b
# Monkey patching the add method to subtract instead
def mock_add(self, a, b):
return a - b
# Test the monkey patched method
def test_add_with_monkey_patching():
# Create an instance of the Calculator class
calc = Calculator()
# Monkey patch the add method of the Calculator instance
calc.add = mock_add.__get__(calc, Calculator)
# Test the monkey patched method
result = calc.add(5, 3)
# Assert that the result is what we expect
assert result == 2
It _works_, but it completely misses the point. The test case is testing whether or not the monkey patching works as expected - not testing something using monkey patching to isolate a side effect in the method under test, which was my intention.
Here's where I think there is a potential major issue: As someone who is currently a "Senior Staff Software Engineer" and has been doing this sort of work for two decades now, if you had given me the same prompt my first response would have been "use monkey patching to do what?". ChatGPT doesn't do that. Instead, it gives you a response that best fits the question. It includes a half dozen paragraphs explaining the code, what it does, and what monkey patching is, sure... but it doesn't even touch on why you'd want to use monkey patching, when it is or is not the best approach, or any alternatives. In short, ChatGPT lacks the intuition that a human programmer will develop over the course of a career.
It's getting better. A few months ago I could have asked ChatGPT the same question and probably 30% of the time gotten a result that would even run. In the past couple of months I don't think I've run into that at all.
The "intuition" thing is a big deal, though. ChatGPT is a great tool in the hands of a competent engineer who has the experience to examine the output with a critical eye. Today, I could see it replacing a junior engineer in a professional setting. We should not use it in that way.
If we do, in a few years we'll get to the point where the current generation of senior engineers are retiring. If we've replaced the majority of our junior engineers with AI, we'll be left without people who can use the AI-generated results effectively.
There has to be a way to balance the savings represented by these tools (in terms of both time and money) with the fact that the people who are able to most effectively use it today only got to that point because they've spent much of their adult lives developing the exact skillset that we're proposing to replace with them.
- 7speter 3y ago>If we do, in a few years we'll get to the point where the current generation of senior engineers are retiring. If we've replaced the majority of our junior engineers with AI, we'll be left without people who can use the AI-generated results effectively. I mean, you might not look at job postings for Jr. Engineers anymore, but they all ask for someone who can lead and mentor teammates less senior than they are so it seems like there won’t be many replacements for senior engineers retiring in the next decade regardless of ai’s existence.
- pixl97 3y agoJr level job requirements in the future "Must have at least 75,000 GPU hours of experience"
- IanCal 3y agoI told it that it was a senior engineer and I was a random client and asked the same thing. It explained what monkey patching was for, creates an example where a function pulls from an API and we patch it. Depending on runs or prompts you can see more or less explanation. I like getting it to first reason about its role and task, then it has that in its context when replying. Have you tried telling it who it is? You're coming at it with context about how it should act without telling it - it can role play a lot of things. I spoke to a teacher dealing with kids doing their homework too well with it, and showed you can just say "write X as a student with middling English" and get realistic mistakes.
- __loam 3y agoI hate that every time someone adds a nuanced view to these discussions, someone comes in to ask if they're "using it right" and asks them if they're typing words right as if that actually stops this thing from hallucinating bullshit all the time.
- IanCal 3y agoIt's fine to not want to learn to use a tool, but it doesn't really add much to the conversation to get angry about people talking about how to use it. > as if that actually stops this thing from hallucinating bullshit all the time. This has nothing to do with hallucinations though. It's about giving something a poorly specified problem and then complaining that it gives a valid answer but doesn't act like a particular persona when that persona was not explained. This is a very general problem with a general approach to fixing it. Want it to challenge you on what you're asking it to do? Tell it that.