![]() Last week, Billy McFarland (aka The Fyre Festival fraudster) was put in solitary confinement for launching a podcast from prison. Please don’t tell me how they smuggled the mics in. We hope this gives you the courage to pick up that side project you’ve been putting off (unless it’s illegal). Node.js 15 is Released
Featuring all your favorite artists! (Except Ryan Dahl 🦕) The OG JavaScript runtime blessed us with a major release last week, which means that Node.js 15 is now the “current” release line that gets all the fun new features. It also means that if you’re still using Node 14 you’re either a total n00b or you’re someone with a balanced, fulfilling life outside of JavaScript-land (gross). Either way, Node.js 14 is getting moved to long-term support (LTS) later this week, so here’s what’s new with Node 15:
The Bottom LineIt seems like the trendiest thing in OSS is to build a new runtime from scratch that’s got cool buzzwords like “modern” and “fast” and “TypeScript.” But until Deno (or someone else) grabs the crown, Node.js is still the runtime king. TWIH: AngularJS Hits a Decade
AngularJS devs with that 10-year anniversary strength 10 years ago last week, AngularJS was publicly released to the world. It was created at Google by Misko Hevery as a tool to allow web designers to interact with both the frontend and backend. Misko originally named it GetAngular because of HTML’s angular brackets ( But in late 2009, GetAngular seemed destined to remain a small side project forever. Until Misko made a bet with his boss that changed the course of web history. At the time, Misko was working on the small Google Feedback team, who had grinded out 17,000+ lines of code over 6 months. As the app’s codebase grew, Misko and his teammates were getting frustrated with how hard it was to test and modify the code. So Misko did what any developer would do: he bet his manager that he could rewrite the entire app from scratch in 2 weeks using his side project JavaScript framework (GetAngular). Misko lost the bet because it technically took him a whole 3 weeks to rewrite the app. Along the way, he managed to reduce the codebase from 17,000 lines to 1,500. Not bad. At that point, the manager realized that our boy Misko might be onto something with this whole “JavaScript framework” thing, and decided to invest some Google-bucks into building it out. We’re not totally sure when the name officially changed to Angular, but it worked out for everyone except for this guy who could have sold that handle for quite a bit… After a few months of work, AngularJS had its initial public release on October 20, 2010. So what’s the lesson here? If you’re stuck working on a large, unruly codebase, just stop what you’re doing and invent your own JavaScript framework real quick. It’ll be much easier that way. Cool Bits
One Question InterviewWhat does building for the web look like 5 years from now?![]() “Five years from now, I hope to see a world where our tools have taken further leaps and bound forward to empowering developers to build and scale applications at an even faster rate than today with things like improved debugging tools and better cross-platform support. Most importantly though, I hope to see that the web community continues to hold true to its core values of sharing knowledge and creating a warm community that people can join regardless of their background.” Ben will be giving a ui.dev Event titled “Introduction to Vue 3” this Thursday. JS Tip: == vs ===
When writing software, the simpler solution is almost always the better one. If in order to use a feature I first have to learn and remember a list of rules pertaining to it, I try my best to avoid it. Not because that feature might not be valuable to know, but because I don’t trust myself to remember every nuanced rule. That logic is the primary decision to why I always use triple equals ( Identity Operator (triple equals, ===)When using triple equals Strict EqualityStrict equality checks that both the type (
Seems simple enough, but as mentioned earlier this rule breaks down when we start to compare reference values (or values that aren’t primitives). Reference EqualityAs we saw in the previous example, primitives are compared by their value. However, if you use triple equals with reference values, it’s going to compare the references (or spots in memory).
Even though each of the examples above has the same type and what appears to be the same value, because they’re reference values, JavaScript compares the references in memory, not the actual value. In each of the examples the references or locations in memory are different, which is why we always get false. We can see this further by assigning two variable to the same reference in memory and then using the identity operator on them.
In the example both In summary, when using the Identity Operator ( Equality Operator (double equals, ==)Unlike the Identity Operator (
So what exactly is going on here? Notice that each comparison is being made between different types. As we saw earlier with the Identity Operator ( So in the first example, It’s that type coercion stage which makes the Equality Operator ( If you and anyone who works on your codebase is confident in all of JavaScript’s type coercion rules, feel free to use whichever operator you’d like. However, if you’re like me and you’d rather use the tool that works how you’d expect, stick with the Identity Operator (===). |