Human efficiency or machine efficiency?

Source: Internet
Author: User

"The code is for people, and the machine code is for machines ."

In the training courses for new students, I once again elaborated on those who have not yet understood the coding world. The words are powerful and don't hesitate.

Think about it. As a point of view mentioned in many books, the above sentence has become a world just like me, but I don't know much about it, however, they are eager to find out what they recognize as the second method.

As a result, we keep reminding ourselves in the process of writing code, "the code is for people to read", so our code will follow some of the accepted codes, it makes the code more understandable "rules"-code style, programming paradigm, and even framework constraints.

But in the past few days, there may be some paradox in this sentence.

We will not mention this paradox for the time being. We will give an example in real life-so that you will not be able to get down to the inertia of thinking when I come up with this paradox, I thought it was a piece of paper.

Humans can become the largest and strongest host of the planet from other creatures, one big reason is that we use various tools.

The ancient ox carts and modern lathes are all classic tools. But have we heard such remarks on these tools?-To ensure the comfort of the farmer driving the ox car, we can reduce the quality of the equipment equipped with the ox car, then, we will use these savings to buy a more comfortable cow seat cushion for the farmer. To ensure the efficiency of Lathe lathe workers, we can let the lathe itself execute some unnecessary operations-for example, let it run slower than the standard speed, so that the lathe can operate his instrument more precisely.

As far as I know, among these mature tools (at least the history is longer than that of computers ), similar to the above statement, it is often absurd-because if we follow the above statement to make a so-called change to improve people's work efficiency, we often cannot finish our work on time.

In the software development industry, we have been following the ridiculous path described above in other fields-we have been turning software development into a more comfortable and efficient job for people all the way, however, it has never been our main development goal to improve the efficiency of machine work.

This is the "Paradox" that I have just mentioned that makes me confused.

Let's take a look at the development path of the programming language to learn more about this trend. First, our early programmers put a line on the tape to represent the holes in the machine code, and then handed it to the machine for processing. Then we invented the symbolic language of the machine code-assembly language, let us go out of the era of "writing software with hardware"-but we finally have a gap with the original machine, and then we are still not satisfied, the invention of medium and low-level languages such as C and Pascal with higher abstraction levels, and later to cater to the object oriented programing paradigm, c ++ has been invented. These jobs have separated our code and machines from the compiler and assembler. Then we have invented the platform-based languages such as Java and C, there is another interpreter in these gaps. More recently, we have invented languages that fully explain execution, such as Perl, Ruby, and python, at this time, our code and machines are added with the most bulky interpreter; the most extreme is DSL, a domain-specific language, such as SQL -- we don't even tell the machine what to do, just tell the machine what to do (don't
Tell the machine how, just tell the machine what.

Yes, we have been working hard to make people more efficient-the cost of doing so is to make the machine work more efficient.

I don't know if you have heard of Andy Bill's law.

This law is one of the three major laws that the IT industry is currently following-the other two are the famous Moore's Law and its inverse law, respectively.

Andy in Bill's Law refers to Andy Grove, president of Intel, and Bill is the bill gates that everyone knows. The most concise explanation of the law is: what Andy provides and what Bill takes.

What does it mean?

In a word, Andy's Intel company's 18-month doubling of computing power brought to the IT industry by Moore's law has been possessed and taken away by Bill Gates's new version of Windows.

More broadly speaking, why do we need to constantly update computers to pave the way for Microsoft's latest operating system? Why is there more than twice as many new computing power as our computers two years ago, today, we can only get the latest Windows configuration-or even barely-out?

The answer is simple-Bill took away Andy's powerful computing power, and in a reckless way-less and less machine-friendly code than before.

Bill himself complained similar to his employees-"I used the BASIC Program in my early years, and the entire environment would be over three hundred K, but what you are doing now. net, more than three hundred MB. But is. Net really more than one thousand times better than basic? Apparently not. "

With my narration, you should also begin to form a viewpoint in your mind-indeed, the development path of our software development is too much in favor of people's work efficiency-people are loved in this field, and the equally important tools themselves are moved into the cold room by us, this is the second consideration. We will not comment on the correctness of this opinion, but we should understand that it must be convincing.

Now we have a question: is human efficiency or machine efficiency more important?

This question may be divided into two schools, just like some questions that cannot be finalized by themselves, then, we held a heated discussion and even argued against it. However, after all, we couldn't come to the conclusion of a hammer.

If this problem is a matter of dispute, I will say which school I am from without a shift. I just want to explain some of my principled points.

The first is moderate, or can be called a balance. If there are two sides of a thing that cannot be left alone and are opposite to each other, then this thing develops and eventually has only one result-they find a balance to stabilize this thing, find the final form.

The second is from the agile Declaration, where people and interactions are more important than processes and tools.

The third is the famous saying of my C language teacher-young people must be persistent, dare to go deep into the bottom layer, and know what machines are doing. You don't know what your machine is doing. Why are you comfortable running code?

Well, although I don't express my support arguments, I think you should have a certain understanding of my self-explanatory ideas?

What do you think of the importance of human efficiency and machine efficiency?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.