Share
Embed
What Can We Learn With JavaScript Fatigue? - The Conf SP
Lucas Fernandes da Costa
September 30, 2017
Transcript
130 slides
-
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 github: lucasfcosta twitter: lfernandescosta L U C
A S F C O S T A . C O M -
PAGE NUMBER 3 github: lucasfcosta twitter: lfernandescosta L U C
A S F C O S T A . C O M -
PAGE NUMBER 4 github: lucasfcosta twitter: lfernandescosta L U C
A S F C O S T A . C O M -
5 PAGE NUMBER github: lucasfcosta twitter: lfernandescosta L U C
A S F C O S T A . C O M -
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 -
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 -
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 -
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 -
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. -
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 -
REALITIES OF YOUR INDUSTRY 101 PAGE NUMBER LUCASFCOSTA.COM 14 You
are not paid to write code The less code you write, the better -
PAGE NUMBER 15 You’re in the business of unemploying people.
Patrick McKenzie REALITIES OF YOUR INDUSTRY 101 LUCASFCOSTA.COM -
PAGE NUMBER LUCASFCOSTA.COM 17 REALITIES OF YOUR INDUSTRY 101 versus
Revenue Cost All that matters™ -
PAGE NUMBER 19 Realities of your industry 101 REALITIES OF
YOUR INDUSTRY 101 LUCASFCOSTA.COM -
PAGE NUMBER 20 Realities of your industry 101 REALITIES OF
YOUR INDUSTRY 101 LUCASFCOSTA.COM -
PAGE NUMBER 21 Realities of capitalism 101 REALITIES OF YOUR
INDUSTRY 101 LUCASFCOSTA.COM -
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 -
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," -
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 -
PAGE NUMBER LUCASFCOSTA.COM REALITIES OF YOUR INDUSTRY 101 25 JS
These things exist to solve problems. -
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 -
PAGE NUMBER LUCASFCOSTA.COM REALITIES OF YOUR INDUSTRY 101 Donald Knuth
“ 27 "Premature optimization is the root of all evil" -
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 -
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 -
PAGE NUMBER 33 More choices Less satisfaction REALITIES OF YOUR
INDUSTRY 101 LUCASFCOSTA.COM -
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 -
PAGE NUMBER 35 Have you ever wondered why surprise box
subscriptions are so popular nowadays? REALITIES OF YOUR INDUSTRY 101 LUCASFCOSTA.COM -
PAGE NUMBER 36 Our willpower is limited REALITIES OF YOUR
INDUSTRY 101 LUCASFCOSTA.COM -
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 -
PAGE NUMBER 38 We might not be JavaScript fatigued maybe
we’re just decision fatigued REALITIES OF YOUR INDUSTRY 101 LUCASFCOSTA.COM -
PAGE NUMBER LUCASFCOSTA.COM JAVASCRIPT 44 400 a month Birth Rate
in Florianópolis -
PAGE NUMBER 46 ? But how did that happen? JAVASCRIPT
LUCASFCOSTA.COM -
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 -
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 -
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 -
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 -
PAGE NUMBER 52 ECMAScript then became the basis for all
JavaScript implementations JAVASCRIPT LUCASFCOSTA.COM LUCASFCOSTA.COM -
PAGE NUMBER 53 ES1 1997 ES2 1998 ES3 1999 ES4
2008 (CANCELLED) ES5 2009 ES6 2015 JAVASCRIPT LUCASFCOSTA.COM -
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 -
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 -
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 -
PAGE NUMBER JAVASCRIPT LUCASFCOSTA.COM 63 Good programmers know what to
write. Eric. S. Raymond Great ones know what to rewrite (and reuse). -
PAGE NUMBER LUCASFCOSTA.COM 66 Do one thing, and do it
well. JAVASCRIPT -
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 -
PAGE NUMBER 72 These things are not new grunt npm
webpack LUCASFCOSTA.COM JAVASCRIPT -
PAGE NUMBER LUCASFCOSTA.COM 75 HOW TO DEAL WITH IT you
don’t need to know everything -
PAGE NUMBER LUCASFCOSTA.COM 76 HOW TO DEAL WITH IT don’t
be defined by your stack -
PAGE NUMBER LUCASFCOSTA.COM 77 HOW TO DEAL WITH IT Master
Foo & The Recruiter -
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. -
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?” -
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?” -
PAGE NUMBER LUCASFCOSTA.COM 81 HOW TO DEAL WITH IT “I
am learning to walk,” replied Master Foo. -
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.” -
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 -
PAGE NUMBER 84 start from the beginning HTTP CompSci Fundamentals
HOW TO DEAL WITH IT LUCASFCOSTA.COM -
PAGE NUMBER LUCASFCOSTA.COM 85 HOW TO DEAL WITH IT don’t
be too attached to a single technology -
PAGE NUMBER LUCASFCOSTA.COM 87 HOW TO DEAL WITH IT What
I cannot create I do not understand. Richard Feynman -
PAGE NUMBER LUCASFCOSTA.COM 88 HOW TO DEAL WITH IT focus
on what matters -
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. -
PAGE NUMBER LUCASFCOSTA.COM 91 HOW TO DEAL WITH IT don’t
get ahead of yourself -
PAGE NUMBER LUCASFCOSTA.COM 92 HOW TO DEAL WITH IT do
things that don’t scale Paul Graham -
PAGE NUMBER 93 The Master Plan Thanks Mr. Elon Musk,
you are awesome LUCASFCOSTA.COM HOW TO DEAL WITH IT -
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 -
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 -
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 -
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. -
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 -
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 -
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 -
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 -
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 -
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?" -
PAGE NUMBER LUCASFCOSTA.COM 106 HOW TO DEAL WITH IT Henrik
Kniberg meh, that’s cliché -
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 -
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 -
PAGE NUMBER 110 The Right Thing Worse is better LUCASFCOSTA.COM
HOW TO DEAL WITH IT SIMPLICITY -
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 -
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 -
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 -
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 -
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 -
116 PAGE NUMBER What am I? Programmer or Software Developer?
Software Architect? Software Engineer? HOW TO DEAL WITH IT -
PAGE NUMBER 119 This is Barcelona as seen from the
sky. LUCASFCOSTA.COM HOW TO DEAL WITH IT -
PAGE NUMBER 121 Software is flexible. Engineering is not. HOW
TO DEAL WITH IT -
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 -
PAGE NUMBER 123 LET IT GROW ADAPT AS NEEDED Be
a town planner. LUCASFCOSTA.COM HOW TO DEAL WITH IT -
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 -
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 -
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 -
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