-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
647 lines (532 loc) · 25 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
646
647
<!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">
<title>Initiating change</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/white.css">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css">
<style>
:root {
--r-heading1-size: 1.5em;
--r-heading2-size: 1.2em;
--r-heading-text-transform: none;
}
.reveal ol ul {
margin-left: 0;
}
.reveal h1 sub {
display: block;
font-size: .5em;
line-height: inherit;
bottom: 0;
}
figure {
text-align: center;
}
figure img {
display: inline-block;
}
blockquote {
border: 0 !important;
border-left: 5px solid orange !important;
}
blockquote + figcaption {
text-align: right !important;
width: 70% !important;
margin: 0 auto !important;
}
blockquote + figcaption cite {
font-size: .5em !important;
}
</style>
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
important: true
}
</script>
</head>
<body class="text-xl">
<div class="reveal">
<div class="slides">
<section>
<h1>
Initiating change
<sub>An approach for Developers</sub>
</h1>
<footer class="mt-32">
<p><small>Patrick Heller<br/><a href="https://twitter.com/psren">twitter.com/psren</a></small></p>
</footer>
<aside class="notes">
<ul>
<li>> 10yrs of symfony</li>
<li>multiple legacy projects to Symfony</li>
<li>multiple, very different teams</li>
<li>Backend Lead Dev @ Digistore24</li>
</ul>
<ul>
<li>Legacy</li>
<li>Examples</li>
<li>How Change software project</li>
<li>Where change</li>
<li>Bad examples</li>
<li>Learn from bad examples</li>
</ul>
</aside>
</section>
<section>
<section data-background-image="./assets/crazy_tree.png">
</section>
<section>
<h1>We all have to deal with legacy</h1>
<aside class="notes">
<ul>
<li>Ferdi: Wie kann man in 2 Monaten so Mist erzeugen?</li>
</ul>
</aside>
</section>
<section>
<h1>Legacy code is good</h1>
<footer>
<ul class="list-none">
<li>💰 It earns money</li>
<li>🧠 You can learn a lot</li>
</ul>
</footer>
<aside class="notes">
<ul>
<li>Great developers</li>
<li>Software-Design</li>
</ul>
</aside>
</section>
<section>
<h1>Legacy still hurts *</h1>
<footer>
<ul class="list-none">
<li>* gray hair / stress</li>
<li>* could earn more money</li>
</ul>
</footer>
<aside class="notes">
<ul>
<li>Weekly incidents</li>
<li>Panic mode</li>
</ul>
</aside>
</section>
<section>
<h1>Possible reasons for bad Code</h1>
<p>(I'll leave out the boring ones)</p>
</section>
<section>
<h1>Real-World-Examples *</h1>
<footer>
<small>
* Regardless of what we discover,
we understand and truly believe that everyone did the best job they could,
given what was known at the time, their skills and abilities, the resources available,
and the situation at hand.
</small>
</footer>
</section>
<section>
<figure>
<img src="./assets/georgia-vagim-ny-lHmsHYHk-unsplash.jpg" alt="">
</figure>
</section>
<section>
<h3>#1 - Broken salary model</h3>
<ol>
<li>Pay developers bonus for <code>Number of bugs fixed</code></li>
<li>They "accidentally" write crappy code</li>
<li>They fix bugs</li>
<li>🤑 Profit 🤑</li>
</ol>
</section>
<section>
<h3>#2 - The live "Proof of concept"</h3>
<ol>
<li>Request a "Proof of concept"</li>
<li>Deploy it without investing even one more minute</li>
<li>🐞🐛 Profit 🐛🐜</li>
</ol>
</section>
<section>
<h3>#3 - the fast workaround</h3>
<figure>
<blockquote>
I wrote a new legacy tool!
</blockquote>
<figcaption>
<cite>my ex boss Franz *</cite>
</figcaption>
</figure>
<footer class="text-lg">
<ul class="list-none">
<li>* we had our reasons</li>
<li>* I loved working with you :-)</li>
</ul>
</footer>
<aside class="notes">
<ul>
<li>It's fine</li>
<li>many such tools</li>
<li>Should pay dept</li>
</ul>
</aside>
</section>
<section>
<h3>#4 - Lasagna-Pattern</h3>
<ol>
<li>Build your own PHP4-Framework</li>
<li>Wrap it in FuelPHP</li>
<li>Add sprinkles of CodeIgniter</li>
<li>🍳 Cook it for a decade without cleanup</li>
<li>Wrap it in Symfony</li>
<li>Serve while hot 🧨🔥</li>
</ol>
</section>
<section>
<h1>Legacy is <span class="text-red-600">not</span> limited to Code</h1>
<aside class="notes">
<ul>
<li>Meetings</li>
<li>Company processes</li>
</ul>
</aside>
</section>
<section>
<figure>
<img src="./assets/peter-neumann-mUtYXnpW1ts-unsplash.jpg" alt="">
</figure>
</section>
<section>
<h1>Slow processes</h1>
<p>Code-Review, Testing, 1000 Meetings, ...</p>
</section>
</section>
<section>
<section>
<h1>We need change</h1>
<p>... to stay ahead of competitors</p>
</section>
<section>
<h1>You can initiate changes</h1>
<p>but you can't force it</p>
</section>
<section>
<h1>Get them on board</h1>
<p>they might be better drivers</p>
</section>
<section>
<h1>Change is hard work</h1>
<p>and won't happen automatically *</p>
</section>
<section>
<div class="w-1/2 mx-auto">
<blockquote class="twitter-tweet center"><p lang="en" dir="ltr">Software architecture happens whether you like it or not</p>— Jason Gorman @[email protected] (@jasongorman) <a href="https://twitter.com/jasongorman/status/1621193276215681030?ref_src=twsrc%5Etfw">February 2, 2023</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
<p>* this is not automatically</p>
<aside class="notes">
<ul>
<li>Plans are nice ... but</li>
</ul>
</aside>
</section>
<section>
<figure>
<blockquote>
<p>Responding to change<br/><sub>over following a plan</sub></p>
</blockquote>
<figcaption>
<cite><a href="https://agilemanifesto.org/">https://agilemanifesto.org/</a></cite>
</figcaption>
</figure>
</section>
<section>
<h1>Example: Code-Review</h1>
<p>You notice a pattern is bad, but<br/>"it was always done like that"</p>
</section>
<section>
<h1>Change management</h1>
<ul>
<li>Help them * understand why</li>
<li>Help them adapt to change</li>
<li>Change smoothly</li>
<li>Automate to keep it</li>
<li>Celebrate wins</li>
</ul>
<footer>
<p><small>* them could be you</small></p>
</footer>
</section>
<section>
<h1>Every Team is different</h1>
<figure class="mx-auto w-1/2">
<img src="./assets/dev_team.png" alt="">
</figure>
</section>
<section>
<h2>If you don't agree on a change</h2>
<ul>
<li>use simple examples</li>
<li>move on *</li>
<li>come back later</li>
</ul>
<footer>
<p><small>* convince them, build coalitions, collect evidence.<br/>Maybe after incidents / production bugs / customer complaints.</small></p>
</footer>
</section>
<section>
<figure>
<blockquote>
<p>Individuals and interactions<br/><sub>over processes and tools</sub></p>
</blockquote>
<figcaption>
<cite><a href="https://agilemanifesto.org/">https://agilemanifesto.org/</a></cite>
</figcaption>
</figure>
<p>If a process doesn't help, drop it</p>
</section>
</section>
<section>
<section>
<h1>Prioritization</h1>
<p>The right thing at a wrong time<br/>is a wrong thing.</p>
</section>
<section>
<h1>Gather feedback</h1>
<p>ask, listen, analyze, verify</p>
<ul class="text-lg">
<li>Retro-Meetings</li>
<li>Post-Mortems</li>
<li>Jira-Bugs</li>
<li>Code-Reviews</li>
<li>Pair-Programming / 1on1s</li>
<li>Upcoming tasks</li>
<li>...</li>
</ul>
</section>
<section>
<h1>Start simple,<br/>low-hanging 🍎</h1>
</section>
<section>
<h1>Code-Analysis</h1>
<p>Look at the Code, include GIT-History</p>
<figure>
<img src="./assets/churn.png" alt="">
<figcaption class="text-lg">Complexity vs Modifications using <a href="https://github.com/bmitch/churn-php">ChurnPHP</a></figcaption>
</figure>
</section>
<section>
<h1>Types</h1>
<p>Many Bugs are type related</p>
<figure>
<pre><code>vendor/bin/psalm --stats</code></pre>
<img src="./assets/psalm-stats.png" alt="">
<figcaption class="text-lg"><a href="https://psalm.dev/">Psalm</a> Type coverage</figcaption>
</figure>
</section>
<section>
<h1>What could go wrong</h1>
<p>... using PHPStan *</p>
<footer>
<small>
* Not PHPStans fault
</small>
</footer>
</section>
<section>
<h1>What could go wrong with PHPStan</h1>
<ul>
<li>Team not that experienced</li>
<li>very strict settings</li>
<li>CI stopped their usual workflow *</li>
<li>Frustration</li>
</ul>
<footer class="mt-8">
<small>
* Baseline-Feature did not exist back then
</small>
</footer>
</section>
<section>
<h1>Help them to adapt</h1>
<ul>
<li>Experienced: Strict settings</li>
<li>In this case: Lax settings first, then increase</li>
</ul>
</section>
<section>
<h1>Code-Style</h1>
<p>A solved Problem (hopefully)</p>
<aside class="notes">
<ul>
<li>Code-Review discussions</li>
<li>Tabs vs spaces</li>
</ul>
</aside>
</section>
<section>
<h1>What could go wrong</h1>
<p>... using PHP-CS-Fixer *</p>
<footer>
<small>
* Not PHP-CS-Fixer fault
</small>
</footer>
</section>
<section>
<h1>What could go wrong with...<br/>PHP-CS-Fixer?</h1>
<ul>
<li>slow deployment process (multiple hours)</li>
<li>no rollback strategy</li>
<li>skipped QA, because its only Code-Style</li>
<li><a href="https://cs.symfony.com/doc/ruleSets/PhpCsFixerRisky.html">Risky rules</a></li>
</ul>
<aside class="notes">
<ul>
<li>high 5 digit lost / sales</li>
<li>Why, for Code-Style?</li>
<li>Trust issues</li>
</ul>
</aside>
</section>
<section>
<h1>Trust issues</h1>
<p>money gone for Code-Styling?</p>
</section>
<section data-background-image="./assets/sean-oulashin-KMn4VEeEPR8-unsplash.jpg">
<div class="bg-white p-8 -top-8">
<h1>Don't hurry</h1>
<p>Prefer Baby-steps 👶</p>
</div>
</section>
<section data-background-image="./assets/sean-oulashin-KMn4VEeEPR8-unsplash.jpg">
<div class="bg-white p-8 -top-8">
<h1>Don't hurry</h1>
<p>Prefer Baby-steps 👶<br/>People might be overwhelmed.</p>
</div>
</section>
<section>
<figure>
<blockquote>
<p>Individuals and interactions<br/><sub>over processes and tools</sub></p>
</blockquote>
<figcaption>
<cite><a href="https://agilemanifesto.org/">https://agilemanifesto.org/</a></cite>
</figcaption>
</figure>
<p>
We want to <strong class="text-red-600">focus</strong> on interaction that cannot be automated.
</p>
</section>
<section>
<h1>Automate rules you want to keep</h1>
<ul>
<li>
Validate new code only
<ul>
<li>Baseline Feature (PsalmPHP, PHPStan, Deptrac, PHPat, PHPMD)</li>
<li>automate using <a href="https://cs.symfony.com/">PHPCS Fixer</a></li>
<li>automate using <a href="https://getrector.com/">RectorPHP</a></li>
</ul>
</li>
<li>Use existing rules (<a href="https://mlocati.github.io/php-cs-fixer-configurator/#version:3.14">CS-Fixer</a>,
<a href="https://getrector.com/">RectorPHP</a>, <a href="https://phpmd.org/">PHPMD</a>...)</li>
<li>Implement your own rules (<a href="https://getrector.com/">RectorPHP</a>, <a href="https://qossmic.github.io/deptrac/">Deptrac</a>, <a
href="https://github.com/carlosas/phpat">PHPat</a>, <a href="https://psalm.dev/docs/running_psalm/plugins/authoring_plugins/">Psalm</a>...)</li>
</ul>
</section>
</section>
<section>
<section>
<h2>Measure & Celebrate</h2>
<aside class="notes">
<ul>
<li>Slow progress</li>
<li>Show what we accomplished</li>
<li>Motivation</li>
</ul>
</aside>
</section>
<section>
<h1>Metrics</h1>
<p>Code-Coverage is <span class="text-red-600">not</span> important *</p>
<footer>
<small>
* There might be better metrics
</small>
</footer>
</section>
<section>
<h1>Metrics</h1>
<p>Choose metrics that matter</p>
<small>
<ul>
<li>Customer Feedback</li>
<li>Incidents per year</li>
<li>Time to market</li>
<li>...</li>
</ul>
</small>
</section>
<section>
<h1>Metrics</h1>
<p>If you want Code-Metrics</p>
<small>
<ul>
<li>Complexity</li>
<li>Type Coverage</li>
<li><a href="https://testing.googleblog.com/2011/02/this-code-is-crap.html">CRAP</a>(Change risk anti pattern)</li>
</ul>
</small>
<aside class="notes">
<ul>
<li>Code-Coverage included in CRAP</li>
</ul>
</aside>
</section>
<section>
<h1>Celebrate</h1>
<p>Do good and talk about it</p>
<ul>
<li>Iteration Review</li>
<li>Yearly review</li>
</ul>
</section>
</section>
<section>
<h1>Thank you</h1>
</section>
<section>
<h1>Questions</h1>
</section>
</div>
</div>
<script src="dist/reveal.js"></script>
<script src="plugin/notes/notes.js"></script>
<script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
slideNumber: true,
navigationMode: 'linear',
transition: 'none',
backgroundTransition: 'fade',
autoAnimate: false,
// Learn about plugins: https://revealjs.com/plugins/
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
});
</script>
</body>
</html>