Upgrade to Pro — share decks privately, control downloads, hide ads and more …

iJS Conference

iJS Conference

London, 14 May 2019

bruce lawson

May 14, 2019
Tweet

More Decks by bruce lawson

Other Decks in Programming

Transcript

  1. @brucel
    Treasure!
    • More performant

    • More accessible

    • More robust

    • Less code to write

    • Less code to test

    • More time in the pub/ playing Call Of Duty/ seeing your
    kids

    View full-size slide

  2. @brucel
    The treasure map:
    • Use HTML properly

    • Write more HTML

    • Use CSS properly

    • Built-in beats Bolt-on. Bigly.

    View full-size slide

  3. @brucel
    Since its first publication in 1970 The
    Technique of Furniture Making has
    established itself as the bible for all
    woodworkers.

    View full-size slide

  4. @brucel
    Introduction
    Any textbook concerned with the techniques of furniture-
    making must deal primarily with the basic handcrafts for
    it is upon this groundwork that machine production is built,
    and in fact all the machine can ever do is to translate
    the essential hand operations into rotary movements of
    the cutting tool.

    View full-size slide

  5. @brucel
    anyone who has only been shown how to force a piece of
    wood against a mechanised saw will have learnt very little,
    but if he has had to saw that piece of wood by hand he
    will be more likely to know that much more about it, he
    will have greater respect for it and will understand in
    greater depth the problems that will have to be faced in
    its manipulation.

    View full-size slide

  6. @brucel
    職⼈人気質
    The Japanese word shokunin is defined by both
    Japanese and Japanese-English dictionaries as
    ‘craftsman’ or ‘artisan,’ but such a literal
    description does not fully express the deeper
    meaning.

    Tashio Odate - “Japanese Woodworking Tools: Their Tradition, Spirit and Use”

    View full-size slide

  7. @brucel
    職⼈人気質
    Shokunin means not only having technical skill, but
    also implies an attitude and social
    consciousness... a social obligation to work his
    best for the general welfare of the people, [an]
    obligation both material and spiritual.

    Tashio Odate - “Japanese Woodworking Tools: Their Tradition, Spirit and Use”

    View full-size slide

  8. @brucel
    • Picture of TBL “web developer”

    View full-size slide

  9. @brucel
    http://info.cern.ch/hypertext/WWW/TheProject.html

    View full-size slide

  10. @brucel
    We broke it
    • fixed width

    • bad contrast, fonts, colours

    • pixel-perfect layout

    • lack of captions for videos

    • lack of keyboard accessibility

    • removing focus indicator

    View full-size slide

  11. @brucel
    The Raw Materials

    View full-size slide

  12. @brucel
    b
    • web comping

    View full-size slide

  13. @brucel
    Top four
    1. Have a fundamental understanding of JavaScript

    “Of course you can’t do full-stack JavaScript development (or
    full-stack any web development for that matter), without
    learning JavaScript itself.”

    2. Front-End framework

    3. Bootstrap 4

    4. HTML/CSS

    View full-size slide

  14. @brucel
    As for HTML, there’s not much to learn right away
    and you can kind of learn as you go, but before
    making your first templates, know the difference
    between in-line elements like and how they
    differ from block ones like . This will save you a
    huge amount of headache when fiddling with your
    CSS code.

    View full-size slide

  15. @brucel
    HTML is declarative
    Click Me!

    View full-size slide

  16. @brucel
    HTML is fault-tolerant
    OMG you’re having a seizure

    View full-size slide

  17. @brucel
    so is backwards compatible

    Can’t play it.
    Download it.

    View full-size slide

  18. @brucel
    Paving a cowpath

    type=“image/webp”>


    View full-size slide

  19. @brucel
    HTML is interoperable.
    I’m badly nested

    View full-size slide

  20. @brucel
    Ninja by Efe Palavan
    from the Noun Project

    View full-size slide

  21. @brucel
    JavaScript is NOT declarative
    Imperative programming focuses on describing how a
    program operates.

    The term is often used in contrast to declarative
    programming, which focuses on what the program should
    accomplish without specifying how the program should
    achieve the result.

    View full-size slide

  22. @brucel
    JavaScript is NOT fault-tolerant

    View full-size slide

  23. @brucel
    Principle of Least Power
    The choice of language is a common design choice.

    The low power end of the scale is typically simpler to
    design, implement and use, but the high power end of
    the scale has all the attraction of being an open-ended
    hook into which anything can be placed: a door to
    uses bounded only by the imagination of the
    programmer.

    Sir Uncle Timbo https://www.w3.org/DesignIssues/Principles.html#PLP

    View full-size slide

  24. https://kryogenix.org/code/browser/everyonehasjs.html

    View full-size slide

  25. @brucel
    Oooh demo

    View full-size slide

  26. @brucel
    Wooooh code
    blah blah blah
    blah blah blah

    View full-size slide

  27. @brucel
    https://wicg.github.io/aom/explainer.html

    View full-size slide

  28. @brucel

    Click me (if you can!)
    • Remember to set ARIA role (in HTML or JS)

    • Remember to manage focusability

    • Remember to listen for the correct keypresses

    View full-size slide

  29. @brucel
    div
    “The div element has no special meaning at all.

    Authors are strongly encouraged to view the div element as
    an element of last resort, for when no other element is
    suitable. Use of more appropriate elements instead of
    the div element leads to better accessibility for readers and
    easier maintainability for authors.”

    View full-size slide

  30. @brucel
    Screen reader users
    webaim.org/projects/screenreadersurvey5/ - used by kind permission

    www.smashingmagazine.com/2019/02/accessibility-webinar/

    View full-size slide

  31. @brucel
    • Leonie vid clip
    https://www.smashingmagazine.com/2019/02/accessibility-webinar/

    View full-size slide

  32. @brucel
    “Structured data”
    When you add markup to your content, you help search
    engines understand the different components of a page.
    When Google's systems understand your page more clearly,
    Google Search can surface content through the cool features
    discussed in this post, which can enhance the user
    experience and get you more traffic.

    https://webmasters.googleblog.com/2019/04/enriching-search-results-structured-data.html

    View full-size slide

  33. @brucel
    ooooh $$$$
    • Eventbrite leveraged event structured data and saw 100%
    increase in the typical YOY growth of traffic from
    search.

    • Jobrapido integrated with the job experience on Google
    Search and saw 115% increase in organic traffic, 270%
    increase of new user registrations from organic traffic,
    and 15% lower bounce rate for Google visitors to job
    pages.

    • Rakuten used the recipe search experience and saw a 2.7X
    increase in traffic from search engines and a 1.5X
    increase in session duration.

    View full-size slide

  34. @brucel



    Reading List
    datetime="2019-01-18">Friday 18 January 2019

    SOME STUFF
    Posted in accessibility web standards, reading list .
    Edit. Leave a comment

    View full-size slide

  35. @brucel
    whats-bruce-wearing-today.tumblr.com

    View full-size slide

  36. @brucel
    Accessibility is part of Usability
    “high conformance with web
    accessibility guidelines may
    provide benefits to users
    without disabilities.”


    View full-size slide

  37. @brucel
    Schmutza, Sondereggera and Sauera

    • Sixty-one participants without disabilities used one of three
    websites differing in levels of accessibility

    • A high level of web accessibility led to better performance (i.e.,
    task completion time and task completion rate) than low or very
    low accessibility.

    • Likewise, high web accessibility improved user ratings (i.e.,
    perceived usability, aesthetics, workload and trustworthiness)
    compared to low or very low web accessibility.

    Department of Psychology, University of Fribourg, Fribourg, Switzerland
    www.unifr.ch/psycho/assets/files/KogErg/SchmutzSondereggerSauer2016.pdf

    View full-size slide

  38. @brucel
    https://twitter.com/goodwitch/status/1106231135443410944

    View full-size slide

  39. @brucel
    Sir Uncle Timbo:
    The web is for everyone and collectively we
    hold the power to change it. It won’t be easy.
    But if we dream a little and work a lot, we
    can get the web we want.

    https://webfoundation.org/2019/03/web-birthday-30/

    View full-size slide

  40. @brucel
    What can you do?
    • Learn the semantics of HTML. There are 120(ish) elements, that’s all!

    “Most 2-year-olds can say about 100 words. By the time your toddler is 2
    1/2, she'll probably know close to 300.”(www.parents.com/advice/toddlers-preschoolers/development/whats-
    the-normal-vocabulary-for-a-2-year-old/)


    • Think about (but don’t stress about) accessibility

    • Use HTML (and CSS) wherever possible.

    • Make sites that work without JavaScript, then enhance with JS.

    • Choose your libraries carefully.

    View full-size slide

  41. @brucel
    tenon-ui.info
    Bruce Approved!

    View full-size slide

  42. @brucel
    react-bootstrap
    https://react-bootstrap.github.io/components/navs/

    View full-size slide

  43. @brucel
    What no ?
    Bruce rejected.

    View full-size slide

  44. @brucel
    http://www.commitstrip.com/en/2019/04/19/its-better-with-javascript/

    View full-size slide

  45. @brucel
    “Developer Experience” Bait-and-Switch
    We cannot continue to use as much JavaScript as is
    now “normal” and expect the web to flourish.

    To get this fixed, we need to confront the “developer
    experience” bait-and-switch. Tools that cost the
    poorest users to pay wealthy developers are bunk.

    Alex Russell https://infrequently.org/2018/09/the-developer-experience-bait-and-switch/

    View full-size slide

  46. @brucel
    500MB data: hours worked
    https://360.here.com/2015/06/03/offline-navigation-really-matters-500mb-data-costs-week-wages/

    View full-size slide

  47. @brucel
    How To Make Internet Affordable
    Even with more phones than ever before, the cost of
    Internet is a major obstacle. In Nigeria, the data
    needed to watch just 2 minutes of online video a
    day can cost more than sending a child to school
    for a month.
    https://webwewant.org/news/how-to-make-internet-affordable/

    View full-size slide

  48. @brucel
    The Baseline Costs of JavaScript Frameworks
    Your React application will never load faster than about 1.1
    seconds on an average phone in India, no matter how much
    you optimize it. Your Angular app will always take at least
    2.7 seconds to boot up.
    Ankur Sethi, Nov 2018

    https://blog.uncommon.is/the-baseline-costs-of-javascript-frameworks-f768e2865d4a


    View full-size slide

  49. ICT access by population
    Total 

    global population
    ~7.4 billion
    High-speed

    internet
    1.1 billion
    Total 

    internet users
    3.2 billion
    Mobile phones
    5.2 billion
    Within
    mobile coverage
    7 billion
    World Bank: Digital Dividends 2016

    View full-size slide

  50. Developing countries are home to 94% of the
    global offline population.

    - State of Connectivity 2014, internet.org

    View full-size slide

  51. Making the internet universally accessible
    and affordable should be a global priority.

    World Bank

    View full-size slide

  52. Courtesy of Hesperian

    View full-size slide

  53. If you want to liberate a country, give them
    the internet.

    - Wael Ghonim, Egyptian internet activist

    View full-size slide

  54. an increase in Internet maturity similar to the
    one experienced in mature countries over the
    past 5 years creates an increase in real GDP
    per capita of $500 on average during this
    period.

    Internet matters
    - The Net’s sweeping impact on growth, jobs, and prosperity (McKinsey Global Institute)

    View full-size slide

  55. It took the Industrial Revolution of the 19th
    century 50 years to produce the same result.

    Internet matters
    - The Net’s sweeping impact on growth, jobs, and prosperity (McKinsey Global Institute)

    View full-size slide

  56. @brucel
    • [image of a crowd of people - terrible stock
    photo?]

    View full-size slide

  57. THANKS ’N’ SNOGS!
    brucelawson.co.uk
    @brucel
    * Other Bruce Lawsons are available.
    ** known to cause nausea in some jurisdictions.

    View full-size slide