Full translation of Unix-koans into Russian



    I present to your court another translation of the Koans about Master Fu into Russian. This collection includes all the koans currently published on Eric Raymond's website . I must say that Eric himself is a very extraordinary person, but worth mentioning in this article. In addition to the holivars on the mailing lists of various projects for his authorship, there are also several serious works on Unix - including the community, without which the ecosystem of modern open projects would not be possible ( full list of books ). The idea to translate koans once again occurred to me 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 another chapter from there.

    And of course, the disclaimer: all comments and the specifics of the arrangement are a figment of the imagination of your humble servant.
    I publish this translation in the hope that someone may like it, but I do not provide any guarantees for it, including compliance with the canons of the translation or the suitability for citation anywhere.


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

    “It is good that you seek wisdom,” replied Master Fu, “but there are no secrets in the Great Way.”

    The administrator looked discouraged:
    “But they say that you are a 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 everything about the Windows API, even those legends that are already half-forgotten in Redmond itself. What secret knowledge then gives you your strength?

    Master Fu replied:
    - I do not have anything. Nothing is hidden, nothing to reveal.

    The outraged administrator exclaimed:
    - Great! 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?

    Master Fu said:
    “A man who takes secrets for knowledge is like someone who clings so tightly to the candle in search of light that he puts out its 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 style of problem solving,” said student

    Master Fu nodded, agreeing.

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

    Master Fu froze for a moment, then said:
    “There is a path to the Great Way in any operating system, if only we can find it.”

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

    Master Fu nodded again.

    The student said:
    “Well then, do those who have reached enlightenment in the Great Way return to the Windows world?”

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

    The student exclaimed furiously:
    “Master Fu, if it is so easy, why are there so many bloated and broken Windows applications?” After all, with a graphical interface and fashionable colors should be able to write elegant applications, but this almost never happens. What then happens to those enlightened ones who return to Windows? .. The

    master said:
    “The broken mirror will no longer reflect;
    Fallen flowers will not return to the old branches.

    Hearing this, everyone present became enlightened.

    A comment
    I had to think hard about this koan in due time.

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

    Again, the question “how did they find enlightenment” will be revealed in the following koans.
    Looking ahead, the Unix philosophy flourishes in the minds of programmers almost spontaneously and on a semi-intuitive level. In a way, at first, such surrounded Windows are pratyeka-buddhas.



    Master Foo and the Script Kiddie
    Once, during a morning meal, a traveler from Woot approached Master Fu and his students.

    “R heard that tbl e1337en,” he began, “please, taught me all that you know.

    The master’s students looked at each other, embarrassed by the barbarian language of the wanderer. But the Master only smiled and answered:
    - Do you want to learn the Unix Path?

    - I want to be a magician-hacker0m! - the wanderer answered, - and master all the boxes of the world!

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

    The wanderer looked excited:
    - Chuv @ k, yes tbl pr0st0 poseR! He exclaimed. “If you had known anything, you would have told me!”

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

    The wanderer bowed and went out. The master finished his meal.

    Days passed, followed by months. The wanderer was forgotten.

    Years later, the traveler from Woot returned.
    - Damn you! He cried from the doorway. “I hacked that system, and it was just as 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 scribbled another IP address on paper and handed it to the wanderer.

    - Are you crazy ?? - he recoiled. “After all that was with me, I will not go a mile to other people's boxes!”

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

    Hearing this, the wanderer gained enlightenment.

    A comment
    This koan is probably the most famous of all.
    It’s a pity, but in translations I haven’t seen a litspik script kiddie anywhere.

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



    Master Foo and the End User
    At the next public appearance of Master Fu, the end user, driven by rumors of Master’s wisdom, came to him for advice.

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

    Some of the students who watched aside began to taunt the user, calling him an ignoramus and saying that the Unix Great Way obeys only the wise and trained.

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

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

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

    “I am dissatisfied with the software that surrounds me,” the user said, “It does not work reliably and does not please the eye and the soul.” Hearing that the Unix Path, though 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 my stamp is.”

    Master Fu turned back to the student:
    “A cat can scoff at a tiger,” said the Master, “but that won’t turn her meow into a roar.”

    Upon hearing this, the student gained enlightenment.

    A comment
    I definitely saw this koan translated in "notes of a debian".
    And the translation there was excellent. Unless Eric expressly points out in the notes that it would be nice to use the equivalent of "print".



    Master Foo and the Hardware Designer
    Once, when Master Fu was heading to a conference with several senior students, a chip architect turned to 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?”

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

    - Why not? - asked Master Fu.

    “If we did that,” answered the architect, “we would be tempted by the opportunity to invent microchips so large that they could not be manufactured, and even if they could, their extreme complexity would create insurmountable obstacles for their correct testing!”

    Master Fu smiled, then bowed to him.

    At this point, the architect achieved enlightenment.


    Master Foo and the Ten Thousand Lines
    Master Fu once said to the programmer who visited him:
    - One line of the bash script has more Unix spirit than ten thousand lines of C code.

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

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

    Chagrin reflected on the programmer's face:
    “But through C we learn 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 of the bash script there is still more Unix spirit than in ten thousand lines of C code.

    The programmer grinned and stood up, wanting to leave. But Master Fu nodded at his student Newby, who was throwing a single-line bash on a board nearby, and asked:
    “Master programmer, look at this conveyor.” Written in pure C, would it not take ten thousand lines?

    The programmer muttered through his beard, contemplating Newby's inscription. Finally, he agreed that it was.

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

    “A lot,” 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 Fu, - Is it the one who writes tens of thousands of lines, or the one who, understanding the emptiness of the problem, wins without writing a single one?

    Hearing this, the programmer gained enlightenment.

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



    Master Foo and the Unix Zealot
    A Unix adept, having heard of Master Fu's wisdom on the Great Way, came to him for advice.

    Master Fu told him this:
    “When Patriarch Thompson invented Unix, he did not realize this. He later came to understand, and did not invent anything else.
    - When Patriarch McIlroy invented the conveyor, he knew that it 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 of buffer overflows, memory corruption and dereferencing a null pointer!
    - Truly, the patriarchs were blind and stupid!

    Adept many angered such maxims of the Master:
    “These enlightened ones,” he objected, “bequeathed to us the Great Way of Unix.” And if we scoff at them, we will lose all dignity and be reborn as beasts or engineers of Microsoft!

    - Is your code truly clean from errors and omissions? Asked Master Fu.

    “No,” the adherent admitted, “this is beyond human power.”

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

    After these words, an insight descended on the adept.

    A comment
    For some reason, the last line was often translated as "they were crazy." It’s unfortunate, but the koan makes a little sense of this.

    The patriarchs knew that they were fools - that’s true. Unix was invented and implemented completely spontaneously, the principle of “mechanism, not design” dominated. Much has been criticized in recent years - too primitive security model, too many names for the same thing, task control is similar to a patch ...

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

    And the community paid them handsomely.



    Master Foo and the Programming Prodigy
    For some time now, rumors had spread to Master Fu and his students that an unusually gifted young programmer was walking the earth along and across, creating masterpieces of programming and multiplying by zero all those who dared to compete with him.

    In the end, the young genius came to visit the Master, who greeted him with reverence and offered him tea. The genius received it with reciprocal respect 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 equally embrace it. Only a recognized master, such as you (and here a genius bowed low), can possess the proper insight.

    Master Fu politely bowed and began to study the code. After some time, he raised his eyes from the screen:
    “This code at first glance looks very impressive,” he said, “its architecture is elegant, the algorithms feel original and skillful, and it is written with extreme care, which minimizes the possibility of error.

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

    - The disadvantage? - the genius started, - What is the drawback?

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

    “I'm not looking for cooperation with other programmers,” said the genius from above, “I was disappointed every time I thought that I had found someone who could compare with me in mastery! Therefore, I work alone.

    - But even working alone, the hacker cooperates with others and always needs to communicate clearly, otherwise his work will become confused and forgotten.

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

    Master Fu replied:
    - All future you.

    Hearing this, a genius gained enlightenment.

    A comment
    Here, just for show, I remind you that the "hacker" is used without a negative connotation. This word is much older than the nicknames of the Black-Caps. There is a link to Wikipedia about this subculture, unfortunately, available only in English. The very essence in the first sentence: A hacker is one who enjoys intellectual competition in skillfully circumventing and overcoming the boundaries of programmable systems and trying to expand their capabilities.

    What was common in them was a love of excellence and programming. They tried to make their programs as good as possible. Yes, so that they work elegantly. They would like to do something so stunning that no one would even believe in the reality of this, and say: “Look how wonderful it is. I bet you didn’t believe that it was possible! ”

    - Richard Stallman



    Master Foo and the Nervous Novice
    One novice, who had already learned quite a lot from the Master, still felt that something was missing. After meditating on his doubts for a while, he dared to approach the Master with his problem:
    “Master Fu,” he asked, “why don't Unix adherents use anti-virus programs?” And defragmenters? And cleaning up the trojans?

    Master Fu 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 Fu picked up a tangle of twine lying nearby and began to wrap the novice's legs around it.

    - What are you doing? He asked in amazement.

    Master Fu answered simply:
    - Tie your shoelaces.

    Hearing this, the novice gained enlightenment.


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

    Upon discovering that they came from one of the newcomers, he inquired:
    - What is your difficulty?

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

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

    The student thought for a couple of minutes, then answered:
    - Well, this is 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 get better because ...

    ... Then the student’s speech was interrupted by a sharp blow of the Master’s staff on the back of the head.

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

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

    Upon hearing this, the student gained enlightenment.

    A 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 Fu, came to him for instruction. Approaching the Master, he bowed three times and said:
    “Master Fu, I am seriously worried.” In my youth, those who followed the Great Way had simple and unpretentious programs - ed, mailx. Today they use vim and mutt. Tomorrow, I fear, they will learn KMail and Evolution, and Unix will become the same as Windows - bloated and streaked with all kinds of graphical interfaces.

    Master Fu said:
    “But what program should I use if I need to draw a poster?”

    “I ...,” said the programmer, “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 Fu asked:
    - Who will quickly cross the river: is he who dreams of a raft, or the one who hitchhikes to the nearest bridge?

    Hearing this, the programmer achieved enlightenment.

    A comment
    ed - one of the first and simplest streaming text editor. Now almost completely forgotten and buried by sed.
    mailx is a streaming and very simple email client, it is still used in some places on HP-UX or Solaris and for simple sending messages via pipelines.

    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 it was a huge monolithic cast of semi-working code.
    Evolution is a graphical email client from the Gnome Foundation. For a long time, it provided almost no possibilities for customizing the interface and behavior to the needs of the user.



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

    After some silence, Newby remarked:
    “Teacher, but these teachings may contradict one another.”
    - A simple implementation of the algorithm does not cover all bottlenecks, such as running out of resources, race condition, or transaction timeout.
    - When this happens, the behavior of the program becomes malfunctioning and unpredictable. After all, this cannot be the spirit of Unix?

    Master Fu nodded approvingly.

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

    And again the Master nodded approvingly.

    “What Dharma teaching is true, then?”

    And the Master replied:
    “When the eagle flies, does he forget that his feet were touching the ground?” When the tiger grabs its prey, does it forget about the moment spent in the jump? Three pounds VAX!

    Hearing this, Newby gained enlightenment.

    A comment
    In this koan, as well as in one of the previous ones, there are references to "Buddha Nature", as well as an untranslatable pun - a replica of the Master "Three pounds of VAX!" should be reminiscent of the classic “Three pounds of flax!” koan, which emphasizes a similar idea. Namely: there is no silver bullet. There is not a single program that meets all ideals. And when developing, you should not follow the best practices in everything, because the context can radically differ.

    VAX is a computer-building architecture that was very popular in the 1980s and has been developing Unix for a long time. It is interesting to note that precisely because of their commitment to VAX, Unix adherents did not at one time pay attention to the appearance of Intel x86, which was inconspicuous in those days, and later Windows on them.



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

    Master Fu nodded.

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

    Master Fu nodded.

    - How is this possible? - asked the student.

    Master Fu replied:
    “Novell really holds control of Unix code, but Unix code is not Unix.” OpenGroup really holds control of the Unix name, but the Unix name is not Unix.

    “Then what is the spirit of Unix?” - asked the student.

    Master Fu said:
    “Not a code.” Not a name. Not a thought. Not a thing. Forever 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 flourishes 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, let it be!

    Upon hearing this, the student gained enlightenment.

    A comment
    Again, references to the "Buddha Nature", which everyone finds himself. This koan is simply full of all kinds 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 common saying to justify something in “Tao Te Ching”, also, “Not a code. Not a name. Not a thought. Not a thing. " - An almost 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
    A newcomer came to Master Fu and said:
    “I am in confusion.” Isn't that the Unix way that every program should do one thing and do it well?

    Master Fu nodded.

    The novice continued:
    “Isn't that the Unix Way, too, that the wheel should not be reinvented?”

    Master Fu nodded again.

    - Why then are there similar features in word processing?

    Master Fu asked the student:
    “Which one 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 do not know awk, but in recent weeks I have written sed scripts. Since I already have some experience, for now I would prefer sed. But if you need to edit only one file once, a text editor is enough.

    Master Fu nodded and answered:
    - When you are 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 Fu and his student Newby traveled to holy places, it was customary for Masters to give instructions to Unix neophytes, shortening the time before spending the night in related towns and villages.

    On one of these days, among the attentive was a methodologist.

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

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

    “Once I came across a fisherman who just dropped his net into the lake where his boat was floating,” said Master Fu. “He rummaged for a long time at the bottom of the boat, trying to find it.

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

    “Because he did not know how to swim,” replied Master Fu.

    After these words, insight descended on the methodologist.

    A comment
    Eric Raymond explicitly indicates in the translation instructions that the methodologist does not belong to a particular practical branch of any methodology, but to the management caste in general - and he asks not to translate it verbatim, but to use a suitable substitute in the target language in the field of business slang



    Master Foo Discourses on the Graphical User Interface
    Once Master Fu and Newby attended a meeting of programmers gathered to share knowledge. One of the programmers asked Newby which school he and his teacher belong to. Hearing that they were followers of the Unix Great Way, he grinned contemptuously.

    “The Unix command line tools are rude and backward,” he threw, “modern, well-designed operating systems do everything through a graphical interface!”

    Master Fu said nothing, but jabbed his finger at the moon. A dog nearby barked at the Master’s hand.

    - I do not understand you! - said the programmer.

    Master Fu, still silent, poked at the Buddha image. Then to the window.

    “What are you trying to say?” Asked the programmer.

    Master Fu poked at the head of the programmer. Then to the stone.

    “Why can't you say clearly?” - the programmer demanded an answer.

    Master Fu frowned thoughtfully, then double-clicked the programmer on the nose and threw it into the nearest trash bin.

    While the programmer was trying to get out of there, a dog running past urinated on him.

    At this point, the programmer achieved enlightenment.

    A comment
    When I first read this koan in translation, he dipped me into the abyss of the SPPS, because the translator chose “indicated” as a description of the actions of the Master. Although this is more true stylistically in the Russian language, but I think it’s worthwhile to emphasize the similarity of the Wizard’s actions with the mouse pointer of a user who tastes all the many button combinations in graphic applications.
    The moral is simple - the graphical interface does not make your program modern and convenient for you.



    Thanks for attention. I wish that such pearls do not disappear in the vast sea of ​​content in the current network. Comments, corrections to the translation are welcome.

    EDIT:
    I’m sorry, now I suddenly thought that it would be better to design the post as a translation, since everything except the title and comments on the koans is the property of the community. Sorry.

    Also popular now: