SlideShare ist ein Scribd-Unternehmen logo
1 von 64
while42 meetup
JavaScript Sucks
How we deal with it
About Me
• Kyle Powers
About Me
• Kyle Powers
• Enterprise Cloud Meteorologist
About Me
• Kyle Powers
• Enterprise Cloud Meteorologist
• Also work on javascript 99% of my time
About Me
• Kyle Powers
• Enterprise Cloud Meteorologist
• Also work on javascript 99% of my time
• I like Sublime Text
JavaScript Quiz
Based on Gary Bernhardt’s “Wat” talk
WAT
WAT
WAT
WAT
WAT
WAT
End Quiz
• So how do we deal with this stuff?
How do we deal with this stuff
• Education
How do we deal with this stuff
• Education
• Testing
How do we deal with this stuff
• Education
• Testing
• Chrome developer console
Other bad things about JS
• Leaving off the “var” keyword makes a
variable global.
How we solve it
• When referencing a global variable “foo”, we
specify “window.foo” to make it clear that it’s
global
Other bad things about JS
• Callback hell
How we solve it
• Refactor – name functions outside of the
scope
• Keep functions shallow – usually no more than
2 levels deep
• Use the module pattern
"Write small modules that each do
one thing, and assemble them into
other modules that do a bigger
thing. You can't get into callback
hell if you don't go there.”
-Isaac Schlueter
Other useful tools
• type-check.js
• http://gkz.github.io/type-check/
If all else fails, blame it on IE6
Thanks
p.s. we’re hiring
kyle@clearslide.com
@mfkp
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7

Weitere ähnliche Inhalte

Was ist angesagt?

Angular – Say Goodbye to Javascript Soup
Angular – Say Goodbye to Javascript SoupAngular – Say Goodbye to Javascript Soup
Angular – Say Goodbye to Javascript Soup
Graeme Foster
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJS
Zahid Mahir
 
Customizing the custom loop wordcamp 2012-jeff
Customizing the custom loop   wordcamp 2012-jeffCustomizing the custom loop   wordcamp 2012-jeff
Customizing the custom loop wordcamp 2012-jeff
Alexander Sapountzis
 

Was ist angesagt? (20)

Php workshop L0 Introduction
Php workshop L0 IntroductionPhp workshop L0 Introduction
Php workshop L0 Introduction
 
Cleaning up your codebase with a clean architecture
Cleaning up your codebase with a clean architectureCleaning up your codebase with a clean architecture
Cleaning up your codebase with a clean architecture
 
Creating Hyper Performant Web Apps with React
Creating Hyper Performant Web Apps with ReactCreating Hyper Performant Web Apps with React
Creating Hyper Performant Web Apps with React
 
Freelancing and side-projects on Rails
Freelancing and side-projects on RailsFreelancing and side-projects on Rails
Freelancing and side-projects on Rails
 
Test Driven Development with AngularJS
Test Driven Development with AngularJSTest Driven Development with AngularJS
Test Driven Development with AngularJS
 
MongoDB: The Ultimate Backpack for the Cloud
MongoDB: The Ultimate Backpack for the CloudMongoDB: The Ultimate Backpack for the Cloud
MongoDB: The Ultimate Backpack for the Cloud
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Jira ICT - The magic of a fast website #jd11nl
Jira ICT - The magic of a fast website #jd11nlJira ICT - The magic of a fast website #jd11nl
Jira ICT - The magic of a fast website #jd11nl
 
Journey To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineJourney To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The Machine
 
Design patterns - The Good, the Bad, and the Anti-Pattern
Design patterns -  The Good, the Bad, and the Anti-PatternDesign patterns -  The Good, the Bad, and the Anti-Pattern
Design patterns - The Good, the Bad, and the Anti-Pattern
 
Simplicity vs. Performance NSBCon NY by Jeffrey Palermo and Andrew Siemer
Simplicity vs.Performance NSBCon NY by Jeffrey Palermo and Andrew SiemerSimplicity vs.Performance NSBCon NY by Jeffrey Palermo and Andrew Siemer
Simplicity vs. Performance NSBCon NY by Jeffrey Palermo and Andrew Siemer
 
Angular – Say Goodbye to Javascript Soup
Angular – Say Goodbye to Javascript SoupAngular – Say Goodbye to Javascript Soup
Angular – Say Goodbye to Javascript Soup
 
Site Speed Hacks: Open West 2015
Site Speed Hacks: Open West 2015Site Speed Hacks: Open West 2015
Site Speed Hacks: Open West 2015
 
Extreme Javascript Minification
Extreme Javascript MinificationExtreme Javascript Minification
Extreme Javascript Minification
 
Untangling - fall2017 - week 7
Untangling - fall2017 - week 7Untangling - fall2017 - week 7
Untangling - fall2017 - week 7
 
PowerShell Runspaces
PowerShell RunspacesPowerShell Runspaces
PowerShell Runspaces
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJS
 
Untangling - fall2017 - week5
Untangling - fall2017 - week5Untangling - fall2017 - week5
Untangling - fall2017 - week5
 
Untangling - fall2017 - week6
Untangling - fall2017 - week6Untangling - fall2017 - week6
Untangling - fall2017 - week6
 
Customizing the custom loop wordcamp 2012-jeff
Customizing the custom loop   wordcamp 2012-jeffCustomizing the custom loop   wordcamp 2012-jeff
Customizing the custom loop wordcamp 2012-jeff
 

Andere mochten auch

Javascript Myths and its Evolution
Javascript Myths and its  EvolutionJavascript Myths and its  Evolution
Javascript Myths and its Evolution
Deepu S Nath
 
How to Use SlideRocket
How to Use SlideRocketHow to Use SlideRocket
How to Use SlideRocket
desousam5
 

Andere mochten auch (13)

Javascript Myths and its Evolution
Javascript Myths and its  EvolutionJavascript Myths and its  Evolution
Javascript Myths and its Evolution
 
While42 SF presentation | w42 #7 at ClearSlide
While42 SF presentation | w42 #7 at ClearSlideWhile42 SF presentation | w42 #7 at ClearSlide
While42 SF presentation | w42 #7 at ClearSlide
 
Sliderocket
SliderocketSliderocket
Sliderocket
 
Edtech lab presentations 7 30 15
Edtech lab presentations 7 30 15Edtech lab presentations 7 30 15
Edtech lab presentations 7 30 15
 
How to Use SlideRocket
How to Use SlideRocketHow to Use SlideRocket
How to Use SlideRocket
 
2collab London Online web2.0 after the buzz
2collab London Online web2.0 after the buzz2collab London Online web2.0 after the buzz
2collab London Online web2.0 after the buzz
 
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
 
Metarefresh
MetarefreshMetarefresh
Metarefresh
 
MIT OpenDocLab's StoryTools
MIT OpenDocLab's StoryTools MIT OpenDocLab's StoryTools
MIT OpenDocLab's StoryTools
 
Why ClearSlide
Why ClearSlideWhy ClearSlide
Why ClearSlide
 
ClearSlide
ClearSlide ClearSlide
ClearSlide
 
Agile Doesn't Work - Agile Twin Cities
Agile Doesn't Work - Agile Twin CitiesAgile Doesn't Work - Agile Twin Cities
Agile Doesn't Work - Agile Twin Cities
 
Pitch Deck Templates for Startups
Pitch Deck Templates for StartupsPitch Deck Templates for Startups
Pitch Deck Templates for Startups
 

Ähnlich wie Javascript sucks & frontend challenges @ClearSlide | while42 SF #7

Javascript orientado a testes
Javascript orientado a testesJavascript orientado a testes
Javascript orientado a testes
Alexandre Gomes
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
elliando dias
 

Ähnlich wie Javascript sucks & frontend challenges @ClearSlide | while42 SF #7 (20)

Leveling Up at JavaScript
Leveling Up at JavaScriptLeveling Up at JavaScript
Leveling Up at JavaScript
 
Drupal commerce performance profiling and tunning using loadstorm experiments...
Drupal commerce performance profiling and tunning using loadstorm experiments...Drupal commerce performance profiling and tunning using loadstorm experiments...
Drupal commerce performance profiling and tunning using loadstorm experiments...
 
Javascript orientado a testes
Javascript orientado a testesJavascript orientado a testes
Javascript orientado a testes
 
ClojureScript: I can't believe this is JavaScript
ClojureScript: I can't believe this is JavaScriptClojureScript: I can't believe this is JavaScript
ClojureScript: I can't believe this is JavaScript
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...
 
The JavaScript Delusion
The JavaScript DelusionThe JavaScript Delusion
The JavaScript Delusion
 
Blazing Fast Feedback Loops in the Java Universe
Blazing Fast Feedback Loops in the Java UniverseBlazing Fast Feedback Loops in the Java Universe
Blazing Fast Feedback Loops in the Java Universe
 
Testing gone-right
Testing gone-rightTesting gone-right
Testing gone-right
 
Introduction to the wonderful world of JavaScript
Introduction to the wonderful world of JavaScriptIntroduction to the wonderful world of JavaScript
Introduction to the wonderful world of JavaScript
 
ClojureScript Anatomy
ClojureScript AnatomyClojureScript Anatomy
ClojureScript Anatomy
 
All of Javascript
All of JavascriptAll of Javascript
All of Javascript
 
33rd degree
33rd degree33rd degree
33rd degree
 
Nashorn: JavaScript that doesn’t suck (ILJUG)
Nashorn: JavaScript that doesn’t suck (ILJUG)Nashorn: JavaScript that doesn’t suck (ILJUG)
Nashorn: JavaScript that doesn’t suck (ILJUG)
 
11 Amazing things I Learnt At Word Camp Sydney 2014
11 Amazing things I Learnt At Word Camp Sydney 201411 Amazing things I Learnt At Word Camp Sydney 2014
11 Amazing things I Learnt At Word Camp Sydney 2014
 
3 years with Clojure
3 years with Clojure3 years with Clojure
3 years with Clojure
 
Qcon beijing 2010
Qcon beijing 2010Qcon beijing 2010
Qcon beijing 2010
 
Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
 
Refactoring RIA Unleashed 2011
Refactoring RIA Unleashed 2011Refactoring RIA Unleashed 2011
Refactoring RIA Unleashed 2011
 
Javascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to Titanium
 

Mehr von While42

Singapore chapitre #4 - You don't know
Singapore chapitre #4 - You don't knowSingapore chapitre #4 - You don't know
Singapore chapitre #4 - You don't know
While42
 

Mehr von While42 (14)

2 membres de while42 dans Programmez!
2 membres de while42 dans Programmez!2 membres de while42 dans Programmez!
2 membres de while42 dans Programmez!
 
while42 Marseille #1
while42 Marseille #1while42 Marseille #1
while42 Marseille #1
 
The Immigration reform
The Immigration reformThe Immigration reform
The Immigration reform
 
42 (school) at 2 years of while42
42 (school) at 2 years of while4242 (school) at 2 years of while42
42 (school) at 2 years of while42
 
La Silicon Valley vue par Camille Despringhere
La Silicon Valley vue par Camille DespringhereLa Silicon Valley vue par Camille Despringhere
La Silicon Valley vue par Camille Despringhere
 
Singapore chapitre #4 - You don't know
Singapore chapitre #4 - You don't knowSingapore chapitre #4 - You don't know
Singapore chapitre #4 - You don't know
 
Singapore chapitre #4 - Presentation
Singapore chapitre #4 - PresentationSingapore chapitre #4 - Presentation
Singapore chapitre #4 - Presentation
 
while42 mentionné dans la version papier du quotidien "Le Monde"
while42 mentionné dans la version papier du quotidien "Le Monde"while42 mentionné dans la version papier du quotidien "Le Monde"
while42 mentionné dans la version papier du quotidien "Le Monde"
 
Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2
 
while42 Montreal #0 @ wajam
while42 Montreal #0 @ wajamwhile42 Montreal #0 @ wajam
while42 Montreal #0 @ wajam
 
Bugs from Outer Space | while42 SF #6
Bugs from Outer Space | while42 SF #6Bugs from Outer Space | while42 SF #6
Bugs from Outer Space | while42 SF #6
 
While42 SF #6: introducing while42 to Girls in Tech and Kwarter
While42 SF #6: introducing while42 to Girls in Tech and KwarterWhile42 SF #6: introducing while42 to Girls in Tech and Kwarter
While42 SF #6: introducing while42 to Girls in Tech and Kwarter
 
While42 Paris #1 - Presentation de while42
While42 Paris #1 - Presentation de while42While42 Paris #1 - Presentation de while42
While42 Paris #1 - Presentation de while42
 
Hack le droid
Hack le droidHack le droid
Hack le droid
 

Kürzlich hochgeladen

Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
Muhammad Subhan
 

Kürzlich hochgeladen (20)

Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 

Javascript sucks & frontend challenges @ClearSlide | while42 SF #7