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

What Can We Learn With JavaScript Fatigue? - Th...

What Can We Learn With JavaScript Fatigue? - The Conf SP

Lucas Fernandes da Costa

September 30, 2017
Tweet

More Decks by Lucas Fernandes da Costa

Other Decks in Programming

Transcript

  1. 1 PAGE NUMBER What can we learn with JavaScript Fatigue?

    github: lucasfcosta twitter: lfernandescosta L U C A S F C O S T A . C O M
  2. PAGE NUMBER 6 This talk is not “hardcore” github: lucasfcosta

    twitter: lfernandescosta L U C A S F C O S T A . C O M
  3. PAGE NUMBER 7 This talk is not “hardcore” •No data

    structures github: lucasfcosta twitter: lfernandescosta L U C A S F C O S T A . C O M
  4. PAGE NUMBER 8 This talk is not “hardcore” •No data

    structures •No fancy algorithms github: lucasfcosta twitter: lfernandescosta L U C A S F C O S T A . C O M
  5. PAGE NUMBER 9 This talk is not “hardcore” •No data

    structures •No fancy algorithms •No math github: lucasfcosta twitter: lfernandescosta L U C A S F C O S T A . C O M
  6. PAGE NUMBER 10 = github: lucasfcosta twitter: lfernandescosta L U

    C A S F C O S T A . C O M This talk is about making decisions.
  7. PAGE NUMBER REALITIES OF YOUR INDUSTRY 101 13 LUCASFCOSTA.COM Software

    solves business problems Don't Call Yourself A Programmer, And Other Career Advice - Patrick McKenzie
  8. REALITIES OF YOUR INDUSTRY 101 PAGE NUMBER LUCASFCOSTA.COM 14 You

    are not paid to write code The less code you write, the better
  9. PAGE NUMBER 15 You’re in the business of unemploying people.

    Patrick McKenzie REALITIES OF YOUR INDUSTRY 101 LUCASFCOSTA.COM
  10. 22 PAGE NUMBER 64% 36% Coding Design Some Experience With

    Automated Aids To The Design Of Large-Scale Reliable Software - 1975 Occurrence of Errors REALITIES OF YOUR INDUSTRY 101 LUCASFCOSTA.COM
  11. PAGE NUMBER LUCASFCOSTA.COM 23 REALITIES OF YOUR INDUSTRY 101 In

    the NASA Apollo project about 73% of all errors were design errors. HAMILTON, M., AND ZELDIN, S. "Higher order software--a methodology for defining software,"
  12. 24 PAGE NUMBER “ Louis Srygley Without requirements or design,

    programming is the art of adding bugs to an empty text file. REALITIES OF YOUR INDUSTRY 101 LUCASFCOSTA.COM
  13. PAGE NUMBER 26 JS Fatigue happens when people use tools

    they don't need to solve problems they don't have. REALITIES OF YOUR INDUSTRY 101 LUCASFCOSTA.COM
  14. PAGE NUMBER LUCASFCOSTA.COM REALITIES OF YOUR INDUSTRY 101 Donald Knuth

    “ 27 "Premature optimization is the root of all evil"
  15. PAGE NUMBER 28 REALITIES OF YOUR INDUSTRY 101 The greatest

    performance improvement of all is when a system goes from not-working to working John Ousterhout
  16. PAGE NUMBER 29 Fancy algorithms are slow when n is

    small and n is usually small. Rob Pike REALITIES OF YOUR INDUSTRY 101 LUCASFCOSTA.COM
  17. PAGE NUMBER 34 As the number of options increases, the

    costs, in time and effort, of gathering the information needed to make a good choice also increase Barry Schwartz REALITIES OF YOUR INDUSTRY 101 LUCASFCOSTA.COM
  18. PAGE NUMBER 35 Have you ever wondered why surprise box

    subscriptions are so popular nowadays? REALITIES OF YOUR INDUSTRY 101 LUCASFCOSTA.COM
  19. PAGE NUMBER LUCASFCOSTA.COM 37 REALITIES OF YOUR INDUSTRY 101 Creative

    Slides Presentation Your willpower is like a muscle Judges would make more favorable decisions after those breaks. After a lunch break the rates of favorable decisions immediately jumps to 65% again. Dotted lines represent food breaks In the morning we started with 65% of favorable decisions and at the end of the day this rate steadily drops to zero. As time goes by, less favorable decisions occur James Clear Image by James Clear
  20. PAGE NUMBER 38 We might not be JavaScript fatigued maybe

    we’re just decision fatigued REALITIES OF YOUR INDUSTRY 101 LUCASFCOSTA.COM
  21. PAGE NUMBER 48 1992 THE JOURNEY BEGINS A company called

    Nombas started creating a language called C-minus-minus (CMM) 1. As the popularity of Netscape grew, they developed a version that could be embedded into webpages (“Espresso Pages”) 2. Cmm was renamed to ScriptEase JAVASCRIPT LUCASFCOSTA.COM
  22. PAGE NUMBER 49 1995 A WILD JAVASCRIPT APPEARED JavaScript was

    created in 10 days 1. It aimed to handle input validation on the client-save and save round-trips 2. Since then, JavaScript became a must-have 3. JAVASCRIPT LUCASFCOSTA.COM
  23. PAGE NUMBER 50 1995 THINGS GET COMPLICATED Microsoft releases Internet

    Explorer 3.0 with JScript 1. We now have 3 different scripting languages available: 2. ScriptEase JavaScript JScript JAVASCRIPT LUCASFCOSTA.COM
  24. PAGE NUMBER 51 1997 FINALLY WE GET A STANDARD A

    proposal was submitted to ECMA 1. Technical Committee #39 (TC39) was assigned for: 2. Standardization of the general purpose, cross platform, vendor- neutral programming language ECMAScript. JAVASCRIPT LUCASFCOSTA.COM
  25. PAGE NUMBER 52 ECMAScript then became the basis for all

    JavaScript implementations JAVASCRIPT LUCASFCOSTA.COM LUCASFCOSTA.COM
  26. PAGE NUMBER 53 ES1 1997 ES2 1998 ES3 1999 ES4

    2008 (CANCELLED) ES5 2009 ES6 2015 JAVASCRIPT LUCASFCOSTA.COM
  27. PAGE NUMBER JAVASCRIPT 54 14.88% Safari 54.89% Chrome 5.9% Firefox

    4% Opera 7.43% UC Browser 3.69% IE Browser Market Share source: http://gs.statcounter.com/browser-market-share LUCASFCOSTA.COM
  28. PAGE NUMBER “ 58 Abstractions are necessary to reduce the

    cognitive load of how things work so you can focus on creating. Eric Clemmons LUCASFCOSTA.COM JAVASCRIPT
  29. PAGE NUMBER 59 First you learn the value of abstraction,

    then you learn the cost of abstraction, then you're ready to engineer Kent Beck LUCASFCOSTA.COM JAVASCRIPT
  30. PAGE NUMBER JAVASCRIPT LUCASFCOSTA.COM 63 Good programmers know what to

    write. Eric. S. Raymond Great ones know what to rewrite (and reuse).
  31. M A R K 0 3 P R E S

    E N T A T I O N PAGE NUMBER 68 Our tools are not new LUCASFCOSTA.COM
  32. PAGE NUMBER 72 These things are not new grunt npm

    webpack LUCASFCOSTA.COM JAVASCRIPT
  33. PAGE NUMBER LUCASFCOSTA.COM 78 HOW TO DEAL WITH IT A

    technical recruiter, having discovered that that the ways of Unix hackers were strange to him, sought an audience with Master Foo to learn more about the Way.
  34. PAGE NUMBER LUCASFCOSTA.COM 79 HOW TO DEAL WITH IT The

    recruiter said:
 “I have observed that Unix hackers scowl or become annoyed when I ask them how many years of experience they have in a new programming language. Why is this so?”
  35. PAGE NUMBER LUCASFCOSTA.COM 80 HOW TO DEAL WITH IT Master

    Foo stood, and began to pace across the office floor. The recruiter was puzzled, and asked “What are you doing?”
  36. PAGE NUMBER LUCASFCOSTA.COM 81 HOW TO DEAL WITH IT “I

    am learning to walk,” replied Master Foo.
  37. PAGE NUMBER LUCASFCOSTA.COM 82 HOW TO DEAL WITH IT “I

    saw you walk through that door” the recruiter exclaimed “and you are not stumbling over your own feet. Obviously you already know how to walk.”
  38. PAGE NUMBER LUCASFCOSTA.COM 83 HOW TO DEAL WITH IT “Yes,

    but this floor is new to me.” replied Master Foo. Upon hearing this, the recruiter was enlightened. http://www.catb.org/esr/writings/unix-koans/recruiter.html
  39. PAGE NUMBER LUCASFCOSTA.COM 85 HOW TO DEAL WITH IT don’t

    be too attached to a single technology
  40. PAGE NUMBER LUCASFCOSTA.COM 87 HOW TO DEAL WITH IT What

    I cannot create I do not understand. Richard Feynman
  41. PAGE NUMBER LUCASFCOSTA.COM 89 HOW TO DEAL WITH IT Parkinson's

    law of triviality Members of an organization give disproportionate weights to trivial issues.
  42. PAGE NUMBER LUCASFCOSTA.COM 92 HOW TO DEAL WITH IT do

    things that don’t scale Paul Graham
  43. PAGE NUMBER 93 The Master Plan Thanks Mr. Elon Musk,

    you are awesome LUCASFCOSTA.COM HOW TO DEAL WITH IT
  44. PAGE NUMBER 94 The Master Plan Thanks Mr. Elon Musk,

    you are awesome LUCASFCOSTA.COM HOW TO DEAL WITH IT . Create a low volume car, which would necessarily be expensive
  45. PAGE NUMBER 95 The Master Plan Thanks Mr. Elon Musk,

    you are awesome LUCASFCOSTA.COM HOW TO DEAL WITH IT . Create a low volume car, which would necessarily be expensive . Use that money to develop a medium volume car at a lower price
  46. PAGE NUMBER 96 The Master Plan Thanks Mr. Elon Musk,

    you are awesome LUCASFCOSTA.COM HOW TO DEAL WITH IT . Create a low volume car, which would necessarily be expensive . Use that money to develop a medium volume car at a lower price . Use that money to create an affordable, high volume car
  47. PAGE NUMBER 97 The Master Plan Thanks Mr. Elon Musk,

    you are awesome LUCASFCOSTA.COM HOW TO DEAL WITH IT . Create a low volume car, which would necessarily be expensive . Use that money to develop a medium volume car at a lower price . Use that money to create an affordable, high volume car . Provide solar power.
  48. PAGE NUMBER 98 The Master Plan Tesla Roadster Tesla Model

    3 Thanks Mr. Elon Musk, you are awesome LUCASFCOSTA.COM HOW TO DEAL WITH IT
  49. PAGE NUMBER 99 The Master Plan Tesla Roadster Tesla Model

    3 Thanks Mr. Elon Musk, you are awesome LUCASFCOSTA.COM HOW TO DEAL WITH IT $ ~110,000 $ ~35,000
  50. PAGE NUMBER 100 The Master Plan Tesla Roadster Tesla Model

    3 Thanks Mr. Elon Musk, you are awesome LUCASFCOSTA.COM HOW TO DEAL WITH IT $ ~110,000 $ ~35,000 2,400 units sold 200,000 units reserved
  51. PAGE NUMBER 101 The Master Plan Tesla Roadster Tesla Model

    3 Thanks Mr. Elon Musk, you are awesome LUCASFCOSTA.COM HOW TO DEAL WITH IT $ ~110,000 $ ~35,000 2,400 units sold 200,000 units reserved ON ITS FIRST DAY
  52. PAGE NUMBER 102 The Master Plan Tesla Roadster Tesla Model

    3 Thanks Mr. Elon Musk, you are awesome LUCASFCOSTA.COM HOW TO DEAL WITH IT $ ~110,000 $ ~35,000 2,400 units sold 200,000 units reserved ON ITS FIRST DAY BEFORE RELEASE
  53. PAGE NUMBER 103 The Master Plan Thanks Mr. Elon Musk,

    you are awesome LUCASFCOSTA.COM HOW TO DEAL WITH IT “Okay, but what about solar power?"
  54. PAGE NUMBER LUCASFCOSTA.COM 108 the cathedral HOW TO DEAL WITH

    IT • centralized • carefully crafted by individual wizards • no beta or release before its time
  55. PAGE NUMBER LUCASFCOSTA.COM 109 HOW TO DEAL WITH IT •

    centralized • carefully crafted by individual wizards • no beta or release before its time the bazaar • release early and often • delegate everything you can • communicate • listen to feedback
  56. PAGE NUMBER 111 The Right Thing Worse is better LUCASFCOSTA.COM

    HOW TO DEAL WITH IT • It is more important for the interface to be simple than the implementation. • The design must be simple, both in implementation and interface. Simplicity is the most important consideration in a design. SIMPLICITY
  57. PAGE NUMBER 112 The Right Thing Worse is better LUCASFCOSTA.COM

    HOW TO DEAL WITH IT • It is more important for the interface to be simple than the implementation. • Incorrectness is simply not allowed • The design must be simple, both in implementation and interface. Simplicity is the most important consideration in a design. • It is slightly better to be simple than correct. CORRECTNESS
  58. PAGE NUMBER 113 The Right Thing Worse is better LUCASFCOSTA.COM

    HOW TO DEAL WITH IT • It is more important for the interface to be simple than the implementation. • Incorrectness is simply not allowed • The design must be consistent. A design is allowed to be slightly less simple and less complete to avoid inconsistency. • The design must be simple, both in implementation and interface. Simplicity is the most important consideration in a design. • It is slightly better to be simple than correct. • The design must not be overly inconsistent. Consistency can be sacrificed for simplicity in some cases. CONSISTENCY
  59. PAGE NUMBER 114 The Right Thing Worse is better LUCASFCOSTA.COM

    HOW TO DEAL WITH IT • It is more important for the interface to be simple than the implementation. • Incorrectness is simply not allowed • The design must be consistent. A design is allowed to be slightly less simple and less complete to avoid inconsistency. • The design must cover as many important situations as is practical. Simplicity is not allowed to overly reduce completeness. • The design must be simple, both in implementation and interface. Simplicity is the most important consideration in a design. • It is slightly better to be simple than correct. • The design must not be overly inconsistent. Consistency can be sacrificed for simplicity in some cases. • Completeness can be sacrificed in favor of any other quality. In fact, completeness must be sacrificed whenever implementation simplicity is jeopardized. COMPLETENESS
  60. PAGE NUMBER 115 The Right Thing Worse is better LUCASFCOSTA.COM

    HOW TO DEAL WITH IT Might take forever to build • The design must be simple, both in implementation and interface. Simplicity is the most important consideration in a design. • It is slightly better to be simple than correct. • The design must not be overly inconsistent. Consistency can be sacrificed for simplicity in some cases. • Completeness can be sacrificed in favor of any other quality. In fact, completeness must be sacrificed whenever implementation simplicity is jeopardized. COMPLETENESS
  61. 116 PAGE NUMBER What am I? Programmer or Software Developer?

    Software Architect? Software Engineer? HOW TO DEAL WITH IT
  62. PAGE NUMBER 119 This is Barcelona as seen from the

    sky. LUCASFCOSTA.COM HOW TO DEAL WITH IT
  63. 122 PAGE NUMBER We can break things We spend more

    time designing and thinking than building We can build as many times as we want We can always change things Our build time is compile time. HOW TO DEAL WITH IT
  64. PAGE NUMBER 123 LET IT GROW ADAPT AS NEEDED Be

    a town planner. LUCASFCOSTA.COM HOW TO DEAL WITH IT
  65. PAGE NUMBER LUCASFCOSTA.COM HOW TO DEAL WITH IT “ 124

    Abstractions only work well in the right context, and the right context develops as the system develops. Sam Koblenski
  66. PAGE NUMBER LUCASFCOSTA.COM 127 HOW TO DEAL WITH IT Be

    curious. Read widely. Try new things. What people call intelligence just boils down to curiosity. Aaron Swartz
  67. PAGE NUMBER LUCASFCOSTA.COM 129 solve problems thank you L U

    C A S F C O S T A . C O M github: lucasfcosta twitter: lfernandescosta
  68. 130 PAGE NUMBER Related Material/References THANK YOU! • Don't Call

    Yourself A Programmer, And Other Career Advice (Highly Recommended)
 Patrick McKenzie
 http://www.kalzumeus.com/2011/10/28/dont-call-yourself-a-programmer/ • The Cost of Abstraction
 Sam Koblenski
 http://sam-koblenski.blogspot.com/2014/07/the-cost-of-abstraction.html • The Deep Roots of Javascript Fatigue
 Calvin French-Owen
 https://segment.com/blog/the-deep-roots-of-js-fatigue/ • JavaScript Fatigue
 Eric Clemmons
 https://medium.com/@ericclemmons/javascript-fatigue-48d4011b6fc4 • JavaScript Fatigue Fatigue - Dr. Axel Rauschmayer
 http://2ality.com/2016/02/js-fatigue-fatigue.html • JavaScript Fatigue, AMP, and Paths.js - JS Party Episode #3
 https://changelog.com/jsparty/3 Building Microservices (Book)
 Sam Newman