-
Notifications
You must be signed in to change notification settings - Fork 1
/
talk.html
401 lines (368 loc) · 21 KB
/
talk.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
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui"><title>Writing Production Software</title><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/reset.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/reveal.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/theme/black.css" id="theme"><!--This CSS is generated by the Asciidoctor reveal.js converter to further integrate AsciiDoc's existing semantic with reveal.js--><style type="text/css">.reveal div.right{float:right}
/* listing block */
.reveal .listingblock.stretch>.content{height: 100%}
.reveal .listingblock.stretch>.content>pre{height: 100%}
.reveal .listingblock.stretch>.content>pre>code{height:100%;max-height:100%}
/* tables */
table{border-collapse:collapse;border-spacing:0}
table{margin-bottom:1.25em;border:solid 1px #dedede}
table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;text-align:left}
table tr th,table tr td{padding:.5625em .625em;font-size:inherit}
table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6}
td.tableblock>.content{margin-bottom:1.25em}
td.tableblock>.content>:last-child{margin-bottom:-1.25em}
table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
table.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{border-width:0 1px 1px 0}
table.grid-all>tfoot>tr>.tableblock{border-width:1px 1px 0 0}
table.grid-cols>*>tr>.tableblock{border-width:0 1px 0 0}
table.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px}
table.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0}
table.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0}
table.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0}
table.frame-all{border-width:1px}
table.frame-sides{border-width:0 1px}
table.frame-topbot,table.frame-ends{border-width:1px 0}
.reveal table th.halign-left,.reveal table td.halign-left{text-align:left}
.reveal table th.halign-right,.reveal table td.halign-right{text-align:right}
.reveal table th.halign-center,.reveal table td.halign-center{text-align:center}
.reveal table th.valign-top,.reveal table td.valign-top{vertical-align:top}
.reveal table th.valign-bottom,.reveal table td.valign-bottom{vertical-align:bottom}
.reveal table th.valign-middle,.reveal table td.valign-middle{vertical-align:middle}
table thead th,table tfoot th{font-weight:bold}
tbody tr th{display:table-cell;line-height:1.6}
tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{font-weight:bold}
thead{display:table-header-group}
.reveal table.grid-none th,.reveal table.grid-none td{border-bottom:0!important}
/* kbd macro */
kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
.keyseq kbd:first-child{margin-left:0}
.keyseq kbd:last-child{margin-right:0}
/* callouts */
.conum[data-value] {display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:50%;border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
.conum[data-value] *{color:#fff!important}
.conum[data-value]+b{display:none}
.conum[data-value]:after{content:attr(data-value)}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}
/* Callout list */
.hdlist>table,.colist>table{border:0;background:none}
.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
td.hdlist1{font-weight:bold;padding-bottom:1.25em}
/* Disabled from Asciidoctor CSS because it caused callout list to go under the
* source listing when .stretch is applied (see #335)
* .literalblock+.colist,.listingblock+.colist{margin-top:-.5em} */
.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
.colist td:not([class]):first-child img{max-width:none}
.colist td:not([class]):last-child{padding:.25em 0}
/* Override Asciidoctor CSS that causes issues with reveal.js features */
.reveal .hljs table{border: 0}
/* Callout list rows would have a bottom border with some reveal.js themes (see #335) */
.reveal .colist>table th, .reveal .colist>table td {border-bottom:0}
/* Fixes line height with Highlight.js source listing when linenums enabled (see #331) */
.reveal .hljs table thead tr th, .reveal .hljs table tfoot tr th, .reveal .hljs table tbody tr td, .reveal .hljs table tr td, .reveal .hljs table tfoot tr td{line-height:inherit}
/* Columns layout */
.columns .slide-content {
display: flex;
}
.columns.wrap .slide-content {
flex-wrap: wrap;
}
.columns.is-vcentered .slide-content {
align-items: center;
}
.columns .slide-content > .column {
display: block;
flex-basis: 0;
flex-grow: 1;
flex-shrink: 1;
padding: .75rem;
}
.columns .slide-content > .column.is-full {
flex: none;
width: 100%;
}
.columns .slide-content > .column.is-four-fifths {
flex: none;
width: 80%;
}
.columns .slide-content > .column.is-three-quarters {
flex: none;
width: 75%;
}
.columns .slide-content > .column.is-two-thirds {
flex: none;
width: 66.6666%;
}
.columns .slide-content > .column.is-three-fifths {
flex: none;
width: 60%;
}
.columns .slide-content > .column.is-half {
flex: none;
width: 50%;
}
.columns .slide-content > .column.is-two-fifths {
flex: none;
width: 40%;
}
.columns .slide-content > .column.is-one-third {
flex: none;
width: 33.3333%;
}
.columns .slide-content > .column.is-one-quarter {
flex: none;
width: 25%;
}
.columns .slide-content > .column.is-one-fifth {
flex: none;
width: 20%;
}
</style><!--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 ) ? "https://cdn.jsdelivr.net/npm/[email protected]/css/print/pdf.css" : "https://cdn.jsdelivr.net/npm/[email protected]/css/print/paper.css";
document.getElementsByTagName( 'head' )[0].appendChild( link );</script></head><body><div class="reveal"><div class="slides"><section class="title" data-state="title"><h1>Writing Production Software</h1></section><section id="_production"><h2>„production“</h2><div class="slide-content"><div class="paragraph"><p>The code (and the platform it runs on) that, if it stops working, means that your product stops working, and your business has a problem.</p></div></div></section>
<section id="_who_me"><h2>Who? Me?</h2><div class="slide-content"><div class="paragraph"><p>Christian Schramm</p></div></div></section>
<section id="_story_paralysis_by_fear"><h2>Story: Paralysis by fear</h2></section>
<section id="_why_even_be_afraid"><h2>Why even be afraid?</h2><div class="slide-content"><div class="ulist"><ul><li><p>Development is change.</p></li><li><p>Change means things can break.</p></li><li><p>Production breakage can be really, really bad.</p></li></ul></div></div></section>
<section id="_fear_free_software_development"><h2>Fear-Free Software Development</h2><div class="slide-content"><div class="paragraph"><p>Good production software is the result of a <em>fear-free software development</em> culture and process.</p></div></div></section>
<section id="_what_not_to_do_predicting_know_the_future"><h2>What <em>not</em> to do: Predicting know the future</h2><div class="slide-content"><div class="paragraph"><p>You don’t control business requirements.</p></div></div></section>
<section id="_story_the_generic_data_converter_for_apis"><h2>Story: The generic data converter for APIs</h2></section>
<section id="_dont_generalize_the_problem"><h2>Don’t generalize the problem</h2><div class="slide-content"><div class="paragraph"><p>Solve it. Abstraction is debt. Don’t generalize to procrastinate.</p></div></div></section>
<section id="_example_error_handling"><h2>Example: Error handling</h2><div class="slide-content"><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-python" data-lang="python">try:
result = requests.get(url, raise_for_status=True)
except HTTPError as e:
logging.error("request failed with status %s", e.status)
raise</code></pre></div></div></div></section>
<section id="_dont_write_error_handling_code"><h2>Don’t write error-handling code</h2><div class="slide-content"><div class="paragraph"><p>The breakage you can anticipate is most likely not your problem.</p></div></div></section>
<section id="_example_the_good_old_code"><h2>Example: The good old code</h2><div class="slide-content"><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-python" data-lang="python">if config.OLD_BEHAVIOUR:
...
else:
...</code></pre></div></div></div></section>
<section id="_dont_carry_around_old_code_or_behavior"><h2>Don’t carry around old code or behavior</h2><div class="slide-content"><div class="paragraph"><p>And don’t make runtime switches for behaviour change.</p></div></div></section>
<section id="_what_to_do"><h2>What to do</h2></section>
<section id="_make_sure_your_deployment_process_is_a_joy"><h2>Make sure your deployment process is a joy</h2><div class="slide-content"><div class="paragraph"><p>Because that’s where <em>change</em> is supposed to happen.</p></div></div></section>
<section id="_story_too_many_products"><h2>Story: Too many products</h2></section>
<section id="_if_it_can_fail_make_it_fail_right_now"><h2>If it can fail, make it fail <em>right now</em></h2></section>
<section id="_make_it_easy_to_reason_about"><h2>Make it easy to reason about</h2><div class="slide-content"><div class="paragraph"><p>That’s often more an issue of application design than code quality.</p></div></div></section>
<section id="_example_task_restart"><h2>Example: Task restart</h2></section>
<section id="_make_operations_idempotent"><h2>Make operations idempotent</h2><div class="slide-content"><div class="paragraph"><p>It should not make a difference it you execute an operation once or more. Test it.</p></div></div></section>
<section id="_example_state_exchange_between_tasks"><h2>Example: State exchange between tasks</h2></section>
<section id="_design_around_state_transparency"><h2>Design around state transparency</h2><div class="slide-content"><div class="paragraph"><p>You should always be able to tell the exact state of your entire application, <em>right now</em>.</p></div></div></section>
<section id="_summing_up_fear_free_software_development"><h2>Summing up Fear-Free Software Development</h2><div class="slide-content"><div class="ulist"><ul><li><p>Think about the future, but don’t try to predict it.</p></li><li><p>Strife to make the present code and application state easy to reason about.</p></li><li><p>Make sure changes (and failures) happen at deployment time.</p></li></ul></div></div></section>
<section id="_applying_the_principles_of_ffsd"><h2>Applying the principles of FFSD</h2><div class="slide-content"><div class="ulist"><ul><li><p>get your team on board</p></li><li><p>Get your product owner on board</p></li><li><p>Integrate it into your agile process</p></li><li><p>Integrate it in your <em>definition of done</em></p></li></ul></div></div></section>
<section id="_thanks"><h2>Thanks!</h2></section></div></div><script src="https://cdn.jsdelivr.net/npm/[email protected]/js/reveal.js"></script><script>Array.prototype.slice.call(document.querySelectorAll('.slides section')).forEach(function(slide) {
if (slide.getAttribute('data-background-color')) return;
// user needs to explicitly say he wants CSS color to override otherwise we might break custom css or theme (#226)
if (!(slide.classList.contains('canvas') || slide.classList.contains('background'))) return;
var bgColor = getComputedStyle(slide).backgroundColor;
if (bgColor !== 'rgba(0, 0, 0, 0)' && bgColor !== 'transparent') {
slide.setAttribute('data-background-color', bgColor);
slide.style.backgroundColor = 'transparent';
}
});
// More info about config & dependencies:
// - https://github.com/hakimel/reveal.js#configuration
// - https://github.com/hakimel/reveal.js#dependencies
Reveal.initialize({
// Display presentation control arrows
controls: true,
// Help the user learn the controls by providing hints, for example by
// bouncing the down arrow when they first encounter a vertical slide
controlsTutorial: true,
// Determines where controls appear, "edges" or "bottom-right"
controlsLayout: 'bottom-right',
// Visibility rule for backwards navigation arrows; "faded", "hidden"
// or "visible"
controlsBackArrows: 'faded',
// Display a presentation progress bar
progress: true,
// Display the page number of the current slide
slideNumber: false,
// Control which views the slide number displays on
showSlideNumber: 'all',
// Add the current slide number to the URL hash so that reloading the
// page/copying the URL will return you to the same slide
hash: false,
// Push each slide change to the browser history. Implies `hash: true`
history: false,
// Enable keyboard shortcuts for navigation
keyboard: true,
// Enable the slide overview mode
overview: true,
// Vertical centering of slides
center: true,
// Enables touch navigation on devices with touch input
touch: true,
// Loop the presentation
loop: false,
// Change the presentation direction to be RTL
rtl: false,
// See https://github.com/hakimel/reveal.js/#navigation-mode
navigationMode: 'default',
// Randomizes the order of slides each time the presentation loads
shuffle: false,
// Turns fragments on and off globally
fragments: true,
// Flags whether to include the current fragment in the URL,
// so that reloading brings you to the same fragment position
fragmentInURL: false,
// Flags if the presentation is running in an embedded mode,
// i.e. contained within a limited portion of the screen
embedded: false,
// Flags if we should show a help overlay when the questionmark
// key is pressed
help: true,
// Flags if speaker notes should be visible to all viewers
showNotes: false,
// Global override for autolaying embedded media (video/audio/iframe)
// - null: Media will only autoplay if data-autoplay is present
// - true: All media will autoplay, regardless of individual setting
// - false: No media will autoplay, regardless of individual setting
autoPlayMedia: null,
// Global override for preloading lazy-loaded iframes
// - null: Iframes with data-src AND data-preload will be loaded when within
// the viewDistance, iframes with only data-src will be loaded when visible
// - true: All iframes with data-src will be loaded when within the viewDistance
// - false: All iframes with data-src will be loaded only when visible
preloadIframes: null,
// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoslide attribute on your slides
autoSlide: 0,
// Stop auto-sliding after user input
autoSlideStoppable: true,
// Use this method for navigation when auto-sliding
autoSlideMethod: Reveal.navigateNext,
// Specify the average time in seconds that you think you will spend
// presenting each slide. This is used to show a pacing timer in the
// speaker view
defaultTiming: 120,
// Specify the total time in seconds that is available to
// present. If this is set to a nonzero value, the pacing
// timer will work out the time available for each slide,
// instead of using the defaultTiming value
totalTime: 0,
// Specify the minimum amount of time you want to allot to
// each slide, if using the totalTime calculation method. If
// the automated time allocation causes slide pacing to fall
// below this threshold, then you will see an alert in the
// speaker notes window
minimumTimePerSlide: 0,
// Enable slide navigation via mouse wheel
mouseWheel: false,
// Hide cursor if inactive
hideInactiveCursor: true,
// Time before the cursor is hidden (in ms)
hideCursorTime: 5000,
// Hides the address bar on mobile devices
hideAddressBar: true,
// Opens links in an iframe preview overlay
// Add `data-preview-link` and `data-preview-link="false"` to customise each link
// individually
previewLinks: false,
// Transition style (e.g., none, fade, slide, convex, concave, zoom)
transition: 'slide',
// Transition speed (e.g., default, fast, slow)
transitionSpeed: 'default',
// Transition style for full page slide backgrounds (e.g., none, fade, slide, convex, concave, zoom)
backgroundTransition: 'fade',
// Number of slides away from the current that are visible
viewDistance: 3,
// Number of slides away from the current that are visible on mobile
// devices. It is advisable to set this to a lower number than
// viewDistance in order to save resources.
mobileViewDistance: 3,
// Parallax background image (e.g., "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'")
parallaxBackgroundImage: '',
// Parallax background size in CSS syntax (e.g., "2100px 900px")
parallaxBackgroundSize: '',
// Number of pixels to move the parallax background per slide
// - Calculated automatically unless specified
// - Set to 0 to disable movement along an axis
parallaxBackgroundHorizontal: null,
parallaxBackgroundVertical: null,
// The display mode that will be used to show slides
display: 'block',
// The "normal" size of the presentation, aspect ratio will be preserved
// when the presentation is scaled to fit different resolutions. Can be
// specified using percentage units.
width: 960,
height: 700,
// Factor of the display size that should remain empty around the content
margin: 0.1,
// Bounds for smallest/largest possible scale to apply to content
minScale: 0.2,
maxScale: 1.5,
// PDF Export Options
// Put each fragment on a separate page
pdfSeparateFragments: true,
// For slides that do not fit on a page, max number of pages
pdfMaxPagesPerSlide: 1,
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'https://cdn.jsdelivr.net/npm/[email protected]/plugin/zoom-js/zoom.js', async: true },
{ src: 'https://cdn.jsdelivr.net/npm/[email protected]/plugin/notes/notes.js', async: true }
],
});</script><script>var dom = {};
dom.slides = document.querySelector('.reveal .slides');
function getRemainingHeight(element, slideElement, height) {
height = height || 0;
if (element) {
var newHeight, oldHeight = element.style.height;
// Change the .stretch element height to 0 in order find the height of all
// the other elements
element.style.height = '0px';
// In Overview mode, the parent (.slide) height is set of 700px.
// Restore it temporarily to its natural height.
slideElement.style.height = 'auto';
newHeight = height - slideElement.offsetHeight;
// Restore the old height, just in case
element.style.height = oldHeight + 'px';
// Clear the parent (.slide) height. .removeProperty works in IE9+
slideElement.style.removeProperty('height');
return newHeight;
}
return height;
}
function layoutSlideContents(width, height) {
// Handle sizing of elements with the 'stretch' class
toArray(dom.slides.querySelectorAll('section .stretch')).forEach(function (element) {
// Determine how much vertical space we can use
var limit = 5; // hard limit
var parent = element.parentNode;
while (parent.nodeName !== 'SECTION' && limit > 0) {
parent = parent.parentNode;
limit--;
}
if (limit === 0) {
// unable to find parent, aborting!
return;
}
var remainingHeight = getRemainingHeight(element, parent, height);
// Consider the aspect ratio of media elements
if (/(img|video)/gi.test(element.nodeName)) {
var nw = element.naturalWidth || element.videoWidth, nh = element.naturalHeight || element.videoHeight;
var es = Math.min(width / nw, remainingHeight / nh);
element.style.width = (nw * es) + 'px';
element.style.height = (nh * es) + 'px';
} else {
element.style.width = width + 'px';
element.style.height = remainingHeight + 'px';
}
});
}
function toArray(o) {
return Array.prototype.slice.call(o);
}
Reveal.addEventListener('slidechanged', function () {
layoutSlideContents(960, 700)
});
Reveal.addEventListener('ready', function () {
layoutSlideContents(960, 700)
});
Reveal.addEventListener('resize', function () {
layoutSlideContents(960, 700)
});</script></body></html>