comparison unix-phil-slides.ms @ 28:faff9ea75591 cs talk version

more rework
author meillo@marmaro.de
date Mon, 08 Mar 2010 16:31:52 +0100
parents e8adc3571e8c
children
comparison
equal deleted inserted replaced
27:e8adc3571e8c 28:faff9ea75591
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 good/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 Background
32 .I 32 .I
33 What is the Unix Phil? 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 Real world examples
38 .I 38 .I
39 The Unix Phil is more than software dev guidelines 39 Final thoughts
40 40
41 41
42 42
43 .S "How I learned about it 43
44 .P "Background
45
46
47
48 .S "How I met the Unix Phil
44 .LP 49 .LP
45 First contact through dwm (suckless project) 50 First contact through dwm (suckless project)
46 .LP 51 .LP
47 ``cat -v Considered Harmful'' 52 ``cat -v Considered Harmful''
48 .LP 53 .LP
49 ``The Unix and the Echo'' 54 ``The Unix and the Echo''
50 .LP 55 .LP
51 ``The Unix Programming Environment'' 56 ``The Unix Programming Environment''
57 .LP
52 .sp 1 58 .sp 1
53 .LP
54 Better understanding through digging in the past 59 Better understanding through digging in the past
55 60
56 61
57
58
59
60 .P "Historical background
61
62
63
64
65 .S "Historical background 62 .S "Historical background
66 .LP 63 .LP
67 The late 60s and early 70s 64 The late 60s and early 70s
68 .LP 65 .LP
69 Operating systems are complex 66 Operating systems are complex
86 Made simple operating systems possible 83 Made simple operating systems possible
87 .LP 84 .LP
88 It is not covered by the Unix Phil 85 It is not covered by the Unix Phil
89 .br 86 .br
90 The Unix Phil is on a different level 87 The Unix Phil is on a different level
91 .sp 2 88 .LP
92 .LP 89 .sp 2
93 Unix is mainly two things: 90 Unix is mainly two things:
94 .I 91 .I
95 An operating system (system calls) 92 An operating system (system calls)
96 .I 93 .I
97 A toolchest (coreutils) 94 A toolchest (coreutils)
211 .LP 208 .LP
212 One thing is easier to understand 209 One thing is easier to understand
213 .LP 210 .LP
214 Often straight forward to implement 211 Often straight forward to implement
215 .LP 212 .LP
213 Toolchests
214 .LP
216 Reusable 215 Reusable
217 216
218 217
219 .S "Build a prototype as soon as possible 218 .S "Build a prototype as soon as possible
220 .LP 219 .LP
223 Shows the problems of the software 222 Shows the problems of the software
224 .LP 223 .LP
225 The best way to shape a software 224 The best way to shape a software
226 .LP 225 .LP
227 Users find bugs 226 Users find bugs
227 .LP
228 Incremental development
228 229
229 230
230 .S "Choose portability over efficiency 231 .S "Choose portability over efficiency
231 .LP 232 .LP
232 (Originates in a lot of incompatible hardware in history) 233 (Originates in a lot of incompatible hardware in history)
238 Only needs to be fast enough 239 Only needs to be fast enough
239 240
240 241
241 .S "Store data in flat text files 242 .S "Store data in flat text files
242 .LP 243 .LP
244 (originally: ``Store numerical data in flat ASCII files'')
245 .LP
243 Binary data is machine-dependent 246 Binary data is machine-dependent
244 .LP 247 .LP
245 Human readable data is: 248 Human readable data is:
246 .I 249 .I
247 As generic as possible 250 As generic as possible
260 What do we have computers for? 263 What do we have computers for?
261 .LP 264 .LP
262 Make best use of computing power 265 Make best use of computing power
263 .LP 266 .LP
264 Reduce development effort 267 Reduce development effort
268 .LP
269 Toolchests and a powerful shell
265 270
266 271
267 .S "Use shell scripts to increase leverage and portability 272 .S "Use shell scripts to increase leverage and portability
268 .LP 273 .LP
269 Was very important in history 274 Was very important in history
271 High level languages 276 High level languages
272 .LP 277 .LP
273 Prototyping 278 Prototyping
274 .LP 279 .LP
275 Quick hacks 280 Quick hacks
281 .LP
282 Users are ``programmers''
276 283
277 284
278 .S "Avoid captive user interfaces 285 .S "Avoid captive user interfaces
279 .LP 286 .LP
280 Don't assume the user to be human 287 Don't assume the user to be human
281 .LP 288 .LP
282 Exclude the user whenever possible 289 Exclude the user whenever possible
283 .LP 290 .LP
284 Automate 291 Automate
292 .LP
293 How does it scale?
294 .LP
295 Bloat
285 296
286 297
287 .S "Make every program a filter 298 .S "Make every program a filter
288 .LP 299 .LP
289 Programs transform data 300 Programs transform data
290 .LP 301 .LP
291 Combine programs 302 Combine programs
292 .LP 303 .LP
293 Have one common interface 304 Have one common interface
305 .LP
306 Toolchests
294 307
295 308
296 309
297 .P "real world examples 310 .P "real world examples
298 311
299 312
300 .S "find -printf 313 .S "find -printf
301 .LP 314 .LP
302 How to reformat the output of find(1) to have ``FILENAME PATH'' 315 How to reformat the output of find(1) to have ``FILENAME PATH''
303 instead of ``PATH/FILENAME''? 316 instead of ``PATH/FILENAME''?
304
305 .LP 317 .LP
306 The ``easy'' way: 318 The ``easy'' way:
307 \f(CWfind /dir -printf "%P %h\en"\fP 319 \f(CWfind /dir -printf "%P %h\en"\fP
308
309 .LP 320 .LP
310 The ``good'' way: 321 The ``good'' way:
311 .br 322 .br
312 .CW "\s-1find /dir | sed 's,\e(.*\e)/\e(.*\e),\e2 \e1,' 323 .CW "\s-1find /dir | sed 's,\e(.*\e)/\e(.*\e),\e2 \e1,'
313
314 .LP 324 .LP
315 The difference shows off when one wants, for instance, 325 The difference shows off when one wants, for instance,
316 the path to be manipulated further. 326 the path to be manipulated further.
317 327 .LP
318 328 .sp 3
319 .S "various 329 Source (in German):
330 .CW "\s-1http://debianforum.de/forum/viewtopic.php?t=117683
331
332
333 .S "Various
320 .LP 334 .LP
321 Who uses 335 Who uses
322 .CW "grep -R 336 .CW "grep -R
323 ? 337 ?
324 .sp 1 338 .sp 1
364 378
365 379
366 380
367 381
368 382
369 .P "Some final thoughts 383 .P "Final thoughts
370 384
371 385
372 .S "Say no! 386 .S "Say no
373 .LP 387 .LP
374 In today's computer world, the Unix Phil is often asceticism 388 In today's computer world, following the Unix Phil means often asceticism
375 .LP 389 .LP
376 One needs to abjure a lot of ``nice'' features 390 One needs to abjure a lot of ``nice'' features
377 .LP 391 .LP
378 Actually it is abjuring the bad solutions 392 Actually, it is abjuring the *bad* features
379 .LP 393 .LP
380 IMO that leads to a valuable attitude 394 Leads to a valuable attitude, IMO
381 .LP 395 .LP
382 .sp 2 396 .sp 2
383 Transfer it to your everyday life 397 Transfer it to your everyday life
384 398
385 399
404 .LP 418 .LP
405 .sp 2 419 .sp 2
406 Transfer it to your everyday life 420 Transfer it to your everyday life
407 421
408 422
409 .S "Live it! 423 .S "Live it
410 .LP 424 .LP
411 The Unix Phil is not just a few guidelines 425 The Unix Phil is more than just a few guidelines
412 .LP 426 .LP
413 You cannot follow just some of the tenets 427 You cannot follow only some of the tenets
414 .LP 428 .LP
415 You will not understand the Unix Phil when you don't engage with it 429 To understand the Unix Phil, you need to engage with it
416 .sp 3 430 .LP
417 .LP 431 .sp 4
418 .ce 432 .ce
433 .B
419 It's a philosophy \(en live it! 434 It's a philosophy \(en live it!
420 435
421 436
422 437
423 .P "Appendix 438
439
440 .P "References
424 441
425 442
426 .S Literature 443 .S Literature
427 .I 444 .I
428 ``\fBThe Unix Philosophy\fP'' 445 ``\fBThe Unix Philosophy\fP''
434 by Kernighan and Pike 451 by Kernighan and Pike
435 .br 452 .br
436 A Bible for Unix-lovers. 453 A Bible for Unix-lovers.
437 .I 454 .I
438 ``\fBThe Mythical Man-Month\fP'' 455 ``\fBThe Mythical Man-Month\fP''
456 and ``\fBNo Silver Bullet\fP''
439 by Fred Brooks 457 by Fred Brooks
440 .br 458 .br
441 The case about complexity. 459 About complexity in software development.
442 .I 460 .I
443 ``\fBThe Practice of Programming\fP'' 461 ``\fBThe Practice of Programming\fP''
444 by Kernighan and Pike 462 by Kernighan and Pike
445 .br 463 .br
446 How good code should look like. 464 How good code should look like.