meta_pixel
Tapesearch Logo
Log in
Syntax - Tasty Web Development Treats

Hasty Treat - JavaScript Event Buzzwords — Sync, Concurrent, Defer, Blocking, Workers

Syntax - Tasty Web Development Treats

Wes Bos

Tech News, Technology, News

4.91.2K Ratings

🗓️ 5 July 2021

⏱️ 25 minutes

🧾️ Download transcript

Summary

In this Hasty Treat, Scott and Wes define some JavaScript Buzzwords and talk about what they mean! Freshbooks - Sponsor Get a 30 day free trial of Freshbooks at freshbooks.com/syntax and put SYNTAX in the “How did you hear about us?” section. Sentry - Sponsor If you want to know what’s happening with your code, track errors and monitor performance with Sentry. Sentry’s Application Monitoring platform helps developers see performance issues, fix errors faster, and optimize their code health. Cut your time on error resolution from hours to minutes. It works with any language and integrates with dozens of other services. Syntax listeners new to Sentry can get two months for free by visiting Sentry.io and using the coupon code TASTYTREAT during sign up. Show Notes 03:24 - Synchronous / Async 05:23 - Multi-threaded JavaScript has a single “main thread” But you can have more threads with web workers 08:12 - Blocking JavaScript can stop other things on the page from running A script tag can block HTML from being parsed Most stuff in JavaScript is non-blocking Node.js write to filesystem can be blocking 10:27 - Concurrent + Parallel JavaScript start/stop are concurrent The API runs on a different thread Doesn’t REALLY matter https://joearms.github.io/published/2013-04-05-concurrent-and-parallel-programming.html 13:22 - Consecutive / Waterfall One after another 13:48 - Callback A function to run when this thing happens or is done Click event callback Websocket on data callback Like a tweet stream Data fetch callback Almost entirely replaced with async + await http://callbackhell.com/ https://caolan.github.io/async/v3/ 17:56 - Script Tag Async + Defer Doesn’t block other content Runs when ready - doesn’t care about DOMcontentLoaded Wait until the page is loaded before running If the script tag is above content, don’t wait for it Good for things that aren’t called on page load 21:54 - Lazy Load it in later - maybe when it’s scrolled into view, or as needed Not mission-critical Tweet us your tasty treats! Scott’s Instagram LevelUpTutorials Instagram Wes’ Instagram Wes’ Twitter Wes’ Facebook Scott’s Twitter Make sure to include @SyntaxFM in your tweets

Transcript

Click on a timestamp to play from that location

0:00.0

Monday Monday Monday open wide dev fans get ready to stuff your face with Javascript CSS node module barbecue tips get work flows break dancing soft skills web development the hastiest the

0:13.5

Carrazius the tastiest web development treats coming in hot. Here is West

0:19.2

Barracuda boss and Scott L. Toro Lungo to Linsky

0:25.2

Welcome to syntax in this Monday Monday Monday Monday Monday Monday Monday hasty treat we're going to be talking about some Javascript buzzwords that can send new

0:37.3

Developers old developers and intermediate developers into a tizzy because they can just be hard to understand. My name is Scott

0:45.3

I'm a developer from Denver Colorado and with me as always is the U.S. boss. Hey, I'm excited to get into some of these. I don't necessarily know if they're buzzwords, but they're words that are sometimes hard to understand what they mean in Javascript. Yeah, jargony jargon. Yeah. So

1:04.3

This episode is sponsored by two amazing companies today. I'm talking about fresh books and century. Now century is the perfect place to see all of your errors and exceptions happen because

1:15.0

They give them to you in a giant table that is really great to be able to be filtered or saved or marked as resolved or marked as ignored or do any of those things that you would possibly want to do whenever an error comes into your site.

1:28.6

You can also assign them to a GitHub issues directly. Hey, is there one person in particular who goofed this thing up? Hey, you can go ping them and assign it to them. If you say, hey, you, uh, you did this and you know how I know you did this.

1:41.1

Well, it was introduced in this specific PR that you made, but of course, you don't want to do that a non blamie or judgment away. You're going to be very nice about it.

1:49.6

And you can do all of that over at century dot I owe use the coupon code at tasty treat all over case in all one word. If you want to handle your errors and exceptions track and make sure that your users are eating the best possible version of your site like a pro.

2:03.7

So thank you so much for century for sponsoring.

2:06.3

What else was sponsored by fresh books, the cloud accounting solution. I'm going to focus in on one of their features today, which is it's entirely a cloud based service, meaning that your computer crashes. You lose all your files. You don't have backups. We know how you are.

2:21.7

You're not going to lose any of this vitally important information because that would be a bad bad day if you had to do your taxes or you had to bill a client and the information about all of that stuff was gone.

2:34.9

So fresh books saves it all in the cloud. You can access it on the website and on the app. Whatever it is that you need. Don't have to sweat about it. Check it out freshbooks.com forward slash syntax for 30 day, no credit card required trial. Thank you, fresh books for sponsoring sick.

2:51.9

All right, let's get into doing some talking about some buzzwords here. So we've got a whole bunch of synchronous synchronous multi threaded concurrent and parallel consecutive and waterfall call back blocking a sink to fur and lazy. So these are all words in JavaScript.

3:09.9

And they all kind of sort of are in the same space of when do things happen and understanding what they mean and the implications of them is what we're going to try to break down and explain in this episode.

3:23.5

So the first one is I think we have synchronous and asynchronous. And these are words that are used both in programming, which can be a little bit confusing, but also if you I like to refer to them in real life. So if you are doing something

3:39.7

synchronously in your work, it doesn't mean do them at the same time, which is really weird because if you think about synchronized swimming.

3:48.5

Those people are swimming at the same time. And I don't understand why it is I've talked about this before I even tweeted it out earlier. Nobody seems to know why it's not called a synchronized swimming.

3:58.1

But the idea with something being synchronous is that they are explicitly done one after another and you cannot do the next thing until the first one is finished.

4:10.2

And the idea with a synchronous work is that you can start something. It will go off and do it and then come back to you when it is. So this is not to be confused with awaiting because awaiting kind of makes a synchronous functions

...

Please login to see the full transcript.

Disclaimer: The podcast and artwork embedded on this page are from Wes Bos, and are the property of its owner and not affiliated with or endorsed by Tapesearch.

Generated transcripts are the property of Wes Bos and are distributed freely under the Fair Use doctrine. Transcripts generated by Tapesearch are not guaranteed to be accurate.

Copyright © Tapesearch 2026.