Index

A

-a option, 243

Abstraction, 102–103

Access Control Lists (ACLs), 471

Accidental complexity, 299–300

Ada, 328

Adams, Scott, 53

Ad-hoc code generation, 225–229

for ascii displays, 225–227

generating HTML code for a tabular list, 227–229

Adhocity trap, 297

ADOS, 65

Advanced shell programming, 325

Aegis, 368–369

AF_INET socket family, 173

Agile programming, 477–478

AIX, 77

Algol, 84, 324

Allen, Paul, 36

AmigaOs, 67

ANSI C, 11

Apache, 9, 48, 49, 108, 131, 172, 175, 336, 426, 440, 446

Applets, 339

Application programming interfaces (APIs), 8, 16, 58, 70, 85, 150, 402

Application protocol, 173

Application protocol design, 123–127

IMAP, 123, 126–127

POP3, 123, 124–126

SMTP, 123, 124

Application protocol metaformats, 127–132

CDDB/freedb.org database, 129

classical Internet application metaprotocol, 127–128

HTTP, 128–129

Arnold, Ken, 21, 34, 88, 115, 171, 173

ARPANET, 9, 31, 35–36, 44–45

fusion with Unix culture, 45–47

Art of Computer Programming, The (Knuth), xxxii, 23

Artificial intelligence, 14

Artistic License, 388, 458

ascii, 90, 217–218

ash, 244

ASR-33 teletype, 30

Assemblers, 14

at, 275

AT&T, 32–33, 35, 37, 40–42, 61, 176. See also System V Unix

Bell Labs, 30–36

divestiture, impact of, 6

and XENIX, 35

atd, 275

Attitude, 26–27

audacity, 135–136, 258, 265

autoconf, 363–364, 447–448

autoheader, 447

automake, 364, 447

Automated version control, 366

awk, 75, 89, 112, 183, 200–202, 244, 330, 354

B

-b option, 243

Backup scripts, 166

bash shell, 71

bc, 165, 183, 187, 203–205, 262–264

BCPL, 395

Bechtolsheim, Andreas, 36

Beck, Kent, 23, 360

BEEP (Blocks Extensible Exchange Protocol), 130–131

Bell Labs, 33–36, 367, 464

netlib code, 196

Bellovin, Steven M., 330

BeOS, 71–72, 79

Berkeley Unix, 35–36

Berners-Lee, Tim, 299

Bernstein chaining, 167–168

bib, 195

Big-endian, 98

BIND, 183

binhex, 245

bison, 353, 441

Blaauw, Gerrit, 98

Blivet trap, 297

blq, 333–334

BNF (Backus-Naur Form), 355

bogofilter, 218

bootpd, 172

Bostic, Keith, 41

Brooks, Fredrick P., 14, 87, 98, 215

Brooks’s Law, 86

Browser DOM, 206

BROWSER environment variable, 240

BSD Class License, 457–458

BSD sockets, 39, 89, 90, 176, 182, 400, 463, 464

BSD Unix, 4, 41, 43, 49, 90, 171, 175–176, 388, 402. See also Berkeley Unix

open-source variants, 61, 175

and reliable signals, 173

version 4.2, 35

bsh, 244

Bug tracking, 365

Byte stream, 58, 106, 172

Byte-stuffed payload, 127–128

bzip, 245, 248

C

-c option, 244

C language, 5, 11, 16, 19, 22, 26, 30, 32, 36–37, 45, 70, 84, 88–89, 103, 106, 209, 323–325, 334, 338, 409–410

early history of, 395–396

evolution of, 394–398

fetchmail, 327

portability of, 409–410

standards, 396–398

as “thin glue”, 98–99

C programming, 12

C++ language, 22, 37, 56, 89, 98–99, 106, 191, 209, 238, 322–325, 327–300, 334, 337–349, 353, 356–357, 370, 384, 397, 410

portability of, 410

Qt toolkit, 329–330

Caldera, 43

Cantrip pattern, 268

Case studies, xxx–xxxi

Casual programming:

for MVS, 74

and Unix, 60–61

cat, 256, 467

cc, 269

cdda2wav, 276

CDDB/freedb.org database, 129

cdrecord, 276

cdrtools, xxx

CGI (Common Gateway Interface), 228, 282–284

Change tracking, 365

Checklist features, 17

checkpassword, 167

Christensen, Clayton, 52

ci, 246

Clarity, 14–15

rule of, 13, 102, 154–155

Clark, Alexander, 231

Classical Internet application metaprotocol, 127–128

clear, 268

CLI server, 123

pattern, 182, 278–279

Client, 59

clone, 466

CMS Pipelines, 75

co, 246

Code, 11

clarity of, 14–15

Code generation, 215–229

ad-hoc code generation, 225–229

for ascii displays, 225–227

generating HTML code for a tabular list, 227–229

data-driven programming, 216–225

ascii, 217–218

defined, 216–217

fetchmailconf, metaclass hacking in, 219–225

statistical spam filtering, 218–219

Codebase size, 297

Coherent, 37

COLUMNS environment variable, 239

Comer, Douglas, 33

Command-line interfaces (CLIs), 58–59

Command-line options, 242–248

-a option, 243

-b option, 243

-c option, 244

-d option, 244

-D option, 244

-e option, 244

-f option, 244–245

-h option, 245

-i option, 245

-I option, 245

-k option, 245

-l option, 245–246

-m option, 246

-n option, 246

-o option, 246

-p option, 246

portability to other operating systems, 248

-q option, 246

-R option, 246–247

-r option, 246–247

-s option, 247

-t option, 247

-u option, 247

-v option, 247

-V option, 247

-w option, 247

-x option, 247–248

-y option, 248

-z option, 248

"Communications of the ACM", paper, 33

Compactness, 84, 87–89, 202, 225

and the strong single center, 91, 92–94

Compatible Time-Sharing System (CTSS), 29, 234

Compiler pattern, 269

Compilers, 14

Complexity, 295–317

accidental, 299–300

compromise, 312–314

ed, 304–305

Emacs, 307–308, 314–315

essential, 299–300

interaction with helper subprocesses, 303

interface and implementation complexity, tradeoffs between, 298–299

mapping, 300–302

optional, 299–300

output parsing, 303

plain-text editing, 302

problems, identifying, 309–312

rich-text editing, 302–303

Sam editor, 306–307

software, right size of, 316–317

sources of, 296–298

syntax awareness, 303

vi editor, 305–306

Wily editor, 308–309

Complexity level, choosing, 207–208

Composition, rule of, 13, 15–16

Comprehensive Perl Archive Network, 332

Concision, of interface designs, 257–258

Concurrent Version System (CVS), 367–368

condredirect, 167

Configuration, 231–252

command-line options, 242–248

control information in startup-time environment, 233–234

environment variables, 238–242

portability to other operating systems, 242

system, 238–239

user, 240

when to use, 240–242

methods:

choosing among, 248–252

fetchmail, 249–250

XFree86 Server, 251–252

run-control files, 234–238

.netrc file, 236–237

portability to other operating systems, 238

Conventions, used in book, xxix–xxx

Cookie-jar format, 115–116

Cooperating processes, 55–56

Cooperative multitasking, 54–55

Costello, Joseph, 417

cp, 246, 465

CPAN archive, 384, 456

cpio, 245

crontab, 244, 247

csh, 92

csplit, 247

CSSC (Compatibility Stupid Source Control), 367

ctags, 104

Culture, 3–4

CUP, 355

curses libraries, 144, 292

Custom grammar, writing, 210

cut, 112, 113

cvs, 247, 248

Cygwin, 70

CTSS. See Compatible Time-Sharing System

D

-d option, 244

-D option, 244

Da Vinci, Leonardo, 253

Daemons, 170

fetchmail, 172

Data file metaformats, 112–123

cookie-jar format, 115–116

defined, 112

DSV style, 113–114

record-jar format, 116–117

RFC 822 format, 114–115

Unix textual file format conventions, 120–122

Windows INI format, 119–120

XML, 117–119

Data vs. program logic, 215–216

Data-driven programming, 216–225

ascii, 217–218

defined, 216–217

fetchmailconf, metaclass hacking in, 219–225

statistical spam filtering, 218–219

date, 476

dbx, 371

dc, 165, 183, 187, 203–205, 262–264

Dead code, 155

debugfs, 152

Debugging, 14

DEC (Digital Equipment Corporation), 37, 40, 61, 75

Defense Advanced Research Projects Agency (DARPA), 35

Delimiter-Separated Values (DSV), 113–114

Dependency derivation, 362

Designing for the future, 24–25

Detachment, value of, 94

df, 243

diff, 38, 93, 441

Discoverability, 18, 133–134, 258–259

coding for, 150–151

designing for, 148–149

Disruptive technology, 52

ditroff, 107

Diversity, rule of, 14, 24, 102

DLL hell problem, 70

DocBook, 426, 427–434

document type definitions, 427–429

editing tools, 432–433

migration tools, 431–432

related standards/practices, 433

SGML, 433

toolchain, 429–431

writing Unix documentation, best practices for, 434–435

XML-DocBook references, 433–434

DocBook: The Definitive Guide (Walsh), 434

Documentation, 417–435

concepts, 418–420

cultural style, 421–422

formats, 422–426

DocBook, 426, 427–434

Documenter’s Workbench tools, 422–424

HTML, 426

POD (Plain Old Documentation), 425

TeX, 424–425

Texinfo, 425

troff, 422–424

large-document bias, 420–421

Documenter’s Workbench (DWB) tools, 195–199, 204, 422–424

Domain-specific languages, 183–184

Don’t Repeat Yourself rule. See SPOT rule

Dormant code, 155

DSV style, 113–114

DTD (Document Type Definition), 429

DTSS, 78

du, 243

DVI (TeX Device-Independent format), 331, 430

Dynamically-linked libraries (DLLs), 100

E

-e option, 244

Ease, of interface designs, 257–258

Economy, rule of, 13, 22, 375

ed, 188, 304–305, 309, 476

ed pattern, 270

EDITOR environment variable, 240

egrep, 188, 244

Einstein, Albert, 295

Elegant code, 134

Elements of Programming Style, The (Kernighan/Plauger), 104

ELIZA program, 205

elm, 256, 272

elvis, 351

emacs, 245, 247

Emacs, xxix, 16, 47, 106, 205, 235, 255, 272, 279, 307–308, 311, 314–315, 351–352, 437

combining tools with, 370–373

and make, 371

and profiling, 372

and runtime debugging, 371

and version control, 371–372

Emacs Lisp, 88–89, 187, 205, 342–343, 344, 369, 412

portability, 343, 412

Emacs Lisp libraries, 134

Embedded scripts, 334

EMX, 67

Encapsulation, 85–87, 107

Environment variables, 238–242

portability to other operating systems, 242

system, 238–239

user, 240

when to use, 240–242

EPSF, 203

eqn, 183, 195–196

EROS, 472

Essential complexity, 299–300

etags, 104

Ethernet, 4

ex, 247

Expressiveness, of interface designs, 257–258

Extending/embedding languages, 209

Extensibility, 308, 311, 336

rule of, 14, 24–25

F

-f option, 244–245

f77, 245

faces, 247

fcntl, 464, 469, 471

Feldman, Stuart, 358–360

Fellowship theme, 31

fetchmail, xxx, 119, 155, 165–166, 172, 186, 200, 219–221, 229, 237, 243, 245–247, 249–250, 274, 327, 358, 359, 361

as a pipeline, 165–166

run-control syntax, 186, 199–200, 356

-v option, 136–139, 151

fetchmailconf, 219–225, 274, 338–339

metaclass hacking in, 219–225

File compression, 122–123

File servers, 464

file (tool), 122–123, 338

File Transfer Protocol (FTP), 277

Filter pattern, 266–267

Filtering:

and discarded information, 267

and noise, 267

Filters, 15

find, 476

First Guide to Postscript (Web site), 202

flex, 243, 247, 353, 354–355

Flex, 441

Flowcharting, 14

FO (Formatting Objects), 331, 430

FOP, 430–431

fork, 158

FORTH, 203

FORTRAN, 324, 328, 344

Fourth-generation languages, 14

Free Software Foundation, 46, 195, 326, 382, 432

Free Software Movement, 45–47, 49–51

Free Standards Group, 402–403

FreeBSD, 76, 426, 466

Freeciv, 174–175

data files, 146–148

FreeNet, 342

Freshmeat, 344–345, 384, 454

fsck, 248

fsdb, 152

FSF. See Free Software Foundation

ftp, 270, 277, 465

ftpd, 277

Function-call overhead, 289

fuser, 247

G

Gabriel, Richard, 298–299

Galloway, Tom, 105

Gancarz, Mike, xxviii

gated, 172

Gates, Bill, 36

gcc, 245, 269

GCC (GNU C compiler), 47, 139–140, 382

GCOS, 78

gdb, 270, 371

Geeks, 44–45

Gelernter, David, 133, 208

GEM, 67

General Public License (GPL), 46, 458–459

Generated vs. hand-hacked code, 22

Generation, rule of, 13, 22–23

get, 244

getenv, 238

gettext, GNU, 413–414

getty, 244

Gettys, Jim, 7, 108, 181, 291, 407

GhostScript Project, 202

ghostview, 276

gif2png, 269

GIMP, xxx, 261, 279, 280, 281, 346, 383

plugins, 100–101

Glade, 185, 191–193, 353, 356–357

glob expressions, 188

glob facility, 93

Glue layers, 97–98

GNOME project, 66, 178, 315, 346, 383, 426, 476

GNU, 37, 39–40, 42, 48, 248, 270, 326

GNU Compiler Collection, 39, 326, 329, 384, 427, 439

GNU Emacs, 352

GNU Emacs Lisp Reference Manual, 343

GNU project, 39–40, 46–47, 248, 356, 422, 425, 440

GNU Texinfo, 432

GPL. See General Public License

gprof, 289, 370

grap, 183, 195–196

Graphical user interfaces (GUIs), xxx, 15–16, 58, 79, 96, 97, 197, 256, 279, 281, 468, 476

grep, 93, 112, 119, 249, 256, 266, 354

grn, 195

groff, 164, 195, 199, 422–423

grops, 247

gs, 276

GTK, 346–347, 409

Guile, 209

gunzip, 123, 269

gv, 276

gzip, 122, 269

H

-h option, 245

Hackers, 5, 9, 10–11, 33–34, 37, 40–41, 43–51, 76, 84, 123, 155, 202, 272, 298, 305, 328, 332, 337, 344–345, 350, 404, 420, 440, 475, 478

origins/history of, 43–49

Hamming, Dick, 7

Hand-hacking, avoiding, 22–23

Harness program, 278

Hatton, Les, 183

head, 246

Heuristics, 93–94

High-level-language code, 22

Hoare, C. A. R., 83, 287

HOME environment variable, 239

HP-UX, 77

HTML, 96–97, 205, 229, 281, 284, 331, 426

HTTP, 97, 128–130

I

-i option, 245

-I option, 245

ibiblio, 384

IBM, 4, 10, 33, 36–37, 39–41, 43, 65–67, 72–76, 271, 395, 478, 495

alliance with Microsoft, 65

identify, 338

Idris, 37

IEEE-X, 400

IETF. See Internet Engineering Task Force

ifconfig, 246

imake, 363

IMAP, 123, 126–127, 293

Imgsizer, 338

inetd, 123, 172, 278

infocmp, 145, 152

InfoZip, 383

Institute of Electrical and Electronic Engineers (IEEE), 399–400

Intel, 43

Interfaces, 10, 253–285

calculator program, writing, 262–264

CLI and visual interfaces, tradeoffs between, 259–262

configurability, 264–266

expressiveness, 264–266

interface design, evaluating, 257–259

Rule of Least Surprise, applying, 254–255

Rule of Silence, 284–285

transparency, 264–266

Unix interface design, history of, 256–257

Unix interface design patterns, 266–280

applying, 280–281

cantrip pattern, 268

CLI server pattern, 278–279

compiler pattern, 269

ed pattern, 270

filter pattern, 266–267

language-based patterns, 279–280

polyvalent-program pattern, 281

roguelike pattern, 270–271

"separated engine and interface" pattern, 273–278

sink pattern, 269

source pattern, 268

Web browser as universal front end, 281–284

Internal boundaries, 57

Internationalization, 413–414

Internet, 8–9, 476

Internet Engineering Task Force (IETF), 44, 49

Printer Working Group, 129

and RFC standards process, 403–405

Internet Printing Protocol (IPP), 129–130

Internet Standards Process (Revision 3), 404

Internet technical culture, 10

Interprocess communication (IPC), 55, 158

Introspection, 222

ioctl, 464, 471

ITS, 44, 78

J

Jabber, 131

Jack, 355

Jargon File, 44, 45

Java, 22, 50–51, 66–67, 70, 88–89, 96, 106, 131, 187, 207, 209, 222, 282–283, 311, 324, 337, 339–342, 369, 411–412

FreeNet, 342

Native Method Interface, 339

portability, 411–412

Java Applets page, 385

JavaScript, 96, 187, 205–207, 281

JCL (Job Control Language), 73

Johnson, Steve, 10, 84, 208, 232–233, 276, 290, 354, 395, 396, 397, 468

Jolitz, William, 41

Joy, Bill, 35–36

Jython, 337

K

-k option, 245

Kay, Alan, 461

KDE project, 179, 315, 383, 426, 476

Kernighan, Brian, 5, 14, 259, 335, 395

Khosla, Vinod, 36

KISS principle, 25, 119, 219

kmail, 140–144, 154, 265

Knuth, Donald, 23, 370, 430

Korn, David, 180, 201, 496

Korn shell, 209, 330–331, 496

ksh, 244

L

-l option, 245–246

Lampson, Burt, 26

Language vs. application protocol, 212–213

Language-based interface patterns, 279–280

Lasermoon, 401

LaTeX, 211, 424–425, 432, 433

Law of Software Envelopment, 313

Least Surprise, rule of, 13, 20, 134, 197, 210, 253, 255, 285

applying, 254–255

Lesk, Mike, 24, 99, 262, 354, 419

less, 163, 247

lex, 93, 183, 185, 210, 352, 353–356

LGPL, 388

Libraries, 99–100

LINES environment variable, 239

Linux operating system, 4, 6, 7–8, 41–43, 48–51, 61, 65–67, 72, 76–79, 100, 117, 119, 134, 152, 155, 158, 172, 175–176, 178, 207, 241, 248, 251, 256, 269, 280, 331, 402, 440

archives, 384

as a cultural phenomenon, 41–43

kernel, 383

Red Hat, 429–430

Sorcerer GNU/Linux, 332

Linux Standards Base (LSB), 402

Lion, John, 34

Lisp, 16, 22, 30, 46, 88, 194, 222, 337, 343

Little-endian, 98

Live code, 155

Lock file, 171

LOGNAME environment variable, 238

lpd, 275

lpr, 269, 275

ls, 162, 245, 249, 268, 465

lynx, 144, 359

M

-m option, 246

m4, 185, 193–194, 210

Mac Interface Guidelines, 64

Macintosh, 475–477

culture, convergence with Unix culture, 477

MacOS, 4, 50, 62, 64–65, 176, 242, 248, 329, 333, 335, 338, 341, 346, 347, 351, 409–410, 471, 476–477

Macro expansion, 194, 211

Macros, 210–212

Mail transport agent (MTA), 124

MAILER environment variable, 240

Maintainability, designing for, 154–155

make, 89, 183, 197, 246, 357–364

basic theory of, 357–358

for document-file translation, 359

generating makefiles, 362–364

autoconf, 363–364

automake, 364

imake, 363

makedepend, 362–363

in non-C/C++ development, 359

utility productions, 359–362

makedepend, 362–363

man macros, 88–89

man pages, 432

Manularity trap, 297

Mapping complexity, 300–302

Marshalling, 106

MATLAB, 290

McCarthy, John, 30

McIlroy, Doug, 5, 7, 11–12, 17, 21–22, 30, 32, 49, 55, 56, 77, 90, 92–93, 161–162, 177, 212, 232, 250, 267, 314, 322, 450

McKusick, Marshall Kirk, 41, 61

mdoc, 422

Memory management unit (MMU), 57, 63, 69, 71

Metaclass hacking, 222–223

Metcalf, Robert, 4

MICAHI, 232

Microsoft, 36, 40, 47, 65–66, 67, 70, 72

Windows, 10, 50, 75, 78–79, 146, 176

Windows NT, 68–71

Word, macro viruses, 78, 207

MIME, 114, 131, 140, 480

Minilanguages, 183–213

applying, 187–199

awk, 200–202

bc and dc, 203–205

designing, 184, 206–213

complexity level, choosing, 207–208

custom grammar, writing, 210

extending/embedding languages, 209

language vs. application protocol, 212–213

macros, 210–212

Documenter’s Workbench (DWB) tools, 195–199

Emacs Lisp, 205

fetchmail run-control syntax, 199–200

Glade, 191–193

JavaScript, 205–206

m4, 193–194

PostScript, 202–203

regular expressions, 188–191

basic, 188

examples, 189

extended, 188

glob expressions, 188

operations, 190

Perl, 189

sng, 187–188

spectrum of, 186

taxonomy of languages, 185–187

XSLT, 194–195

MIT Artificial Intelligence Lab, 44

MIT or X Consortium License, 388, 457

mkisofs, 276

mm, 422

mmap, 175, 449, 462

Moded interface, 305–306

Model/view/controller pattern, 273–274

Modularity, 14, 83–104

coding for, 103–104

compactness, 87–89

and the strong single center, 92–94

encapsulation, 85–87

libraries, 99–100

optimal module size, 85–87

orthogonality, 89–91

rule of, 13, 84, 85, 159

SPOT rule, 91–92

Moodss system, 336

Moore’s Law, 287

more, 162, 163

mountd, 172

Mozilla, 9, 49, 255, 440

Mozilla Public License (MPL), 388, 459

MPE, 78

MPL. See Mozilla Public License

ms, 422

MTS, 78

Multics, 29–32, 44, 61, 74–75, 78, 438

Multics Emacs: The History, Design, and Implementation (Greenberg), 308

Multiprogramming, 157–182

bc and dc, 165

Bernstein chaining, 167–168

complexity control, separating from performance tuning, 159–160

defined, 157

fetchmail, as a pipeline, 165–166

filters, 162–166

mutt mail user agent, 161

peer-to-peer interprocess communication, 169–176

fetchmail’s use of signals, 172

shared memory, 175–176

signals, 170–171

sockets, 172–175

system daemons and conventional signals, 172

tempfiles, 169–170

pic2graph, 164–165

pipes, 161–166

piping to a pager, 163

problems/methods to avoid, 176–181

obsolete Unix IPC methods, 176–178

remote procedure calls (RPCs), 178–180

threads, 180–181

process partitioning at the design level, 181–182

process spawning, 158

redirection, 162–166

slave processes, 168–169

scp and ssh, 169

specialist programs, handing off tasks to, 160–161

Unix IPC methods, taxonomy of, 160–161

word lists, making, 164

wrappers, 166

backup scripts, 166

security wrappers, 167–168

Multitasking, 54–55

cooperative, 54–55

preemptive, 55

Multitrack editing, 136

mutt, xxx, 144, 161, 256, 272

mv, 465

MVS (Multiple Virtual Storage), 72–74

N

-n option, 246

named, 172

Named pipes, 163

NetBSD, 76

Netscape, 49–50, 67, 255

NFS (Network File System), 178

nfsd, 172

No Silver Bullet (Brooks), 300

Noncompact designs, 89

Nonlocality, 290–291

Novell, 43

nroff, 32, 246, 422

nsgmls, 247

NUMA (non-uniform memory access), 290

O

-o option, 246

O notation, 288

Object orientation, 14, 216

Object-oriented programming (OO), 101–103

Obsolete Unix IPC methods, 176–178

STREAMS, 177–178, 462

System V IPC, 177

od, 247

Olsen, Ken, 40

"On Holy Wars and a Plea for Peace", paper, 98

On the Design of Application Protocols (Rose), 127

Open Software Foundation (OSF), 40

Open source, 39, 41–43, 47–52, 61, 65, 67, 70–72, 76–77, 79, 117, 130–131, 146, 155, 174–175, 178, 191, 194–196, 201–203, 205–206, 209, 251, 256, 280, 284, 290, 298, 322, 324, 326, 328, 329, 332, 340–341, 344–346, 350, 355, 357, 359, 362, 367–369, 372–373, 380–390, 399, 401–402, 408–410, 412–415, 424, 426–427, 437–459

license selection, 456

licensing, 457–459

Artistic License, 458

BSD Class License, 457–458

General Public License, 46, 458–459

MIT or X Consortium License, 457

Mozilla Public License, 459

Open Source Definition (OSD), 7, 386–387, 457

seeking legal assistance, 390

software, issues in using, 385

standard licenses, 388–390

using, 457

and Unix, 438–440

working with developers, 440–456

communication practice, 454–456

development practice, 447–450

distribution-making practice, 450–454

patching practice, 440–444

project- and archive-naming practice, 444–447

OpenBSD, 76

Open-source community, 9

Open-source movement, 49–51

Operating systems:

binary file formats, 58

comparisons, 61–78

BeOS, 71–72, 79

Linux, 76–78

MacOS, 64–65

MVS (Multiple Virtual Storage), 72–74

OS/2, 65–67

VM/CMS, 74–76

VMS, 61–64

Windows NT, 68–71

elements of style, 53–61

entry barriers to development, 60–61

file attributes, 57–58

intended audience, 59–60

internal boundaries, 57

inter-process communication (IPC), 55

multitasking, 54–55

preferred user interface style, 58–59

record structures, 57–58

Optimal module size, 85–87

Optimization, 287–294

choosing to do nothing, 287–288

measuring before, 288–290

nonlocality, 290–291

rule of, 14, 23–24

throughput vs. latency, 291–294

batching operations, 292

caching operation results, 293–294

overlapping operations, 293

Optional complexity, 299–300

Orthogonality, 84, 87, 89–91, 93–94, 99, 225, 301, 305

OS/2, 65–67

Ossana, Joseph, 417

Ousterhout, John, 411

Output parsing, 303

P

-p option, 246

Packard, Keith, 47, 117, 407–408

PAGER environment variable, 240

Palladium, 475

Parser/lexer generators, 23

Parsimony, rule of, 13, 18

Pascal, 324

PassiveTeX, 430

passwd, 245

paste, 113

patch, 38, 39, 42, 93, 437, 441

Paterson, Tim, 36

PATH environment variable, 239

Pattern Language, A (Alexander), xxxii

PDF. See Portable Document Format

PDP computer Web FAQ, 30

PDP computers, 123

PDP-1, 44

PDP-7, 30–32

PDP-10, 37, 44–45. See also TOPS-10 and TOPS-20

PDP-11, 32, 34, 40, 84, 98, 395, 481

Peer-to-peer interprocess communication, 169–176

fetchmail’s use of signals, 172

shared memory, 175–176

signals, 170–171

sockets, 172–175

system daemons and conventional signals, 172

tempfiles, 169–170

perl, 244

Perl, xxvi, 22, 39, 49, 75, 88–89, 103, 187, 201–202, 209, 228, 311, 332–334, 338, 369, 410

blq, 333–334

keeper, 334

portability, 410

Perl XS, 339

Perlis, Alan, 157, 200

pic, 164–165, 183, 195–199, 210

pic2plot, 199

pidfile, 171

Pike, Rob, 12, 19, 23, 154, 288, 466

pine, 272

Pipes, 11, 36, 45, 55, 56, 58, 75, 107, 158, 161–166, 176, 197, 242, 267, 278, 466

Piping to a pager, 163

PL/1, 84, 324

Plain-text editing, 302

Plan 9 from Bell Labs, 306, 308, 312, 464–466, 471–472

Plugins, 100

GIMP, 100–101

PLY, 355

PNG (Portable Network Graphics) file format, 111–112, 130, 142–144, 152, 154, 185, 187, 269, 339, 414

POD (Plain Old Documentation), 425, 426, 432

poll, 182

Polyvalent-program pattern, 281

POP3, 123, 124–126, 293

popen, 168

popfile, 218

Portability, 362, 393–417

C language:

early history of, 395–396

evolution of, 394–398

standards, 396–398

and choice of language, 409–412

C, 409–410

C++, 410

Emacs Lisp, 412

Java, 411–412

Perl, 410

Python, 410–411

shell, 410

Tcl, 411

internationalization, 413–414

Internet Engineering Task Force (IETF), and RFC standards process, 403–405

and open standards/open source, 414–415

programming for, 408–413

system dependencies, avoiding, 412–413

tools for, 413

Unix standards, 398–403

in the open-source world, 402–403

and Unix wars, 398–401

Portability layer, 449

Portable Document Format (PDF), 420, 426, 430

Portable Operating System Standard (IEEE), 8

POSIX, 8, 39–40, 67, 71, 170, 175–176, 181, 188–189, 326, 398, 400–401, 414, 469

Postel, Jonathan, 21

Postel’s Prescription, 21, 267

PostgreSQL, 174

postmaster, 277

PostScript, 164, 186, 202–203, 331, 420, 426, 431

pppd, 172

pr, 247

Preemptive multitasking, 55

Presentation-level markup, 419

Principle of Least Astonishment, 20

Procedural programming, 14

Process spawning, 158

Profiling, 370

Programmer time, conserving, 22

Protocol family, 173

Prototyping, 23–24

ps, 245, 247, 268

PS/2 port, 39

psql, 152, 277

PyChecker, 448

Python, xxvi, 22, 75, 88–89, 106, 187, 209, 228–229, 244, 311, 327, 333, 336–339, 369, 383, 410–411

fetchmailconf, 338–339

home page, 384

imgsizer, 338

portability, 410–411

Python Imaging Library (PIL), 339

Python interpreter, 293–294

Python Software Activity, 456

Q

-q option, 246

QDOS, 36

qed editor, 304

qmail, 275

qmail POP3 server, 167

qmail-popup, 167–168

qmail-smtpd, 168

QNX, 37

Qt toolkit, 329–330, 409

R

-r option, 246–247

-R option, 246–247

Race condition, 171

Rationale for the Structure of the Model and Protocol for the Internet Printing Protocol, 129–130

rblsmtpd, 167–168

read, 177

Record-jar format, 116–117

Redirection, 162–166

Refactoring, 90–91

refer, 195

Registry creep, 69

Regular expressions, 188–191

basic, 188

examples, 189

extended, 188

glob expressions, 188

operations, 190

Perl, 189

rehash directive, in csh, 92

Remote procedure call (RPC), 68, 178–180

Repair, rule of, 13, 21–22, 147, 154, 252

Representation, rule of, 13, 19–20, 102

Requests for Comment (RFCs), 44

Reuse, 375–390

moving to open source, 380–381

new programmers, 376–379

and transparency, 379–380

Revision Control System (RCS), 367

Rexx scripting language, 66, 75

RFC 822 format, 114–115

rfork, 466

Rich-text editing, 302–303

Ritchie, Dennis, 5, 30–33, 34, 36, 49, 98–99, 161, 177, 395

rm, 268

Robustness, rule of, 13, 18–19, 154

rogue, 256, 270

Roguelike pattern, 270–271

Rootless Root, 499–509

Rule of Clarity, 13, 102, 154–155

Rule of Composition, 13, 15–16

Rule of Diversity, 14, 24, 102

Rule of Economy, 13, 22, 375

Rule of Extensibility, 14, 24–25

Rule of Generation, 13, 22–23

Rule of Least Surprise, 13, 20, 134, 197, 210, 253, 255, 285

applying, 254–255

Rule of Minimality, 316

Rule of Modularity, 13, 84, 85, 159

Rule of Optimization, 14, 23–24

Rule of Parsimony, 13, 18

Rule of Repair, 13, 21–22, 147, 154, 252

Rule of Representation, 13, 19–20, 102

Rule of Robustness, 13, 18–19, 154

Rule of Separation, 13, 16–17

Rule of Silence, 13, 20–21, 284–285

Rule of Simplicity, 13, 17, 102, 178

Rule of Transparency, 13, 18, 19, 102, 151, 264

Run-control files, 234–238

.netrc file, 236–237

portability to other operating systems, 238

Russell, Bertrand, 183

S

-s option, 247

SAIL, 44

Saint-Exupéry, Antoine de, 99

Samba, 426

Sandboxed languages, 207

Santa Cruz Operation (SCO), 35, 43

Santayana, George, 29

Saxon, 429

Scheme, 279

scp, 169

screen, 470

Scriptability, of interface designs, 257–259

Scripting languages, xxx, 112, 122, 166, 183, 187–188, 201–202, 204, 209, 226, 321–324, 337–338, 344, 359, 410

ScrollKeeper, 433, 435

sdb, 371

Security wrappers, 167–168

sed, 89, 112, 183, 188, 330

select, 182

Semi-compact designs, 88

sendmail, 183–184, 193, 275, 277

"Separated engine and interface" pattern, 273–278

client/server pair, 277–278

configurator/actor pair, 274

driver/engine pair, 275–277

spooler/daemon pair, 275

Separation, rule of, 13, 16–17

Server, 59

setuid bit, 159

SGML, 205, 426, 432–434

sh, 244, 247, 270

shar, 247

Shared culture, xxv

Shared memory, 175–176

shell, 75, 88–89, 187, 410

SHELL environment variable, 239

Shell:

languages, 22

portability, 410

programs, 330–332

Sorcerer GNU/Linux, 332

xmlto, 331–332

Shelling out, 160

Signal handler, 170

Silence, rule of, 13, 20–21, 284–285

Simplicity, rule of, 13, 17, 102, 178

Single Point of Truth. See SPOT rule

Single Unix Specification, 175, 401

Sink pattern, 269

Slave processes, 168–169

scp and ssh, 169

slrn, 144, 272

smbclient, 152, 237

SMTP, 123, 124

SNA (Systems Network Architecture), 73–74

sng, 152, 187–188

SNG (Scriptable Network Graphics format), 142–144, 154, 185

snmpnetstat, 246

SOAP (Simple Object Access Protocol), 131, 179

Sockets, 163, 172–175

Freeciv, 174–175

PostgreSQL, 174

Software engineering, 3–4

Software-development methodologies, 14

Solaris, 4, 77

Sorcerer GNU/Linux, 332

sort, 249, 266, 330

Source Code Control System (SCCS), 367

Source pattern, 268

SourceForge, 344–345, 384

Space Travel game, 30–31, 44

SPACEWAR, 44

spambayes, 218

Spencer, Henry, 3, 15, 19, 20, 100, 107, 145, 153, 204, 216, 250, 264, 354, 365, 376, 397, 415, 439, 469

Sponge, 269

SPOT rule, 91–92, 220, 224, 293, 301

ssh, 169

Stallman, Richard (RMS), 37, 39, 45–47, 48, 51, 314, 400

startx, 268

stat, 449

Stephenson, Neal, xxv

STL (Standard Template Library), 328

STREAMS, 177–178, 462

Structured programming, 14

Stylesheet, 419, 428

Subversion, 368–369

Sun Community Source License (SCSL), 340

Sun Microsystems, 36–38, 40, 42, 50, 178, 339, 345, 399

Network Window System (NeWS), 256

Syntactic sugar, 200

Syntax awareness, 303

system, 160

System III Unix, 90, 171, 367, 396, 398

System V Unix, 37–38, 171, 176–178, 238, 299, 395, 398–400, 462. See also AT&T

T

-t option, 247

tail, 246

Tales of Zen Master Greg, 500

Tao of Programming, The, 499

Tao Te Ching, 375

tar, 166, 243–244, 248

tbl, 183, 195–197

Tcl, 22, 131, 186, 187, 209, 212, 228, 279, 281, 322, 327, 333, 334–339, 342–347, 369, 371, 394, 410, 411

expect package, 212

Moodss system, 336

portability of, 411

TkMan, 336

tcpdump, 246

TCP/IP, 8–9, 35, 36, 66, 73–74, 174, 176, 178, 239, 278, 462, 463

TECO, 184

TERM environment variable, 239

termcap capability format, 144

terminfo, 145–146

Terminfo database, 144–146

TeX, 211, 261, 424–425, 430

Texinfo, 425

Text streams, 15

Textuality, 105–131

application protocol design, 123–127

IMAP, 123, 126–127

POP3, 123, 124–126

SMTP, 123, 124

application protocol metaformats, 127–132

CDDB/freedb.org database, 129

classical Internet application metaprotocol, 127–128

HTTP, 128–129

data file metaformats, 112–123

cookie-jar format, 115–116

defined, 112

DSV style, 113–114

record-jar format, 116–117

RFC 822 format, 114–115

Unix textual file format conventions, 120–122

Windows INI format, 119–120

XML, 117–119

file compression, 122–123

importance of, 107–109

Internet Printing Protocol (IPP), 129–130

BEEP (Blocks Extensible Exchange Protocol), 130–131

Jabber, 131

SOAP (Simple Object Access Protocol), 131, 179

XML-RPC, 131, 158

marshalling, 106

.newsrc format, 110–111

PNG (Portable Network Graphics) file format, 111–112, 185

Unix password file format, 109–110

unmarshalling, 106

Textualizers, 152

Thin-glue principle, 97–98

Thompson, Ken, 4, 5, 16, 23, 24, 30–32, 34–35, 37, 60, 84, 98–99, 104, 139, 155, 161, 203, 304, 395, 466, 472

Threads, 180–181

Throughput vs. latency, 291–294

batching operations, 292

caching operation results, 293–294

overlapping operations, 293

Throwing an exception, 470

Timeless Way of Building (Alexander), xxxii

Timesharing operating systems, 61–62

tin, 272

Tk, 409

Tk toolkit, 334

TkMan, 336

Toolkits, 256–257

Tools, 349–373

developer-friendly operating system, 349–373

editors:

choosing, 350–353

Emacs, 351–352

using both vi and Emacs, 352

vi, 351

Emacs:

combining tools with, 370–373

and make, 371

and profiling, 372

and runtime debugging, 371

and version control, 371–372

make, 357–364

autoconf, 363–364

automake, 364

basic theory of, 357–358

for document-file translation, 359

generating makefiles, 362–364

imake, 363

makedepend, 362–363

in non-C/C++ development, 359

utility productions, 359–362

profiling, 370

runtime debugging, 369

special-purpose code generators, 352–357

fetchmailrc grammar, 356

Glade, 356–357

lex, 353–356

yacc, 353–356

version control:

Aegis, 368–369

automated, 366

Concurrent Version System (CVS), 367–368

by hand, 365

purpose of, 364–365

Revision Control System (RCS), 367

Source Code Control System (SCCS), 367

Subversion, 368–369

systems, 364–369

Unix tools for, 367–369

Top-down vs. bottom-up design, 95–97

TOPS-10, 78

TOPS-20, 44, 78, 468

Torvalds, Linus, 41, 47, 48–49, 406, 437

touch, 268

tr, 112, 266

Transparency, 133–155

case studies:

audacity, 135–136

fetchmail, -v option, 136–139

Freeciv data files, 146–148

GCC (GNU C compiler), 139–140

kmail, 140–144

Terminfo database, 144–146

of code, 150–151

of designs, 148–149

and discoverability, 133–134, 148–151

editable representations, 152–153

fault diagnosis, 153–154

fault recovery, 153–154

of interface designs, 257–258

maintainability, designing for, 154–155

overprotectiveness, avoiding, 151–152

rule of, 13, 18, 19, 102, 151, 264

Zen of, 149–150

troff, 89, 107, 183, 186, 197, 199, 246, 261, 417, 421, 422–424

markup, 89

Trusted Computing Platform Alliance, 474–475

TSO, 73

Turing-complete languages, 187, 201, 205

U

-u option, 247

ucspi-tcp, 168

uNETix, 37

Unix:

APIs, 90

application programming interface (API), 8

basic philosophy, 11–14

binary file formats, 58

and casual programming, 60–61

code, 11

code generation, 215–229

complexity, 295–317

configuration, 231–252

cross-platform portability, 8

culture:

case against learning, 5–6

expertise transmitted by, 11–12

problems in, 475–477

data file metaformats, 112–123

documentation, 417–435

concepts, 418–420

cultural style, 421–422

formats, 422–426

large-document bias, 420–421

durability/adaptability of, 4–5

environment, problems in, 473–475

files, 6, 466–467

attributes, 57–58

deletion, 6

flexibility of, 9–10

fusion with ARPANET culture, 45–47

future of, 461–478

and hackers, 10–11, 33, 43

heritage of, 6

history of, 29–43

lessons learned from, 51–52

interfaces, 253–285

styles, 7

internal boundaries, 57

inter-process communication (IPC), 55

job control, 6

koans of Master Foo, 499–504

language evaluations, 325–343

C language, 326–327

C++, 327–330

Emacs Lisp, 342–343

Java, 339–342

Perl, 332–334

Python, 336–339

shell programs, 330–332

Tcl, 334–336

languages, 321–347

C language, 323–325

cornucopia of, 321–322

future trends, 344–345

interpreted languages, 325

minilanguages, 183–213

modularity, 83–104

multiprogramming, 157–182

multitasking, 54–55

objections to, 6–7

and object-oriented languages, 101–103

open source, 437–459

open standards, 8

open-source applications, 9

as open-source software, 7–8

operating system, elements of style, 53–61

optimization, 287–294

options, 7

origin of, 29–30

philosophy, 3–27, 369

applying, 26

compared to others, 53–80

portability, 393–417

preferred user interface style, 58–59

record structures, 57–58

reuse, 375–390

specification level, 215–229

textuality, 105–131

tools, 349–373

transparency, 133–155

and universality, 6

use of term, xxix

Version 7 release, 34

wars, 35–41, 398–401

X toolkit, choosing, 346–347

Unix interface design, history of, 256–257

Unix interface design patterns, 266–280

applying, 280–281

cantrip pattern, 268

CLI server pattern, 182, 278–279

compiler pattern, 269

ed pattern, 270

filter pattern, 266–267

language-based patterns, 279–280

polyvalent-program pattern, 281

roguelike pattern, 270–271

"separated engine and interface" pattern, 273–278

client/server pair, 277–278

configurator/actor pair, 274

driver/engine pair, 275–277

spooler/daemon pair, 275

sink pattern, 269

source pattern, 268

Unix System V. See

Unix textual file format conventions, 120–122

Unmarshalling, 106

unzip, 245

URI (Universal Resource Indicator), 128

URL (Uniform Resource Locator), 9, 128

Usenet, 35, 42, 110, 114, 205, 272, 305, 343, 383, 440, 451, 455, 495, 497

USER environment variable, 238

User-interface design, 140, 475

Utility productions, 359–362

UUCP, 35

uupc, 247

V

-v option, 247

-V option, 247

Validating parser, 428

VAX/VMS operating system, 10, 35, 367

Venix, 37

Version control:

Aegis, 368–369

automated, 366

by hand, 365

purpose of, 364–365

Subversion, 368–369

systems, 364–369

Unix tools for, 367–369

Concurrent Version System (CVS), 367–368

Revision Control System (RCS), 367

Source Code Control System (SCCS), 367

vi, 35, 247, 272, 311, 351, 352

vile, 351

vim, 351

VM/CMS, 4, 74–76

VMS, 40, 61–64, 468

W

-w option, 247

Wall, Larry, 39, 458

Waterfall model, 406

wc, 162

White Book, 94, 395

who, 268

Wily editor, 308–309

Window manager, 257

Windows operating system, 10, 40, 50, 66, 67, 75, 77–79, 100, 113, 135, 146–147, 152–153, 171, 173, 175, 176, 179, 181, 193, 207, 238, 242, 248, 252, 256–257, 265, 324, 329, 340, 349–352, 367, 409–410, 412, 450, 453

Windows Help markup, 426

Windows INI format, 119–120

Windows NT, 68–71

Wittgentstein, Ludwig, 321

Workplace Shell (WPS), 66

World Wide Web (WWW), 8–9, 42, 281, 476

"Worse Is Better", paper (Gabriel), 298, 438

Wrappers, 166, 330

backup scripts, 166

security wrappers, 167–168

write, 177

wxWindows, 346–347, 409

WYSIWYG, 196, 258, 418–419

X

-x option, 247–248

X clients, 251

X servers, 251

X toolkit, 191

choosing, 346–347

X windowing system, 7, 47, 49, 63, 108, 183, 463

and XFree86, 42

Xalan, 429

xcalc, 262–263

xcdroast, xxxi, 276

xdb, 371

XEmacs, 352

XENIX, 35

Xerox PARC, 256, 273, 461, 463, 467–468, 480

XF86Config file, 251–252

XFree86, 42, 251–252, 383

XHTML, 426

XML, 117–119, 196, 205, 284, 331, 463

XML Cover Pages, 434

XML-DocBook, 426

xmllint, 147

XML-RPC, 131, 158

xmlroff, 431

xmltk toolkit, 118–119

xmlto, xxx-xxxi, 331–332, 425–426, 429, 435

X/Open, 401

XSLT, 186, 194–195, 331–332

xsltproc, 429–430

xterm, 144, 244, 403

xvi, 351

Y

-y option, 248

yacc, 10, 93, 183, 185, 210, 352, 353–356

Yacc/M, 355

ypbind, 172

Z

-z option, 248

Zawinski’s Law, 313, 316

zcat, 248

Zen, xxix, 13, 149–150, 225, 287, 317, 477

and value of detachment, 94

zip, 122, 248

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.183.221