But I definitely remember hearing that message in the media for the last 20 years, and I don't recall anyone calling it "trolling" until it was directed at journalists.
I've wasted the entire morning looking for sources of this by now. Like you, I sort of remembered hearing that message over the years. But now that I'm looking, I'm not actually finding many examples where news outlets are seriously suggesting this.
Have you ever thought you knew something, but end up misremembering it? There are lots of people who swear they remember a movie called Shazzam staring Sinbad as a genie, but there is no such movie. There was a movie called Kazaam staring Shaquille O'Neal, and Sinbad once dressed up in similar garb when hosting a movie showing. But people conflated the two things.
I think that's whats going on. And if so, we should not be harassing journalists who had nothing to do with this.
The whole point is that it wasn't a punishment when some journalists did it, but it's a punishement when some journalists hear it. So, they are full of crap.
But when did they do it? and who? Please send me any evidence you have. I feel like I'm going crazy here. Not finding anything.
If this was a widespread thing that many journalists spouted, I understand the outcry. If only a few journalists spouted this nonsense, then I don't think it's fair to punish an entire industry over some bad apples.
What I suspect is that the "learn to code" push was more of a society-wide meme trafficked by politicians, economists, and tech CEOs. And I have to imagine that some journalists gave those people a platform. But perhaps I'm looking at the wrong evidence?
EDIT: dexen's post found maybe one example: A Buzzfeed quiz that suggests coding could become the next blue collar profession. That kind of fits the "learn to code" meme. The other articles dexen posted were actually counter to that - An article where Michael Bloomberg said learning to code is unrealistic for many displaced workers, and another article about coal miners proving him wrong.
Is that it? Or are there more examples?