docs/unix-phil

diff unix-phil.ms @ 47:b6ae4a8ab1d3

improved references and some minor design issues
author meillo@marmaro.de
date Mon, 12 Apr 2010 14:11:39 +0200
parents 98a1446744c7
children 40caeb9e9b25
line diff
     1.1 --- a/unix-phil.ms	Mon Apr 12 10:52:59 2010 +0200
     1.2 +++ b/unix-phil.ms	Mon Apr 12 14:11:39 2010 +0200
     1.3 @@ -1,6 +1,7 @@
     1.4  .nr PS 11
     1.5  .nr VS 13
     1.6  .nr lu 0
     1.7 +
     1.8  .de CW
     1.9  .nr PQ \\n(.f
    1.10  .if t .ft CW
    1.11 @@ -11,6 +12,7 @@
    1.12  .if n .if \\n(.$>1 \&\\$1\c
    1.13  .if n .if \\n(.$>1 \&\\$2
    1.14  ..
    1.15 +
    1.16  .ds [. \ [
    1.17  .ds .] ]
    1.18  
    1.19 @@ -26,6 +28,11 @@
    1.20  .ps -1
    1.21  ..
    1.22  
    1.23 +.am DS
    1.24 +.CW
    1.25 +.ps -1
    1.26 +..
    1.27 +
    1.28  .\"----------------------------------------
    1.29  
    1.30  .TL
    1.31 @@ -45,8 +52,8 @@
    1.32  .FS
    1.33  .ps -1
    1.34  This paper was prepared for the ``Software Analysis'' seminar at University Ulm.
    1.35 -Mentor was professor Schweiggert. 2010-04-05
    1.36 -.br
    1.37 +Mentor was professor Franz Schweiggert.
    1.38 +Handed in on 2010-04-12.
    1.39  You may retrieve this document from
    1.40  .CW \s-1http://marmaro.de/docs \ .
    1.41  .FE
    1.42 @@ -54,6 +61,8 @@
    1.43  .NH 1
    1.44  Introduction
    1.45  .XS
    1.46 +.sp .5v
    1.47 +.B
    1.48  \*(SN Introduction
    1.49  .XE
    1.50  .LP
    1.51 @@ -130,6 +139,7 @@
    1.52  Importance of software design in general
    1.53  .XS
    1.54  .sp .5v
    1.55 +.B
    1.56  \*(SN Importance of software design in general
    1.57  .XE
    1.58  .LP
    1.59 @@ -245,6 +255,7 @@
    1.60  The Unix Philosophy
    1.61  .XS
    1.62  .sp .5v
    1.63 +.B
    1.64  \*(SN The Unix Philosophy
    1.65  .XE
    1.66  .LP
    1.67 @@ -263,8 +274,6 @@
    1.68  .PP
    1.69  Counting the number of files in the current directory:
    1.70  .DS
    1.71 -.CW
    1.72 -.ps -1
    1.73  ls | wc -l
    1.74  .DE
    1.75  The
    1.76 @@ -276,8 +285,6 @@
    1.77  .PP
    1.78  Counting the number of files that do not contain ``foo'' in their name:
    1.79  .DS
    1.80 -.CW
    1.81 -.ps -1
    1.82  ls | grep -v foo | wc -l
    1.83  .DE
    1.84  Here, the list of files is filtered by
    1.85 @@ -287,8 +294,6 @@
    1.86  .PP
    1.87  Finding the five largest entries in the current directory.
    1.88  .DS
    1.89 -.CW
    1.90 -.ps -1
    1.91  du -s * | sort -nr | sed 5q
    1.92  .DE
    1.93  .CW "du -s *
    1.94 @@ -442,8 +447,6 @@
    1.95  A wrapper script for finding the five largest entries in the current directory
    1.96  could look like this:
    1.97  .DS
    1.98 -.CW
    1.99 -.ps -1
   1.100  #!/bin/sh
   1.101  du -s * | sort -nr | sed 5q
   1.102  .DE
   1.103 @@ -452,8 +455,6 @@
   1.104  It is probably worth to make the program flexible on the number of
   1.105  entries it prints:
   1.106  .DS
   1.107 -.CW
   1.108 -.ps -1
   1.109  #!/bin/sh
   1.110  num=5
   1.111  [ $# -eq 1 ] && num="$1"
   1.112 @@ -513,6 +514,10 @@
   1.113  .PP
   1.114  Writing a prototype is a great method for becoming familiar with the requirements
   1.115  and to run into real problems early.
   1.116 +.[ [
   1.117 +gancarz
   1.118 +unix philosophy
   1.119 +.], page 28 f.]
   1.120  .PP
   1.121  Prototyping is often seen as a first step in building a software.
   1.122  This is, of course, good.
   1.123 @@ -534,7 +539,7 @@
   1.124  .LP
   1.125  The Unix Philosophy aims for the 90% solution;
   1.126  others call it the ``Worse is better'' approach.
   1.127 -Practical experience shows, that:
   1.128 +Experience from real life projects shows:
   1.129  .PP
   1.130  (1) It is almost never possible to define the
   1.131  requirements completely and correctly the first time.
   1.132 @@ -552,6 +557,12 @@
   1.133  Software parts that will be written in future,
   1.134  do not need maintenance till then.
   1.135  .PP
   1.136 +See Brooks' ``The Mythical Man-Month'' for reference.
   1.137 +.[ [
   1.138 +brooks
   1.139 +mythical man-month
   1.140 +.], page 115 ff.]
   1.141 +.PP
   1.142  Starting with a prototype in a scripting language has several advantages:
   1.143  .IP \(bu
   1.144  As the initial effort is low, one will likely start right away.
   1.145 @@ -608,26 +619,21 @@
   1.146  (This may be at the level of one creature, or at the level of one species.)
   1.147  The fitness of software is affected mainly by four properties:
   1.148  portability of code, portability of data, range of usability, and reusability of parts.
   1.149 -.\" .IP \(bu
   1.150 -.\" portability of code
   1.151 -.\" .IP \(bu
   1.152 -.\" portability of data
   1.153 -.\" .IP \(bu
   1.154 -.\" range of usability
   1.155 -.\" .IP \(bu
   1.156 -.\" reuseability of parts
   1.157  .PP
   1.158  (1)
   1.159  .I "Portability of code
   1.160  means, using high-level programming languages,
   1.161  sticking to the standard,
   1.162 +.[ [
   1.163 +kernighan pike
   1.164 +practice of programming
   1.165 +.], chapter\|8]
   1.166  and avoiding optimizations that introduce dependencies on specific hardware.
   1.167  Hardware has a much lower lifetime than software.
   1.168  By chaining software to a specific hardware,
   1.169  the software's lifetime gets shortened to that of this hardware.
   1.170  In contrast, software should be easy to port \(en
   1.171  adaptation is the key to success.
   1.172 -.\" cf. practice of prog: ch08
   1.173  .PP
   1.174  (2)
   1.175  .I "Portability of data
   1.176 @@ -641,7 +647,10 @@
   1.177  Apart from being able to transfer data between machines,
   1.178  readable data has the great advantage, that humans are able to directly
   1.179  read and edit it with text editors and other tools from the Unix toolchest.
   1.180 -.\" gancarz tenet 5
   1.181 +.[ [
   1.182 +gancarz
   1.183 +unix philosophy
   1.184 +.], page 56 ff.]
   1.185  .PP
   1.186  (3)
   1.187  A large
   1.188 @@ -705,6 +714,7 @@
   1.189  Case study: \s-1MH\s0
   1.190  .XS
   1.191  .sp .5v
   1.192 +.B
   1.193  \*(SN Case study: \s-1MH\s0
   1.194  .XE
   1.195  .LP
   1.196 @@ -718,6 +728,9 @@
   1.197  This first case study is about the mail user agents (\s-1MUA\s0)
   1.198  \s-1MH\s0 (``mail handler'') and its descendent \fInmh\fP
   1.199  (``new mail handler'').
   1.200 +.[
   1.201 +nmh website
   1.202 +.]
   1.203  \s-1MUA\s0s provide functions to read, compose, and organize mail,
   1.204  but (ideally) not to transfer it.
   1.205  In this document, the name \s-1MH\s0 will be used to include nmh.
   1.206 @@ -1052,7 +1065,6 @@
   1.207  To use the format as default for \f(CWscan\fP, a single line,
   1.208  reading
   1.209  .DS
   1.210 -.CW
   1.211  scan: -form FORMATFILE
   1.212  .DE
   1.213  must be added to \f(CW.mh_profile\fP.
   1.214 @@ -1168,6 +1180,7 @@
   1.215  Case study: uzbl
   1.216  .XS
   1.217  .sp .5v
   1.218 +.B
   1.219  \*(SN Case study: uzbl
   1.220  .XE
   1.221  .LP
   1.222 @@ -1200,20 +1213,35 @@
   1.223  Fortunately, he found the time.
   1.224  One day later, the first prototype was out.
   1.225  One week later, uzbl had an own website.
   1.226 +.[
   1.227 +uzbl website
   1.228 +.]
   1.229  One month after the first code showed up,
   1.230 -a mailing list was installed to coordinate and discuss further development.
   1.231 -Then a wiki followed to store documentation and scripts that showed up on the
   1.232 +a mailing list was installed to coordinate and discuss further development,
   1.233 +and a wiki was added to store documentation and scripts that showed up on the
   1.234  mailing list and elsewhere.
   1.235  .PP
   1.236  In the, now, one year of uzbl's existence, it was heavily developed on various branches.
   1.237  Plaetinck's task became more and more to only merge the best code from the
   1.238  different branches into his main branch, and to apply patches.
   1.239 +.[
   1.240 +lwn uzbl
   1.241 +.]
   1.242  About once a month, Plaetinck released a new version.
   1.243  In September 2009, he presented several forks of uzbl.
   1.244 +.[ [
   1.245 +uzbl website
   1.246 +.], news archive]
   1.247  Uzbl, actually, opened the field for a whole family of web browsers with similar shape.
   1.248  .PP
   1.249  In July 2009, \fILinux Weekly News\fP published an interview with Plaetinck about uzbl.
   1.250 +.[
   1.251 +lwn uzbl
   1.252 +.]
   1.253  In September 2009, the uzbl web browser was on \fISlashdot\fP.
   1.254 +.[
   1.255 +slashdot uzbl
   1.256 +.]
   1.257  
   1.258  .NH 2
   1.259  Contrasts to other web browsers
   1.260 @@ -1240,7 +1268,6 @@
   1.261  and on stdin, and it writes events to a Unix socket and to stdout.
   1.262  Loading a webpage in a running uzbl instance requires only:
   1.263  .DS
   1.264 -.CW
   1.265  echo 'uri http://example.org' >/path/to/uzbl-fifo
   1.266  .DE
   1.267  The graphical rendering of the webpage is done by webkit,
   1.268 @@ -1340,7 +1367,6 @@
   1.269  whenever the event of a fully loaded page occurs.
   1.270  The script to append the entry to the history is not much more than:
   1.271  .DS
   1.272 -.CW
   1.273  #!/bin/sh
   1.274  file=/path/to/uzbl-history
   1.275  echo `date +'%Y-%m-%d %H:%M:%S'`" $6 $7" >> $file
   1.276 @@ -1354,7 +1380,6 @@
   1.277  With error checking and corner case handling removed,
   1.278  the script looks like this:
   1.279  .DS
   1.280 -.CW
   1.281  #!/bin/sh
   1.282  file=/path/to/uzbl-history
   1.283  goto=`tac $file | dmenu | cut -d' ' -f 3`
   1.284 @@ -1496,6 +1521,7 @@
   1.285  Final thoughts
   1.286  .XS
   1.287  .sp .5v
   1.288 +.B
   1.289  \*(SN Final thoughts
   1.290  .XE
   1.291  
   1.292 @@ -1519,7 +1545,17 @@
   1.293  .LP
   1.294  Make the right choice!
   1.295  
   1.296 -.nr PI .3i
   1.297 +
   1.298 +.bp
   1.299 +.TL
   1.300 +References
   1.301 +.LP
   1.302 +.XS
   1.303 +.sp .5v
   1.304 +.B
   1.305 +References
   1.306 +.XE
   1.307 +.ev r
   1.308  .rm ]<
   1.309  .de ]<
   1.310  .LP
   1.311 @@ -1528,23 +1564,17 @@
   1.312  \\..
   1.313  .rm FS FE
   1.314  ..
   1.315 -.ds CH "
   1.316 -.bp
   1.317 -.rs
   1.318 -.sp .3i
   1.319 -.TL
   1.320 -References
   1.321 -.LP
   1.322 -.XS
   1.323 -.sp .5v
   1.324 -References
   1.325 -.XE
   1.326 -.sp 2v
   1.327  .nr PS -1
   1.328  .nr VS -1
   1.329  .[
   1.330  $LIST$
   1.331  .]
   1.332 -.\".wh -1p
   1.333 +.nr PS +1
   1.334 +.nr VS +1
   1.335 +.ev
   1.336 +
   1.337  .bp
   1.338 -.PX
   1.339 +.TL
   1.340 +Table of Contents
   1.341 +.LP
   1.342 +.PX no