-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
645 lines (523 loc) · 20.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The Pragmatic Programmer: From Journeyman to Master</title>
<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
<meta name="author" content="Hakim El Hattab">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/black.css" id="theme">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<h1>The Pragmatic Programmer</h1>
<h3>From Journeyman to Master</h3>
<p>
<small><a href="http://twitter.com/rodolfoprr">@rodolfoprr</a></small>
</p>
</section>
<section>
<h2>O livro</h2>
<ol>
<li>A Pragmatic Philosophy</li>
<li>A Pragmatic Approach</li>
<li>The Basic Tools</li>
<li>Programatic Paranoia</li>
<li>Bend or Break</li>
<li>While You Are Coding</li>
<li>Before the Project</li>
<li>Pragmatic Projects</li>
</ol>
</section>
<section>
<img data-src="img/capa-livro.jpg" >
<blockquote>
This book will help you become a better programmer.
</blockquote>
</section>
<section>
<img data-src="img/trabalho-dificil.gif" >
<blockquote>
It's a difficult job.
</blockquote>
</section>
<section>
<h2>
What Makes a Pragmatic Programmer?
</h2>
<ul>
<li>Early adopter/fast adapter;</li>
<li>Inquisitive;</li>
<li>Critical thinker;</li>
<li>Realistic;</li>
<li>Jack of all trades.</li>
</ul>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#1 Care About Your Craft</h2>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#2 Think! About Your Work</h2>
</section>
<section>
<h3>
Chapter 1
</h3>
<h2> A Pragmatic Philosophy</h2>
</section>
<section>
<img data-src="img/gato-comeu-codigofonte.jpg" >
<h3>The Cat Ate My Source Code</h3>
</section>
<section>
<blockquote>
We can be proud of our abilities, but we must be honest about our shortcomings—our ignorance as well as our mistakes
</blockquote>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#3 Provide Options, Don't Make Lame Excuses</h2>
</section>
<section>
<img data-src="img/janela-quebrada.jpg" >
<h3>Software Entropy</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#4 Don't Live with Broken Windows</h2>
</section>
<section>
<img data-src="img/frogs.jpeg" >
<h3>Stone Soup and Boiled Frogs</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#5 Be a Catalyst for Change</h2>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#6 Remember the Big Picture</h2>
</section>
<section>
<img data-src="img/parece-bao.jpg" >
<h3>Good-Enough Software</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#7 Make Quality a Requirements Issue</h2>
</section>
<section>
<img data-src="img/code-languages.jpg" >
<h3>Your Knowledge Portfolio</h3>
</section>
<section>
<h3>Building Your Portfolio</h3>
<ul>
<li>Invest regularly;</li>
<li>Diversify;</li>
<li>Manage risk;</li>
<li>Buy low, sell high;</li>
<li>Review and rebalance.</li>
</ul>
</section>
<section>
<h3>Goals</h3>
<ul>
<li>Learn at least one new language every year;</li>
<li>Read a technical book each quarter;</li>
<li>Read nontechnical books, too;</li>
<li>Take classes;</li>
<li>Participate in local user groups;</li>
<li>Experiment with different environments;</li>
<li>Stay current;</li>
<li>Get wired.</li>
</ul>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#8 Critically Analyze What You Read and Hear</h2>
</section>
<section>
<img data-src="img/comunicacao.jpg" >
<h3>Communicate!</h3>
</section>
<section>
<ul>
<li>Know What You Want to Say;</li>
<li>Know Your Audience;</li>
<li>Choose Your Moment;</li>
<li>Choose a Style;</li>
<li>Make It Look Good;</li>
<li>Involve Your Audience;</li>
<li>Be a Listener;</li>
<li>Get Back to People.</li>
</ul>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#9 It's Both What You Say and the Way You Say It</h2>
</section>
<section>
<h3>
Chapter 2
</h3>
<h2>A Pragmatic Approach</h2>
</section>
<section>
<img data-src="img/dry.jpg" >
<h3>The Evils of Duplication</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#10 DRY - Don't Repeat Yourself</h2>
</section>
<section>
<h3>How Does Duplication Arise?</h3>
<ul>
<li>Imposed duplication;</li>
<li>Inadvertent duplication;</li>
<li>Impatient duplication;</li>
<li>Interdeveloper duplication.</li>
</ul>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#11 Make It Easy to Reuse</h2>
</section>
<section>
<img data-src="img/orthogonality.gif" >
<h3>Orthogonality</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#12 Eliminate Effects Between Unrelated Things</h2>
</section>
<section>
<img data-src="img/Reversibility.jpg" >
<h3>Reversibility</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#13 There Are No Final Decisions</h2>
</section>
<section>
<img data-src="img/Prototype.jpg" >
<h3>Prototypes and Post-it Notes</h3>
</section>
<section>
<h3>You can prototype</h3>
<ul>
<li>Architecture;</li>
<li>New functionality in an existing system;</li>
<li>Structure or contents of external data;</li>
<li>Third-party tools or components;</li>
<li>Performance issue;</li>
<li>User interface design.</li>
</ul>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#14 Prototype to Learn</h2>
</section>
<section>
<h3>What details can you ignore</h3>
<ul>
<li>Correctness;</li>
<li>Completeness;</li>
<li>Robustness;</li>
<li>Style.</li>
</ul>
</section>
<section>
<img data-src="img/domain.jpg" >
<h3>Domain Languages</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#15 Program Close to the Problem domain</h2>
</section>
<section>
<h3>
Chapter 3
</h3>
<h2>The Basic Tools</h2>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#16 Use the Power of Command Shells</h2>
</section>
<section>
<h3>WYSIWYG vs. WYSIAYG</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#17 Use a Single Editor Well</h2>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#18 Always Use Source Code Control</h2>
</section>
<section>
<img data-src="img/Debugging.jpg" >
<h3>Debugging</h3>
</section>
<section>
<h3>Psychology of Debugging</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#19 Fix the Problem, Not the Blame</h2>
</section>
<section>
<h3>A Debugging Mindset</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#20 Don't Panic</h2>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#21 Don't Assume It—Prove It</h2>
</section>
<section>
<h3>Debugging Checklist</h3>
<ul>
<li>Is the problem being reported a direct result of the underlying bug, or merely a symptom?</li>
<li>Is the bug really in the compiler? Is it in the OS? Or is it in your code?</li>
<li>If you explained this problem in detail to a coworker, what would you say?</li>
<li>If the suspect code passes its unit tests, are the tests complete enough? What happens if you run the unit test with this data?</li>
<li>Do the conditions that caused this bug exist anywhere else in the system?</li>
</ul>
</section>
<section>
<h3>
Chapter 4
</h3>
<h2>Pragmatic Paranoia</h2>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#22 You Can't Write Perfect Software</h2>
<p>Did that hurt? It shouldn't. Accept it as an axiom of life. Embrace it. Celebrate it. Because perfect software doesn't exist. No one in the brief history of computing has ever written a
piece of perfect software.</p>
</section>
<section>
<img data-src="img/contract.jpg" >
<h3>Design by Contract</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#23 Design with Contracts</h2>
</section>
<section>
<img data-src="img/liskov.jpg" >
<h3>Liskov Substitution Principle</h3>
</section>
<section>
<img data-src="img/exception.jpg" >
<h3>When to Use Exceptions</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#24 Use Exceptions for Exceptional Problems</h2>
</section>
<section>
<h3>How to Balance Resources</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#25 Finish What You Start</h2>
</section>
<section>
<h3>
Chapter 5
</h3>
<h2>Bend or Break</h2>
</section>
<section>
<img data-src="img/demeter.jpg" >
<h3>Decoupling and the Law of Demeter</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#26 Minimize Coupling Between Modules</h2>
</section>
<section>
<img data-src="img/view.jpg" >
<h3>It's Just a View</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#27 Separate Views from Models</h2>
</section>
<section>
<h3>
Chapter 6
</h3>
<h2>While You Are Coding</h2>
</section>
<section>
<img data-src="img/Coincidence.jpg" >
<h3>Programming by Coincidence</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#28 Don't Program by Coincidence</h2>
</section>
<section>
<h3>How to Program Deliberately</h3>
<ul>
<li>Always be aware of what you are doing;</li>
<li>Don't code blindfolded;</li>
<li>Proceed from a plan;</li>
<li>Rely only on reliable things;</li>
<li>Don't just test your code, but test your assumptions as well;</li>
<li>Prioritize your effort;</li>
<li>Don't be a slave to history.</li>
</ul>
</section>
<section>
<p>Do you really think this code needs refactoring? It works good…</p>
<img data-src="img/Refactoring.gif" >
<h3>Refactoring</h3>
</section>
<section>
<h3>When Should You Refactor?</h3>
<ul>
<li>Duplication;</li>
<li>Nonorthogonal design;</li>
<li>Outdated knowledge;</li>
<li>Performance.</li>
</ul>
</section>
<section>
<h3>Real-World Complications</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#29 Refactor Early, Refactor Often</h2>
</section>
<section>
<h3>Tips</h3>
<ul>
<li>Don't try to refactor and add functionality at the same time;</li>
<li>Make sure you have good tests before you begin refactoring;</li>
<li>Take short, deliberate steps.</li>
</ul>
</section>
<section>
<img data-src="img/test.png" >
<h3>Code That's Easy to Test</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#30 Design to Test</h2>
</section>
<section>
<h3>Test harnesses should include the following capabilities</h3>
<ul>
<li>A standard way to specify setup and cleanup</li>
<li>A method for selecting individual tests or all available tests;</li>
<li>A means of analyzing output for expected (or unexpected) result;</li>
<li>A standardized form of failure reporting.</li>
</ul>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#31 Test Your Software, or Your Users Will</h2>
</section>
<section>
<img data-src="img/Wizards.jpg" >
<h3>Evil Wizards</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#32 Don't Use Wizard Code You Don't Understand</h2>
</section>
<section>
<h3>
Chapter 7
</h3>
<h2>Before the Project</h2>
</section>
<section>
<img data-src="img/Requirements.jpg" >
<h3>The Requirements Pit</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#33 Don't Gather Requirements—Dig for Them</h2>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#34 Work with a User to Think Like a User</h2>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#35 Use a Project Glossary</h2>
</section>
<section>
<img data-src="img/rsg.jpg" >
<h3>Not Until You're Ready</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#36 Listen to Nagging Doubts—Start When You're Ready</h2>
</section>
<section>
<h3>Good Judgment or Procrastination?</h3>
</section>
<section>
<img data-src="img/trap.gif" >
<h3>The Specification Trap</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#37 Some Things Are Better Done than Described</h2>
</section>
<section>
<h3>
Chapter 8
</h3>
<h2>Pragmatic Projects</h2>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#38 Organize Around Functionality, Not Job Functions</h2>
</section>
<section>
<img data-src="img/test.png" >
<h3>Ruthless Testing</h3>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#39 Test Early. Test Often. Test Automatically</h2>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h2>#40 Coding Ain't Done 'Til All the Tests Run</h2>
</section>
<section>
<h3>What to Test</h3>
<ul>
<li>Unit testing;</li>
<li>Integration testing;</li>
<li>Validation and verification;</li>
<li>Resource exhaustion, errors, and recovery;</li>
<li>Performance testing;</li>
<li>Usability testing.</li>
</ul>
</section>
<section>
<img data-src="img/yoda.jpg" >
</section>
<section>
<h3>Obrigado.</h3>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// Optional reveal.js plugins
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>