Bytes.dev - Bytes: The Edge is just a spicy CDN

Bytes banner (Turn on images 😘)

This week, we’re experimenting with our runtime features, learning about The Edge™️, and (hopefully) avoiding accidental tax fraud.

Welcome to #97.


Mountain Dew as a shower head meme

Some experiments pay off

Node gets experimental

Node 18 was released last week, and it celebrated becoming a legal adult by doing what lots of us did on our 18th birthday: vomiting tobacco and Flamin’ Hot Cheetos out our nose ✨experimenting with stuff✨.

All of the big new features in Node 18 come with that spooky (experimental) flag, so make sure you know your limits when you’re trying them out. (I always recommend the buddy system.)

🔬 Experiment #1: global fetch API – This provides a standard around fetching data via http requests that’s similar to the popular node-fetch library but is “as close to browser spec-compliant as possible.” The Node team has been working on this for literally 4 years, but it turns out that it’s still impossible to please everybody.

🔬 Experiment #2: Test runner module – This new, built-in test runner lets you create and run Node tests without a third-party library. This is great news for smaller libraries looking to minimize dependencies and developers who just want to use Jest less (so, everyone).

🔬 Experiment #3: Web Streams API – This implementation of 17 different APIs is a lot. But the idea is that it allows you to use JavaScript to programmatically access streams of data and process them in a bunch of different ways.

The bottom line: We’re just happy to see Node being so productive despite the abandonment issues they must have been dealing with ever since dad Ryan Dahl left.


jeopardy answer of what is pain

Building notifications from scratch. [sponsored]

Courier’s new API saved me from my PM

You know that one person on your team who loves building complex notification systems?

Of course you don’t.

That’s because notifications have become a special kind of hell with tons of different platforms to worry about – email, SMS, chat, web and mobile push, Slack and more.

That’s what makes Courier’s simple API so powerful. It’s a one-stop shop for all notification platforms – so you can use the same API call to send your users an email, an SMS, a Slack message, or a push notification.

And their new Courier Elemental update gives you a JSON-based syntax to easily customize the design and content for each platform you send messages to.

This makes designing the actual notifications a lot less tedious, and it lets you create more dynamic notifications like magic login links and location based alerts.

So tell your PM to go as crazy as they want with notifications, because Courier’s got your back.

Check it out and get 10,000 free sends a month.


Severance meme

My innie trying to figure out wtf "the edge" is

Netlify and Deno are teaming up at The Edge™️

Netlify and Deno just announced that they’re partnering to deliver Edge Functions – a new serverless compute offering. Given that developers reference the “the edge” more than my mother-in-law’s flat earth Facebook group, we should probably address what the big deal is.

“The Edge”, otherwise known as a spicy Content Delivery Network (CDN), has been around for a while. CDNs provide the infrastructure to cache static content and deliver it from the closest server to the end user. Cloudflare changed the game when they released Workers in 2017, making it possible to run JavaScript at the edge.

Since then, hosting providers have been aggressively pursuing their own “edge compute” offerings. Like Workers, Deno & Netlify’s new offering is built on top of the V8 JavaScript engine and has a similar API to service workers in the browser. Here are some of the highlights:

  1. Cheap – 24x less expensive than standard serverless functions (3 million/month for free).

  2. Fast – without the overhead of containers, edge functions can start faster and run closer to the user, reducing latency.

  3. Web APIs – Because they’re built on web standards, code can be moved from the client to the server without many of the previous tradeoffs.

  4. New paradigm – Edge rendering can be nearly as fast as serving static files, potentially changing the paradigm for how developers think about building applications.

The Bottom Line: It’s hard to be more stoked about “the Edge” than I was in high school (closet U2 fan - terrible decision), but with companies like Cloudflare, Deno, and the rest of the homies working on it, “the Edge” definitely seems like the next big thing.


Jobs

Synapse Studios is looking for Senior JavaScript Engineers in the US

Synapse is a software consultancy (Node/React) with a focus on engineering excellence and tightly knit, low-ego teams. We believe devs want to feel productive, challenged, and supported and build our culture around those concepts. Come join our growing crew as we solve interesting challenges in healthcare, fitness, IoT, retail and more, for a variety of clients, at scale.


🔬 Spot the Bug – Sponsored by PostHog

PostHog is an open-source product analytics suite you can self-host. Heatmaps, Recordings, Funnels and more — all in a platform where you can build your own TypeScript plugins!

function calcPrice(price, tax, discount) {
  tax = tax || 0.05;
  discount = discount || 0;

  return price - price * discount + price * tax;
}

Cool Bits

  1. JSDB is a new tool that lets you use JavaScript as your database. Because when everyone’s super a backend developer, no one will be 😈

  2. Eleventy didn’t want to feel left out of EdgeWeek™️, so they announced plans for Eleventy Edge – a new plugin to run Eleventy in an Edge Function so you can easily add dynamic content to your sites.

  3. React - The Road to Enterprise is a new, advanced React book that’ll teach you industry-level techniques, best practices and concepts like advanced component and state management patterns, performance optimisation, scalable and maintainable architecture, testing, and much more. [sponsored]

  4. Óscar Otero created this Deno cheat sheet for no other reason than to help you feel superior to your co-workers. You’re welcome.

  5. Misko Hevery wrote about how Hydration is Pure Overhead. That may be true, but Misko should know how important hydration is this time of year – especially when people’s allergies are acting up.

  6. Marcin Wanago wrote this 10-part series on JavaScript testing that covers a range of beginner and advanced topics. Thankfully, we can just use Node’s built-in test runner for everything now, so we’ll never have to read it.

  7. David East from the Firebase team made this 30-minute crash course that shows how to use Firestore and Firebase Auth together.

  8. Reasonable Colors is an open-source color system for building nice color palettes. Now if only we could get someone to create some Reasonable Tax Reform, so that I could pay the US government what I owe without having stress dreams about being thrown in prison for committing accidental tax fraud.


🔬 Spot the Bug – Sponsored by PostHog

The || operator checks for falsy values and 0 is a falsy value, which would accidentally apply the default tax rate. To fix this, instead of checking for a falsy value, you can use the nullish coalescing (??) operator.

function calcPrice(price, tax, discount) {
  tax = tax ?? 0.05;
  discount = discount ?? 0;

  return price - price * discount + price * tax;
}

The nullish coalescing operator works because it returns its right-hand side operand when its left-hand side operand is null or undefined (NOT 0), and otherwise returns its left-hand side operand.


Share Bytes

ui.dev banner
 

We work hard to make Bytes something you'd want to share with your developer friends. And to make it a little easier, we'll give you free stuff when you do.

20

Your bits

Your Referral Page

Your shareable link

https://bytes.dev?x=1697807915
 

Have a product you think our developers will love?
Advertise in Bytes

youtube icon youtube icon twitter icon instagram icon

50 W Broadway Ste 333 PMB 51647 Salt Lake City, Utah 84101

Unsubscribe from Bytes

You Might Also Like

LockBit Ransomware Developer Charged for Billions in Global Damages

Saturday, December 21, 2024

THN Daily Updates Newsletter cover The Data Science Handbook, 2nd Edition ($60.00 Value) FREE for a Limited Time Practical, accessible guide to becoming a data scientist, updated to include the latest

Re: My VPN recommendation

Saturday, December 21, 2024

Do you know when to use a VPN and what it does to protect your data? Any time you are connected to the internet, your information is at risk of being tracked or hacked. A VPN helps keep your surfing

📧 Scheduling Background Jobs With Quartz in .NET (advanced concepts)

Saturday, December 21, 2024

​ Scheduling Background Jobs With Quartz in .NET (advanced concepts) Read on: m​y website / Read time: 6 minutes The .NET Weekly is brought to you by: It's been a big year for API collaborations!

The Thrill Was Never There 🎸

Saturday, December 21, 2024

Takeaways from a punk-rock creator who says he doesn't like punk. Here's a version for your browser. Hunting for the end of the long tail • December 20, 2024 The Thrill Was Never There A famous

🎮 Smartphones Will Never Kill Dedicated Handhelds — 11 Stocking Stuffers for iPhone Owners

Friday, December 20, 2024

Also: How to Add a Smart Speaker to Your Home Assistant Setup How-To Geek Logo December 20, 2024 Did You Know The nursery rhyme "Mary Had a Little Lamb" is based on a true story. The girl in

Daily Coding Problem: Problem #1643 [Easy]

Friday, December 20, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Facebook. Given a 32-bit integer, return the number with its bits reversed. For example,

JSK Daily for Dec 20, 2024

Friday, December 20, 2024

JSK Daily for Dec 20, 2024 View this email in your browser A community curated daily e-mail of JavaScript news Empower Your Data Insights: Integrating JavaScript Gantt Chart into Power BI Syncfusion

Charted | America’s Top 20 Billionaires, by Wealth 💰

Friday, December 20, 2024

America's top 20 billionaires have a combined wealth of $2.7 trillion, as of December 2024. See how it all breaks down in this infographic. View Online | Subscribe | Download Our App Presented by:

My holiday AI reading list 🎄

Friday, December 20, 2024

plus, what's coming in 2025 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Spyglass Dispatch: On to '25

Friday, December 20, 2024

Google's 'AI Mode' • Billionaires at Dinner • Nintendo's Switch 2 • Amazon's Bond Problem The Spyglass Dispatch is a newsletter sent on weekdays featuring links and commentary on