Mercurial > docs > unix-phil
comparison unix-phil.ms @ 42:303e8f449e77
added TOC and improved visual appearance
author | meillo@marmaro.de |
---|---|
date | Fri, 09 Apr 2010 13:31:51 +0200 |
parents | 13ef7042fa28 |
children | 46e34e433231 |
comparison
equal
deleted
inserted
replaced
41:13ef7042fa28 | 42:303e8f449e77 |
---|---|
11 .if n .if \\n(.$>1 \&\\$1\c | 11 .if n .if \\n(.$>1 \&\\$1\c |
12 .if n .if \\n(.$>1 \&\\$2 | 12 .if n .if \\n(.$>1 \&\\$2 |
13 .. | 13 .. |
14 .ds [. \ [ | 14 .ds [. \ [ |
15 .ds .] ] | 15 .ds .] ] |
16 | |
17 .rn NH _N | |
18 .de NH | |
19 .if '\\$1'1' .sp 2v | |
20 .if '\\$1'1' .nr PS +2 | |
21 ._N \\$1 | |
22 .if '\\$1'1' .nr PS -2 | |
23 .. | |
24 | |
16 .\"---------------------------------------- | 25 .\"---------------------------------------- |
26 | |
17 .TL | 27 .TL |
28 .ps +4 | |
18 Why the Unix Philosophy still matters | 29 Why the Unix Philosophy still matters |
19 .AU | 30 .AU |
20 markus schnalke <meillo@marmaro.de> | 31 markus schnalke <meillo@marmaro.de> |
21 .AB | 32 .AB |
22 .ti \n(.iu | 33 .ti \n(.iu |
36 .CW \s-1http://marmaro.de/docs \ . | 47 .CW \s-1http://marmaro.de/docs \ . |
37 .FE | 48 .FE |
38 | 49 |
39 .NH 1 | 50 .NH 1 |
40 Introduction | 51 Introduction |
52 .XS | |
53 \*(SN Introduction | |
54 .XE | |
41 .LP | 55 .LP |
42 The Unix Philosophy is the essence of how the Unix operating system, | 56 The Unix Philosophy is the essence of how the Unix operating system, |
43 especially its toolchest, was designed. | 57 especially its toolchest, was designed. |
44 It is no limited set of fixed rules, | 58 It is no limited set of fixed rules, |
45 but a loose set of guidelines which tell how to write software that | 59 but a loose set of guidelines which tell how to write software that |
127 is a good book that covers this topic. | 141 is a good book that covers this topic. |
128 Its point of view matches to the one of this paper. | 142 Its point of view matches to the one of this paper. |
129 | 143 |
130 .NH 1 | 144 .NH 1 |
131 Importance of software design in general | 145 Importance of software design in general |
146 .XS | |
147 .sp .5v | |
148 \*(SN Importance of software design in general | |
149 .XE | |
132 .LP | 150 .LP |
133 Software design is the planning of how the internal structure | 151 Software design is the planning of how the internal structure |
134 and external interfaces of a software should look like. | 152 and external interfaces of a software should look like. |
135 It has nothing to do with visual appearance. | 153 It has nothing to do with visual appearance. |
136 If we take a program as a car, then its color is of no matter. | 154 If we take a program as a car, then its color is of no matter. |
241 It offers guidelines to achieve good quality and high gain for the effort spent. | 259 It offers guidelines to achieve good quality and high gain for the effort spent. |
242 | 260 |
243 | 261 |
244 .NH 1 | 262 .NH 1 |
245 The Unix Philosophy | 263 The Unix Philosophy |
264 .XS | |
265 .sp .5v | |
266 \*(SN The Unix Philosophy | |
267 .XE | |
246 .LP | 268 .LP |
247 The origins of the Unix Philosophy were already introduced. | 269 The origins of the Unix Philosophy were already introduced. |
248 This chapter explains the philosophy, oriented on Gancarz, | 270 This chapter explains the philosophy, oriented on Gancarz, |
249 and shows concrete examples of its application. | 271 and shows concrete examples of its application. |
250 | 272 |
251 .NH 2 | 273 .NH 2 |
252 Pipes | 274 Pipes |
275 .XS | |
276 \*(SN Pipes | |
277 .XE | |
253 .LP | 278 .LP |
254 Following are some examples to demonstrate how applied Unix Philosophy feels like. | 279 Following are some examples to demonstrate how applied Unix Philosophy feels like. |
255 Knowledge of using the Unix shell is assumed. | 280 Knowledge of using the Unix shell is assumed. |
256 .PP | 281 .PP |
257 Counting the number of files in the current directory: | 282 Counting the number of files in the current directory: |
321 The other is the design of the programs that are used in the pipeline. | 346 The other is the design of the programs that are used in the pipeline. |
322 They have to interfaces that allows them to be used in such a way. | 347 They have to interfaces that allows them to be used in such a way. |
323 | 348 |
324 .NH 2 | 349 .NH 2 |
325 Interface design | 350 Interface design |
351 .XS | |
352 \*(SN Interface design | |
353 .XE | |
326 .LP | 354 .LP |
327 Unix is, first of all, simple \(en Everything is a file. | 355 Unix is, first of all, simple \(en Everything is a file. |
328 Files are sequences of bytes, without any special structure. | 356 Files are sequences of bytes, without any special structure. |
329 Programs should be filters, which read a stream of bytes from ``standard input'' (stdin) | 357 Programs should be filters, which read a stream of bytes from ``standard input'' (stdin) |
330 and write a stream of bytes to ``standard output'' (stdout). | 358 and write a stream of bytes to ``standard output'' (stdout). |
374 Testing of interactive programs is much more complicated, | 402 Testing of interactive programs is much more complicated, |
375 than testing of non-interactive programs. | 403 than testing of non-interactive programs. |
376 | 404 |
377 .NH 2 | 405 .NH 2 |
378 The toolchest approach | 406 The toolchest approach |
407 .XS | |
408 \*(SN The toolchest approach | |
409 .XE | |
379 .LP | 410 .LP |
380 A toolchest is a set of tools. | 411 A toolchest is a set of tools. |
381 Instead of having one big tool for all tasks, one has many small tools, | 412 Instead of having one big tool for all tasks, one has many small tools, |
382 each for one task. | 413 each for one task. |
383 Difficult tasks are solved by combining several of the small, simple tools. | 414 Difficult tasks are solved by combining several of the small, simple tools. |
452 This script acts like the one before, when called without an argument. | 483 This script acts like the one before, when called without an argument. |
453 But one can also specify a numerical argument to define the number of lines to print. | 484 But one can also specify a numerical argument to define the number of lines to print. |
454 | 485 |
455 .NH 2 | 486 .NH 2 |
456 A powerful shell | 487 A powerful shell |
488 .XS | |
489 \*(SN A powerful shell | |
490 .XE | |
457 .LP | 491 .LP |
458 It was already said, that the Unix shell provides the possibility to | 492 It was already said, that the Unix shell provides the possibility to |
459 combine small programs into large ones easily. | 493 combine small programs into large ones easily. |
460 A powerful shell is a great feature in other ways, too. | 494 A powerful shell is a great feature in other ways, too. |
461 .PP | 495 .PP |
517 changing requirements. | 551 changing requirements. |
518 Software parts that are not written will not miss the requirements. | 552 Software parts that are not written will not miss the requirements. |
519 | 553 |
520 .NH 2 | 554 .NH 2 |
521 Worse is better | 555 Worse is better |
556 .XS | |
557 \*(SN Worse is better | |
558 .XE | |
522 .LP | 559 .LP |
523 The Unix Philosophy aims for the 80% solution; | 560 The Unix Philosophy aims for the 80% solution; |
524 others call it the ``Worse is better'' approach. | 561 others call it the ``Worse is better'' approach. |
525 .PP | 562 .PP |
526 First, practical experience shows, that it is almost never possible to define the | 563 First, practical experience shows, that it is almost never possible to define the |
557 then less effort was spent into the project, than it would have be | 594 then less effort was spent into the project, than it would have be |
558 when a different approach had been used. | 595 when a different approach had been used. |
559 | 596 |
560 .NH 2 | 597 .NH 2 |
561 Upgrowth and survival of software | 598 Upgrowth and survival of software |
599 .XS | |
600 \*(SN Upgrowth and survival of software | |
601 .XE | |
562 .LP | 602 .LP |
563 So far it was talked about \fIwriting\fP or \fIbuilding\fP software. | 603 So far it was talked about \fIwriting\fP or \fIbuilding\fP software. |
564 Although these are just verbs, they do imply a specific view on the work process | 604 Although these are just verbs, they do imply a specific view on the work process |
565 they describe. | 605 they describe. |
566 The better verb, however, is to \fIgrow\fP. | 606 The better verb, however, is to \fIgrow\fP. |
666 Who cares if the large program is a failure, | 706 Who cares if the large program is a failure, |
667 but parts of it become successful instead? | 707 but parts of it become successful instead? |
668 | 708 |
669 .NH 2 | 709 .NH 2 |
670 Summary | 710 Summary |
711 .XS | |
712 \*(SN Summary | |
713 .XE | |
671 .LP | 714 .LP |
672 This chapter explained the central ideas of the Unix Philosophy. | 715 This chapter explained the central ideas of the Unix Philosophy. |
673 For each of the ideas, it was exposed what advantages they introduce. | 716 For each of the ideas, it was exposed what advantages they introduce. |
674 The Unix Philosophy are guidelines that help to write valuable software. | 717 The Unix Philosophy are guidelines that help to write valuable software. |
675 From the view point of a software developer or software designer, | 718 From the view point of a software developer or software designer, |
685 | 728 |
686 | 729 |
687 | 730 |
688 .NH 1 | 731 .NH 1 |
689 Case study: \s-1MH\s0 | 732 Case study: \s-1MH\s0 |
733 .XS | |
734 .sp .5v | |
735 \*(SN Case study: \s-1MH\s0 | |
736 .XE | |
690 .LP | 737 .LP |
691 The previous chapter introduced and explained the Unix Philosophy | 738 The previous chapter introduced and explained the Unix Philosophy |
692 from a general point of view. | 739 from a general point of view. |
693 The driving force were the guidelines; references to | 740 The driving force were the guidelines; references to |
694 existing software were given only sparsely. | 741 existing software were given only sparsely. |
705 them are described. | 752 them are described. |
706 | 753 |
707 | 754 |
708 .NH 2 | 755 .NH 2 |
709 Historical background | 756 Historical background |
757 .XS | |
758 \*(SN Historical background | |
759 .XE | |
710 .LP | 760 .LP |
711 Electronic mail was available in Unix very early. | 761 Electronic mail was available in Unix very early. |
712 The first \s-1MUA\s0 on Unix was \f(CWmail\fP, | 762 The first \s-1MUA\s0 on Unix was \f(CWmail\fP, |
713 which was already present in the First Edition. | 763 which was already present in the First Edition. |
714 .[ | 764 .[ |
780 %O Also available online: \f(CW\s-2http://rand-mh.sourceforge.net/book/\fP | 830 %O Also available online: \f(CW\s-2http://rand-mh.sourceforge.net/book/\fP |
781 .] | 831 .] |
782 | 832 |
783 .NH 2 | 833 .NH 2 |
784 Contrasts to monolithic mail systems | 834 Contrasts to monolithic mail systems |
835 .XS | |
836 \*(SN Contrasts to monolithic mail systems | |
837 .XE | |
785 .LP | 838 .LP |
786 All \s-1MUA\s0s are monolithic, except \s-1MH\s0. | 839 All \s-1MUA\s0s are monolithic, except \s-1MH\s0. |
787 Although there might actually exist further, very little known, | 840 Although there might actually exist further, very little known, |
788 toolchest \s-1MUA\s0s, this statement reflects the situation pretty well. | 841 toolchest \s-1MUA\s0s, this statement reflects the situation pretty well. |
789 .PP | 842 .PP |
835 alone or in combination with others, even from other toolchests, | 888 alone or in combination with others, even from other toolchests, |
836 without leaving the shell. | 889 without leaving the shell. |
837 | 890 |
838 .NH 2 | 891 .NH 2 |
839 Data storage | 892 Data storage |
893 .XS | |
894 \*(SN Data storage | |
895 .XE | |
840 .LP | 896 .LP |
841 \s-1MH\s0's mail storage is a directory tree under the user's | 897 \s-1MH\s0's mail storage is a directory tree under the user's |
842 \s-1MH\s0 directory (usually \f(CW$HOME/Mail\fP), | 898 \s-1MH\s0 directory (usually \f(CW$HOME/Mail\fP), |
843 where mail folders are directories and mail messages are text files | 899 where mail folders are directories and mail messages are text files |
844 within them. | 900 within them. |
896 %O mh-profile(5) and mh-sequence(5) | 952 %O mh-profile(5) and mh-sequence(5) |
897 .] | 953 .] |
898 | 954 |
899 .NH 2 | 955 .NH 2 |
900 Discussion of the design | 956 Discussion of the design |
957 .XS | |
958 \*(SN Discussion of the design | |
959 .XE | |
901 .LP | 960 .LP |
902 The following paragraphs discuss \s-1MH\s0 in regard to the tenets | 961 The following paragraphs discuss \s-1MH\s0 in regard to the tenets |
903 of the Unix Philosophy which Gancarz identified. | 962 of the Unix Philosophy which Gancarz identified. |
904 | 963 |
905 .PP | 964 .PP |
1086 With these three, I was able to convince people that the structure was viable. | 1145 With these three, I was able to convince people that the structure was viable. |
1087 This took about three weeks. | 1146 This took about three weeks. |
1088 | 1147 |
1089 .NH 2 | 1148 .NH 2 |
1090 Problems | 1149 Problems |
1150 .XS | |
1151 \*(SN Problems | |
1152 .XE | |
1091 .LP | 1153 .LP |
1092 \s-1MH\s0, for sure is not without problems. | 1154 \s-1MH\s0, for sure is not without problems. |
1093 There are two main problems: one is technical, the other is about human behavior. | 1155 There are two main problems: one is technical, the other is about human behavior. |
1094 .PP | 1156 .PP |
1095 \s-1MH\s0 is old and email today is very different to email in the time | 1157 \s-1MH\s0 is old and email today is very different to email in the time |
1117 are quite outdated and thus not very appealing compared to the modern interfaces | 1179 are quite outdated and thus not very appealing compared to the modern interfaces |
1118 which monolithic \s-1MUA\s0s offer. | 1180 which monolithic \s-1MUA\s0s offer. |
1119 | 1181 |
1120 .NH 2 | 1182 .NH 2 |
1121 Summary \s-1MH\s0 | 1183 Summary \s-1MH\s0 |
1184 .XS | |
1185 \*(SN Summary \s-1MH\s0 | |
1186 .XE | |
1122 .LP | 1187 .LP |
1123 \s-1MH\s0 is an \s-1MUA\s0 that follows the Unix Philosophy in its design | 1188 \s-1MH\s0 is an \s-1MUA\s0 that follows the Unix Philosophy in its design |
1124 and implementation. | 1189 and implementation. |
1125 It consists of a toolchest of small tools, each of them does one job well. | 1190 It consists of a toolchest of small tools, each of them does one job well. |
1126 The tools are orthogonal to each other, to a large extend. | 1191 The tools are orthogonal to each other, to a large extend. |
1146 | 1211 |
1147 | 1212 |
1148 | 1213 |
1149 .NH 1 | 1214 .NH 1 |
1150 Case study: uzbl | 1215 Case study: uzbl |
1216 .XS | |
1217 .sp .5v | |
1218 \*(SN Case study: uzbl | |
1219 .XE | |
1151 .LP | 1220 .LP |
1152 The last chapter took a look on the \s-1MUA\s0 \s-1MH\s0, | 1221 The last chapter took a look on the \s-1MUA\s0 \s-1MH\s0, |
1153 this chapter is about uzbl, a web browser that adheres to the Unix Philosophy. | 1222 this chapter is about uzbl, a web browser that adheres to the Unix Philosophy. |
1154 ``uzbl'' is the \fIlolcat\fP's word for the English adjective ``usable''. | 1223 ``uzbl'' is the \fIlolcat\fP's word for the English adjective ``usable''. |
1155 It is pronounced the identical. | 1224 It is pronounced the identical. |
1156 | 1225 |
1157 .NH 2 | 1226 .NH 2 |
1158 Historical background | 1227 Historical background |
1228 .XS | |
1229 \*(SN Historical background | |
1230 .XE | |
1159 .LP | 1231 .LP |
1160 Uzbl was started by Dieter Plaetinck in April 2009. | 1232 Uzbl was started by Dieter Plaetinck in April 2009. |
1161 The idea was born in a thread in the Arch Linux forum. | 1233 The idea was born in a thread in the Arch Linux forum. |
1162 .[ | 1234 .[ |
1163 %O http://bbs.archlinux.org/viewtopic.php?id=67463 | 1235 %O http://bbs.archlinux.org/viewtopic.php?id=67463 |
1187 In July 2009, \fILinux Weekly News\fP published an interview with Plaetinck about uzbl. | 1259 In July 2009, \fILinux Weekly News\fP published an interview with Plaetinck about uzbl. |
1188 In September 2009, the uzbl web browser was on \fISlashdot\fP. | 1260 In September 2009, the uzbl web browser was on \fISlashdot\fP. |
1189 | 1261 |
1190 .NH 2 | 1262 .NH 2 |
1191 Contrasts to other web browsers | 1263 Contrasts to other web browsers |
1264 .XS | |
1265 \*(SN Contrasts to other web browsers | |
1266 .XE | |
1192 .LP | 1267 .LP |
1193 Like most \s-1MUA\s0s are monolithic, but \s-1MH\s0 is a toolchest, | 1268 Like most \s-1MUA\s0s are monolithic, but \s-1MH\s0 is a toolchest, |
1194 most web browsers are monolithic, but uzbl is a frontend to a toolchest. | 1269 most web browsers are monolithic, but uzbl is a frontend to a toolchest. |
1195 .PP | 1270 .PP |
1196 Today, uzbl is divided into uzbl-core and uzbl-browser. | 1271 Today, uzbl is divided into uzbl-core and uzbl-browser. |
1228 But instead of using existing, external programs, modern web browsers | 1303 But instead of using existing, external programs, modern web browsers |
1229 include these functions, although they might be loaded at runtime. | 1304 include these functions, although they might be loaded at runtime. |
1230 | 1305 |
1231 .NH 2 | 1306 .NH 2 |
1232 Discussion of the design | 1307 Discussion of the design |
1308 .XS | |
1309 \*(SN Discussion of the design | |
1310 .XE | |
1233 .LP | 1311 .LP |
1234 This section discusses uzbl in regard of the Unix Philosophy, | 1312 This section discusses uzbl in regard of the Unix Philosophy, |
1235 as identified by Gancarz. | 1313 as identified by Gancarz. |
1236 | 1314 |
1237 .PP | 1315 .PP |
1398 .] | 1476 .] |
1399 | 1477 |
1400 | 1478 |
1401 .NH 2 | 1479 .NH 2 |
1402 Problems | 1480 Problems |
1481 .XS | |
1482 \*(SN Problems | |
1483 .XE | |
1403 .LP | 1484 .LP |
1404 Similar to \s-1MH\s0, uzbl, too suffers from being different. | 1485 Similar to \s-1MH\s0, uzbl, too suffers from being different. |
1405 It is sad, but people use what they know. | 1486 It is sad, but people use what they know. |
1406 Fortunately, uzbl's user interface can look and feel very much the | 1487 Fortunately, uzbl's user interface can look and feel very much the |
1407 same as the one of the well known web browsers, | 1488 same as the one of the well known web browsers, |
1426 Now web browsers, and eventually the users, suffer from it. | 1507 Now web browsers, and eventually the users, suffer from it. |
1427 | 1508 |
1428 | 1509 |
1429 .NH 2 | 1510 .NH 2 |
1430 Summary uzbl | 1511 Summary uzbl |
1512 .XS | |
1513 \*(SN Summary uzbl | |
1514 .XE | |
1431 .LP | 1515 .LP |
1432 ``Uzbl is a browser that adheres to the Unix Philosophy'', | 1516 ``Uzbl is a browser that adheres to the Unix Philosophy'', |
1433 that is how uzbl is seen by its authors. | 1517 that is how uzbl is seen by its authors. |
1434 Indeed, uzbl follows the Unix Philosophy in many ways. | 1518 Indeed, uzbl follows the Unix Philosophy in many ways. |
1435 It consists of independent parts that work together, | 1519 It consists of independent parts that work together, |
1452 Despite this bad situation, uzbl does a fairly good job. | 1536 Despite this bad situation, uzbl does a fairly good job. |
1453 | 1537 |
1454 | 1538 |
1455 .NH 1 | 1539 .NH 1 |
1456 Final thoughts | 1540 Final thoughts |
1541 .XS | |
1542 .sp .5v | |
1543 \*(SN Final thoughts | |
1544 .XE | |
1457 | 1545 |
1458 .NH 2 | 1546 .NH 2 |
1459 Quick summary | 1547 Quick summary |
1548 .XS | |
1549 \*(SN Quick summary | |
1550 .XE | |
1460 .LP | 1551 .LP |
1461 good design | 1552 good design |
1462 .LP | 1553 .LP |
1463 unix phil | 1554 unix phil |
1464 .LP | 1555 .LP |
1465 case studies | 1556 case studies |
1466 | 1557 |
1467 .NH 2 | 1558 .NH 2 |
1468 Why people should choose | 1559 Why people should choose |
1560 .XS | |
1561 \*(SN Why people should choose | |
1562 .XE | |
1469 .LP | 1563 .LP |
1470 Make the right choice! | 1564 Make the right choice! |
1471 | 1565 |
1472 .nr PI .5i | 1566 .nr PI .3i |
1473 .rm ]< | 1567 .rm ]< |
1474 .de ]< | 1568 .de ]< |
1475 .LP | 1569 .LP |
1476 .de FP | 1570 .de FP |
1477 .IP \\\\$1. | 1571 .IP \\\\$1. |
1478 \\.. | 1572 \\.. |
1479 .rm FS FE | 1573 .rm FS FE |
1480 .. | 1574 .. |
1481 .SH | 1575 .ds CH " |
1576 .bp | |
1577 .rs | |
1578 .sp .3i | |
1579 .TL | |
1482 References | 1580 References |
1581 .LP | |
1582 .XS | |
1583 .sp .5v | |
1584 References | |
1585 .XE | |
1586 .sp 2v | |
1587 .nr PS -1 | |
1588 .nr VS -1 | |
1483 .[ | 1589 .[ |
1484 $LIST$ | 1590 $LIST$ |
1485 .] | 1591 .] |
1486 .wh -1p | 1592 .\".wh -1p |
1593 .bp | |
1594 .PX |