I'm perhaps in a unique position to comment, having recently taught my girlfriend to program. So I can talk about how that played out.
My girlfriend understands menus, she knows about links, she can install software, she can use word, she can type away like no other, and even fix some problems. If you watched her using a computer it'd seem like she had a pretty good affinity with this black box.
However, I don't think most programmers realize what a holistic approach the average person (even a relatively tech savvy one) takes to computers. They only understand them at the highest level. They develop fetishes and incantations to fix things. When something goes wrong my girlfriend will turn the computer on an off. She'll turn the router on and off. Etc. Or just click "ok" until it stops complaining. It often fixes the problem, but it's just something she's learned to do with little understanding. She goes to the store and can pick out a decent phone or laptop, but only because she's developed an intuitive semi-understanding of the lingo. This one has more gigs, that's better...etc.
The computer will do things they don't understand, except some vague notion that the computer is "dumb".
I asked her one time how a computer works because I was legitimately curious how people without any instruction in comp sci etc visualize it. She had absolutely no idea of even the most fundamental workings of a computer except that it had something vaguely to do with "ones and zeros".
I taught her binary. I taught her boolean logic. I showed her binary math. I gave a very basic example of how you can use circuits to do binary math. I made her sit at a desk and act as a processor. Then I explained the concept of bootstrapping.
Then I taught her a little bit of Python.
She understands garbage in - garbage out. She understands dependencies. She understands algorithmic complexity. She understands types and formatting...and much more. (at least generally, which is enough).
This mysterious box no longer seems capricious and opaque. She has a much better understanding of why her computer behaves the way it does and therefore feels more at ease. Sure she can't magically fix anything, but she's recognizing general patterns more and more.
She installed Ubuntu recently in fact, and has started writing Python scripts (and Bash!) to assist in assorted data processing tasks she used to do by hand. When my girlfriend needed to update batches of reports, she would up each one BY HAND and change them. Using a computer was frustrating and scary. Learning coding won't improve her life? Seriously?
Would it make him a better mayor? Not necessarily but it sure could help. I'm sure he uses a computer and I'm willing to bet the less time the mayor spends screwing around with a computer or waiting for tech support the better. Likewise, I'm sure he has all sorts of tedious tasks which don't warrant third party software but which could be tackled by a nice Perl script. That doesn't even take into account the boost in (general) analytical thinking that comes from programming. Ditto for potential refreshment in Math.
Who says it needs to make him a better Mayor anyway? What if he just wants to be a better person?
In addition to being a programmer, I happen to be a musician as well...which puts me into contact with a lot of artists. I'm always surprised by how much they could benefit learning programming because a lot of art involves hacking; creating weird one off contraptions...often requiring lots of tedious work. Many want to experiment with technology and art, but are unsure how. Processing could blow some minds. Ditto Overtone.
Using a computer is largely about software; and software is similar to arts and crafts in that it's a reflection of the creator and the tools they used.
Learning about an artist helps you interpret the meaning of their work. Learning about the techniques help you evaluate and appreciate their work.
Learning to code makes you sympathize with the people who wrote the software you use. It helps you understand how software is put together. Which is good, because the more you sympathize with the author and the more you understand how it fits together the easier time you will have using it.
To be fair there are a lot of things I feel everyone should learn. I think it's fair to say though that out of all the ones you could pick, learning to program will be more beneficial practically relative to most others.
> Research voraciously, and understand how the things around us work at a basic level.
Communicate effectively with other human beings.
I think this is the heart of the misunderstanding between sides. Learning to program is actually the first step in that. He mentions having "basic internet skills" as a necessary life skill. Learning some programming will greatly facilitate that.
Likewise programming will introduce concepts and develop skills that help you understand technology in general. It even helps in in non-technological areas. It facilitates communication because it forces you to confront and think about how difficult it is to communicate certain things clearly.
It's also interesting that you mention the holistic approach because this is exactly how many people view computers, in the same way they might view a mechanical device. I have seen people reason "If a reboot doesn't fix it , maybe 2 or 3 reboots in quick succession will".
It's also scary how many professional IT people seem to have a cargo cult understanding of computers.
I've seen people do all kinds of crazy incantations , for example troubleshooting a network problem by re-installing OS software on multiple workstations and trying different combinations of firewall / AV and network driver software when in fact 5 minutes of methodical probing with wireshark would have made the issue obvious.
Of course this stuff is massively complicated and the majority of HN readers probably don't really understand the whole thing so what hope would some random person have?
If people could understand a basic turing machine type system and possibly write simple assembler to run on it then they could be told "this is all your PC, your smartphone and your iPad are just they have lots and lots of window dressing".
This mysterious box no longer seems capricious and opaque. She has a much better understanding of why her computer behaves the way it does and therefore feels more at ease.
This is exactly the benefit from people learning to code:
People don't have to actualy code, they just have to have some understading of how a computer work and what problems is easy to automate (as her report updates) to get more productive in their own field. If they can code it on their own, it is only a plus.
This reminds me of a hacker koan:
A novice was trying to fix a broken Lisp machine by
turning the power off and on.
Knight, seeing what the student was doing, spoke
sternly: "You cannot fix a machine by just power-cycling
it with no understanding of what is going wrong."
Knight turned the machine off and on.
The machine worked.
I'm great believer that anyone can get to be _reasonably_ good at something if they invest enough time and effort into it.
It's the classic logarithm curve; when you have no skills in a field, you can learn a few skills really easily (steap curve). Then, as you get better, your progress for effort-expended goes down until you're basically a domain expect (flat line; no matter what you do you basically dont get any better).
This applies to ANYONE on ANY field; the curves are just different; and I'd argue the steep part of the curve is pretty long for programming (compared to say, I dunno; learning differential equations).
Despite the great them-and-us divide that geeks (and here I generalize based on the geeks that _I_ know personally) seem to have to 'other people' who are 'dumb' ... people are, in my experience, generally smarter than you'd expect.
I'd rather encourage people to learn a little bit, than tell them to go away because they're probably not smart enough. <-- This is arrogant as f*, and if I see someone do it, it makes me angry... although, I realize you weren't directly saying that, so please, take this as a general comment, not as a criticism of you personally. :)
It's not that people are 'dumb' or 'smart'. It's just that some people have an easier time with some topics than others. I have seen people who really struggeled with the basic concepts after three courses (not my courses ;)). Others understood it far quicker and with much less work.
I'm not saying that these people were dumb. They usually excelled in other areas, just like I am seriously unable to keep a plant alive for more than a few months (believe me, I tried!).
As I said, to some people some topics are an exercise in frustration. It's not that hey can't learn it. It would just be really painful and boring to them.
Those people who just generally don't like learning anything would likely be frustrated by learning about programming, but I've no idea if this amounts to most people or not.