The Art of UNIX Programming

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

The Art of UNIX Programming poses the belief that understanding the unwritten UNIX engineering tradition and mastering its design patterns will help programmers of all stripes to become better programmers. This book attempts to capture the engineering wisdom and design philosophy of the UNIX, Linux, and Open Source software development community as it has evolved over the past three decades, and as it is applied today by the most experienced programmers. Eric Raymond offers the next generation of "hackers" the unique opportunity to learn the connection between UNIX philosophy and practice through careful case studies of the very best UNIX/Linux programs.

Author(s): Eric S. Raymond
Edition: 1
Publisher: Addison-Wesley Professional
Year: 2003

Language: English
Pages: 558

Contents......Page 10
Preface......Page 26
I: Context......Page 34
1.1 Culture? What Culture?......Page 36
1.2 The Durability of Unix......Page 37
1.3 The Case against Learning Unix Culture......Page 38
1.4 What Unix Gets Wrong......Page 39
1.5 What Unix Gets Right......Page 40
1.6 Basics of the Unix Philosophy......Page 44
1.7 The Unix Philosophy in One Lesson......Page 58
1.9 Attitude Matters Too......Page 59
2.1 Origins and History of Unix, 1969–1995......Page 62
2.2 Origins and History of the Hackers, 1961–1995......Page 76
2.3 The Open-Source Movement: 1998 and Onward......Page 82
2.4 The Lessons of Unix History......Page 84
3.1 The Elements of Operating-System Style......Page 86
3.2 Operating-System Comparisons......Page 94
3.3 What Goes Around, Comes Around......Page 111
II: Design......Page 114
4 Modularity: Keeping It Clean, Keeping It Simple......Page 116
4.1 Encapsulation and Optimal Module Size......Page 118
4.2 Compactness and Orthogonality......Page 120
4.3 Software Is a Many-Layered Thing......Page 128
4.4 Libraries......Page 132
4.5 Unix and Object-Oriented Languages......Page 134
4.6 Coding for Modularity......Page 136
5 Textuality: Good Protocols Make Good Practice......Page 138
5.1 The Importance of Being Textual......Page 140
5.2 Data File Metaformats......Page 145
5.3 Application Protocol Design......Page 156
5.4 Application Protocol Metaformats......Page 160
6 Transparency: Let There Be Light......Page 166
6.1 Studying Cases......Page 168
6.2 Designing for Transparency and Discoverability......Page 181
6.3 Designing for Maintainability......Page 187
7 Multiprogramming: Separating Processes to Separate Function......Page 190
7.1 Separating Complexity Control from Performance Tuning......Page 192
7.2 Taxonomy of Unix IPC Methods......Page 193
7.3 Problems and Methods to Avoid......Page 209
7.4 Process Partitioning at the Design Level......Page 214
8 Minilanguages: Finding a Notation That Sings......Page 216
8.1 Understanding the Taxonomy of Languages......Page 218
8.2 Applying Minilanguages......Page 220
8.3 Designing Minilanguages......Page 239
9 Generation: Pushing the Specification Level Upwards......Page 248
9.1 Data-Driven Programming......Page 249
9.2 Ad-hoc Code Generation......Page 258
10.1 What Should Be Configurable?......Page 264
10.2 Where Configurations Live......Page 266
10.3 Run-Control Files......Page 267
10.4 Environment Variables......Page 271
10.5 Command-Line Options......Page 275
10.6 How to Choose among the Methods......Page 281
10.7 On Breaking These Rules......Page 285
11 Interfaces: User-Interface Design Patterns in the Unix Environment......Page 286
11.1 Applying the Rule of Least Surprise......Page 287
11.2 History of Interface Design on Unix......Page 289
11.3 Evaluating Interface Designs......Page 290
11.4 Tradeoffs between CLI and Visual Interfaces......Page 292
11.5 Transparency, Expressiveness, and Configurability......Page 297
11.6 Unix Interface Design Patterns......Page 299
11.7 Applying Unix Interface-Design Patterns......Page 313
11.8 The Web Browser as a Universal Front End......Page 314
11.9 Silence Is Golden......Page 317
12.1 Don’t Just Do Something, Stand There!......Page 320
12.2 Measure before Optimizing......Page 321
12.3 Nonlocality Considered Harmful......Page 323
12.4 Throughput vs. Latency......Page 324
13 Complexity: As Simple As Possible, but No Simpler......Page 328
13.1 Speaking of Complexity......Page 329
13.2 A Tale of Five Editors......Page 335
13.3 The Right Size for an Editor......Page 342
13.4 The Right Size of Software......Page 349
III: Implementation......Page 352
14.1 Unix’s Cornucopia of Languages......Page 354
14.2 Why Not C?......Page 356
14.4 Language Evaluations......Page 358
14.5 Trends for the Future......Page 377
14.6 Choosing an X Toolkit......Page 379
15.1 A Developer-Friendly Operating System......Page 382
15.2 Choosing an Editor......Page 383
15.3 Special-Purpose Code Generators......Page 385
15.4 make: Automating Your Recipes......Page 390
15.5 Version-Control Systems......Page 397
15.6 Runtime Debugging......Page 402
15.8 Combining Tools with Emacs......Page 403
16 Reuse: On Not Reinventing the Wheel......Page 408
16.1 The Tale of J. Random Newbie......Page 409
16.2 Transparency as the Key to Reuse......Page 412
16.3 From Reuse to Open Source......Page 413
16.4 The Best Things in Life Are Open......Page 414
16.5 Where to Look?......Page 417
16.6 Issues in Using Open-Source Software......Page 418
16.7 Licensing Issues......Page 419
IV: Community......Page 424
17 Portability: Software Portability and Keeping Up Standards......Page 426
17.1 Evolution of C......Page 427
17.2 Unix Standards......Page 431
17.3 IETF and the RFC Standards Process......Page 436
17.4 Specifications as DNA, Code as RNA......Page 438
17.5 Programming for Portability......Page 441
17.6 Internationalization......Page 446
17.7 Portability, Open Standards, and Open Source......Page 447
18 Documentation: Explaining Your Code to a Web-Centric World......Page 450
18.1 Documentation Concepts......Page 451
18.2 The Unix Style......Page 453
18.3 The Zoo of Unix Documentation Formats......Page 455
18.4 The Present Chaos and a Possible Way Out......Page 459
18.5 DocBook......Page 460
18.6 Best Practices for Writing Unix Documentation......Page 467
19 Open Source: Programming in the New Unix Community......Page 470
19.1 Unix and Open Source......Page 471
19.2 Best Practices for Working with Open-Source Developers......Page 473
19.3 The Logic of Licenses: How to Pick One......Page 489
19.5 Varieties of Open-Source Licensing......Page 490
20.1 Essence and Accident in Unix Tradition......Page 494
20.2 Plan 9: The Way the Future Was......Page 497
20.3 Problems in the Design of Unix......Page 499
20.4 Problems in the Environment of Unix......Page 506
20.5 Problems in the Culture of Unix......Page 508
20.6 Reasons to Believe......Page 510
A: Glossary of Abbreviations......Page 512
B: References......Page 516
C: Contributors......Page 528
D: Rootless Root: The Unix Koans of Master Foo......Page 532
Colophon......Page 543
B......Page 544
C......Page 545
D......Page 546
F......Page 547
H......Page 548
L......Page 549
M......Page 550
O......Page 551
P......Page 552
R......Page 553
S......Page 554
T......Page 555
U......Page 556
Z......Page 558