Recently I've noticed that there is a new movement on the Internet to try to get more people interested in coding. I believe that it is really important for everybody to learn how to code. Nevertheless, I don't believe that telling everybody that they can become good developers is true and that the ultimate goal should be for them to be able to develop their own apps.
Software development is not easy. While it is true that anyone can learn how to write some toy apps, writing real software is hard. It is disingenuous to hide this fact from the poor souls that start coding and are led to believe that they can become millionaires writing software after taking a few online courses just because it is easy.
On the other hand, there is value in getting people to learn how to program and it should be done from an early age. I've often told people, half jokingly, that I want my son to learn Python when he'll be 7 and that he can then move on to C or C++ (his choice) when he'll be 10. People look at me scared and probably think that I'm an awful father. Knowing that I'm an engineer, they normally reply that he will end up majoring in literature or political science as if that would be something bad or I would be upset about it! My answer is always the same: "He can study whatever he wants, as long as he has a basic education in programming". I strongly believe it is one of the best skills he can acquire and doing it early on in his education will have a positive impact in his day-to-day life. Let me explain you why.
If you read carefully the previous paragraph you will notice that I didn't say that I want him to be a great programmer. What I want him is to learn how to program, or in other words: I want him to learn how to think algorithmically about a problem, divide it into smaller parts until he has a collection of simple problems he knows how to solve. Once he knows what problems he has to solve, he needs to tell a third party how to solve it, step by step, and ensure it does what it is expected.
Being able to do that is an extremely valuable skill! You would be surprised how often I meet people who are unable to analyze rationally a problem, break it down into smaller problems and explain to others how to solve them. I don't need my kid to become the best programmer in the world, I just want him to master those skills and programming happens to provide a perfect playground to develop them. That is why I believe that everybody needs to learn how to program.
The only time I've seen people being forced to learn how to program was in University. People who had never touched a computer, or who had only used it to write documents in Word, had to start to work in C for the programming assignments. I couldn't understand how people that I considered to be very intelligent were unable to produce any kind of working code and when they did, they were unable to divide the program in different functions! It is true that C is not an easy language to jump into but what I saw was not entirely due to the language, on a more deeper level what I saw were 19 year old people unable to think analytically... and that scared me!
When I said that I want my kid to learn Python when he'll be seven, it is because it is a language that is extremely easy to learn and extremely flexible with the syntax. Once you know the basic commands, you develop a feeling for the language when you can just try things out and in most cases they work. They might not be the best way to do things or even the pythonic way of doing it, but it irons out the frustration of seeing things fail repeatedly for not getting it 100% perfect on the first try.
The joy and sense of empowerment of seeing a machine do what you asked it to do is a very powerful motivator. Once you can get a "dumb" computer to follow your instructions accurately, you know that you did a good job at breaking down the problem in pieces and explaining it to a third party. That is a key skill that is useful no matter what you want to do in your life.
PS: This post was inspired by the article in The Guardian: Why kids should be taught to code