comparison unix-phil.ms @ 48:40caeb9e9b25

switched to new header macro; cleaned up CW
author meillo@marmaro.de
date Mon, 12 Apr 2010 14:45:29 +0200
parents b6ae4a8ab1d3
children 2f188a5dc0dc
comparison
equal deleted inserted replaced
47:b6ae4a8ab1d3 48:40caeb9e9b25
1 .nr PS 11 1 .nr PS 11
2 .nr VS 13 2 .nr VS 13
3 .nr lu 0
4 3
5 .de CW 4 .de CW
6 .nr PQ \\n(.f 5 .nr PQ \\n(.f
7 .if t .ft CW 6 .if t \{\
8 .ie ^\\$1^^ .if n .ul 999 7 . ft CW
9 .el .if n .ul 1 8 . if !^\\$1^^ \&\\$1\f\\n(PQ\\$2
10 .if t .if !^\\$1^^ \&\\$1\f\\n(PQ\\$2 9 .\}
11 .if n .if \\n(.$=1 \&\\$1 10 .if n \{\
12 .if n .if \\n(.$>1 \&\\$1\c 11 . ie ^\\$1^^ .ul 999
13 .if n .if \\n(.$>1 \&\\$2 12 . el .ul 1
13 . if \\n(.$=1 \&\\$1
14 . if \\n(.$>1 \&\\$1\c
15 . if \\n(.$>1 \&\\$2
16 .\}
14 .. 17 ..
15 18
16 .ds [. \ [ 19 .ds [. \ [
17 .ds .] ] 20 .ds .] ]
18 21
19 .rn NH _N 22 .de H
20 .de NH 23 .if '\\$1'1' \{\
21 .if '\\$1'1' .sp 2v 24 . sp 2v
22 .if '\\$1'1' .nr PS +2 25 . nr PS +2
23 ._N \\$1 26 . NH \\$1
24 .if '\\$1'1' .nr PS -2 27 \\$2
28 . nr PS -2
29 . LP
30 . XS
31 . sp .5v
32 . B
33 \\*(SN \\$2
34 . XE
35 .\}
36 .if '\\$1'2' \{\
37 . NH \\$1
38 \\$2
39 . LP
40 . XS
41 \\*(SN \\$2
42 . XE
43 .\}
25 .. 44 ..
26 45
27 .am QP 46 .am QP
28 .ps -1 47 .ps -1
29 .. 48 ..
56 Handed in on 2010-04-12. 75 Handed in on 2010-04-12.
57 You may retrieve this document from 76 You may retrieve this document from
58 .CW \s-1http://marmaro.de/docs \ . 77 .CW \s-1http://marmaro.de/docs \ .
59 .FE 78 .FE
60 79
61 .NH 1 80 .H 1 Introduction
62 Introduction
63 .XS
64 .sp .5v
65 .B
66 \*(SN Introduction
67 .XE
68 .LP 81 .LP
69 The Unix Philosophy is the essence of how the Unix operating system, 82 The Unix Philosophy is the essence of how the Unix operating system,
70 especially its toolchest, was designed. 83 especially its toolchest, was designed.
71 It is no limited set of fixed rules, 84 It is no limited set of fixed rules,
72 but a loose set of guidelines which tell how to write software that 85 but a loose set of guidelines which tell how to write software that
133 practice of programming 146 practice of programming
134 .] 147 .]
135 is a good book that covers this topic. 148 is a good book that covers this topic.
136 Its point of view matches to the one of this paper. 149 Its point of view matches to the one of this paper.
137 150
138 .NH 1 151 .H 1 "Importance of software design in general
139 Importance of software design in general
140 .XS
141 .sp .5v
142 .B
143 \*(SN Importance of software design in general
144 .XE
145 .LP 152 .LP
146 Software design is the planning of how the internal structure 153 Software design is the planning of how the internal structure
147 and external interfaces of a software should look like. 154 and external interfaces of a software should look like.
148 It has nothing to do with visual appearance. 155 It has nothing to do with visual appearance.
149 If we take a program as a car, then its color is of no matter. 156 If we take a program as a car, then its color is of no matter.
249 Indeed, much effort should be spent into good design to make software more valuable. 256 Indeed, much effort should be spent into good design to make software more valuable.
250 The Unix Philosophy shows a way of how to design software well. 257 The Unix Philosophy shows a way of how to design software well.
251 It offers guidelines to achieve good quality and high gain for the effort spent. 258 It offers guidelines to achieve good quality and high gain for the effort spent.
252 259
253 260
254 .NH 1 261 .H 1 "The Unix Philosophy
255 The Unix Philosophy
256 .XS
257 .sp .5v
258 .B
259 \*(SN The Unix Philosophy
260 .XE
261 .LP 262 .LP
262 The origins of the Unix Philosophy were already introduced. 263 The origins of the Unix Philosophy were already introduced.
263 This chapter explains the philosophy, oriented on Gancarz, 264 This chapter explains the philosophy, oriented on Gancarz,
264 and shows concrete examples of its application. 265 and shows concrete examples of its application.
265 266
266 .NH 2 267 .H 2 Pipes
267 Pipes
268 .XS
269 \*(SN Pipes
270 .XE
271 .LP 268 .LP
272 Following are some examples to demonstrate how applied Unix Philosophy feels like. 269 Following are some examples to demonstrate how applied Unix Philosophy feels like.
273 Knowledge of using the Unix shell is assumed. 270 Knowledge of using the Unix shell is assumed.
274 .PP 271 .PP
275 Counting the number of files in the current directory: 272 Counting the number of files in the current directory:
331 however, not enough by itself. 328 however, not enough by itself.
332 It is only one half. 329 It is only one half.
333 The other is the design of the programs that are used in the pipeline. 330 The other is the design of the programs that are used in the pipeline.
334 They need interfaces that allow them to be used in such a way. 331 They need interfaces that allow them to be used in such a way.
335 332
336 .NH 2 333 .H 2 "Interface design
337 Interface design
338 .XS
339 \*(SN Interface design
340 .XE
341 .LP 334 .LP
342 Unix is, first of all, simple \(en Everything is a file. 335 Unix is, first of all, simple \(en Everything is a file.
343 Files are sequences of bytes, without any special structure. 336 Files are sequences of bytes, without any special structure.
344 Programs should be filters, which read a stream of bytes from standard input (stdin) 337 Programs should be filters, which read a stream of bytes from standard input (stdin)
345 and write a stream of bytes to standard output (stdout). 338 and write a stream of bytes to standard output (stdout).
383 .PP 376 .PP
384 Non-interactive use is, during development, also an advantage for testing. 377 Non-interactive use is, during development, also an advantage for testing.
385 Testing of interactive programs is much more complicated, 378 Testing of interactive programs is much more complicated,
386 than testing of non-interactive programs. 379 than testing of non-interactive programs.
387 380
388 .NH 2 381 .H 2 "The toolchest approach
389 The toolchest approach
390 .XS
391 \*(SN The toolchest approach
392 .XE
393 .LP 382 .LP
394 A toolchest is a set of tools. 383 A toolchest is a set of tools.
395 Instead of having one big tool for all tasks, one has many small tools, 384 Instead of having one big tool for all tasks, one has many small tools,
396 each for one task. 385 each for one task.
397 Difficult tasks are solved by combining several of the small, simple tools. 386 Difficult tasks are solved by combining several of the small, simple tools.
464 But one can also specify a numerical argument to define the number of lines to print. 453 But one can also specify a numerical argument to define the number of lines to print.
465 One can surely imagine even more flexible versions, however, 454 One can surely imagine even more flexible versions, however,
466 they will still relay on the external programs, 455 they will still relay on the external programs,
467 which do the actual work. 456 which do the actual work.
468 457
469 .NH 2 458 .H 2 "A powerful shell
470 A powerful shell
471 .XS
472 \*(SN A powerful shell
473 .XE
474 .LP 459 .LP
475 The Unix shell provides the possibility to combine small programs into large ones. 460 The Unix shell provides the possibility to combine small programs into large ones.
476 But a powerful shell is a great feature in other ways, too. 461 But a powerful shell is a great feature in other ways, too.
477 For instance by being scriptable. 462 For instance by being scriptable.
478 Control statements are build into the shell. 463 Control statements are build into the shell.
529 Maybe later, it might be necessary to rewrite the software, but not now. 514 Maybe later, it might be necessary to rewrite the software, but not now.
530 By delaying further work, one keeps the flexibility to react on 515 By delaying further work, one keeps the flexibility to react on
531 changing requirements. 516 changing requirements.
532 Software parts that are not written will not miss the requirements. 517 Software parts that are not written will not miss the requirements.
533 518
534 .NH 2 519 .H 2 "Worse is better
535 Worse is better
536 .XS
537 \*(SN Worse is better
538 .XE
539 .LP 520 .LP
540 The Unix Philosophy aims for the 90% solution; 521 The Unix Philosophy aims for the 90% solution;
541 others call it the ``Worse is better'' approach. 522 others call it the ``Worse is better'' approach.
542 Experience from real life projects shows: 523 Experience from real life projects shows:
543 .PP 524 .PP
582 .IP \(bu 563 .IP \(bu
583 If the global situation changes so that the software is not needed anymore, 564 If the global situation changes so that the software is not needed anymore,
584 then less effort was spent into the project, than it would have be 565 then less effort was spent into the project, than it would have be
585 when a different approach had been used. 566 when a different approach had been used.
586 567
587 .NH 2 568 .H 2 "Upgrowth and survival of software
588 Upgrowth and survival of software
589 .XS
590 \*(SN Upgrowth and survival of software
591 .XE
592 .LP 569 .LP
593 So far it was talked about \fIwriting\fP or \fIbuilding\fP software. 570 So far it was talked about \fIwriting\fP or \fIbuilding\fP software.
594 Although these are just verbs, they do imply a specific view on the work process 571 Although these are just verbs, they do imply a specific view on the work process
595 they describe. 572 they describe.
596 The better verb, however, is to \fIgrow\fP. 573 The better verb, however, is to \fIgrow\fP.
686 If software is build by combining small independent programs, 663 If software is build by combining small independent programs,
687 then these parts are readily available for reuse. 664 then these parts are readily available for reuse.
688 Who cares if the large program is a failure, 665 Who cares if the large program is a failure,
689 but parts of it become successful instead? 666 but parts of it become successful instead?
690 667
691 .NH 2 668 .H 2 "Summary
692 Summary
693 .XS
694 \*(SN Summary
695 .XE
696 .LP 669 .LP
697 This chapter explained central ideas of the Unix Philosophy. 670 This chapter explained central ideas of the Unix Philosophy.
698 For each of the ideas, the advantages they introduce were explained. 671 For each of the ideas, the advantages they introduce were explained.
699 The Unix Philosophy are guidelines that help to write more valuable software. 672 The Unix Philosophy are guidelines that help to write more valuable software.
700 From the view point of a software developer or software designer, 673 From the view point of a software developer or software designer,
708 and 681 and
709 .I "``Use software leverage!'' 682 .I "``Use software leverage!''
710 683
711 684
712 685
713 .NH 1 686 .H 1 "Case study: \s-1MH\s0
714 Case study: \s-1MH\s0
715 .XS
716 .sp .5v
717 .B
718 \*(SN Case study: \s-1MH\s0
719 .XE
720 .LP 687 .LP
721 The previous chapter introduced and explained the Unix Philosophy 688 The previous chapter introduced and explained the Unix Philosophy
722 from a general point of view. 689 from a general point of view.
723 The driving force were the guidelines; references to 690 The driving force were the guidelines; references to
724 existing software were given only sparsely. 691 existing software were given only sparsely.
736 In this document, the name \s-1MH\s0 will be used to include nmh. 703 In this document, the name \s-1MH\s0 will be used to include nmh.
737 A distinction will only be made if differences between 704 A distinction will only be made if differences between
738 \s-1MH\s0 and nmh are described. 705 \s-1MH\s0 and nmh are described.
739 706
740 707
741 .NH 2 708 .H 2 "Historical background
742 Historical background
743 .XS
744 \*(SN Historical background
745 .XE
746 .LP 709 .LP
747 Electronic mail was available in Unix very early. 710 Electronic mail was available in Unix very early.
748 The first \s-1MUA\s0 on Unix was \f(CWmail\fP, 711 The first \s-1MUA\s0 on Unix was \f(CWmail\fP,
749 which was already present in the First Edition. 712 which was already present in the First Edition.
750 .[ [ 713 .[ [
803 .[ 766 .[
804 peek 767 peek
805 mh 768 mh
806 .] 769 .]
807 770
808 .NH 2 771 .H 2 "Contrasts to monolithic mail systems
809 Contrasts to monolithic mail systems
810 .XS
811 \*(SN Contrasts to monolithic mail systems
812 .XE
813 .LP 772 .LP
814 All \s-1MUA\s0s are monolithic, except \s-1MH\s0. 773 All \s-1MUA\s0s are monolithic, except \s-1MH\s0.
815 Although there might actually exist further, very little known, 774 Although there might actually exist further, very little known,
816 toolchest \s-1MUA\s0s, this statement reflects the situation pretty well. 775 toolchest \s-1MUA\s0s, this statement reflects the situation pretty well.
817 .PP 776 .PP
861 means ``entering'' the program, using it, and ``exiting'' the program. 820 means ``entering'' the program, using it, and ``exiting'' the program.
862 Using toolchests like \s-1MH\s0 means running programs, 821 Using toolchests like \s-1MH\s0 means running programs,
863 alone or in combination with others, also from other toolchests, 822 alone or in combination with others, also from other toolchests,
864 without leaving the shell. 823 without leaving the shell.
865 824
866 .NH 2 825 .H 2 "Data storage
867 Data storage
868 .XS
869 \*(SN Data storage
870 .XE
871 .LP 826 .LP
872 \s-1MH\s0's mail storage is a directory tree under the user's 827 \s-1MH\s0's mail storage is a directory tree under the user's
873 \s-1MH\s0 directory (usually \f(CW$HOME/Mail\fP), 828 \s-1MH\s0 directory (usually \f(CW$HOME/Mail\fP),
874 where mail folders are directories and mail messages are text files 829 where mail folders are directories and mail messages are text files
875 within them. 830 within them.
926 and reside in the \f(CW.mh_sequences\fP file there. 881 and reside in the \f(CW.mh_sequences\fP file there.
927 .[ 882 .[
928 man page mh-profile mh-sequence 883 man page mh-profile mh-sequence
929 .] 884 .]
930 885
931 .NH 2 886 .H 2 "Discussion of the design
932 Discussion of the design
933 .XS
934 \*(SN Discussion of the design
935 .XE
936 .LP 887 .LP
937 This section discusses \s-1MH\s0 in regard to the tenets 888 This section discusses \s-1MH\s0 in regard to the tenets
938 of the Unix Philosophy that Gancarz identified. 889 of the Unix Philosophy that Gancarz identified.
939 890
940 .PP 891 .PP
1113 inc, show/next/prev, and comp. 1064 inc, show/next/prev, and comp.
1114 [...] 1065 [...]
1115 With these three, I was able to convince people that the structure was viable. 1066 With these three, I was able to convince people that the structure was viable.
1116 This took about three weeks. 1067 This took about three weeks.
1117 1068
1118 .NH 2 1069 .H 2 "Problems
1119 Problems
1120 .XS
1121 \*(SN Problems
1122 .XE
1123 .LP 1070 .LP
1124 \s-1MH\s0 is not without problems. 1071 \s-1MH\s0 is not without problems.
1125 There are two main problems: one is technical, the other is about human behavior. 1072 There are two main problems: one is technical, the other is about human behavior.
1126 .PP 1073 .PP
1127 \s-1MH\s0 is old and email today is very different to email in the time 1074 \s-1MH\s0 is old and email today is very different to email in the time
1147 simply because \s-1MH\s0 is different. 1094 simply because \s-1MH\s0 is different.
1148 Unfortunately, the frontends to \s-1MH\s0, which could provide familiar look'n'feel, 1095 Unfortunately, the frontends to \s-1MH\s0, which could provide familiar look'n'feel,
1149 are quite outdated and thus not very appealing, compared to the modern interfaces 1096 are quite outdated and thus not very appealing, compared to the modern interfaces
1150 of many monolithic \s-1MUA\s0s. 1097 of many monolithic \s-1MUA\s0s.
1151 1098
1152 .NH 2 1099 NH 2 "Summary \s-1MH\s0
1153 Summary \s-1MH\s0
1154 .XS
1155 \*(SN Summary \s-1MH\s0
1156 .XE
1157 .LP 1100 .LP
1158 \s-1MH\s0 is an \s-1MUA\s0 that follows the Unix Philosophy in its design. 1101 \s-1MH\s0 is an \s-1MUA\s0 that follows the Unix Philosophy in its design.
1159 It consists of a toolchest of small tools, each of them does one job well. 1102 It consists of a toolchest of small tools, each of them does one job well.
1160 The toolchest approach offers great flexibility to the user. 1103 The toolchest approach offers great flexibility to the user.
1161 It is possible to utilize the complete power of the Unix shell with \s-1MH\s0. 1104 It is possible to utilize the complete power of the Unix shell with \s-1MH\s0.
1174 Unfortunately, for most people their habits are stronger 1117 Unfortunately, for most people their habits are stronger
1175 than the attraction of the clear design and the power, \s-1MH\s0 offers. 1118 than the attraction of the clear design and the power, \s-1MH\s0 offers.
1176 1119
1177 1120
1178 1121
1179 .NH 1 1122 .H 1 "Case study: uzbl
1180 Case study: uzbl
1181 .XS
1182 .sp .5v
1183 .B
1184 \*(SN Case study: uzbl
1185 .XE
1186 .LP 1123 .LP
1187 The last chapter took a look on the \s-1MUA\s0 \s-1MH\s0, 1124 The last chapter took a look on the \s-1MUA\s0 \s-1MH\s0,
1188 which is an old and established software. 1125 which is an old and established software.
1189 This chapter covers uzbl, a fresh new project. 1126 This chapter covers uzbl, a fresh new project.
1190 Uzbl is a web browser that adheres to the Unix Philosophy. 1127 Uzbl is a web browser that adheres to the Unix Philosophy.
1191 Its name comes from the \fILolspeak\fP word for ``usable''; 1128 Its name comes from the \fILolspeak\fP word for ``usable'';
1192 it is pronounced identical. 1129 it is pronounced identical.
1193 1130
1194 .NH 2 1131 .H 2 "Historical background
1195 Historical background
1196 .XS
1197 \*(SN Historical background
1198 .XE
1199 .LP 1132 .LP
1200 Uzbl was started by Dieter Plaetinck in April 2009. 1133 Uzbl was started by Dieter Plaetinck in April 2009.
1201 The idea was born in a thread in the Arch Linux Forums. 1134 The idea was born in a thread in the Arch Linux Forums.
1202 .[ 1135 .[
1203 arch linux forums 1136 arch linux forums
1241 In September 2009, the uzbl web browser was on \fISlashdot\fP. 1174 In September 2009, the uzbl web browser was on \fISlashdot\fP.
1242 .[ 1175 .[
1243 slashdot uzbl 1176 slashdot uzbl
1244 .] 1177 .]
1245 1178
1246 .NH 2 1179 .H 2 "Contrasts to other web browsers
1247 Contrasts to other web browsers
1248 .XS
1249 \*(SN Contrasts to other web browsers
1250 .XE
1251 .LP 1180 .LP
1252 Like most \s-1MUA\s0s are monolithic, but \s-1MH\s0 is a toolchest, 1181 Like most \s-1MUA\s0s are monolithic, but \s-1MH\s0 is a toolchest,
1253 most web browsers are monolithic, but uzbl is a frontend to a toolchest. 1182 most web browsers are monolithic, but uzbl is a frontend to a toolchest.
1254 .PP 1183 .PP
1255 Today, uzbl is divided into uzbl-core and uzbl-browser. 1184 Today, uzbl is divided into uzbl-core and uzbl-browser.
1285 Modern web browsers are proud to have addons, plugins, and modules, instead. 1214 Modern web browsers are proud to have addons, plugins, and modules, instead.
1286 This is their effort to achieve similar goals. 1215 This is their effort to achieve similar goals.
1287 But instead of using existing, external programs, modern web browsers 1216 But instead of using existing, external programs, modern web browsers
1288 include these functions. 1217 include these functions.
1289 1218
1290 .NH 2 1219 .H 2 "Discussion of the design
1291 Discussion of the design
1292 .XS
1293 \*(SN Discussion of the design
1294 .XE
1295 .LP 1220 .LP
1296 This section discusses uzbl in regard of the Unix Philosophy, 1221 This section discusses uzbl in regard of the Unix Philosophy,
1297 as identified by Gancarz. 1222 as identified by Gancarz.
1298 1223
1299 .PP 1224 .PP
1456 lwn 1381 lwn
1457 uzbl 1382 uzbl
1458 .] 1383 .]
1459 1384
1460 1385
1461 .NH 2 1386 .H 2 "Problems
1462 Problems
1463 .XS
1464 \*(SN Problems
1465 .XE
1466 .LP 1387 .LP
1467 Similar to \s-1MH\s0, uzbl, too suffers from being different. 1388 Similar to \s-1MH\s0, uzbl, too suffers from being different.
1468 It is sad, but people use what they know. 1389 It is sad, but people use what they know.
1469 Fortunately, uzbl's user interface can look and feel very much the 1390 Fortunately, uzbl's user interface can look and feel very much the
1470 same as the one of the well known web browsers, 1391 same as the one of the well known web browsers,
1487 .PP 1408 .PP
1488 The web was misused to provide all kinds of imaginable wishes. 1409 The web was misused to provide all kinds of imaginable wishes.
1489 Now web browsers, and eventually the users, suffer from it. 1410 Now web browsers, and eventually the users, suffer from it.
1490 1411
1491 1412
1492 .NH 2 1413 .H 2 "Summary uzbl
1493 Summary uzbl
1494 .XS
1495 \*(SN Summary uzbl
1496 .XE
1497 .LP 1414 .LP
1498 ``Uzbl is a browser that adheres to the Unix Philosophy'', 1415 ``Uzbl is a browser that adheres to the Unix Philosophy'',
1499 that is how uzbl is seen by its authors. 1416 that is how uzbl is seen by its authors.
1500 Indeed, uzbl follows the Unix Philosophy in many ways. 1417 Indeed, uzbl follows the Unix Philosophy in many ways.
1501 It consists of independent parts that work together, 1418 It consists of independent parts that work together,
1515 But uzbl's main problem is the modern web, that makes it hard 1432 But uzbl's main problem is the modern web, that makes it hard
1516 to design a sane web browser. 1433 to design a sane web browser.
1517 Despite this bad situation, uzbl does a fairly good job. 1434 Despite this bad situation, uzbl does a fairly good job.
1518 1435
1519 1436
1520 .NH 1 1437 .H 1 "Final thoughts
1521 Final thoughts 1438
1522 .XS 1439 .H 2 "Quick summary
1523 .sp .5v
1524 .B
1525 \*(SN Final thoughts
1526 .XE
1527
1528 .NH 2
1529 Quick summary
1530 .XS
1531 \*(SN Quick summary
1532 .XE
1533 .LP 1440 .LP
1534 good design 1441 good design
1535 .LP 1442 .LP
1536 unix phil 1443 unix phil
1537 .LP 1444 .LP
1538 case studies 1445 case studies
1539 1446
1540 .NH 2 1447 .H 2 "Why people should choose
1541 Why people should choose
1542 .XS
1543 \*(SN Why people should choose
1544 .XE
1545 .LP 1448 .LP
1546 Make the right choice! 1449 Make the right choice!
1547 1450
1548 1451
1549 .bp 1452 .bp