Incomprehensible Software Engineers: Why should you write tens of thousands of lines of code when you can do it with thousands of lines of code?

640?wx_fmt=gif&wxfrom=5&wx_lazy=1

Introduction: "So there are not many program masters, and the program masters who continue to write programs are even rarer." This article is the experience and opinions shared by a software engineer who has been in the industry for many years. There are a lot of points, which should be encountered by practitioners. I wonder if you can resonate with them.


640?wx_fmt=jpeg&wxfrom=5&wx_lazy=1



01


Our company's software for Windows is more than ten years old, and after generations of engineers, the content has become messy. For the past three months, I found time to rewrite the entire main program myself. The original program with tens of thousands of lines was rewritten by me with only a few thousand lines left. The function remains unchanged, the performance is better, and the structure is just like.


After finishing the alpha the other day, I couldn't help laughing, and the laughter started the whole office.



02


During this period of rewriting the program, for the first two months, I should have spent no more than four hours a week on the program. Later, when I had nothing to do during the Lunar New Year, I went to the company to work overtime for a few days, but I did not spend more than four hours a day writing programs.


Usually, I write programs for two or three hours during the day. When I encounter a bottleneck, I go to work on other things, or I just go home for dinner. Before going to bed at night, I check information on my mobile phone while lying in bed. The next day I go to work and walk on the road. It is natural to think of a good solution.


Writing programs is a kind of creation, not hard work. You can't sit in front of the computer for more than ten hours a day. Otherwise, working overtime will only make your mind more confused.


Many programmers I know don't spend too much time writing programs every day.



03


In 1995, one day in Salt Lake City, the United States, I accompanied Zhang Mingzheng, the founder of Trend Micro, to help his father cross the road, and he suddenly said to me, "Yijing, I really don't understand, in the software industry, a person is very The output of a good engineer can easily be worth 10 to 20 mediocre engineers, but the company only pays him two or three times at most. So why are companies willing to pay mediocre engineers?”


At the time, I had just finished my Ph.D., and of course I didn't know how to answer his question; now, after all these years, I still don't know how to answer that question.


At that time, Zhang Mingzheng asked me that question, probably because I introduced several classmates and friends to work at Trend Micro. Those few are all masters who take one to ten and one to one hundred. Trend Micro didn't pay them ten times or a hundred times the salary at that time, but it was not thin to them, and gave them a lot of stock.


Later, the trend was listed in Japan, and my friends became billionaires, and their wealth should be ten times or a hundred times more than that of ordinary engineers, right?


640?wx_fmt=jpeg



04


Writing a large program is not about "many people make things easier".


In the case of civil engineering or manufacturing, the more people there are, the greater the output. If a project is delayed, bring in more people to help.


But in software engineering, the more people there are, the more difficult it is to coordinate, and the programs written tend to be of poorer quality and performance.


This is the famous "The Mythical Man-Month: Addingmanpower to a late software project makes it later".


IBM discovered this peculiar phenomenon when it developed OS/360 operating system software in the 1960s.


So I don't understand, why do big software companies hire so many software engineers?



05


When I was in the army, I worked as an information officer at the Information Center of the Tenth Army Corps in Taichung for a while. At that time, I had two junior college soldiers who graduated from the Department of Information Science, but I thought that the two of them were too slow to write programs, and it was more troublesome to explain to them. It was better for me to write it myself.


So I told them to cool off and let me write all the programs. And the two of them felt very embarrassed, so they brewed delicious milk tea for me to drink.


Later we became good friends.



06


Writing a program is not about writing as long as possible and as powerful as possible.


When I was young in the Department of Information Engineering at National Taiwan University, I would brag to my friends, "The programming language compiler program I wrote has more than 10,000 lines in total."


Later, I went to Brown University in the United States to study for a Ph.D. in computer science. When I graduated, I liked to show off to my friends: "The program in my doctoral thesis is so powerful, but I only used seven or eight thousand lines of program to get it done."



07


Second-rate software engineers like to complicate simple problems and write programs that others cannot understand.


A first-class software engineer likes to simplify complex problems and write programs with a clear structure, which makes people feel that the problem is very simple after reading it.


Third-rate software engineers will worship second-rate software engineers, because they will think that the programs written by second-rate engineers cannot understand them, and they must be super powerful;


Third-rate software engineers don't worship first-rate software engineers, because they think that the things that first-rate engineers do are easy to understand and seem to be simple.


Only the first-class software engineers will admire the first-class software engineers, because only they can see it, where are the other first-class software engineers?


The software industry in Taiwan is like this, and the software industry in the United States is roughly the same.


640?wx_fmt=jpeg



08


Until the late 1980s, IBM was the largest computer company in the world. At that time, IBM found some senior executives who were originally hardware manufacturers to manage the software department.


Those senior executives, based on their experience managing the manufacturing department, decided to use KLOC (thousands lines of code), which is how many lines of code each software engineer writes per year, to calculate the efficiency of the software department.


As a result, software engineers are "short story" and write a bunch of long and inefficient software programs.



09


To become a first-class software engineer, you must be familiar with various basic theories of computer science, and you must also accumulate long-term practical experience.


When I was a Ph.D. student in Brown University's computer science department, programming assignments were heavy. In the Operating System class, the professor asked each of us to independently write a mini Unix operating system including File System and Process System;


In the Compiler class, the professor asked each of us to write a Compiler independently, and each module must be written in two or more methods, and then compared with each other;


And on computer graphics taught by Andy Van Dam, it's a hell on earth. At that time, the teaching assistants sent out a questionnaire and found that each student spent an average of more than 40 hours a week writing the program for that class, and the students almost rebelled.


However, those who have taken the above three courses without being pawned and have obtained high scores have become masters and masters who understand theory and programming.



10


When I was a Ph.D student at Brown University, I estimated that there were about a dozen programmers at my level in our department, right?


But the most recognized programmer in our department is my advisor Prof. SteveReiss. He alone is probably worth five to ten engineers of our rank.


There are many legends about him. Once I went to his office to look for him and saw him playing a game of solitaire. He was a little embarrassed when I found him, and quickly told me that he thought the Solitaire game on Windows was very fun, but he didn't have a Windows computer, so he spent four or five days in his own Sun Work. Station has a similar Solitaire game written on it, with colorful graphic interfaces and more.


Want to play video games and write one yourself? I wanted to laugh, but almost fell to my knees in front of my master.



11


There are probably not many of the software masters I knew at Brown University who actually made their careers in writing programs and then wrote great and widely used programs.


Because some people go on to become university professors, professors usually don't write programs by themselves. After a long time, I don't know how much power they have left?


Some people later went to some big companies to write some very unnutritious and very boring programs in order to get a high salary. After a long time, I don't know how much power they have left?


Some people later go into industry and get promoted to managerial positions soon after, and managers usually don't write programs themselves. After a long time, I don't know how much power they have left?


Therefore, there are not many program masters, and the program masters who continue to write programs are even rarer.


640?wx_fmt=jpeg



12


There is an old joke in the software industry in the United States: if there are two engineers on the same team, one is very good at programming and the other is very bad at programming, then the one who is promoted to manager must be the one who is not good at programming.


Because the team needs the guy who can write the program to stay and write the program.



13


When my programming skills were the highest, it should have been when I first got my Ph.D. more than 20 years ago. At that time, I understood the theory and accumulated a lot of programming experience. I dare not say that I can take one to one hundred, but one to ten should be more than enough.


It's a pity that I was promoted to the management position not long after, and after I became a manager, assistant, and general manager, if I still wrote the program myself, it would be laughed at by others.


So I stopped writing programs, and I also learned to put more engineers in my department, otherwise the battle is not big enough, and I will be looked down upon by other departments and my boss.


Twenty years later, my skill is only about 20% or 30% left.



14


I am now finally my own boss. After becoming a boss, one of the biggest benefits is that I can write programs when I am happy to write programs. Even if someone wants to laugh at me, I can ignore them.



15


During the Chinese New Year, I rewrote the main program of our company's Windows. After finishing it, I felt that my skill had recovered to 30 or 40% of the previous year, and I couldn't help but feel very happy.


However, I still feel that software engineering is really a difficult industry to understand. Although I am a software engineer myself, although my doctoral dissertation is about programming environment (Programming Environment), the subject is the issues I am talking about here.


Author: Lin Yijing


Recommended reading


The Japanese grandpa insisted on painting with Excel for 17 years. I may have used a fake Excel...

180-page PPT, explaining artificial intelligence technology and industrial development

Finally someone explained cloud computing, big data and artificial intelligence!

The data tells you: Compared with the lack of "core", China's current problem is more deadly!



Q:  How many lines of code do you write?

Welcome to leave a message to share with you

Feel good, please share this article with your friends

For reprint/submission, please contact: [email protected]

For more exciting articles, please click "Historical Articles" in the background of the official account to view

640?wx_fmt=jpeg

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325787843&siteId=291194637