Why I'd still learn to program
When I was a kid I started programming in Liberty BASIC, thanks to a free copy in the back of a "For Dummies" book. I looked it up recently and the website still looks like somebody's first attempt at making a site in Microsoft FrontPage from the early 2000s. Which, in an era of AI-generated, purple-gradient-filled websites, it's a strangely nostalgic breath of fresh air.

It's also amazing how far both I and software development have come since then. A kid starting out today can describe a basic app in plain English and watch it appear, which would have blown my mind at that age (well, anyone's, I'm sure).
So is learning to program still worth it, now that a machine can do so much of the actual programming? I think it is, and my reasons have very little to do with jobs.
I should say this might look odd coming from me. I've written before about leaning heavily on agentic development, in some cases to the point of not scrutinising the code at a syntactic level. That's about getting software built, though, and this post is about what learning to program does for the person doing it.
Personal development is rarely tied up with economic value. We often pay for the privilege of developing skills that bring us almost no economic benefit, whether that's learning to play an instrument or reading history for the joy of it. I think programming belongs, for better or worse, in the same category. It works a lot like learning to read or write, in that the skills it gives you go well beyond producing software.
The biggest of those skills is being able to take a problem, break it down, sit with it, and solve it. That's useful almost everywhere, and I'd say it's what makes a good modern engineer too. It gives you a sharpness and a confidence, much like getting good at mental maths does. Calculators didn't make mental maths pointless, and I don't think AI makes learning to program pointless either.
Of course, being a good programmer isn't inherently the same as being clever, and plenty of sharp people have never written a line of code. Even so, programming exercises the same habits that make someone good at solving problems in general, so it's not surprising the two so often go together.
There's also simply the joy of it. I'm a big fan of Advent of Code for this reason. Every December it puts out a set of puzzles that are pointless in economic terms and yet great fun to solve.
A kid starting out today will have tools I couldn't have imagined, and I'm glad they will. I just hope they still spend some time stuck on a problem of their own, working it out piece by piece. I think that's the part that carries you through life, whatever you end up doing.