comparison unix-phil.ms @ 16:f89ca78f289e

numbered 2nd level headings
author meillo@marmaro.de
date Sun, 21 Feb 2010 21:55:53 +0100
parents 00e306ee903b
children ef67aad148f6
comparison
equal deleted inserted replaced
15:00e306ee903b 16:f89ca78f289e
217 .LP 217 .LP
218 The origins of the Unix Philosophy were already introduced. 218 The origins of the Unix Philosophy were already introduced.
219 This chapter explains the philosophy, oriented on Gancarz, 219 This chapter explains the philosophy, oriented on Gancarz,
220 and shows concrete examples of its application. 220 and shows concrete examples of its application.
221 221
222 .SH 222 .NH 2
223 Pipes 223 Pipes
224 .LP 224 .LP
225 Following are some examples to demonstrate how applied Unix Philosophy feels like. 225 Following are some examples to demonstrate how applied Unix Philosophy feels like.
226 Knowledge of using the Unix shell is assumed. 226 Knowledge of using the Unix shell is assumed.
227 .PP 227 .PP
290 however, not enough by itself. 290 however, not enough by itself.
291 It is only one half. 291 It is only one half.
292 The other is the design of the programs that are used in the pipeline. 292 The other is the design of the programs that are used in the pipeline.
293 They have to interfaces that allows them to be used in such a way. 293 They have to interfaces that allows them to be used in such a way.
294 294
295 .SH 295 .NH 2
296 Interface design 296 Interface design
297 .LP 297 .LP
298 Unix is, first of all, simple \(en Everything is a file. 298 Unix is, first of all, simple \(en Everything is a file.
299 Files are sequences of bytes, without any special structure. 299 Files are sequences of bytes, without any special structure.
300 Programs should be filters, which read a stream of bytes from ``standard input'' (stdin) 300 Programs should be filters, which read a stream of bytes from ``standard input'' (stdin)
343 .PP 343 .PP
344 Non-interactive use is, during development, also an advantage for testing. 344 Non-interactive use is, during development, also an advantage for testing.
345 Testing of interactive programs is much more complicated, 345 Testing of interactive programs is much more complicated,
346 than testing of non-interactive programs. 346 than testing of non-interactive programs.
347 347
348 .SH 348 .NH 2
349 The toolchest approach 349 The toolchest approach
350 .LP 350 .LP
351 A toolchest is a set of tools. 351 A toolchest is a set of tools.
352 Instead of having one big tool for all tasks, one has many small tools, 352 Instead of having one big tool for all tasks, one has many small tools,
353 each for one task. 353 each for one task.
421 du -sh * | sort -nr | sed "${num}q" 421 du -sh * | sort -nr | sed "${num}q"
422 .DE 422 .DE
423 This script acts like the one before, when called without an argument. 423 This script acts like the one before, when called without an argument.
424 But one can also specify a numerical argument to define the number of lines to print. 424 But one can also specify a numerical argument to define the number of lines to print.
425 425
426 .SH 426 .NH 2
427 A powerful shell 427 A powerful shell
428 .LP 428 .LP
429 It was already said, that the Unix shell provides the possibility to 429 It was already said, that the Unix shell provides the possibility to
430 combine small programs into large ones easily. 430 combine small programs into large ones easily.
431 A powerful shell is a great feature in other ways, too. 431 A powerful shell is a great feature in other ways, too.
485 .PP 485 .PP
486 By delaying further work, one keeps the flexibility to react easily on 486 By delaying further work, one keeps the flexibility to react easily on
487 changing requirements. 487 changing requirements.
488 Software parts that are not written will not miss the requirements. 488 Software parts that are not written will not miss the requirements.
489 489
490 .SH 490 .NH 2
491 Worse is better 491 Worse is better
492 .LP 492 .LP
493 The Unix Philosophy aims for the 80% solution; 493 The Unix Philosophy aims for the 80% solution;
494 others call it the ``Worse is better'' approach. 494 others call it the ``Worse is better'' approach.
495 .PP 495 .PP
525 .IP \(bu 525 .IP \(bu
526 If the global situation changes so that the software is not needed anymore, 526 If the global situation changes so that the software is not needed anymore,
527 then less effort was spent into the project, than it would have be 527 then less effort was spent into the project, than it would have be
528 when a different approach had been used. 528 when a different approach had been used.
529 529
530 .SH 530 .NH 2
531 Upgrowth and survival of software 531 Upgrowth and survival of software
532 .LP 532 .LP
533 So far it was talked about \fIwriting\fP or \fIbuilding\fP software. 533 So far it was talked about \fIwriting\fP or \fIbuilding\fP software.
534 Although these are just verbs, they do imply a specific view on the work process 534 Although these are just verbs, they do imply a specific view on the work process
535 they describe. 535 they describe.
632 If software is build by combining small independent programs, 632 If software is build by combining small independent programs,
633 then there are parts readily available for reuse. 633 then there are parts readily available for reuse.
634 Who cares if the large program is a failure, 634 Who cares if the large program is a failure,
635 but parts of it become successful instead? 635 but parts of it become successful instead?
636 636
637 .SH 637 .NH 2
638 Summary 638 Summary
639 .LP 639 .LP
640 This chapter explained the central ideas of the Unix Philosophy. 640 This chapter explained the central ideas of the Unix Philosophy.
641 For each of the ideas, it was exposed what advantages they introduce. 641 For each of the ideas, it was exposed what advantages they introduce.
642 The Unix Philosophy are guidelines that help to write valuable software. 642 The Unix Philosophy are guidelines that help to write valuable software.