
The Ultimate Evolution of Copying and Pasting Stack Overflow
Stack Overflow is a website where you used to go to ask questions about computer programming and get answers from people who knew what they were doing. It gamified helping people, and, for a while, was cool and fun.
It became a joke that programming was just copy-and-pasting code samples from Stack Overflow. I even recall a mass email from management where I was working warning people to knock that off.
Thing is, tho, there's some truth to it. You have no idea how this library works. Somebody asked how to do roughly what you want to do and somebody else posts a code sample to Stack Overflow. You copy the code sample into your code and it works. Great! Job done. (More likely, you copy it into your code and it doesn't work and you spend the next day or two trying to find the subtle complexity you got wrong).
Maybe you're thinking, doesn't that library have documentation you could read? Surely! To which I have to reply that you've obviously never read API documentation.
Plenty of times I've worked in overly complex codebases without good abstraction layers where the only way to write new code is to try to find old code somewhere and copy it, tweaking it for your requirements.
LLMs are quite good at this sort of thing.
I'm being a bit dismissive, because it's actually much more than that. Coding models have ingested not only the APIs and all the API documentation, they've also ingested every single use of that API in every open code repository. And they can generally craft a unit test stubbing out the API call and run the test to ensure the code does roughly what you told it to do.
Is it perfect? No, absolutely not. But you're generally a lot farther ahead then when you copy-and-pasted that code block and hoped it would work.
I've only been messing with advanced coding models and agents for a few months now and it can be pretty impressive. But you gotta keep your head on your shoulders. Especially when a lot of the models like to go nuts and rewrite half a class before you tell it to stop and work with me to figure out what we actually want to do.
These are tools. Like static analysis, linters and yeah, Stack Overflow. There's skill involved in using them properly. You're still basically copying-and-pasting code from somewhere. It can explain what it did, but you can't entirely trust it.
I'm struggling a bit to get my head around what's really going on here, because in some ways it's quite useful. But humans have a way of anthropomorphizing everything. It's not thinking. It doesn't have intent. But it's generating something that looks quite a bit like that. And, like I said, you gotta keep your head on your shoulders.
Some more AI things I've been thinking about lately: