Mercurial > docs > unix-phil
comparison unix-phil-slides.ms @ 27:e8adc3571e8c
rework
author | meillo@marmaro.de |
---|---|
date | Mon, 08 Mar 2010 12:58:58 +0100 |
parents | b368ff5cdb5f |
children | faff9ea75591 |
comparison
equal
deleted
inserted
replaced
26:b368ff5cdb5f | 27:e8adc3571e8c |
---|---|
10 .sp 1.2i | 10 .sp 1.2i |
11 .ps 11 | 11 .ps 11 |
12 markus schnalke <meillo@marmaro.de> | 12 markus schnalke <meillo@marmaro.de> |
13 | 13 |
14 | 14 |
15 .S "goals of this talk | 15 .S "Goals of this talk |
16 .I | 16 .I |
17 introduce the Unix Phil | 17 Introduce the Unix Phil |
18 .I | 18 .I |
19 show that most modern software is crap | 19 Show that most modern software is crap |
20 .I | 20 .I |
21 explain why the Unix Phil leads to better software | 21 Explain why the Unix Phil leads to better software |
22 .I | 22 .I |
23 convince you that good software is of matter | 23 Convince you that good software is of matter |
24 .sp 2 | 24 .sp 2 |
25 .I | 25 .I |
26 make you think | 26 Make you think |
27 | 27 |
28 | 28 |
29 .S "roadmap | 29 .S "Roadmap |
30 .I | 30 .I |
31 Historical background | 31 Historical background |
32 .I | 32 .I |
33 What is the Unix Philosophy? | 33 What is the Unix Phil? |
34 .I | 34 .I |
35 The Unix Phil after Gancarz | 35 The Unix Phil after Gancarz |
36 .I | 36 .I |
37 Discussion on real world examples | 37 Discussion on real world examples |
38 .I | 38 .I |
39 The Unix Phil is more than software dev guidelines | 39 The Unix Phil is more than software dev guidelines |
40 | 40 |
41 | 41 |
42 | 42 |
43 .S "me and the UP | 43 .S "How I learned about it |
44 .LP | 44 .LP |
45 first contact: through the suckless project | 45 First contact through dwm (suckless project) |
46 .LP | 46 .LP |
47 ``cat -v Considered Harmful'' | 47 ``cat -v Considered Harmful'' |
48 .LP | 48 .LP |
49 ``The Unix and the Echo'' | 49 ``The Unix and the Echo'' |
50 .LP | 50 .LP |
51 ``The Unix Programming Environment'' | 51 ``The Unix Programming Environment'' |
52 .sp 1 | 52 .sp 1 |
53 .LP | 53 .LP |
54 better understanding through digging in the past | 54 Better understanding through digging in the past |
55 | 55 |
56 | 56 |
57 | 57 |
58 | 58 |
59 | 59 |
60 .P "historical background | 60 .P "Historical background |
61 | 61 |
62 | 62 |
63 | 63 |
64 | 64 |
65 .S "historical background | 65 .S "Historical background |
66 .I | 66 .LP |
67 the late 60s and early 70s | 67 The late 60s and early 70s |
68 .I | 68 .LP |
69 operating systems are complex | 69 Operating systems are complex |
70 .I | 70 .LP |
71 MULTICS just failed | |
72 .I | |
73 Brooks' ``The Mythical Man-Month'' | 71 Brooks' ``The Mythical Man-Month'' |
74 .I | 72 .LP |
75 a lot of different hardware | 73 MULTICS had just failed |
76 .I | 74 .LP |
77 limited computing power | 75 A lot of different hardware |
78 .I | 76 .LP |
79 textual input and output (line printers) | 77 Limited computing power |
80 | 78 .LP |
81 | 79 Textual input and output (line printers) |
82 .S "everything is a file | 80 |
83 .LP | 81 |
84 is the(?) basic concept in Unix (and even more in Plan9) | 82 .S "Everything is a file |
85 .LP | 83 .LP |
86 made simple operating systems possible | 84 Is the(?) basic concept in Unix (and even more in Plan9) |
87 .LP | 85 .LP |
88 it is not covered by the Unix Phil; the Unix Phil is on a different level | 86 Made simple operating systems possible |
87 .LP | |
88 It is not covered by the Unix Phil | |
89 .br | |
90 The Unix Phil is on a different level | |
89 .sp 2 | 91 .sp 2 |
90 .LP | 92 .LP |
91 Unix is mainly two things: | 93 Unix is mainly two things: |
92 .I | 94 .I |
93 an operating system (system calls) | 95 An operating system (system calls) |
94 .I | 96 .I |
95 a toolchest (coreutils) | 97 A toolchest (coreutils) |
96 | 98 |
97 | 99 |
98 | 100 |
99 .P "What is the Unix Phil | 101 .P "What is the Unix Phil? |
100 | 102 |
101 | 103 |
102 | 104 |
103 .S "What is the Unix Phil *itself*? | 105 .S "What is the Unix Phil *itself*? |
104 .LP | 106 .LP |
111 How the inventors of Unix write software. | 113 How the inventors of Unix write software. |
112 .LP | 114 .LP |
113 Common things of classic Unix tools. | 115 Common things of classic Unix tools. |
114 .sp 2 | 116 .sp 2 |
115 .LP | 117 .LP |
116 difficult to define | 118 Difficult to define |
117 | 119 |
118 | 120 |
119 .S "Unix Phil vs. SW dev processes | 121 .S "Unix Phil vs. SW dev processes |
120 .LP | 122 .LP |
121 the Unix Phil | 123 The Unix Phil |
122 .I | 124 .I |
123 much: *what* to program | 125 much: *what* to program |
124 .I | 126 .I |
125 few: *how* to program | 127 few: *how* to program |
126 | 128 |
183 Avoid captive user interfaces. | 185 Avoid captive user interfaces. |
184 .I | 186 .I |
185 Make every program a filter. | 187 Make every program a filter. |
186 .sp 1 | 188 .sp 1 |
187 .LP | 189 .LP |
188 plus ten lesser tenets | 190 Plus ten lesser tenets |
189 | 191 |
190 | 192 |
191 | 193 |
192 | 194 |
193 .P "The Unix Phil after Gancarz | 195 .P "The Unix Phil after Gancarz |
194 | 196 |
195 | 197 |
196 | 198 |
197 .S "Small is beautiful | 199 .S "Small is beautiful |
198 .I | 200 .LP |
199 small software is easier to understand, write, maintain | 201 Small software is easier to understand, write, maintain |
200 .I | 202 .LP |
201 less lines of code contain less bugs | 203 Less lines of code contain less bugs |
202 .I | 204 .LP |
203 monsters are large | 205 Monsters are large |
204 | 206 |
205 | 207 |
206 .S "Make each program do one thing well | 208 .S "Make each program do one thing well |
207 .I | 209 .LP |
208 programs with many functions are large | 210 Programs with many functions are large |
209 .I | 211 .LP |
210 one thing is easier to understand | 212 One thing is easier to understand |
211 .I | 213 .LP |
212 often straight forward to implement | 214 Often straight forward to implement |
213 .I | 215 .LP |
214 reusable | 216 Reusable |
215 | 217 |
216 | 218 |
217 .S "Build a prototype as soon as possible | 219 .S "Build a prototype as soon as possible |
218 .I | 220 .LP |
219 shows the quality of the design | 221 Shows the quality of the design |
220 .I | 222 .LP |
221 shows the problems of the software | 223 Shows the problems of the software |
222 .I | 224 .LP |
223 the best way to shape a software | 225 The best way to shape a software |
224 .I | 226 .LP |
225 users find bugs | 227 Users find bugs |
226 | 228 |
227 | 229 |
228 .S "Choose portability over efficiency | 230 .S "Choose portability over efficiency |
229 .I | 231 .LP |
230 (comes from incompatible hardware in history) | 232 (Originates in a lot of incompatible hardware in history) |
231 .I | 233 .LP |
232 use is most important | 234 Use is most important |
233 .I | 235 .LP |
234 availability | 236 Availability |
235 .I | 237 .LP |
236 only needs to be fast enough | 238 Only needs to be fast enough |
237 | 239 |
238 | 240 |
239 .S "Store data in flat text files | 241 .S "Store data in flat text files |
240 .LP | 242 .LP |
241 binary data is machine dependent | 243 Binary data is machine-dependent |
242 .LP | 244 .LP |
243 human readable data is: | 245 Human readable data is: |
244 .I | 246 .I |
245 is very likely supported | 247 As generic as possible |
246 .I | 248 .I |
247 good to port | 249 Is very likely supported |
248 .I | 250 .I |
249 many tools work on it (Unix toolchest) | 251 Many tools work on it (Unix toolchest) |
250 .I | 252 .I |
251 as generic as possible | 253 Directly editable by humans |
252 .LP | 254 .LP |
253 processing needs only to be fast enough | 255 Processing needs only to be fast enough |
254 | 256 |
255 | 257 |
256 .S "Use software leverage to your advantage | 258 .S "Use software leverage to your advantage |
257 .LP | 259 .LP |
258 what do we have computers for? | 260 What do we have computers for? |
259 .LP | 261 .LP |
260 make best use of computing power | 262 Make best use of computing power |
261 .LP | 263 .LP |
262 reduce development effort | 264 Reduce development effort |
263 | 265 |
264 | 266 |
265 .S "Use shell scripts to increase leverage and portability | 267 .S "Use shell scripts to increase leverage and portability |
266 .LP | 268 .LP |
267 was very important in history | 269 Was very important in history |
268 .LP | 270 .LP |
269 high level languages | 271 High level languages |
270 .LP | 272 .LP |
271 prototyping | 273 Prototyping |
272 .LP | 274 .LP |
273 quick hacks | 275 Quick hacks |
274 | 276 |
275 | 277 |
276 .S "Avoid captive user interfaces | 278 .S "Avoid captive user interfaces |
277 .LP | 279 .LP |
278 don't assume the user to be human | 280 Don't assume the user to be human |
279 .LP | 281 .LP |
280 exclude the user whenever possible | 282 Exclude the user whenever possible |
281 .LP | 283 .LP |
282 automate | 284 Automate |
283 | 285 |
284 | 286 |
285 .S "Make every program a filter | 287 .S "Make every program a filter |
286 .LP | 288 .LP |
287 programs transform data | 289 Programs transform data |
288 .LP | 290 .LP |
289 combine programs | 291 Combine programs |
290 .LP | 292 .LP |
291 have one common interface | 293 Have one common interface |
292 | |
293 | |
294 | |
295 .S "a different POV | |
296 .I | |
297 pipes | |
298 .I | |
299 interface design | |
300 .I | |
301 the toolchest approach | |
302 .I | |
303 a powerful shell | |
304 .I | |
305 worse is better | |
306 .I | |
307 upgrowth and survival | |
308 | 294 |
309 | 295 |
310 | 296 |
311 .P "real world examples | 297 .P "real world examples |
312 | 298 |
313 | 299 |
300 .S "find -printf | |
301 .LP | |
302 How to reformat the output of find(1) to have ``FILENAME PATH'' | |
303 instead of ``PATH/FILENAME''? | |
304 | |
305 .LP | |
306 The ``easy'' way: | |
307 \f(CWfind /dir -printf "%P %h\en"\fP | |
308 | |
309 .LP | |
310 The ``good'' way: | |
311 .br | |
312 .CW "\s-1find /dir | sed 's,\e(.*\e)/\e(.*\e),\e2 \e1,' | |
313 | |
314 .LP | |
315 The difference shows off when one wants, for instance, | |
316 the path to be manipulated further. | |
317 | |
318 | |
314 .S "various | 319 .S "various |
315 .LP | 320 .LP |
316 who uses | 321 Who uses |
317 .CW "grep -R | 322 .CW "grep -R |
318 ? | 323 ? |
319 | |
320 .sp 1 | 324 .sp 1 |
321 .LP | 325 .LP |
322 .CW "cat -v | 326 .CW "cat -v |
323 | 327 |
324 .sp 1 | 328 .sp 1 |
325 .LP | 329 .LP |
326 pagers are taken for granted | 330 Pagers are taken for granted |
327 | 331 |
328 .sp 1 | 332 .sp 1 |
329 .LP | 333 .LP |
330 what about the readline? | 334 What about the readline? |
331 | 335 |
332 | |
333 | |
334 .S "find -printf | |
335 .LP | |
336 How to reformat the output of find(1) to have ``FILENAME PATH'' | |
337 instead of ``PATH/FILENAME''? | |
338 | |
339 .LP | |
340 the ``easy'' way: | |
341 \f(CWfind /dir -printf "%P %h\en"\fP | |
342 | |
343 .LP | |
344 the ``good'' way: | |
345 .br | |
346 .CW "\s-1find /dir | sed 's,\e(.*\e)/\e(.*\e),\e2 \e1,' | |
347 | |
348 .LP | |
349 The difference shows off when one wants, for instance, | |
350 the path to be manipulated further. | |
351 | 336 |
352 | 337 |
353 .S "MH / nmh | 338 .S "MH / nmh |
354 .LP | 339 .LP |
355 a Mail User Agent (MUA) | 340 A Mail User Agent (MUA) |
356 .LP | 341 .LP |
357 is a toolchest | 342 Is a toolchest |
358 .LP | 343 .LP |
359 work with mails like with generic files | 344 Work with mails like with generic files |
360 .LP | 345 .LP |
361 the only(?) MUA that follows the Unix Phil | 346 The only(?) MUA that follows the Unix Phil |
362 .LP | 347 .LP |
363 has a very special feeling | 348 Has a very special feeling |
364 | 349 |
365 | 350 |
366 .S "uzbl | 351 .S "uzbl |
367 .LP | 352 .LP |
368 a web browser that adheres to the Unix Phil | 353 A web browser that adheres to the Unix Phil |
369 .LP | 354 .LP |
370 a young project (about 1 year) | 355 A young project (about 1 year) |
371 .LP | 356 .LP |
372 central question: what is the one task a web browser covers? | 357 Central question: |
373 .LP | 358 .br |
374 makes very visible use of software leverage | 359 What is the one task a web browser covers? |
375 .LP | 360 .LP |
376 suffers hard from our broken web | 361 Makes very visible use of software leverage |
377 | 362 .LP |
378 | 363 Suffers hard from our broken web |
379 | 364 |
380 | 365 |
381 | 366 |
382 .P "more than software dev guidelines | 367 |
383 | 368 |
384 | 369 .P "Some final thoughts |
385 .S "say no | 370 |
386 .LP | 371 |
387 in today's computer world, the Unix Phil is much of asceticism | 372 .S "Say no! |
388 .LP | 373 .LP |
389 one needs to abjure a lot of ``nice'' features | 374 In today's computer world, the Unix Phil is often asceticism |
375 .LP | |
376 One needs to abjure a lot of ``nice'' features | |
377 .LP | |
378 Actually it is abjuring the bad solutions | |
390 .LP | 379 .LP |
391 IMO that leads to a valuable attitude | 380 IMO that leads to a valuable attitude |
392 | 381 .LP |
393 | 382 .sp 2 |
394 .S "avoid complexity | 383 Transfer it to your everyday life |
395 .LP | 384 |
396 avoid complexity first and foremost | 385 |
397 .LP | 386 .S "Avoid complexity |
398 complexity is the ``boss enemy'', software developers fight against | 387 .LP |
399 .LP | 388 Avoid complexity first and foremost |
400 strive for simplicity, clarity, generality | 389 .LP |
401 | 390 Complexity is the ``boss enemy'', software developers fight against |
402 | 391 .LP |
403 .S "good solutions | 392 Strive for simplicity, clarity, generality |
404 .LP | 393 .LP |
405 we don't need just solutions, we need good ones | 394 .sp 2 |
406 .LP | 395 Transfer it to your everyday life |
407 today, we can make almost everything possible, | 396 |
397 | |
398 .S "Good solutions | |
399 .LP | |
400 We don't need just solutions, we need good ones | |
401 .LP | |
402 Today, we can make almost everything possible, | |
408 but we still cannot make it good | 403 but we still cannot make it good |
409 | 404 .LP |
410 | 405 .sp 2 |
411 .S "live it | 406 Transfer it to your everyday life |
412 .LP | 407 |
413 the Unix Phil is not just a few guidelines | 408 |
414 .LP | 409 .S "Live it! |
415 you cannot follow just some of the tenets | 410 .LP |
416 .LP | 411 The Unix Phil is not just a few guidelines |
417 you will not understand the Unix Phil when you don't engage with it | 412 .LP |
413 You cannot follow just some of the tenets | |
414 .LP | |
415 You will not understand the Unix Phil when you don't engage with it | |
418 .sp 3 | 416 .sp 3 |
419 .LP | 417 .LP |
420 .ce | 418 .ce |
421 it's a philosophy \(en live it! | 419 It's a philosophy \(en live it! |
422 | 420 |
423 | 421 |
424 | 422 |
425 .P "literature | 423 .P "Appendix |
426 | 424 |
427 | 425 |
428 .S literature | 426 .S Literature |
429 .I | 427 .I |
430 ``\fBThe Unix Philosophy\fP'' | 428 ``\fBThe Unix Philosophy\fP'' |
431 by Mike Gancarz | 429 by Mike Gancarz |
432 .br | 430 .br |
433 Go and get it! | 431 Go and get it! |
454 A must-read. | 452 A must-read. |
455 | 453 |
456 | 454 |
457 .S | 455 .S |
458 .LP | 456 .LP |
459 this talk was prepared using tools of the Heirloom project: | 457 This talk was prepared using tools of the Heirloom project: |
460 .CW \s-2http://heirloom.sf.net\s+2 | 458 .CW \s-2http://heirloom.sf.net\s+2 |
461 .LP | 459 .LP |
462 the slides macros are based on | 460 The slides macros are based on |
463 .br | 461 .br |
464 .CW \s-2http://repo.cat-v.org/troff-slider/\s+2 | 462 .CW \s-2http://repo.cat-v.org/troff-slider/\s+2 |
465 .sp | 463 .sp |
466 | 464 |
467 .LP | 465 .LP |
468 the slides are available on my website | 466 The slides are available on my website |
469 .CW \s-2http://marmaro.de/docs\s+2 | 467 .CW \s-2http://marmaro.de/docs\s+2 |
470 and on | 468 and on |
471 .CW \s-2http://ulm.ccc.de/ChaosSeminar/\s+2 | 469 .CW \s-2http://ulm.ccc.de/ChaosSeminar/\s+2 |
472 .sp | 470 .sp |
473 | 471 .LP |
472 See my paper on the topic, too. | |
473 | |
474 .sp 2 | |
474 2010-03-08 | 475 2010-03-08 |