!important

A presentation at JSFest in April 2019 in Kyiv, Ukraine, 02000 by Chris Heilmann

Slide 1

Slide 1

!important Chris Heilmann @codepo8 March 2019

Slide 2

Slide 2

Chris Heilmann @codepo8 ▪ Principal Software Development Engineer ▪ Microsoft Edge and Developer Experience (VSCode, Devtools…) ▪ W3C Member WebML Discussion Group ▪ 20 years web developer ▪ eToys, Agilisys, Yahoo, Mozilla… ▪ Wrote 3 books, contributed to 10(?)…

Slide 3

Slide 3

!important

Slide 4

Slide 4

!important @codepo8 ▪ For a CSS developer: this is so important, it should override all other inherited settings ▪ For a CSS developer finding it in production: someone was here who shouldn’t have been ▪ For a JavaScript developer writing CSS: that’s how I get it to do what I want ▪ For a JavaScript developer not knowing CSS: not important

Slide 5

Slide 5

Best practices need insight and context @codepo8 ▪ It is not HTML vs. CSS vs. JavaScript ▪ Each on their own are probably not enough to create a great product ▪ What was enough in the beginning of the web is probably not enough now that expectations changed ▪ Just because we can do everything with JavaScript, it may not be the most effective and performant way

Slide 6

Slide 6

We all crave importance and recognition @codepo8 ▪ Being visible is much easier these days than it used to be ▪ A lot more code is open and available in the public ▪ We could collaborate and build great things together ▪ But it is much easier to criticize the work of others, isn’t it?

Slide 7

Slide 7

Drop code, receive assumptions and well-intentioned advice… @codepo8

Slide 8

Slide 8

Probably not safe to assume clean data… @codepo8

Slide 9

Slide 9

Not safe to assume performance with lots of data… @codepo8

Slide 10

Slide 10

Happy accidents can happen… @codepo8

Slide 11

Slide 11

Things we say to each other without considering the context… @codepo8

Slide 12

Slide 12

THIS DoeS NOT wORk wHEN tHE DATA YOu pUt IN is IMpUrE!

Slide 13

Slide 13

THIs DOEsN’T PErFORm WHEN YOU hAVE A LoT OF DATA!

Slide 14

Slide 14

THiS coUlD BE wrITten mUch SHORTER!

Slide 15

Slide 15

THIS dOeS NOt WORK iN oLd BrOwSErS!

Slide 16

Slide 16

THiS IS nOT ACCeSSIbLe!

Slide 17

Slide 17

codepo8.github.io/not-that-important/derpify-js.html

Slide 18

Slide 18

Slide 19

Slide 19

Comfortable rebellion… @codepo8

Slide 20

Slide 20

Each of these is a sure-fire win… @codepo8 ▪ If you zoom out far enough, you can make accusations that can’t be argued against ▪ This means you look clever and caring for the web ▪ It does, however, also mean that we discourage people ▪ And is it really the right place to argue for quality? When the product is done?

Slide 21

Slide 21

As quality focused developers, we rightfully care about… Accessibility Interoperability Performance Security

Slide 22

Slide 22

Alas, the state of the web is !good

Slide 23

Slide 23

Rampant accessibility failures… @codepo8 https://majestic.com/reports/majestic-million https://majestic.com/reports/majestic-million https://webaim.org/projects/million/

Slide 24

Slide 24

Huge and not optimised… @codepo8 https://httparchive.org/reports/page-weight

Slide 25

Slide 25

How is that possible with all the insights we get?

Slide 26

Slide 26

We have audits in browser tools… @codepo8

Slide 27

Slide 27

We have audits in browser tools… @codepo8

Slide 28

Slide 28

Accessibility Insights https://accessibilityinsights.io/ @codepo8

Slide 29

Slide 29

Accessibility Insights https://accessibilityinsights.io/ @codepo8

Slide 30

Slide 30

Accessibility Insights https://accessibilityinsights.io/ @codepo8

Slide 31

Slide 31

@codepo8

Slide 32

Slide 32

Well, all that is… !important

Slide 33

Slide 33

Learn once, repeat forever… @codepo8 https://twitter.com/sebmck/status/1109644524995801088

Slide 34

Slide 34

Web products stack @codepo8 : HTML/CSS/JS https://twitter.com/sebmck/status/1109644524995801088

Slide 35

Slide 35

Front-end: HTML/CSS/JS Realities of web products stack… @codepo8 Back-end: CMS/Frameworks Servers/Cloud DevOps IT Legal Sales Shareholders Investors

Slide 36

Slide 36

We’re competing without knowing it… Staying in budget (time + money) First to Market (FTM) Continuous growth

Slide 37

Slide 37

Budget = reckless re-use Staying in budget (time + money)

Slide 38

Slide 38

Let’s start with a framework… @codepo8

Slide 39

Slide 39

The web is assembled, not authored… @codepo8 https://discuss.httparchive.org/t/what-is-the-distribution-of1st-party-vs-3rd-party-resources/100/14

Slide 40

Slide 40

!sinkable @codepo8

Slide 41

Slide 41

First to market – get it out! First to Market (FTM)

Slide 42

Slide 42

FTM = FML for quality First to Market (FTM)

Slide 43

Slide 43

!given Accessibility Interoperability Performance Security

Slide 44

Slide 44

MVP First to Market (FTM)

Slide 45

Slide 45

MVP=Minimum Viable Product First to Market (FTM)

Slide 46

Slide 46

MVP=Most Validation Pending is

Slide 47

Slide 47

Understandable throwaway culture… @codepo8 https://www.youtube.com/watch?v=65crLKNQR0E

Slide 48

Slide 48

A series of quick wins… is … MVP#1 MVP#2 MVP#3 MVP#4

Slide 49

Slide 49

Alas, on the web… Staying in budget (time + money) First to Market (FTM) Continuous growth

Slide 50

Slide 50

Growth = stickiness+analytics Continuous growth

Slide 51

Slide 51

Third party slowness and cruft… @codepo8 https://github.com/patrickhulce/third-party-web

Slide 52

Slide 52

Reuse keeps budgets in check is MVP V1 (analytics enabled) V2 (marketing features) V3 (beefier cloud) V4 (enterprise, international rollout) PANIC!!!!!

Slide 53

Slide 53

This is the moment when things happen…

Slide 54

Slide 54

Let’s hire some consultants to help us with… Accessibility Interoperability Performance Security

Slide 55

Slide 55

Because when it costs money, it is >important

Slide 56

Slide 56

!easy @codepo8 ▪ Fixing a non-performing, inaccessible, insecure product at this stage of the process is a lot of work ▪ There are ways to do it, but it involves changes in the process – and people hate change ▪ There’s always a lot of blame going around, which doesn’t help either ▪ Often, we pile on more products and processes, adding to the cruft

Slide 57

Slide 57

Patches and “solutions”… @codepo8 ▪ AMP ▪ Safari limiting JavaScript ▪ Chrome’s “Never Slow Mode” ▪ All kind of blockers

Slide 58

Slide 58

The web is a platform ripe for abuse. @codepo8 ▪ The web is defined as forgiving to developer error ▪ Parsers and browsers need to swallow a lot of terrible code and still make something useful of it ▪ Years of competition in browsers and platforms created legacy nonstandard code that needs support ▪ This means not only cruft, but also security attack vectors ▪ We can’t stop developers from being sloppy…

Slide 59

Slide 59

Well, …

Slide 60

Slide 60

Front-end: HTML/CSS/JS What can we do? @codepo8 Back-end: CMS/Frameworks Servers/Cloud DevOps IT Legal Sales Shareholders Investors

Slide 61

Slide 61

What can we do? @codepo8 ▪ Stop arguing amongst ourselves which technology is better ▪ Contribute to and clean up products that people use without thinking about them (CMS, build tools, frameworks…) ▪ Take our time to understand why people do things wrong before telling them off that they do ▪ Earn our seat at the table where stupid decisions are being made

Slide 62

Slide 62

▪ What can we do? @codepo8 ▪ Optimise our workflows to include required quality control as soon as possible ▪ npmjs.com/package/hint ▪ css-tricks.com/make-it-hard-to-screw-updriven-development/ Brush up our knowledge of development tools and give feedback to them – we are their customers

Slide 63

Slide 63

The way we work now is becoming less and less important

Slide 64

Slide 64

Most of the products created now use other people’s code…

Slide 65

Slide 65

So, let’s build accessible, secure and performant solutions for people to re-use!

Slide 66

Slide 66

Power to the next generation! @codepo8

Slide 67

Slide 67

Thanks! Chris Heilmann @codepo8