# HG changeset patch # User meillo@marmaro.de # Date 1267536847 -3600 # Node ID f0511a56416ea577ad1215a1fc01701cc692b4f2 # Parent 4c21f5b8d7160e550c0b5f0935a1bc4755d7ef65 rework in ch04 and spell check diff -r 4c21f5b8d716 -r f0511a56416e unix-phil.ms --- a/unix-phil.ms Tue Mar 02 12:24:30 2010 +0100 +++ b/unix-phil.ms Tue Mar 02 14:34:07 2010 +0100 @@ -191,7 +191,7 @@ (time behavior, resource utilization) .IP \(bu .I Maintainability -(analysability, changeability, stability, testability) +(analyzability, changeability, stability, testability) .IP \(bu .I Portability (adaptability, installability, co-existence, replaceability) @@ -481,7 +481,7 @@ \fIgood enough\fP. Hence, no reimplementation, in a more sophisticated programming language, might be of need, for the moment. -Maybe later, it might be neccessary to rewrite the software, but not now. +Maybe later, it might be necessary to rewrite the software, but not now. .PP By delaying further work, one keeps the flexibility to react easily on changing requirements. @@ -580,14 +580,14 @@ By chaining software to a specific hardware, the software's lifetime gets shortened to that of this hardware. In contrast, software should be easy to port \(en -adaption is the key to success. +adaptation is the key to success. .\" cf. practice of prog: ch08 .PP (2) .I "Portability of data is best achieved by avoiding binary representations to store data, because binary representations differ from machine to machine. -Textual represenation is favored. +Textual representation is favored. Historically, ASCII was the charset of choice. In the future, UTF-8 might be the better choice, however. Important is that it is a plain text representation in a @@ -600,7 +600,7 @@ (3) A large .I "range of usability -ensures good adaption, and thus good survival. +ensures good adaptation, and thus good survival. It is a special distinction if a software becomes used in fields of action, the original authors did never imagine. Software that solves problems in a general way will likely be used @@ -658,13 +658,16 @@ .LP The last chapter introduced and explained the Unix Philosophy from a general point of view. -The driving force were the guidelines and references to +The driving force were the guidelines, references to existing software were given only sparsely. In this and the next chapter, concrete software will be the driving force in the discussion. .PP -This first case study is about the mail user agents \s-1MH\s0 -(``mail handler'') and its descendent \fInmh\fP (``new mail handler''). +This first case study is about the mail user agents (\s-1MUA\s0) +\s-1MH\s0 (``mail handler'') and its descendent \fInmh\fP +(``new mail handler''). +\s-1MUA\s0s provide functions to read, compose, and organize mail, +but (ideally) not to transfer. In this document, the name \s-1MH\s0 will be used for both of them. A distinction will only be made if differences between them are described. @@ -674,12 +677,6 @@ Historical background .LP Electronic mail was available in Unix very early. -It is out of matter that in the beginning mail was only -transferred within one machine. -This chapter is about a mail user agent (\s-1MUA\s0), -which provides functions to read, compose, and organize mail, -but (ideally) not to transfer. -.PP The first \s-1MUA\s0 on Unix was \f(CWmail\fP. It was a small program that either prints the own mailbox file or appends text to someone elses mailbox file, @@ -688,9 +685,9 @@ %O http://cm.bell-labs.com/cm/cs/who/dmr/pdfs/man12.pdf .] It was a program that did one job well. -This job was emailing, which then was very simple. +This job was emailing, which was very simple then. .PP -Later, emailing became more powerfull, and thus more complex. +Later, emailing became more powerful, and thus more complex. The simple \f(CWmail\fP, which knew nothing of subjects, independent handling of single messages, and long-time storage of them, was not powerful enough anymore. @@ -698,9 +695,9 @@ in 1978 to provide additional functions for emailing. Mail was still one program, but now it was large and did several jobs. -Its user interface is modeled after the one of ed. +Its user interface is modeled after the one of \fIed\fP. It is designed for humans, but is still scriptable. -\fImailx\fP is the adaption of Berkeley Mail into System V. +\fImailx\fP is the adaptation of Berkeley Mail into System V. .[ %A Gunnar Ritter %O http://heirloom.sourceforge.net/mailx_history.html @@ -709,9 +706,9 @@ followed Mail's direction. They are large, monolithic programs which include all emailing functions. .PP -A different way took the people of \s-1RAND\s0 Corporation. +A different way was taken by the people of \s-1RAND\s0 Corporation. In the beginning, they also had used a monolitic mail system, -simply called \s-1MS\s0 for ``mail system''. +called \s-1MS\s0 simply for ``mail system''. But in 1977, Stockton Gaines and Norman Shapiro came up with a proposal of a new email system concept \(en one that honors the Unix Philosophy. @@ -721,11 +718,10 @@ Since then, \s-1RAND\s0, the University of California at Irvine and at Berkeley, and several others have contributed to the software. However, it's core concepts remained the same. -In the 90s, when development of \s-1MH\s0 slowed down, +In the late 90s, when development of \s-1MH\s0 slowed down, Richard Coleman started with \fInmh\fP, the new mail handler. -This was in 1997. His goal was to improve \s-1MH\s0, especially in regard of -the requirements of modern email. +the requirements of modern emailing. Today, nmh is developed by various people on the Internet. .[ %T RAND and the Information Evolution: A History in Essays and Vignettes @@ -753,7 +749,8 @@ .PP While monolithic \s-1MUA\s0s gather all function in one program, \s-1MH\s0 is a toolchest of many small tools \(en one for each job. -Following is a list of important programs of \s-1MH\s0's toolchest: +Following is a list of important programs of \s-1MH\s0's toolchest +and their function: .IP \(bu .CW inc : incorporate new mail @@ -791,8 +788,14 @@ \s-1MH\s0 has no special user interface like monolithic \s-1MUA\s0s have. The user does not leave the shell to run \s-1MH\s0, but he uses \s-1MH\s0 within the shell. +Using a monolithic program with a captive user interface +means ``entering'' the program, using it, and ``exiting'' the program. +Using toolchests like \s-1MH\s0 means running programs, +alone or in combinition with others, even from other toolchests, +without leaving the shell. +.PP \s-1MH\s0's mail storage is (only little more than) a directory tree -where directories are mail folders and files are mail messages. +where mail folders are directories and mail messages are text files. Working with \s-1MH\s0's toolchest is much like working with Unix' toolchest: \f(CWscan\fP is like \f(CWls\fP, @@ -801,33 +804,30 @@ \f(CWrefile\fP is like \f(CWmv\fP, and \f(CWrmm\fP is like \f(CWrm\fP. .PP -The context of the Unix tools is mainly the current working directory, +The context of tools in Unix is mainly the current working directory, the user identification, and the environment variables. \s-1MH\s0 extends this context by two more items: -The current mail folder, similar to the current working directory, -for which \f(CWfolder\fP provides the functionality of -\f(CWpwd\fP and \f(CWcd\fP. -And the current message, relative to the current mail folder, +.IP \(bu +The current mail folder, which is similar to the current working directory. +For mail folders, \f(CWfolder\fP provides the corresponding functionality +of \f(CWpwd\fP and \f(CWcd\fP for directories. +.IP \(bu +The current message, relative to the current mail folder, which enables commands like \f(CWnext\fP and \f(CWprev\fP. +.LP In contrast to Unix' context, which is chained to the shell session, \s-1MH\s0's context is meant to be chained to a mail account. But actually, the current message is a property of the mail folder, -which is mainly a legacy. +which appears to be a legacy. This will cause problems when multiple users work in one mail folder simultaneously. -.PP -Using a monolithic program with a captive user interface -means ``entering'' the program, using it, and ``exiting'' the program. -Using toolchests like \s-1MH\s0 means running programs, -alone or in combinition with others, even from other toolchests, -without leaving the shell. .NH 2 Discussion of the design .LP The following paragraphs discuss \s-1MH\s0 in regard to the tenets -of the Unix Philosophy Gancarz identified. +of the Unix Philosophy which Gancarz identified. .PP .I "``Small is beautiful'' @@ -850,17 +850,17 @@ .] .LP The various small programs of \s-1MH\s0 were relatively easy -to write as each of them is small, limited to one function, -and has clear bounderies. +to write, because each of them is small, limited to one function, +and has clear boundaries. For the same reasons, they are also good to maintain. Further more, the system can easily get extended. One only needs to put a new program into the toolchest. -This was done when \s-1MIME\s0 support was added +This was done, for instance, when \s-1MIME\s0 support was added (e.g. \f(CWmhbuild\fP). Also, different programs can exist to do the basically same job in different ways (e.g. in nmh: \f(CWshow\fP and \f(CWmhshow\fP). If someone needs a mail system with some additionally -functions that are nowhere available yet, he best takes a +functions that are available nowhere yet, he best takes a toolchest system like \s-1MH\s0 where he can add the functionality with little work. @@ -870,7 +870,7 @@ Mail folders are directories (which contain a file \&\f(CW.mh_sequences\fP) under the user's \s-1MH\s0 directory (usually \f(CW$HOME/Mail\fP). -Mail messages are text files located in a mail folder. +Mail messages are text files located in mail folders. The files contain the messages as they were received. The messages are numbered in ascending order in each folder. This mailbox format is called ``\s-1MH\s0'' after the \s-1MUA\s0. @@ -882,10 +882,10 @@ of attachments, it is a bad solution. Another disadvantage of the mbox format is that it is more difficult to write tools that work on mail messages, -because it is always neccessary to first find and extract +because it is always necessary to first find and extract the relevant message in the mbox file. -With \s-1MH\s0 mailboxes, each message is a self-standing item, -by definition. +With the \s-1MH\s0 mailbox format, +each message is a self-standing item, by definition. Also, the problem of concurrent access to one mailbox is reduced to the problem of concurrent access to one message. However, the issue of the shared parts of the context, @@ -907,7 +907,7 @@ Providing easy-to-use user interfaces in form of frontends is a good approach, because it does not limit the power of the backend itself. The frontend will anyway only be able to make a subset of the -backend's power and flexibility available. +backend's power and flexibility available to the user. But if it is a separate program, then the missing parts can still be accessed at the backend directly. If it is integrated, then this will hardly be possible. @@ -938,11 +938,10 @@ to be widespread. This demonstration also shows how easy it is to create single programs of a toolchest software. -Most of the single programs comprise less than a hundred lines of -shell code. +Most of them comprise less than a hundred lines of shell code. Such small software is easy to write, easy to understand, and thus easy to maintain. -Being a toolchest improved the possibility to only write some parts +A toolchest improves the possibility to only write some parts and though create a working result. Expanding the toolchest without global changes will likely be possible, too. @@ -961,7 +960,7 @@ There is few software that so much wants users to tailor their environment and to leverage the use of the software, like \s-1MH\s0. Just to make one example: -One might prefere a different listing format for the \f(CWscan\fP +One might prefer a different listing format for the \f(CWscan\fP program. It is possible to take one of the other distributed format files or to write one yourself. @@ -973,8 +972,8 @@ .DE must be added to \f(CW.mh_profile\fP. If one wants this different format as an additional command, -he needs to create a link to \f(CWscan\fP, for instance titled -\f(CWscan2\fP. +instead of changing the default, he needs to create a link to +\f(CWscan\fP, for instance titled \f(CWscan2\fP. The line in \f(CW.mh_profile\fP would then start with \f(CWscan2\fP, as the option should only be in effect when scan was called as \f(CWscan2\fP. @@ -986,6 +985,9 @@ basic file system operations for the mailboxes. \f(CWls\fP, \f(CWcp\fP, \f(CWmv\fP, and \f(CWrm\fP aren't filters neither. +However, they build a basis on which filters can operate. +\s-1MH\s0 does not provide many filters itself, but it is a basis +to write filters for. .PP .I "``Build a prototype as soon as possible'' @@ -993,13 +995,12 @@ This tenet, of course, focuses on early development, which is long time ago for \s-1MH\s0. But without following this guideline at the very beginning, -Bruce Borden may have not convinced the management to ever -create \s-1MH\s0. -In Bruce's own words: +Bruce Borden may have not convinced the management of \s-1RAND\s0 +to ever create \s-1MH\s0. +In Bruce' own words: .QP [...] but [Stockton Gaines and Norm Shapiro] were not able -to convince anyone that such a[n \s-1MH\s0-like] system -would be fast enough to be usable. +to convince anyone that such a system would be fast enough to be usable. I proposed a very short project to prove the basic concepts, and my management agreed. Looking back, I realize that I had been very lucky with my first design.