Author: Zhang Shenjia
First published on WeChat official account: Jia Talk (jia-talking)

There was a chef at a restaurant who cooked very well. Through word of mouth, customers came from all over. But this was not purely good news for the restaurant owner, because the customers came for the chef's skill, not the restaurant. The owner had to find a way to keep the chef; otherwise, once he was poached by someone else, the restaurant's business would plummet. However, even if the owner spared no expense to ensure the chef's loyalty, risks still existed:

When the chef rested or took leave, the taste of the dishes could not satisfy customers;
There was only one chef. If you wanted to open branches in multiple places, the taste could not be guaranteed;
No matter how skilled the chef was, he could only cook one dish at a time, and as customers kept increasing, output always fell short of demand;
The chef would eventually retire when he got old. If he took apprentices, how could the loyalty of the apprentices continue to be guaranteed?

One day, the owner suddenly realized that what determined the taste of the dishes was the chef's cooking process, not the chef himself. If the chef was willing to write out the recipe for each dish, couldn't other chefs be hired to follow it? Although others might not reach the original 100 points by cooking according to the recipe, they could always reach 90 points, and such a gap was indistinguishable to ordinary diners. In this way, as long as the recipe existed, the quality of the restaurant's dishes could be guaranteed, and expanding the storefront or opening branches would no longer be a problem.


So the owner talked with the chef for an entire night and persuaded him to join with his recipes as technical equity. A few years later, the restaurant business was getting better and better, countless branches were opened, the owner made a lot of money, and the chef also received generous dividends, no longer having to rely on his cooking skills every day.

What is programming?

Before washing machines appeared, people could only wash clothes by hand, which required a series of processes: soaking, rubbing, rinsing, and wringing. The invention of the fully automatic washing machine made washing clothes easy enough for everyone to complete, thereby freeing up the time originally used for washing clothes to do other things. As washing machines continue to iterate and upgrade, the entire process of washing clothes will eventually be forgotten by people; only the engineers who design washing machines understand the process, because they are responsible for optimizing and improving it.


A so-calledprogram is a logical flow designed to implement a requirement.The chef's recipes and the washing machine's workflow are both programs, except that the former is executed by humans and the latter by machines. It is precisely because programs serve as a medium that we can separate the roles of designer, caller, and executor. Although the execution effect of a program may not satisfy its designer, it can already exist independently of the designer's limitations of time and space, and can be executed, verified, and improved by others.


So-calledprogramming refers to writing programs.Writing the cooking process into recipes is essentially programming. Through programming, we more thoroughly understand and elaborate the essence of things, allowing what was once exclusive to a person, a group, a place, or even a moment to exist and develop independently. From this perspective, it is not an exaggeration to say that programming is creating life.


Programming can be said to be a kind of standardized writing.Standardization guarantees the quality of services and products, and also makes large-scale replication and expansion possible. KFC relies on its food processing manual, detailed down to the oil temperature and seconds for frying French fries, to open branches all over the world. If Tao Huabi could not clearly describe the recipe and production process of her chili sauce and hand them over to a standardized production line for manufacturing, then today "Lao Gan Ma" would at most be a workshop-level product in a small village and could never make it to our dining table.


In our daily lives, we interact with all kinds of technological products and services, such as navigation, search engines, chat software... Have you ever thought about what principles are behind these products and services? I believe that apart from the programmer community, the vast majority of people will not think about these questions, because:

"This has nothing to do with me! I'm not going into this line of work..."
"Only professionals can understand this. I can't do it!"
"As long as it works, why think so much? That's too tiring!"

They are not wrong to think this way, becausethe essence of programming is: designing a logical flow to implement a specified requirement, so that callers can achieve their goal without needing to understand the implementation details.

Since the broad concepts of program and programming are too general, to avoid conceptual confusion, the "program" and "programming" mentioned below specifically refer to programs written in computer programming languages and run by machines.

Free up time and attention

Suppose you have worked in a position for some time and, based on experience, have concluded that before leaving work every day, there are the following three things to do:

A. Query a certain business's data for the day on the company intranet system (about 10 minutes)
B. Organize it into a daily report and archive it (about 15 minutes)
C. Send the core data by email to the leader (about 5 minutes)

You can, after carefully sorting things out, write this process down, stick it at your desk, or keep it in your mind. This is naturally much better than those who do not know the process; you can ensure that every step is executed without omission (although this is not completely guaranteed). But even though you have spent time thinking carefully, you still have to execute this boring process yourself every day... Wait, can't I hire a secretary to do this task?


Of course you can.Hiring others is a solution that exchanges money for time.But this introduces many new problems at the same time:

You need to spend money (obviously)
You need to explain to the secretary what to do and make sure he understands (communication cost)
When the secretary is off work or on leave, you still have to do these things yourself (time limitation)
You have to bear responsibility for the secretary's mistakes (quality is not guaranteed)
Every time the secretary makes a mistake, you need to educate him (training cost)
The secretary will have direct contact with business data and information, and it is difficult to prevent possible leaks (security risk)
If you change to a new secretary, all the above has to be repeated...

Isn't this making things more complicated?The cost of human labor is too high, and the services provided are unreliable.But if you know how to program, perhaps you can:

Write a small program to complete the process of querying data, making reports, and sending emails, and configure a scheduled task to run automatically every day;
If you are cautious, you can have the program first send to your own email, and forward to the leader after checking that there is no problem;
If necessary, you can also have the program send an alarm notification to your email or phone when something unexpected occurs during runtime;
If you are willing, you can even directly add the email report function to the intranet office system...

Suppose it originally took you 30 minutes to complete processes A, B, and C by hand; then each time your program runs, it saves you 30 minutes. If you spent three hours writing the program, you can recover the cost within a week, and everything after that is pure profit. If the program runs long enough, the amortized cost per run will approach zero. As can be seen,programming is a solution that exchanges time for time.


Of course, you need to write the process as a program that a machine can understand; if requirements change, you need to modify the program accordingly; if a bug occurs during runtime, you need to debug and fix it... But more importantly:A program does not get a salary, cannot resign, does not need rest, will not throw tantrums, and cannot make mistakes. As long as your process is correct and the resources it depends on do not fail, it can keep running 7*24 hours.


Every time we write a program to implement a requirement, it is like making a hammer. In the future, when you encounter similar problems, you can use this hammer to solve them. Of course, sometimes the hammer may not be handy and needs continuous upgrades and optimizations. But in most cases, this hammer can be used directly. In other words:You only need to solve the exact same problem once, and you will not waste time on repetitive work.


Through programming, you can hand over part or even all of the boring repetitive work to machines, therebyfreeing your time and attention from specific matters to do more valuable things.For example, researching and optimizing workflows, spending time with family, or reading a book...

Experience a "cheat-enabled" life

Friends who like online games may know about cheats/plugins. These are small programs that run alongside the game to improve the gaming experience. Cheats generally fall into two categories: one is assistive cheats that simplify player operations within the game system framework, providing functions such as auto-pickup, auto-combat, and key remapping; the other is cheating cheats that exploit game vulnerabilities to create unfair advantages, providing functions such as map reveal, speed hack, and invincibility.

With the rapid development of the gaming industry, many online games nowadays are already equipped with functions originally provided by assistive cheats. Assistive cheats are gradually dying out, leaving only cheating cheats and a series of derived black market industry chains, you know.

When we say someone is "cheating" (kāiguà), we actually mean that their performance (quantity, speed, accuracy...) clearly exceeds the normal range. When primitive tribespeople encounter modern people using various technological products, it probably feels like "Damn, this guy is cheating, right?"


You should know that the reason humans, who are not physically strong, were able to conquer the Earth is that we create and use tools to break through physiological limitations and accomplish things that were originally impossible.In the upcoming all-information era, programming will be the main method of creating tools, and even of using tools.


Most people passively wait for others to meet their needs.They use software that is pushed to them through various channels such as friend recommendations and advertising, and then marvel: "Wow, it can even do this!" They only use the standard features provided by existing software, and any personalized special requirements are simply abandoned because the software doesn't support them. This is just like wearing clothes—most people only buy standard sizes. If it's tight here, loose there, long here, short there, they just have to put up with it.


Additionally,A small minority of people will proactively consider how to meet their own special needs.They will think: "If only there were XXX features..." They will actively search for software that can meet their needs, study the software's personalized configuration options, or suggest features to the software developers. Similarly, people who pursue individuality may find a tailor to custom-make or alter clothes so that they fit as well as possible.


OnlyAn extremely small minority have the ability to implement those needs that others cannot fulfill.They can develop plugins based on existing software, conduct secondary development of the software, or even create entirely new software. Similarly, perfectionists may design clothes themselves and keep altering them until they are completely satisfied.


If learning English well can open a door for your world and give you more choices, thenlearning programming well can give you the opportunity to understand and transform this world from a "God's-eye view," with almost limitless possibilities.Because in reality, everything will eventually be digitized, and through programming you can process and manipulate information in any form whatsoever—as long as you can conceive of it, you can achieve it.


Want to experience a "cheating" life? Then start learning programming right away.

Cultivate a deep way of thinking

Everyone should learn programming, because it teaches you how to think. —Steve Jobs, founder of Apple

Thinking is what makes us human, and programming is the act of re-thinking human thought.We don't need to think every matter through clearly in order to survive in the real world. For some professions involving mechanical operations, no thinking is required at all. But when programming, we can only write the program after we have thought things through clearly. In writing correct, efficient, and elegant programs, we are also shaping our brains to think more clearly and operate more efficiently.


Programming requires us to think objectively about the essence of things, focusing our attention on the things themselves rather than on their relationship to us.When a woman in ancient times washed dirty clothes by the river, she might be thinking: "The river water is so cold... these clothes have such a pretty color... why is my child so mischievous..." But when we design programs for a washing machine, we only think: "Oh, there's a pile of dirty clothes that needs washing." In fact, many problems that have troubled you for a long time become simple and easy to solve once you step out of the "I" framework and engage in "selfless" thinking.


Programming is the process of "materializing" human ideas, which requires us to think more deeply, more meticulously, and more comprehensively.To implement a requirement, you must have a very thorough understanding of its principles and operational flow; otherwise, you cannot describe it precisely in a programming language for a machine to execute. During the process of materialization, structural flaws and logical gaps in your ideas will naturally surface—you will always discover possibilities you hadn't considered and details that require further thought.


Programming requires us to break things and processes down, and to think in a complete, self-consistent way at different levels of abstraction, which makes it possible for us to solve problems of enormous scale.When implementing a requirement of any significant size, we are unlikely to consider the main flow and operational details simultaneously, nor can we think from multiple perspectives at once. After reasonable decomposition, the fine-grained requirements become simple and clear, greatly reducing implementation difficulty while also allowing the work to be distributed among many people. In a mature software or internet company, it is common for over a thousand engineers to develop the same product together. Can you imagine that many people writing a book together?


Programming is an ongoing process of solving problems, and also an ongoing process of refining the methodology for solving problems.An excellent programmer is always a master problem-solver. At every stage of programming—requirement definition, solution design, coding, debugging, error correction—you face endless problems. Should this problem be solved? When? What is its root cause? What aspects need to be considered? How should trade-offs be made? What options are available? What are the principles for choosing? ... The methodology of problem-solving could fill a book if fully expanded, and I will write a separate article on it when I have the time.

Survive better in the future

Half a century ago, 70% of the American population worked on farms; with the widespread adoption of automated farming, that number is now less than 1%. —Kevin Kelly, The Inevitable

From landing on the moon to producing nanorobots, we have accomplished things that humans could never have done with their bare hands by designing and using various machines. To date,simple repetitive work performed by humans—such as laundry, farming, and manufacturing—has been almost entirely taken over by machines, and humanity's work has shifted toward the research, development, and maintenance of machines.And jobs requiring complex knowledge and precise operations—such as driving cars and performing surgery—are also being gradually taken over by machines.


Washing machines freed the hands of housewives, while fully automated assembly lines dismissed most factory workers. Only in some developing countries still enjoying a demographic dividend (such as China and India), where the cost of introducing technology is higher than labor costs, do manual laborers still have some room to survive. But the cost of technology will inevitably continue to fall rapidly, and the window of the demographic dividend will quickly close. The tipping point will soon arrive.


Capital has a will of its own, and it does not change because of human nature.When output quality remains the same and technology costs are significantly lower than labor costs, almost all manual laborers will lose their jobs. Machines never tire and never complain; they work faster, better, and cheaper than humans. How can humans compete with machines?


At the same time,artificial intelligence is gradually taking over simple, repetitive thinking activities—such as route-finding and translation—and humans only need to issue commands, set principles, and make choices.Artificial intelligence has even entered fields that people regarded as "what makes us human": writing, composing, painting...


Google's AlphaGo defeating Lee Sedol was a landmark event, proving that artificial intelligence can already surpass humans in the very domain where humans excel most—thinking. Today, the best chess players are all learning from AI, and daily training between professional players and AI has become the norm. Pure machine beats pure human, and human-machine beats pure machine—this has long been the consensus in the chess world.


When AI's ability in a given thinking domain approaches or exceeds that of humans—which has already happened in many fields—and its cost becomes extremely low—which is only a matter of time—then, driven by the will of capital, that domain will be irreversibly and rapidly taken over by AI. Today we are already accustomed to using calculators to replace our brains for arithmetic. In the near future, we will also become accustomed to handing over many problems that once required our own thinking to artificial intelligence made up of countless programs. In the foreseeable future,all non-creative jobs built on experience and skills will disappear, and humanity's work will shift toward the research, development, and maintenance of artificial intelligence.


The era of comprehensive AI adoption is rushing toward us at the speed of light, and in the next moment it may leave us far behind, with no chance of even seeing its taillights. By then, almost all work will be inseparable from artificial intelligence.Only those who understand AI, can collaborate well with AI, and help improve AI will be able to survive better in that era.

Everyone should start learning programming as early as possible. My children started too late—I think they should have started when they were learning their ABCs and colors. —Barack Obama, 44th President of the United States

In the article "What Language Should We Learn in the Future?" I once imagined brain-computer interface technology that may emerge in the future, along with the structured language shared by humans and machines that would accompany it. By then, our brains will be directly connected to the internet and artificial intelligence, allowing us to instantly download the knowledge and information we need into our brains... We will become god-like beings. But the prerequisite is that you must have a foundation in programming to enjoy the fruits of this revolutionary technology.


What, you still haven't learned programming by then? You might as well wash up and go to bed.

I know you will ask...

But I don't plan to become a programmer, so is it really necessary to learn programming?

You may know how to drive, even be an experienced driver who really enjoys the pleasure of driving, but that doesn't mean you'd be willing to become a taxi driver, right? Similarly, learning programming doesn't necessarily mean becoming a programmer, but it can give you a brand-new perspective, deeper ways of thinking, and efficiency-oriented thinking, all of which will become important soft power for you.In the near future, programming will become a skill everyone needs, just like English and driving.By then, do you want to be the experienced driver, or one of the hitchhikers?


"Is this even useful to learn?" is actually a terrible mindset. Because many things don't seem useful right now, most people give up learning them, while only a few try with the notion of "let's see what this could be useful for." Then one day, when that skill and knowledge are truly needed, those who chose to give up can only sigh, "If only I had learned it back then..." while those who chose to learn will be pleasantly surprised: "Wow, it can be used here too!"...So-called "surprises" and "luck" are really just this: you have already prepared in advance without even realizing it.

Then can I just work hard to make money now and hire a professional programmer later?

Yes, you can find a programmer to carry out your ideas, but all the many problems we encountered when we used to hire secretaries will come flooding back. More importantly, if you don't understand programming, you may not even be able to come up with a viable idea in the first place. Just as someone who has never seen a car would only think of having another person build him a faster horse-drawn carriage.Only after understanding the principles of something can its concept become clear in your mind and truly integrate into your cognitive structure.


Only with a clear concept can you think about it, judge what it can do, and what it cannot do. If the concept is unclear, you can't even articulate your own needs clearly, let alone communicate and collaborate with programmers. Every programmer would break down when faced with a requirement like "build me a Taobao."

My English is terrible. Can I still learn programming?

English is not the bottleneck in learning programming. The key lies in understanding the concepts and principles, as well as changing your way of thinking.Although almost all programming language keywords are in English, there are only a few commonly used ones, and books on popular languages all have translated editions. If you want, you can even name variables and functions in Chinese. Just as you can play English games as long as you recognize start/save/load/quit, and you can travel abroad as long as you can say sorry and how much.

I've been working for many years. Is it too late to start learning now? Where should I begin?

It's never too late to start, and of course the earlier, the better.Wang Jiangmin, the author of China's first antivirus software KV300, didn't start learning programming until he was 38. As for how to learn and where to start, that will be my main focus of thinking this year. Stay tuned for my follow-up series of articles. Maybe you can try these websites first:

http://www.codecombat.com : Learn through playing games, has a Chinese version, suitable for beginners
http://www.khanacademy.org : Pure English video instruction, suitable for top students and note-takers
http://www.codecademy.com : Interactive hands-on practice, best results, but requires some foundation

Afterword

Once upon a time, to establish a website service, you needed to purchase professional servers costing tens of thousands of yuan, pay expensive hosting and bandwidth rental fees, hire professional development talent or teams to build it, and then attract users through advertising and marketing campaigns... The barrier was so high that most people were discouraged, and only enterprises could afford it.


Now, cloud servers are even cheaper than home broadband, various open-source technologies are readily available, and open platforms provide free users and channels. An app can go viral across the country overnight through social networks... With ultra-cheap card-sized computers like the Raspberry Pi, plus the fact that various home appliances are becoming smarter, using programming to bring your little creative ideas to life is really not hard at all.


We are living in an era where as long as you are willing to think, you can change the world.So, are you willing to change the world, or wait to be changed by the world?

References

[1] Steve Jobs - The lost interview (1995), http://v.youku.com/v_show/id_XNDI1NjE1OTIw.html


[2] Obama: Everybody's Got to Learn How to Code, http://www.recode.net/2015/2/14/11559052/obama-everybodys-got-to-learn-how-to-code

Author bio: Born in 1986, Sagittarius, from Xi'an, Shaanxi. A programmer with independent thinking and code cleanliness, with a wide range of interests. A hardcore gamer who has achieved national first place in Rubik's Cube, Minesweeper, Tetris and other fields, breaking national records multiple times, and has participated in programs like "Best Films" and "Day Day Up" as a guest. Founder of the Minesweeper website (saolei.net).