📜 ⬆️ ⬇️

Full translation of Unix-koans into Russian



I present to your court another translation of the koans about Master Foo into Russian. This collection includes all koans, currently published on the website of Eric Raymond. It must be said that Eric himself is a very extraordinary person, but the references in this article are worthwhile. In addition to holivars on the mailing lists of various projects for his authorship, there are also several serious works on Unix - including the community, without which an ecosystem of modern open projects would not be possible ( full list of books ). The idea of ​​translating koans once again came to my mind while reading one of these works, namely “The Art of Unix Programming”, since much of the hidden meaning of koans becomes clear only after reading the next chapter from there.

And of course, a disclaimer: all comments and specifics of the transcription are the fruit of the imagination of your humble servant.
I publish this translation in the hope that someone might like it, but I do not give it any guarantees, including compliance with the canons of translation or suitability for quoting anywhere.
')

Master Foo & MCSE
One day, a famous Windows administrator came to Master Fu and asked him for advice:
“I heard you are the most powerful wizard in the Unix world.” Would you agree to the exchange of secrets, from which we both will only benefit?

“It's good that you are looking for wisdom,” said Master Foo, “But there are no secrets in the Great Way.”

The administrator looked discouraged:
- But they say that you are the Great Master of Unix-systems, who knows their deepest secrets! Like me on Windows: I'm a certified Microsoft engineer. I have other insignia that you rarely see in the world. I remember by heart even the darkest nooks of the registry. I can tell all about the Windows API, even those legends that are already half forgotten in Redmond itself. What secret knowledge gives you your power then?

Master Foo replied:
- I have nothing. Nothing is hidden, nothing to reveal.

Outraged administrator exclaimed:
- Well! Tell me then, if you have no secrets: what do I need to know in order to become as powerful in the Great Way as you are?

Master Foo said:
“A person who takes secrets for knowledge is like someone who, in search of light, clutches a candle so tightly that it puts out the flame and burns his hand.

Upon hearing this, the administrator gained enlightenment.

Master Foo Discourses on Returning to Windows
“We learned that Unix is ​​not only an operating system, but also a problem-solving style,” the student began.

Master Foo nodded in agreement.

The student continued:
“So the Great Path is also suitable for other operating systems?”

Master Foo froze for a moment, then said:
- In any operating system there is a path to the Great Way, if only we are able to find it.

The student continued:
- How then about Windows? It is preinstalled on most computers, and, although its tools are mostly much more primitive, they are easy for beginners to master. Windows can certainly benefit from the Unix philosophy!

Master Foo nodded again.

The student said:
“Well, then, will those who attain enlightenment in the Great Way return to the world of Windows?”

Master Foo replied:
- To return to Windows you just need to download it.

The student exclaimed, burning up:
- Master Foo, if it’s so easy, why then so many bloated and broken Windows applications? After all, with the graphical interface and fashionable colors should be able to write elegant applications, but this almost does not happen. What then happens to those enlightened ones who return to Windows? ..

The master said:
- A broken mirror will not reflect;
Fallen flowers will not return to the old branches.

Hearing this, all those present found enlightenment.

Comment
I had to think hard over this koan in my time.

Returning this time, I believe that under the broken mirror, the Master understood people from the Unix world, who, being seduced by sweetness and simplicity, left the community for the sake of their own convenience and enrichment.
Fallen flowers are those who grew up in a world filled with Windows in many, but, nevertheless, found enlightenment and left.

Again, the question “how did they find enlightenment?” Will be revealed in the following koans.
Going forward, Unix philosophy flourishes in the minds of programmers almost spontaneously and at a semi-intuitive level. In a sense, at first, such surrounded Windows are prateka buddhas.



Master Foo and the Script Kiddie
One day, during a morning meal, a traveler from the country of Woot approached Master Fu and his students.

“R heard that tbl is 1337,” he began, “Please, teach me everything I know.

The master's students exchanged glances, confused by the barbaric language of the wanderer. But the Master only smiled and answered:
- Do you want to learn Unix Path?

- I h0chu life mag hacker0m! - answered the wanderer, - and possess all the drawers of the world!

“I do not teach this way,” answered the Master.

The stranger looked worried:
- Chuv @ k, yes tbl pr0st0 PoseR! - He exclaimed, - If you knew something, you would tell me!

“There is a way,” said the Master, “which can lead you to wisdom.”
He scrawled the IP address on a piece of paper and handed it to the wanderer:
- Hacking this car will not present you any particular difficulty, its guards are incompetent. Come back and tell me what you found.

The stranger bowed and went out. The wizard finished his meal.

Days passed, months after them. The wanderer has been forgotten.

Years later, the traveler from Woot returned.
- Damn you! - He cried from the doorway, - I hacked that system, and it was just like you said. But the FBI grabbed me and threw me in jail!

- Good. - answered the Master, - now you are ready for the next lesson.
He scrawled another IP address on paper and handed it to the wanderer.

- Are you crazy ?? - he recoiled. - After all that was with me, I won't go over to other people's boxes for a mile!

Master Foo smiled.
“Here,” he said, “and wisdom begins.”

Hearing this, the wanderer found enlightenment.

Comment
This koan is probably the most famous of all.
It’s a pity, but in translations I haven’t seen Litspika script-kiddy anywhere.

Therefore, it was completely incomprehensible, for example, that in his language seemed to "barbarous" students.



Master Foo and the End User
At the next public performance of Master Fu, an end user, led by rumors of a Master's wisdom, came to him for advice.

He bowed to the Master three times.
“I want to learn the Great Unix Way,” he began, “but the command line confuses me.

Some of the students who watched on the side began to mock the user, calling him an ignoramus and saying that the Great Unix Path submits only to the wise and trained.

The master raised his hand, calling for silence, then called the most noisy of the offenders to where they sat with the user.
“Tell me,” the student’s master asked, “about the code that you wrote, and about the analysis that you did.”

The student began to stutter to answer, but could not say anything.

Master Foo turned to the user.
“Tell me,” he asked, “why are you looking for the Great Path?”

- I am not satisfied with the software that surrounds me, - the user said, - It does not work reliably and does not please the eye and soul. Having heard that the Unix Path, although more complicated, but more perfect, I try to drop all barriers and prejudices.

“And what are you doing in the world,” the Master asked, “what makes you struggle with software?”

“I am an architect,” the user replied, “on many houses in this city is my seal.”

Master Foo turned back to the student:
“A cat may scoff at a tiger,” said the Master, “but this will not turn her meow into a roar.”

Upon hearing this, the student gained enlightenment.

Comment
I definitely saw this koan translated in the “notes of the debianchik”.
And the translation there was excellent. Is that Eric directly indicates in the notes that it would be good to use the equivalent of "print".



Master Foo and the Hardware Designer
One day, when Master Foo was heading to one of the conferences with several senior students, the architect of the microcircuits addressed him.

He said:
- Rumor has it that you are a great programmer. How many lines of code do you write per year?

Master Fu answered with a question:
- How many square inches of silicon do you make per year?

“Wha ... no, we, architects of iron, never measure our work in this way," he answered.

- Why not? - asked Master Foo.

“If we did that,” the architect answered, “We would be tempted to reinvent microcircuits so large that they could not be made, and even if they could, their extreme complexity would create insurmountable obstacles to correctly testing them!”

Master Foo smiled, then bowed to him.

At this point, the architect reached enlightenment.


Master Foo and the Ten Thousand Lines
Master Foo once told a visiting programmer:
- In one line the bash script has more Unix spirit than ten thousand lines of C code.

The programmer, who was very proud of his mastery of C, replied:
- How is this possible? C is the language in which the very core of Unix was written!

The master replied:
- This is true. And yet, in one line the bash script has more Unix spirit than ten thousand lines of C code.

The programmer’s face was dismayed:
“But through C, we know the grace of patriarch Ritchie!” We become one with the operating system and the machine, achieving incomparable performance!

The master replied:
- All this is true. Nevertheless, in one line the bash script is still more of the spirit of Unix than in ten thousand lines of C code.

The programmer grinned and got up, wanting to leave. But Master Foo nodded at his apprentice Newby, who was pretending to be a one-liner on a blackboard nearby, and asked:
- Master programmer, take a look at this pipeline. Written in pure C, wouldn't it take ten thousand lines?

The programmer mumbled through his beard, contemplating the inscribed Newby. Finally he agreed that this was the case.

- And how many hours would it take to write and debug such a program? - asked Newby.

“There are many,” the programmer admitted, “but only a fool would spend time on such things when so many more important tasks await him.”

- And who better comprehends the spirit of Unix? - asked Master Foo, - Is the one who writes tens of thousands of lines, or is he who, understanding the emptiness of the task, wins without writing a single one?

Hearing this, the programmer found enlightenment.

Comment
Um, actually this koan is a bit different from the rest. The reasoning about the "Buddha Nature", to which there are references, is more characteristic of Japanese schools, so some words must be translated differently. Instead of “emptiness”, for example, in a koan there should be “shunyata” (the absence of its own nature or causality in something), and instead of “enlightenment” - “satori”. I translated in such a way as to maintain uniformity with the other koans, but a comment is nevertheless necessary.



Master Foo and the Unix Zealot
An adherent of Unix, having heard about the wisdom of Master Foo in the Great Way, came to him for advice.

Master Foo told him this:
- When Patriarch Thompson invented Unix, he did not realize this. Later, he came to an understanding, and invented nothing more.
- When Patriarch McIlroy invented the pipeline, he knew that this would transform the program, but he did not know that it would transform the consciousness.
- When Patriarch Ritchie invented C, he doomed the programmers to a thousand hells buffer overflow, memory damage and null pointer dereferencing!
“Indeed, the patriarchs were blind and stupid!”

The adept has infuriated the following maxims of the Master:
“These enlightened ones,” he objected, “bequeathed the Great Unix Path to us.” And if we scoff at them, we will lose all dignity and be reborn as beasts or Microsoft engineers!

- Is your code truly clear of errors and omissions? - asked Master Foo.

“No,” admitted the adept, “this is beyond the power of man.”

“The wisdom of the Patriarchs,” said the Master, “that they knew they were fools.”

After these words enlightenment descended on the adept.

Comment
For some reason, the last line was often translated as "they were mad." Regrettably, but from this the koan loses a little sense.

The patriarchs knew that they were fools - that is so. Unix was invented and implemented quite spontaneously, the principle of “mechanism, not design” dominated. Much in later years was criticized - too primitive security model, too many names for the same, control of tasks is like a patch ...

But with all the seeming fragility of such a system in working with Unix-like operating systems, the very idea for which we love them and which probably formed the basis of the koan can be traced: "The user knows better." Aware of their nearness, the patriarchs made their mechanisms so as not to limit those who will enjoy the fruits of their labors.

And the community has honored them a hundredfold.



Master Foo and the Programming Prodigy
For some time, Master Foo and his students had heard rumors about an unusually gifted young programmer who had come along and across the earth, creating masterpieces of programming and multiplying by zero all who dared to compete with him.

In the end, the young genius came to visit the Master, who met him with respect and offered him tea. The genius received him with respectful deference and explained the purpose of his visit:
“I came to you,” he said, “in search of an assessment of the architecture and code of my last project.” For this project is of exceptional complexity, and I do not know anyone who could embrace it on equal terms. Only an acknowledged master, such as you (and here the genius bowed low), can have the proper insight.

Master Foo bowed politely and began to study the code. After a while he looked up from the screen:
“At first glance, this code looks very impressive,” he said, “its architecture is elegant, originality and skill are felt in the algorithms, and it is written with extreme care that minimizes the possibility of error.

The genius looked very flattered by such an assessment of the Master, but he continued:
- However, I see one major flaw.

“A flaw?” - the genius has startled, - What lack?

“This code is difficult to read,” said the Master, “it is only slightly commented, its variables are blurred, and I see no description of logic and internal structures anywhere. These problems will greatly hinder collaboration with other programmers.

“I’m not looking for cooperation with other programmers,” the genius replied down on him, “I was disappointed with disappointment every time I thought that I had found someone who could compare with me in mastery!” Therefore, I work alone.

“But even working alone, a hacker cooperates with others and must always be clear, otherwise his work will become confused and forgotten.”

- Who are the “others” you are talking about? - demanded the answer genius.

Master Foo replied:
- All future you.

Hearing this, the genius found enlightenment.

Comment
Here I just remind you that the “hacker” is used without a negative hue. This word is a lot of the ancient nicknames of the Blacksmiths. There is a link to Wikipedia about this subculture, unfortunately, available only in English. The very essence of the first sentence: Hacker is the one who enjoys an intellectual competition in a skillful way around and overcoming the boundaries of programmable systems and trying to expand their capabilities.

What they had in common was the love of excellence and programming. They tried to make their programs at hand as good as possible. Yes, even so they worked gracefully. They would like to do something so stunning that no one would even believe in the reality of this, and say: “See how beautiful it is. I bet you didn't believe it was possible! ”

- Richard Stallman



Master Foo and the Nervous Novice
One novice, having already learned quite a lot from the Master, still felt that something was missing. Having meditated on his doubts for some time, he dared to approach the Master with his problem:
“Master Foo,” he asked, “why don't Unix followers use antivirus software?” And defragmenters? And cleaning up the Trojans?

Master Foo smiled and said:
“When your house is well built, there is no need for columns to hold the roof.”

The novice replied:
“Isn't it better to use them anyway — just to be sure?”

Master Foo picked up a ball of twine lying nearby, and began to wrap the novice's legs with it.

- What are you doing? - He asked in amazement.

Master Foo answered simply:
“I'm tying your shoelaces.”

Upon hearing this, the novice found enlightenment.


Master Foo and the Editor Wars
One day, Master Fu's serene morning was clouded by screams of suffering.

Finding that they come from one of the newbies, he asked:
- What is your difficulty?

“I’m desperate for my tools,” the novice replied. “Every time I have to use a whole host of editors, because neither Emacs, nor Vi, nor any other word processor has all the features that I need.

Master Foo nodded:
“How,” he asked, “would the Master of the Great Way decide this difficulty?”

The student thought for a couple of minutes, then answered:
- Well, that's obvious. I will write the best editor in the world. He will do whatever I want. He will do whatever anyone wants. And the world will be better because ...

... Here the student's speech was interrupted by a sharp blow to the master's staff on the back of the head.

- M ... Master? - asked the student, gently rubbing the bruise, - What was I wrong?

- Fool! - said Master Foo, - do you really think that I want to learn another editor?

Upon hearing this, the student gained enlightenment.

Comment
This koan has not yet been translated by anyone anywhere. He appeared just the other day.
Imagine my joy when I see the first update in a year and a half on the Raymond website.



Master Foo and the Old Hand
An experienced Unix programmer, having heard about the wisdom of Master F, came to him for instruction. Approaching the Master, he bowed three times and said:
“Master Foo, I'm seriously concerned.” In my youth, those who followed the Great Path had simple and simple programs — ed, mailx. Today they use vim and mutt. Tomorrow, I fear they will master KMail and Evolution, and Unix will become just like Windows - bloated and dotted with all sorts of graphical interfaces.

Master Foo said:
- But what program to use if you want to draw a poster?

“I ...,” the programmer failed, “I never did that.” But I'm sure I could find the true Unix path and use LaTeX or pic to handle this without a graphical interface.

Then Master Foo asked:
- Who will quickly cross the river: the one who dreams of a raft, or the one who hitchhikers to the nearest bridge?

Upon hearing this, the programmer achieved enlightenment.

Comment
ed - stream text editor, one of the first and simplest. Now almost completely forgotten and buried by sed.
mailx is a streaming and very simple email client, still used here and there on HP-UX or Solaris and for simple parcels of letters through the pipeline.

vim is a console text editor, one of the best at the moment. There are plugins for almost all occasions.
mutt is a console mail client with a user-friendly interface on ncurses.

KMail is a graphical email client from KDE e. V. For a long time there was a huge monolithic copy of the semi-working code.
Evolution is a graphical email client from the Gnome Foundation. For a long time did not provide almost any possibilities of fitting the interface and behavior to the needs of the user.



Master Foo Discourses on the Two Paths
Master Foo instructed the disciples:
- There is a teaching in the way of dharma, as exemplified by Patriarch McIlroy's saying: “Do one thing and do it well”, which demonstrates that the program then follows the Unix path when it has simple and relevant behavior, with user-friendly and other program parameters.
“But there is another teaching of dharma, exemplified by the great mantra of Patriarch Thompson,“ In doubt, use brute force, ”along with various sutras about getting 90% right now than 100% late, which demonstrates clarity and simplicity of realization.
- Tell me now, which programs are more inherent in the spirit of Unix?

After some silence, Newby remarked:
- The teacher, but these teachings can be contradictory.
- A simple implementation of the algorithm does not cover all bottlenecks, such as resource exhaustion, race conditions, or transaction timeout.
- When this happens, the behavior of the program becomes faulty and unpredictable. After all, can this be the spirit of Unix?

Master Foo nodded approvingly.

“But on the other hand, it is well known that ideal algorithms are actually fragile.” And another attempt to cover the bottleneck leads to interaction with the code of the central logic of the program, and with the code from other bottlenecks.
- Thus, the desire to cover all the bottlenecks at once in an effort to achieve "ease of description" can actually lead to an over-complicated and fragile code, or one that, because of the abundance of errors, will never work. After all, this is not the spirit of Unix?

And again the Master nodded approvingly.

- What is the teaching of dharma true, then?

And the master replied:
- When the eagle flies, does he forget that his feet touched the ground? When a tiger grabs its prey, does it forget about the moment it jumped? Three pounds VAX!

Upon hearing this, Newby gained enlightenment.

Comment
In this koan, as well as in one of the previous ones, there are references to the “Nature of the Buddha”, as well as the untranslatable play on words - a replica of the Master “Three pounds of VAX!” Should remind you of the classical koan “Three pounds of flax!”, In which emphasizes a similar idea. Namely: there is no silver bullet. There is not a single program that meets all ideals. And when developing, one should not go about the best practices in everything, because the context can differ dramatically.

VAX is an architecture for building computers that was quite popular in the 1980s, on which Unix was developed for a long time. It is interesting to note that precisely because of their commitment to VAX, Unix adepts did not pay attention at the time to the appearance of the inconspicuous Intel x86 at that time, and later Windows on them.



Master Foo Discourses on the Unix-Nature
The student told Master Foo:
“We were told that Novell retains true power over Unix.”

Master Foo nodded.

The student continued:
“But we were also told that the OpenGroup also holds true power over Unix.

Master Foo nodded.

- How is this possible? - The student asked.

Master Foo replied:
“Novell does hold power over Unix code, but Unix code is not Unix. OpenGroup does hold power over the Unix name, but the Unix name is not Unix.

- What then is the spirit of Unix? The student asked.

Master Foo said:
- Not a code. Not a name. Not a thought. Not a thing. Eternally changing, remains the same.
- The spirit of Unix is ​​simple and empty. Because of this simplicity and emptiness, it is more powerful than a typhoon.
- Moving according to the laws of nature, it inexorably blooms in the minds of programmers, assimilating projects into its nature. All programs that want to compete with him must become like him - empty, empty, deep empty, perfect nothing, so be it!

Upon hearing this, the student gained enlightenment.

Comment
Again, references to the "Nature of the Buddha", which everyone finds himself. This koan is replete with all sorts of references and alterations of phrases from real koans. The ESR itself left a comment that “Moving according to the laws of nature” is a very frequent proverb to substantiate something in “Tao Te Ching”, also, “Not a code. Not a name. Not a thought. Not a thing. ”Is a practically complete copy from koan No. 27, and the last words of the Master in real koans are found as a line from sutra songs.



Master Foo and the Shell Tools
The newcomer came to Master Foo and said:
- I'm confused. Isn't it the Unix way that every program has to do one thing and do it well?

Master Foo nodded.

Rookie continued:
- Isn’t it also the Unix Way that the wheel should not be reinvented?

Master Foo nodded again.

- Why, then, are there similar tools in word processing?

Master Fu asked the student:
- Which of them would you use if you had a text file and the need to replace a few words in it with others?

The newcomer frowned, then said:
- Perl regular expressions are too redundant for such a task. I don't know awk, but in recent weeks I've been writing sed scripts. Since I already have some experience, at the moment I would prefer sed. But if you only need to edit one file once, a text editor is enough.

Master Foo nodded and replied:
- When hungry, eat; when you have thirst, drink; when tired, sleep.

Upon hearing this, the student gained enlightenment.


Master Foo and the Methodologist
At a time when Master Foo and his student Newby traveled to holy places, the custom of the Master was to give instructions to the Unix neophytes, while spending time before spending the night in passing towns and villages.

On one of these days, there was a methodologist among those who listened.

“If you do not regularly profile your code in search of bottlenecks when debugging, you will become like a fisherman who throws a net into an empty lake,” said Master Foo.

- If this is so, then it is not true that if you do not regularly measure your success and efficiency in managing resources, you will become like a fisherman who throws a net into an empty lake? - asked the methodologist.

“I once came across a fisherman who had just dropped his net into the lake where his boat was swimming,” said Master Foo. “He had been rummaging around the bottom of the boat for quite a while trying to find her.

“But ..,” the methodologist said, “If he dropped the net into the lake, why did he search for it in the boat?”

“Because he couldn’t swim,” said Master Foo.

After these words, insight descended on the methodologist.

Comment
Eric Raymond directly indicates in the translation instructions that the methodologist’s membership is not specific to a practical branch of any methodology, but to the management caste in general - and it asks him not to translate literally, but to use an appropriate substitute in the target language in the field of business slang



Master Foo Discourses on the Graphical User Interface
One day, Master Foo and Newby attended a meeting of programmers gathered to share knowledge. One programmer asked Newby what school he and his teacher belong to. Hearing that they are followers of the Great Path of Unix, he smiled contemptuously.

— Unix , — , — !

, . .

— ! — .

, - , . .

— ? — .

. .

— ? — .

, .

, .

.

Comment
, , «» . , , , .
— .



Thanks for attention. , . , .

EDIT:
, , , — . .

Source: https://habr.com/ru/post/273023/


All Articles