docs/unix-phil
changeset 23:f0511a56416e
rework in ch04 and spell check
author | meillo@marmaro.de |
---|---|
date | Tue, 02 Mar 2010 14:34:07 +0100 |
parents | 4c21f5b8d716 |
children | 2335f5658fca |
files | unix-phil.ms |
diffstat | 1 files changed, 59 insertions(+), 58 deletions(-) [+] |
line diff
1.1 --- a/unix-phil.ms Tue Mar 02 12:24:30 2010 +0100 1.2 +++ b/unix-phil.ms Tue Mar 02 14:34:07 2010 +0100 1.3 @@ -191,7 +191,7 @@ 1.4 (time behavior, resource utilization) 1.5 .IP \(bu 1.6 .I Maintainability 1.7 -(analysability, changeability, stability, testability) 1.8 +(analyzability, changeability, stability, testability) 1.9 .IP \(bu 1.10 .I Portability 1.11 (adaptability, installability, co-existence, replaceability) 1.12 @@ -481,7 +481,7 @@ 1.13 \fIgood enough\fP. 1.14 Hence, no reimplementation, in a more sophisticated programming language, might be of need, 1.15 for the moment. 1.16 -Maybe later, it might be neccessary to rewrite the software, but not now. 1.17 +Maybe later, it might be necessary to rewrite the software, but not now. 1.18 .PP 1.19 By delaying further work, one keeps the flexibility to react easily on 1.20 changing requirements. 1.21 @@ -580,14 +580,14 @@ 1.22 By chaining software to a specific hardware, 1.23 the software's lifetime gets shortened to that of this hardware. 1.24 In contrast, software should be easy to port \(en 1.25 -adaption is the key to success. 1.26 +adaptation is the key to success. 1.27 .\" cf. practice of prog: ch08 1.28 .PP 1.29 (2) 1.30 .I "Portability of data 1.31 is best achieved by avoiding binary representations 1.32 to store data, because binary representations differ from machine to machine. 1.33 -Textual represenation is favored. 1.34 +Textual representation is favored. 1.35 Historically, ASCII was the charset of choice. 1.36 In the future, UTF-8 might be the better choice, however. 1.37 Important is that it is a plain text representation in a 1.38 @@ -600,7 +600,7 @@ 1.39 (3) 1.40 A large 1.41 .I "range of usability 1.42 -ensures good adaption, and thus good survival. 1.43 +ensures good adaptation, and thus good survival. 1.44 It is a special distinction if a software becomes used in fields of action, 1.45 the original authors did never imagine. 1.46 Software that solves problems in a general way will likely be used 1.47 @@ -658,13 +658,16 @@ 1.48 .LP 1.49 The last chapter introduced and explained the Unix Philosophy 1.50 from a general point of view. 1.51 -The driving force were the guidelines and references to 1.52 +The driving force were the guidelines, references to 1.53 existing software were given only sparsely. 1.54 In this and the next chapter, concrete software will be 1.55 the driving force in the discussion. 1.56 .PP 1.57 -This first case study is about the mail user agents \s-1MH\s0 1.58 -(``mail handler'') and its descendent \fInmh\fP (``new mail handler''). 1.59 +This first case study is about the mail user agents (\s-1MUA\s0) 1.60 +\s-1MH\s0 (``mail handler'') and its descendent \fInmh\fP 1.61 +(``new mail handler''). 1.62 +\s-1MUA\s0s provide functions to read, compose, and organize mail, 1.63 +but (ideally) not to transfer. 1.64 In this document, the name \s-1MH\s0 will be used for both of them. 1.65 A distinction will only be made if differences between 1.66 them are described. 1.67 @@ -674,12 +677,6 @@ 1.68 Historical background 1.69 .LP 1.70 Electronic mail was available in Unix very early. 1.71 -It is out of matter that in the beginning mail was only 1.72 -transferred within one machine. 1.73 -This chapter is about a mail user agent (\s-1MUA\s0), 1.74 -which provides functions to read, compose, and organize mail, 1.75 -but (ideally) not to transfer. 1.76 -.PP 1.77 The first \s-1MUA\s0 on Unix was \f(CWmail\fP. 1.78 It was a small program that either prints the own mailbox file 1.79 or appends text to someone elses mailbox file, 1.80 @@ -688,9 +685,9 @@ 1.81 %O http://cm.bell-labs.com/cm/cs/who/dmr/pdfs/man12.pdf 1.82 .] 1.83 It was a program that did one job well. 1.84 -This job was emailing, which then was very simple. 1.85 +This job was emailing, which was very simple then. 1.86 .PP 1.87 -Later, emailing became more powerfull, and thus more complex. 1.88 +Later, emailing became more powerful, and thus more complex. 1.89 The simple \f(CWmail\fP, which knew nothing of subjects, 1.90 independent handling of single messages, 1.91 and long-time storage of them, was not powerful enough anymore. 1.92 @@ -698,9 +695,9 @@ 1.93 in 1978 to provide additional functions for emailing. 1.94 Mail was still one program, but now it was large and did 1.95 several jobs. 1.96 -Its user interface is modeled after the one of ed. 1.97 +Its user interface is modeled after the one of \fIed\fP. 1.98 It is designed for humans, but is still scriptable. 1.99 -\fImailx\fP is the adaption of Berkeley Mail into System V. 1.100 +\fImailx\fP is the adaptation of Berkeley Mail into System V. 1.101 .[ 1.102 %A Gunnar Ritter 1.103 %O http://heirloom.sourceforge.net/mailx_history.html 1.104 @@ -709,9 +706,9 @@ 1.105 followed Mail's direction. 1.106 They are large, monolithic programs which include all emailing functions. 1.107 .PP 1.108 -A different way took the people of \s-1RAND\s0 Corporation. 1.109 +A different way was taken by the people of \s-1RAND\s0 Corporation. 1.110 In the beginning, they also had used a monolitic mail system, 1.111 -simply called \s-1MS\s0 for ``mail system''. 1.112 +called \s-1MS\s0 simply for ``mail system''. 1.113 But in 1977, Stockton Gaines and Norman Shapiro 1.114 came up with a proposal of a new email system concept \(en 1.115 one that honors the Unix Philosophy. 1.116 @@ -721,11 +718,10 @@ 1.117 Since then, \s-1RAND\s0, the University of California at Irvine and 1.118 at Berkeley, and several others have contributed to the software. 1.119 However, it's core concepts remained the same. 1.120 -In the 90s, when development of \s-1MH\s0 slowed down, 1.121 +In the late 90s, when development of \s-1MH\s0 slowed down, 1.122 Richard Coleman started with \fInmh\fP, the new mail handler. 1.123 -This was in 1997. 1.124 His goal was to improve \s-1MH\s0, especially in regard of 1.125 -the requirements of modern email. 1.126 +the requirements of modern emailing. 1.127 Today, nmh is developed by various people on the Internet. 1.128 .[ 1.129 %T RAND and the Information Evolution: A History in Essays and Vignettes 1.130 @@ -753,7 +749,8 @@ 1.131 .PP 1.132 While monolithic \s-1MUA\s0s gather all function in one program, 1.133 \s-1MH\s0 is a toolchest of many small tools \(en one for each job. 1.134 -Following is a list of important programs of \s-1MH\s0's toolchest: 1.135 +Following is a list of important programs of \s-1MH\s0's toolchest 1.136 +and their function: 1.137 .IP \(bu 1.138 .CW inc : 1.139 incorporate new mail 1.140 @@ -791,8 +788,14 @@ 1.141 \s-1MH\s0 has no special user interface like monolithic \s-1MUA\s0s have. 1.142 The user does not leave the shell to run \s-1MH\s0, 1.143 but he uses \s-1MH\s0 within the shell. 1.144 +Using a monolithic program with a captive user interface 1.145 +means ``entering'' the program, using it, and ``exiting'' the program. 1.146 +Using toolchests like \s-1MH\s0 means running programs, 1.147 +alone or in combinition with others, even from other toolchests, 1.148 +without leaving the shell. 1.149 +.PP 1.150 \s-1MH\s0's mail storage is (only little more than) a directory tree 1.151 -where directories are mail folders and files are mail messages. 1.152 +where mail folders are directories and mail messages are text files. 1.153 Working with \s-1MH\s0's toolchest is much like working 1.154 with Unix' toolchest: 1.155 \f(CWscan\fP is like \f(CWls\fP, 1.156 @@ -801,33 +804,30 @@ 1.157 \f(CWrefile\fP is like \f(CWmv\fP, 1.158 and \f(CWrmm\fP is like \f(CWrm\fP. 1.159 .PP 1.160 -The context of the Unix tools is mainly the current working directory, 1.161 +The context of tools in Unix is mainly the current working directory, 1.162 the user identification, and the environment variables. 1.163 \s-1MH\s0 extends this context by two more items: 1.164 -The current mail folder, similar to the current working directory, 1.165 -for which \f(CWfolder\fP provides the functionality of 1.166 -\f(CWpwd\fP and \f(CWcd\fP. 1.167 -And the current message, relative to the current mail folder, 1.168 +.IP \(bu 1.169 +The current mail folder, which is similar to the current working directory. 1.170 +For mail folders, \f(CWfolder\fP provides the corresponding functionality 1.171 +of \f(CWpwd\fP and \f(CWcd\fP for directories. 1.172 +.IP \(bu 1.173 +The current message, relative to the current mail folder, 1.174 which enables commands like \f(CWnext\fP and \f(CWprev\fP. 1.175 +.LP 1.176 In contrast to Unix' context, which is chained to the shell session, 1.177 \s-1MH\s0's context is meant to be chained to a mail account. 1.178 But actually, the current message is a property of the mail folder, 1.179 -which is mainly a legacy. 1.180 +which appears to be a legacy. 1.181 This will cause problems when multiple users work 1.182 in one mail folder simultaneously. 1.183 -.PP 1.184 -Using a monolithic program with a captive user interface 1.185 -means ``entering'' the program, using it, and ``exiting'' the program. 1.186 -Using toolchests like \s-1MH\s0 means running programs, 1.187 -alone or in combinition with others, even from other toolchests, 1.188 -without leaving the shell. 1.189 1.190 1.191 .NH 2 1.192 Discussion of the design 1.193 .LP 1.194 The following paragraphs discuss \s-1MH\s0 in regard to the tenets 1.195 -of the Unix Philosophy Gancarz identified. 1.196 +of the Unix Philosophy which Gancarz identified. 1.197 1.198 .PP 1.199 .I "``Small is beautiful'' 1.200 @@ -850,17 +850,17 @@ 1.201 .] 1.202 .LP 1.203 The various small programs of \s-1MH\s0 were relatively easy 1.204 -to write as each of them is small, limited to one function, 1.205 -and has clear bounderies. 1.206 +to write, because each of them is small, limited to one function, 1.207 +and has clear boundaries. 1.208 For the same reasons, they are also good to maintain. 1.209 Further more, the system can easily get extended. 1.210 One only needs to put a new program into the toolchest. 1.211 -This was done when \s-1MIME\s0 support was added 1.212 +This was done, for instance, when \s-1MIME\s0 support was added 1.213 (e.g. \f(CWmhbuild\fP). 1.214 Also, different programs can exist to do the basically same job 1.215 in different ways (e.g. in nmh: \f(CWshow\fP and \f(CWmhshow\fP). 1.216 If someone needs a mail system with some additionally 1.217 -functions that are nowhere available yet, he best takes a 1.218 +functions that are available nowhere yet, he best takes a 1.219 toolchest system like \s-1MH\s0 where he can add the 1.220 functionality with little work. 1.221 1.222 @@ -870,7 +870,7 @@ 1.223 Mail folders are directories (which contain a file 1.224 \&\f(CW.mh_sequences\fP) under the user's \s-1MH\s0 directory 1.225 (usually \f(CW$HOME/Mail\fP). 1.226 -Mail messages are text files located in a mail folder. 1.227 +Mail messages are text files located in mail folders. 1.228 The files contain the messages as they were received. 1.229 The messages are numbered in ascending order in each folder. 1.230 This mailbox format is called ``\s-1MH\s0'' after the \s-1MUA\s0. 1.231 @@ -882,10 +882,10 @@ 1.232 of attachments, it is a bad solution. 1.233 Another disadvantage of the mbox format is that it is 1.234 more difficult to write tools that work on mail messages, 1.235 -because it is always neccessary to first find and extract 1.236 +because it is always necessary to first find and extract 1.237 the relevant message in the mbox file. 1.238 -With \s-1MH\s0 mailboxes, each message is a self-standing item, 1.239 -by definition. 1.240 +With the \s-1MH\s0 mailbox format, 1.241 +each message is a self-standing item, by definition. 1.242 Also, the problem of concurrent access to one mailbox is 1.243 reduced to the problem of concurrent access to one message. 1.244 However, the issue of the shared parts of the context, 1.245 @@ -907,7 +907,7 @@ 1.246 Providing easy-to-use user interfaces in form of frontends is a good 1.247 approach, because it does not limit the power of the backend itself. 1.248 The frontend will anyway only be able to make a subset of the 1.249 -backend's power and flexibility available. 1.250 +backend's power and flexibility available to the user. 1.251 But if it is a separate program, 1.252 then the missing parts can still be accessed at the backend directly. 1.253 If it is integrated, then this will hardly be possible. 1.254 @@ -938,11 +938,10 @@ 1.255 to be widespread. 1.256 This demonstration also shows how easy it is to create single programs 1.257 of a toolchest software. 1.258 -Most of the single programs comprise less than a hundred lines of 1.259 -shell code. 1.260 +Most of them comprise less than a hundred lines of shell code. 1.261 Such small software is easy to write, easy to understand, 1.262 and thus easy to maintain. 1.263 -Being a toolchest improved the possibility to only write some parts 1.264 +A toolchest improves the possibility to only write some parts 1.265 and though create a working result. 1.266 Expanding the toolchest without global changes will likely be 1.267 possible, too. 1.268 @@ -961,7 +960,7 @@ 1.269 There is few software that so much wants users to tailor their 1.270 environment and to leverage the use of the software, like \s-1MH\s0. 1.271 Just to make one example: 1.272 -One might prefere a different listing format for the \f(CWscan\fP 1.273 +One might prefer a different listing format for the \f(CWscan\fP 1.274 program. 1.275 It is possible to take one of the other distributed format files 1.276 or to write one yourself. 1.277 @@ -973,8 +972,8 @@ 1.278 .DE 1.279 must be added to \f(CW.mh_profile\fP. 1.280 If one wants this different format as an additional command, 1.281 -he needs to create a link to \f(CWscan\fP, for instance titled 1.282 -\f(CWscan2\fP. 1.283 +instead of changing the default, he needs to create a link to 1.284 +\f(CWscan\fP, for instance titled \f(CWscan2\fP. 1.285 The line in \f(CW.mh_profile\fP would then start with \f(CWscan2\fP, 1.286 as the option should only be in effect when scan was called as 1.287 \f(CWscan2\fP. 1.288 @@ -986,6 +985,9 @@ 1.289 basic file system operations for the mailboxes. 1.290 \f(CWls\fP, \f(CWcp\fP, \f(CWmv\fP, and \f(CWrm\fP 1.291 aren't filters neither. 1.292 +However, they build a basis on which filters can operate. 1.293 +\s-1MH\s0 does not provide many filters itself, but it is a basis 1.294 +to write filters for. 1.295 1.296 .PP 1.297 .I "``Build a prototype as soon as possible'' 1.298 @@ -993,13 +995,12 @@ 1.299 This tenet, of course, focuses on early development, which is 1.300 long time ago for \s-1MH\s0. 1.301 But without following this guideline at the very beginning, 1.302 -Bruce Borden may have not convinced the management to ever 1.303 -create \s-1MH\s0. 1.304 -In Bruce's own words: 1.305 +Bruce Borden may have not convinced the management of \s-1RAND\s0 1.306 +to ever create \s-1MH\s0. 1.307 +In Bruce' own words: 1.308 .QP 1.309 [...] but [Stockton Gaines and Norm Shapiro] were not able 1.310 -to convince anyone that such a[n \s-1MH\s0-like] system 1.311 -would be fast enough to be usable. 1.312 +to convince anyone that such a system would be fast enough to be usable. 1.313 I proposed a very short project to prove the basic concepts, 1.314 and my management agreed. 1.315 Looking back, I realize that I had been very lucky with my first design.