You Don't Know JS: Coercion

Kyle Simpson (Getify)
1:45pm–3:15pm Monday, 04/20/2015
Pure Code and JavaScript
Location: Salon 12/13/14/15
Average rating: ****.
(4.38, 16 ratings)
Slides:   1-PDF 

THIS TUTORIAL HAS REQUIREMENTS AND INSTRUCTIONS LISTED BELOW

We’ve all heard it: “JS coercion is evil and bad!” It can seem so magical if you’ve never actually spent the time to understand how coercion works.

But this is definitely one of those places where you are doing yourself a disservice to follow the crowd hype. They’re all just as uninformed as you are, trust me!

In this workshop, we’re going to start from the ground up, understanding JS types, and look at the JS specification for authority on how coercion works. We’ll go through all the common culprits that get cited as “the bad parts”, and show why it’s all mostly just FUD.

Along the way, we’ll find the few legitimately bad/crazy parts, and some effective, simple rules for how to avoid those. But most importantly, we’re going to learn why coercion is not only something you should stop avoiding, but why it can actually improve your programs!

There will be plenty of code snippets for you to type along with, so come ready to code and coerce!

TUTORIAL REQUIREMENTS AND INSTRUCTIONS FOR ATTENDEES

Basic JS

Laptop with current/modern browser.

Photo of Kyle Simpson

Kyle Simpson

Getify

Kyle Simpson is an Open Web Evangelist from Austin, TX, who’s passionate about all things JavaScript. He’s an author, workshop trainer, tech speaker, and OSS contributor/leader.

Comments on this page are now closed.

Comments

Picture of Audra M. Carter
Audra M. Carter
04/28/2015 1:15am PDT

Hi Phillip,

The video will be released as a part of the Fluent compilation, approximately three weeks after the conference. If you had an All Access Pass to the conference, you will receive it under the “Your Products” tab in your oreilly.com account. Otherwise, it will be available for purchase on oreilly.com.

Phillip Berger
04/28/2015 12:14am PDT

Will the video of this talk be posted soon?

Krishna Santhanam
04/21/2015 10:38am PDT

Hi Kyle:

Could you upload the slides for this presentation? Thanks!

Tom Green
04/20/2015 8:31am PDT

Great presentation on all the details of coercion. Fun to dig into the spec a bit for the presentation. Not sure I agree with the conclusion at the end. I have personally had to fix issues created by more junior developers use of double equals which makes me think its still better to keep the linter rules against == and let developers that have a good reason, to explicitly disable that rule for just those lines where they are sure of themselves. It also then points to things that need to be reviewed more carefully.