Part 1
Book 4
Code
And the Great Programmer said: “A well-written program is Paradise itself. A poorly written program is itself Hell
')
4.1
The program should be easy and flexible, and its routines should be like pearls strung on a string. The spirit and purpose of the program must be maintained throughout. The code should not be too much or too little. Neither unnecessary cycles, nor useless variables. Neither randomness nor excessive structuredness.
The program must follow the rule of "least surprise." This means that the program must respond to the user's actions in a way that is least surprising to him.
A program of any complexity should work as a whole. The work of the program is dictated by logic, and not by external signs.
If the program does not meet these requirements, it leads to confusion and confusion. It remains only to rewrite it again.
4.2
The newcomer asked the Master: “My program sometimes works, and sometimes it crashes. I followed the laws of programming, but I'm confused. What is the reason?"
The master replied: “You are confused, because you have not comprehended Tao. Only a fool would expect rational behavior from fellow humans. What did you expect from a car designed by people? Computers emulate determinism. Only Tao is perfect.
The laws of programming are transient, only Tao is forever. Therefore, you must contemplate Tao before you attain Enlightenment. ”
“But how do I know that I have achieved enlightenment?” Asked the novice.
“Your program will work correctly,” answered the Master.
4.3
The master explained the essence of Tao to one of the newcomers.
“Dao is present in all software, even in secondary programs,” said the Master.
“Is there a Tao in the calculator?” Asked the novice.
"There is".
"Is there a Tao in a video game?"
"Even in a video game."
"Is Tao in the DOS operating system?"
The master choked and slightly changed his position. “The lesson is over for today,” he said.
4.4
A programmer serving Prince Wong wrote the program. His fingers danced on the keyboard. The program compiled without errors and worked like a gentle breeze.
"Excellent!" Exclaimed the Prince. "Your technique is impeccable!"
“Technique?” Asked the programmer, turning away from the terminal. “I follow Tao and are far from technician. When I started programming, I saw the task in one piece. Three years later, I saw subroutines instead. And now I see nothing. My essence is in formless emptiness. My feelings are inactive. My spirit, not constrained by the plan, follows instinct. In short, my program writes itself.
Yes, sometimes there are difficult tasks. I see them approaching, I slow down, I silently watch. Then I change one line of code - and the difficulties disappear like clouds of smoke. Then I compile, and the pleasure of work fills me. I close my eyes for a moment, and then log out. "
Prince Wong said "Oh, if all my programmers were so wise!"
Book 5
Support
And the Great Programmer said: "Even a program in 3 lines will sometime have to be supported."
5.1
Often used door does not need lubrication.
Flowing water does not stagnate.
Deer dissolves in the colors of the forest.
Programs spoil if they are not used.
5.2
The manager asked the programmer how much time he needed to complete the work on the program. “It will be finished tomorrow,” he answered quickly.
“In my opinion, you are not realistic,” said the manager. “How much time do you really need?”
The programmer thought. “Well, I want to add some features. It will take at least two weeks. ”
“And even this is too optimistic,” insisted the manager. "It will be enough for me if you just tell me when it will be finished."
The programmer agreed.
A few years later the manager quit. On the way to a farewell dinner, he found the programmer sleeping behind the terminal. He worked all night.
5.3
A novice programmer once got the task to write a simple financial module.
The newcomer worked furiously for many days, but when the Master checked his program, he discovered that it has a visual editor, a set of general-purpose graphic methods, an interface to AI, but nothing even remotely resembling finance.
When the Master asked him about it, the newcomer was indignant: "Do not be so impatient, in the end I will add the financial component."
5.4
Does a good farmer ignore a planted sprout?
Does a good teacher pass by even the most humble student?
Does a good father allow an only child to starve?
Does a good programmer refuse to maintain his code?
Book 6
Control
And the Great Programmer said: “May there be many programmers, but managers will not. Then we will achieve productivity. ”
6.1
When managers meet, programmers write games.
When accountants discuss quarterly earnings, the development budget risks cutting back.
When scientists argue about a clear sky, clouds will soon appear on it.
And this is not Tao programming.
When managers commit themselves, games are pushed to the background.
When accountants engage in long-term planning, harmony and order are restored.
When scientists talk about pressing problems, they will soon be resolved.
And this is tao programming.
6.2
Why are programmers unproductive? They lose time in meetings.
Why do programmers riot? Because managers too often interfere in the process.
Why do programmers quit? Because they burned at work.
Having worked for bad managers, they no longer value their work.
6.3
One manager was going to be fired. But the programmer who worked in his team wrote a new program that became popular and sold well. As a result, the manager kept the job.
The manager tried to give the programmer a bonus, but he refused, saying: “I wrote the program because I was interested in the concept, so I don’t expect any awards.”
Hearing this, the manager remarked: “This programmer, although not in the most esteemed position, understands what an employee’s debt is. Let's raise it to an exalted position of a consultant! ”
The programmer, having heard this, again refused: “I exist to program. If I get promoted, I will only waste other people's time. Can I go? The program is waiting for me there. ”
6.4
The manager came to his programmers, and said to them: “Regarding your working hours: you will need to come to nine and leave at five in the evening.” The programmers got angry, a few immediately resigned.
Then the manager said: "Well, in this case, you yourself plan your time, just finish the projects on time." Programmers, satisfied with this, began to arrive at noon and work until the very morning.
Book 7
Corporate wisdom
And the Great Programmer said: "You can show the program to the director, but you cannot teach him computer literacy."
7.1
A newcomer asked the Masters: “In the east, there is a huge tree structure called“ Corporate Governance ”. It is inflated because of all vice-presidents and accountants. It breeds a mountain of memorandums calling for “going there” or “doing this and that,” and no one knows what they mean. Every year, new names appear in the structure - and all to no avail. How can such an unnatural entity exist? ”
The master replied: “You are watching her, and you care that she has no purpose. But do not they make you stir inside her? Do you enjoy undisturbed programming in the shadow of its spreading branches? Why do you care about her uselessness? ”
7.2
In the east there is a shark, surpassing any fish in size. It turns into a bird, whose wings are like clouds covering the sky. When this bird moves above the ground, it carries a message from the Leadership Corporation. The message falls into the thick of programmers, as if a seagull is marking the beach. Then the bird saddles the wind, and returns home.
A novice programmer is watching her with surprise, because he does not understand it. The average programmer expects her to appear with apprehension, as she is afraid of her message. The great programmer continues to work behind the terminal, not noticing its appearance.
7.3
The wizard from the ivory tower brought his latest invention to the study of the Great Programmer. The magician rolled a large black box into the office of the Great, while he waited in silence.
“This is an integrated general-purpose distributed workstation,” the Wizard began, “designed with ergonomic design, with a closed OS, sixth-generation languages, and many unique user interfaces. My assistants took several hundred man-years to construct it. Well, isn't it an amazing thing? ”
The great programmer raised his eyebrows slightly: "Indeed, amazing."
“The management of the Corporation demanded that everyone use this workstation as a platform for new programs. Do you agree to that? ”
“Certainly,” the Programmer replied. "I will order to transport it to the data center immediately!". And the satisfied wizard returned to his tower.
A few days later, a novice programmer looked into the office of the Great and asked: “I cannot find the listing of my new program. Do you know where he could be? ”
“I know,” answered the Master. "All listings are stacked on the new bedside table in the data center."
7.4
The Great Programmer moves from program to program without fear. He is not touched by changes in management. He will not be fired, even if his project is closed. Why? It is filled with tao.
The book.
Iron and software
And the Great Programmer said: “Without the wind, the grass does not move. Iron is useless without programs. ”
8.1
A novice programmer asked Masters: “I see that one software company is much more than all others. It towers above them like a giant among dwarfs. Any of its subdivisions can be separated into a separate business. Why so?
The master answered: “Why are you asking such stupid questions? The company is big because it is big. If she produced only iron, no one would buy it. If she produced only programs, nobody would use them. If she was engaged only in support, people would treat her as a servant. But since it combines all these areas, people think that it is akin to gods! Not looking for a fight, she wins effortlessly. ”
8.2
One day the Master passed by a novice. He noticed that the newcomer is busy with a portable game.
“I beg your pardon,” he said. "May I see it?"
The novice gave the game to the Master. “I see that the game offers three levels of difficulty: easy, medium and heavy,” said the Master. "And yet, any such device has another level where it does not try to either conquer a person or be conquered by him."
“Oh, Great Master,” begged the novice, “open up, how to find this mysterious option?”
The master dropped the device on the ground, and stepped on it with a heel. And the newcomer suddenly achieved enlightenment.
8.3
There was once a programmer who wrote software for desktops. “Look how well I got settled,” he told the mainframe programmer who had come to visit. “I have my own OS and file storage device. I do not need to share resources with anyone. The software is consistent and easy to use. Why don't you leave your job and join me? ”
The mainframe programmer began to describe his system: “The mainframe sits in the middle of the data center like an ancient sage behind meditation. Its drives stand one after another, like an entire ocean of machines. The software is multifaceted, like a diamond, and intricate, like primitive jungle. Programs, each of which is unique, move through the system like a fast river. That's why I'm happy in my place. ”
The programmer personalok, having heard this, was speechless. But the two programmers remained friends until the end of their days.
8.4
Iron met Soft on the road to Chan Tse. Soft said: “You are Yin, and I am Yang. If we go together, we will become famous and make a lot of money. ” And they set off together, hoping to conquer the world.
And they met Firmware, dressed in tattered rags, hovering along the road, leaning on a spiked stick. The firmware told them: “Tao lies beyond Yin and Yang. It is as silent and silent as a lake. It is not looking for fame - because no one knows about his presence. It does not seek wealth, for it is self-sufficient. It exists outside of space and time. ”
Iron and Soft, ashamed, returned home.
Book 9
Epilogue
And the Great Programmer said: “The time has come for you to leave.”