rev |
line source |
meillo@24
|
1 .TL
|
meillo@24
|
2 \fR\s-6Why\s0\fP
|
meillo@24
|
3 .br
|
meillo@24
|
4 the Unix Philosophy
|
meillo@24
|
5 .br
|
meillo@24
|
6 .vs -4
|
meillo@24
|
7 \fR\s-6(still) matters\s0\fP
|
meillo@24
|
8 .AU
|
meillo@24
|
9 .ft R
|
meillo@24
|
10 .sp 1.2i
|
meillo@24
|
11 .ps 11
|
meillo@24
|
12 markus schnalke <meillo@marmaro.de>
|
meillo@24
|
13
|
meillo@24
|
14
|
meillo@24
|
15 .S "goals of this talk
|
meillo@24
|
16 .I
|
meillo@24
|
17 introduce the Unix Phil
|
meillo@24
|
18 .I
|
meillo@24
|
19 explain why most modern software is crap
|
meillo@24
|
20 .I
|
meillo@24
|
21 explain why the Unix Phil leads to better software
|
meillo@24
|
22 .I
|
meillo@24
|
23 convince you that good software is of matter
|
meillo@24
|
24 .sp 2
|
meillo@24
|
25 .I
|
meillo@24
|
26 make you think
|
meillo@24
|
27
|
meillo@24
|
28
|
meillo@24
|
29 .S "roadmap
|
meillo@24
|
30 .I
|
meillo@24
|
31 Historical background
|
meillo@24
|
32 .I
|
meillo@24
|
33 What is the Unix Philosophy?
|
meillo@24
|
34 .I
|
meillo@24
|
35 The Unix Phil after Gancarz
|
meillo@24
|
36 .I
|
meillo@24
|
37 Discussion on real world examples
|
meillo@24
|
38 .I
|
meillo@24
|
39 The Unix Phil is more than software dev guidelines
|
meillo@24
|
40
|
meillo@24
|
41
|
meillo@24
|
42
|
meillo@24
|
43 .S "me and the UP
|
meillo@24
|
44 .LP
|
meillo@24
|
45 first contact: through the suckless project
|
meillo@24
|
46 .LP
|
meillo@24
|
47 ``cat -v Considered Harmful''
|
meillo@24
|
48 .LP
|
meillo@24
|
49 ``The Unix and the Echo''
|
meillo@24
|
50 .LP
|
meillo@24
|
51 ``The Unix Programming Environment''
|
meillo@24
|
52 .sp 1
|
meillo@24
|
53 .LP
|
meillo@24
|
54 better understanding through digging in the past
|
meillo@24
|
55
|
meillo@24
|
56
|
meillo@24
|
57
|
meillo@24
|
58
|
meillo@24
|
59
|
meillo@24
|
60 .P "historical background
|
meillo@24
|
61
|
meillo@24
|
62
|
meillo@24
|
63
|
meillo@24
|
64
|
meillo@24
|
65 .S "historical background
|
meillo@24
|
66 .I
|
meillo@24
|
67 the late 60s and early 70s
|
meillo@24
|
68 .I
|
meillo@24
|
69 operating systems are complex
|
meillo@24
|
70 .I
|
meillo@24
|
71 MULTICS just failed
|
meillo@24
|
72 .I
|
meillo@24
|
73 Brooks' ``The Mythical Man-Month''
|
meillo@24
|
74 .I
|
meillo@24
|
75 a lot of different hardware
|
meillo@24
|
76 .I
|
meillo@24
|
77 limited computing power
|
meillo@24
|
78 .I
|
meillo@24
|
79 textual input and output (line printers)
|
meillo@24
|
80
|
meillo@24
|
81
|
meillo@24
|
82 .S "everything is a file
|
meillo@24
|
83 .LP
|
meillo@24
|
84 is the(?) basic concept in Unix (and even more in Plan9)
|
meillo@24
|
85 .LP
|
meillo@24
|
86 made simple operating systems possible
|
meillo@24
|
87 .LP
|
meillo@24
|
88 it is not covered by the Unix Phil; the Unix Phil is on a different level
|
meillo@24
|
89 .sp 2
|
meillo@24
|
90 .LP
|
meillo@24
|
91 Unix is mainly two things:
|
meillo@24
|
92 .I
|
meillo@24
|
93 an operating system (system calls)
|
meillo@24
|
94 .I
|
meillo@24
|
95 a toolchest (coreutils)
|
meillo@24
|
96
|
meillo@24
|
97
|
meillo@24
|
98
|
meillo@24
|
99 .P "What is the Unix Phil
|
meillo@24
|
100
|
meillo@24
|
101
|
meillo@24
|
102
|
meillo@24
|
103 .S "What is the Unix Phil *itself*?
|
meillo@24
|
104 .LP
|
meillo@24
|
105 ``The Unix philosophy is a set of cultural norms and philosophical
|
meillo@24
|
106 approaches to developing software based on the experience of
|
meillo@24
|
107 leading developers of the Unix operating system.''
|
meillo@24
|
108 (wikipedia)
|
meillo@24
|
109 .sp 2
|
meillo@24
|
110 .LP
|
meillo@24
|
111 How the inventors of Unix write software.
|
meillo@24
|
112 .LP
|
meillo@24
|
113 Common things of classic Unix tools.
|
meillo@24
|
114 .sp 2
|
meillo@24
|
115 .LP
|
meillo@24
|
116 difficult to define
|
meillo@24
|
117
|
meillo@24
|
118
|
meillo@24
|
119 .S "Unix Phil vs. SW dev processes
|
meillo@24
|
120 .LP
|
meillo@24
|
121 the Unix Phil
|
meillo@24
|
122 .I
|
meillo@24
|
123 much: *what* to program
|
meillo@24
|
124 .I
|
meillo@24
|
125 few: *how* to program
|
meillo@24
|
126
|
meillo@24
|
127 .LP
|
meillo@24
|
128 Software developments processes:
|
meillo@24
|
129 .I
|
meillo@24
|
130 few: *what* to program
|
meillo@24
|
131 .I
|
meillo@24
|
132 much: *how* to program
|
meillo@24
|
133
|
meillo@24
|
134 .sp 2
|
meillo@24
|
135 .LP
|
meillo@24
|
136 Extreme Programming is like the Unix Phil
|
meillo@24
|
137 but with more *how* than *what*,
|
meillo@24
|
138 and with formalisms
|
meillo@24
|
139
|
meillo@24
|
140
|
meillo@24
|
141
|
meillo@24
|
142
|
meillo@24
|
143
|
meillo@24
|
144 .S "What is the Unix Phil?
|
meillo@24
|
145 .I
|
meillo@24
|
146 Doug McIlroy (1978)
|
meillo@24
|
147 .I
|
meillo@24
|
148 Mike Gancarz: ``The Unix Philosophy'' (1994)
|
meillo@24
|
149 .I
|
meillo@24
|
150 Eric S. Raymond: ``The Art of Unix Programming'' (2003)
|
meillo@24
|
151 .sp 2
|
meillo@24
|
152 .I
|
meillo@24
|
153 Richard Gabriel: ``Worse is Better'' (1989)
|
meillo@24
|
154
|
meillo@24
|
155
|
meillo@24
|
156 .S "Doug McIlroy
|
meillo@24
|
157 .LP
|
meillo@24
|
158 This is the Unix philosophy:
|
meillo@24
|
159 .I
|
meillo@24
|
160 Write programs that do one thing and do it well.
|
meillo@24
|
161 .I
|
meillo@24
|
162 Write programs to work together.
|
meillo@24
|
163 .I
|
meillo@24
|
164 Write programs to handle text streams, because that is a universal interface.
|
meillo@24
|
165
|
meillo@24
|
166
|
meillo@24
|
167 .S "Mike Gancarz: ``The Unix Philosophy''
|
meillo@24
|
168 .I
|
meillo@24
|
169 Small is beautiful.
|
meillo@24
|
170 .I
|
meillo@24
|
171 Make each program do one thing well.
|
meillo@24
|
172 .I
|
meillo@24
|
173 Build a prototype as soon as possible.
|
meillo@24
|
174 .I
|
meillo@24
|
175 Choose portability over efficiency.
|
meillo@24
|
176 .I
|
meillo@24
|
177 Store data in flat text files.
|
meillo@24
|
178 .I
|
meillo@24
|
179 Use software leverage to your advantage.
|
meillo@24
|
180 .I
|
meillo@24
|
181 Use shell scripts to increase leverage and portability.
|
meillo@24
|
182 .I
|
meillo@24
|
183 Avoid captive user interfaces.
|
meillo@24
|
184 .I
|
meillo@24
|
185 Make every program a filter.
|
meillo@24
|
186 .sp 1
|
meillo@24
|
187 .LP
|
meillo@24
|
188 plus ten lesser tenets
|
meillo@24
|
189
|
meillo@24
|
190
|
meillo@24
|
191
|
meillo@24
|
192
|
meillo@24
|
193 .P "The Unix Phil after Gancarz
|
meillo@24
|
194
|
meillo@25
|
195
|
meillo@25
|
196
|
meillo@25
|
197 .S "Small is beautiful
|
meillo@25
|
198 .I
|
meillo@25
|
199 small software is easier to understand, write, maintain
|
meillo@25
|
200 .I
|
meillo@25
|
201 less lines of code contain less bugs
|
meillo@25
|
202 .I
|
meillo@25
|
203 monsters are large
|
meillo@25
|
204
|
meillo@25
|
205
|
meillo@25
|
206 .S "Make each program do one thing well
|
meillo@25
|
207 .I
|
meillo@25
|
208 programs with many functions are large
|
meillo@25
|
209 .I
|
meillo@25
|
210 one thing is easier to understand
|
meillo@25
|
211 .I
|
meillo@25
|
212 often straight forward to implement
|
meillo@25
|
213 .I
|
meillo@25
|
214 reusable
|
meillo@25
|
215
|
meillo@25
|
216
|
meillo@25
|
217 .S "Build a prototype as soon as possible
|
meillo@25
|
218 .I
|
meillo@25
|
219 shows the quality of the design
|
meillo@25
|
220 .I
|
meillo@25
|
221 shows the problems of the software
|
meillo@25
|
222 .I
|
meillo@25
|
223 the best way to shape a software
|
meillo@25
|
224 .I
|
meillo@25
|
225 users find bugs
|
meillo@25
|
226
|
meillo@25
|
227
|
meillo@25
|
228 .S "Choose portability over efficiency
|
meillo@25
|
229 .I
|
meillo@25
|
230 (comes from incompatible hardware in history)
|
meillo@25
|
231 .I
|
meillo@25
|
232 use is most important
|
meillo@25
|
233 .I
|
meillo@25
|
234 availability
|
meillo@25
|
235 .I
|
meillo@25
|
236 only needs to be fast enough
|
meillo@25
|
237
|
meillo@25
|
238
|
meillo@25
|
239 .S "Store data in flat text files
|
meillo@24
|
240 .LP
|
meillo@25
|
241 binary data is machine dependent
|
meillo@25
|
242 .LP
|
meillo@25
|
243 human readable data is:
|
meillo@25
|
244 .I
|
meillo@25
|
245 is very likely supported
|
meillo@25
|
246 .I
|
meillo@25
|
247 good to port
|
meillo@25
|
248 .I
|
meillo@25
|
249 many tools work on it (Unix toolchest)
|
meillo@25
|
250 .I
|
meillo@25
|
251 as generic as possible
|
meillo@25
|
252 .LP
|
meillo@25
|
253 processing needs only to be fast enough
|
meillo@24
|
254
|
meillo@24
|
255
|
meillo@25
|
256 .S "Use software leverage to your advantage
|
meillo@24
|
257 .LP
|
meillo@25
|
258 what do we have computers for?
|
meillo@25
|
259 .LP
|
meillo@25
|
260 make best use of computing power
|
meillo@25
|
261 .LP
|
meillo@25
|
262 reduce development effort
|
meillo@24
|
263
|
meillo@24
|
264
|
meillo@25
|
265 .S "Use shell scripts to increase leverage and portability
|
meillo@24
|
266 .LP
|
meillo@25
|
267 was very important in history
|
meillo@25
|
268 .LP
|
meillo@25
|
269 high level languages
|
meillo@25
|
270 .LP
|
meillo@25
|
271 prototyping
|
meillo@25
|
272 .LP
|
meillo@25
|
273 quick hacks
|
meillo@24
|
274
|
meillo@24
|
275
|
meillo@25
|
276 .S "Avoid captive user interfaces
|
meillo@24
|
277 .LP
|
meillo@25
|
278 don't assume the user to be human
|
meillo@25
|
279 .LP
|
meillo@25
|
280 exclude the user whenever possible
|
meillo@25
|
281 .LP
|
meillo@25
|
282 automate
|
meillo@24
|
283
|
meillo@24
|
284
|
meillo@25
|
285 .S "Make every program a filter
|
meillo@24
|
286 .LP
|
meillo@25
|
287 programs transform data
|
meillo@25
|
288 .LP
|
meillo@25
|
289 combine programs
|
meillo@25
|
290 .LP
|
meillo@25
|
291 have one common interface
|
meillo@24
|
292
|
meillo@24
|
293
|
meillo@24
|
294
|
meillo@25
|
295 .S "a different POV
|
meillo@25
|
296 .I
|
meillo@25
|
297 pipes
|
meillo@25
|
298 .I
|
meillo@25
|
299 interface design
|
meillo@25
|
300 .I
|
meillo@25
|
301 the toolchest approach
|
meillo@25
|
302 .I
|
meillo@25
|
303 a powerful shell
|
meillo@25
|
304 .I
|
meillo@25
|
305 worse is better
|
meillo@25
|
306 .I
|
meillo@25
|
307 upgrowth and survival
|
meillo@24
|
308
|
meillo@24
|
309
|
meillo@24
|
310
|
meillo@24
|
311 .P "real world examples
|
meillo@24
|
312
|
meillo@24
|
313
|
meillo@24
|
314 .S "various
|
meillo@24
|
315 .LP
|
meillo@24
|
316 who uses
|
meillo@24
|
317 .CW "grep -R
|
meillo@24
|
318 ?
|
meillo@24
|
319
|
meillo@24
|
320 .sp 1
|
meillo@24
|
321 .LP
|
meillo@24
|
322 .CW "cat -v
|
meillo@24
|
323
|
meillo@24
|
324 .sp 1
|
meillo@24
|
325 .LP
|
meillo@24
|
326 pagers are taken for granted
|
meillo@24
|
327
|
meillo@24
|
328 .sp 1
|
meillo@24
|
329 .LP
|
meillo@24
|
330 what about the readline?
|
meillo@24
|
331
|
meillo@24
|
332
|
meillo@24
|
333
|
meillo@24
|
334 .S "find -printf
|
meillo@24
|
335 .LP
|
meillo@24
|
336 How to reformat the output of find(1) to have ``FILENAME PATH''
|
meillo@24
|
337 instead of ``PATH/FILENAME''?
|
meillo@24
|
338
|
meillo@24
|
339 .LP
|
meillo@24
|
340 the ``easy'' way:
|
meillo@24
|
341 \f(CWfind /dir -printf "%P %h\en"\fP
|
meillo@24
|
342
|
meillo@24
|
343 .LP
|
meillo@24
|
344 the ``good'' way:
|
meillo@24
|
345 .br
|
meillo@24
|
346 .CW "\s-1find /dir | sed 's,\e(.*\e)/\e(.*\e),\e2 \e1,'
|
meillo@24
|
347
|
meillo@24
|
348 .LP
|
meillo@24
|
349 The difference shows off when one wants, for instance,
|
meillo@24
|
350 the path to be manipulated further.
|
meillo@24
|
351
|
meillo@24
|
352
|
meillo@24
|
353 .S "MH / nmh
|
meillo@24
|
354 .LP
|
meillo@24
|
355 a Mail User Agent (MUA)
|
meillo@25
|
356 .LP
|
meillo@25
|
357 is a toolchest
|
meillo@25
|
358 .LP
|
meillo@25
|
359 work with mails like with generic files
|
meillo@25
|
360 .LP
|
meillo@25
|
361 the only(?) MUA that follows the Unix Phil
|
meillo@25
|
362 .LP
|
meillo@25
|
363 has a very special feeling
|
meillo@24
|
364
|
meillo@24
|
365
|
meillo@24
|
366 .S "uzbl
|
meillo@24
|
367 .LP
|
meillo@24
|
368 a web browser that adheres to the Unix Phil
|
meillo@25
|
369 .LP
|
meillo@25
|
370 a young project (about 1 year)
|
meillo@25
|
371 .LP
|
meillo@25
|
372 central question: what is the one task a web browser covers?
|
meillo@25
|
373 .LP
|
meillo@25
|
374 makes very visible use of software leverage
|
meillo@25
|
375 .LP
|
meillo@25
|
376 suffers hard from our broken web
|
meillo@24
|
377
|
meillo@24
|
378
|
meillo@24
|
379
|
meillo@24
|
380
|
meillo@24
|
381
|
meillo@24
|
382 .P "more than software dev guidelines
|
meillo@24
|
383
|
meillo@24
|
384
|
meillo@25
|
385 .S "say no
|
meillo@25
|
386 .LP
|
meillo@25
|
387 in today's computer world, the Unix Phil is much of asceticism
|
meillo@25
|
388 .LP
|
meillo@25
|
389 one needs to abjure a lot of ``nice'' features
|
meillo@25
|
390 .LP
|
meillo@25
|
391 IMO that leads to a valuable attitude
|
meillo@25
|
392
|
meillo@25
|
393
|
meillo@25
|
394 .S "avoid complexity
|
meillo@25
|
395 .LP
|
meillo@25
|
396 avoid complexity first and foremost
|
meillo@25
|
397 .LP
|
meillo@25
|
398 complexity is the ``boss enemy'' software developers fight against
|
meillo@25
|
399 .LP
|
meillo@25
|
400 strive for simplicity, clarity, generality
|
meillo@25
|
401
|
meillo@25
|
402
|
meillo@25
|
403 .S "good solutions
|
meillo@25
|
404 .LP
|
meillo@25
|
405 we don't need just solutions, we need good ones
|
meillo@25
|
406 .LP
|
meillo@25
|
407 today, we can make things possible,
|
meillo@25
|
408 but we still cannot make them good
|
meillo@25
|
409
|
meillo@25
|
410
|
meillo@25
|
411 .S "live it
|
meillo@25
|
412 .LP
|
meillo@25
|
413 the Unix Phil is not just a few guidelines
|
meillo@25
|
414 .LP
|
meillo@25
|
415 you cannot follow just some of the tenets
|
meillo@25
|
416 .LP
|
meillo@25
|
417 you will not understand the Unix Phil when you don't engage with it
|
meillo@25
|
418 .sp 3
|
meillo@25
|
419 .LP
|
meillo@25
|
420 .ce
|
meillo@25
|
421 it's a philosophy \(en live it!
|
meillo@24
|
422
|
meillo@24
|
423
|
meillo@24
|
424
|
meillo@24
|
425 .P "literature
|
meillo@24
|
426
|
meillo@24
|
427
|
meillo@24
|
428 .S literature
|
meillo@24
|
429 .I
|
meillo@24
|
430 ``\fBText Processing and Typesetting with Unix\fP''
|
meillo@24
|
431 by Barron and Rees
|
meillo@24
|
432 explains everything pretty good (focus on
|
meillo@24
|
433 .CW nroff )
|
meillo@24
|
434 .I
|
meillo@24
|
435 ``\fBHeirloom Documentation Tools Nroff/Troff User's Manual\fP''
|
meillo@24
|
436 by Ossanna, Kernighan, and Ritter
|
meillo@24
|
437 is more a technical reference
|
meillo@24
|
438 .I
|
meillo@24
|
439 Various documents collected on
|
meillo@24
|
440 .CW \s-2http://troff.org\s+2
|
meillo@24
|
441
|
meillo@24
|
442
|
meillo@24
|
443 .S
|
meillo@24
|
444 .LP
|
meillo@24
|
445 this talk was prepared using tools of the Heirloom project:
|
meillo@24
|
446 .CW \s-2http://heirloom.sf.net\s+2
|
meillo@24
|
447 .LP
|
meillo@24
|
448 the slides macros are based on
|
meillo@24
|
449 .br
|
meillo@24
|
450 .CW \s-2http://repo.cat-v.org/troff-slider/\s+2
|
meillo@24
|
451 .sp
|
meillo@24
|
452
|
meillo@24
|
453 .LP
|
meillo@24
|
454 the slides are available on my website
|
meillo@24
|
455 .CW \s-2http://marmaro.de/docs\s+2
|
meillo@24
|
456 and on
|
meillo@24
|
457 .CW \s-2http://ulm.ccc.de/ChaosSeminar/\s+2
|
meillo@24
|
458 .sp
|
meillo@24
|
459
|
meillo@24
|
460 2010-03-08
|