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

Howreadable

 Howreadable

A lightening talk explaining the motivation behind our "howreadable" experiment and encouraging participation.

Please take at https://howreadable.com

Daniel van Berzon

November 07, 2019
Tweet

More Decks by Daniel van Berzon

Other Decks in Technology

Transcript

  1. Prescriptive Arbitrary grammar rule that prescribes the way people should

    speak "Never end a sentence with a preposition!"
  2. "Never end a sentence with a preposition!" Joshua Poole (1646)

    John Dryden (1672) Prescriptive What is he on about?
  3. Descriptive Evidence-based Grammar rule that describes the way people speak

    naturally. "English word order is: Subject - Verb - Object"
  4. Penny eats pizza Penny pizza eats Eats penny pizza Eats

    pizza penny Pizza penny eats Pizza eats penny
  5. Penny eats pizza Penny pizza eats Eats penny pizza Eats

    pizza penny Pizza penny eats Pizza eats penny
  6. Airbnb JavaScript Style Guide: // bad function sayHi(name) { return

    'How are you, ' + name + '?'; } // good function sayHi(name) { return `How are you, ${name}?`; } Template strings give you a readable, concise syntax ... “ ” Often mentions readability
  7. Online experiment to find descriptive rules for code readability Measures

    readability of coding constructs Showing code snippets to developers Measuring how easily they read them
  8. What do we measure? Can developer predict output of code?

    Time takes them to understand the code
  9. Experiment is live Measuring 11 constructs > 500 participants Need

    more participants to get better results Comments Naming Pure functions Abstraction Boolean algebra Ternary operators Chaining methods If statements Inline functions Early return Operator precedence