infinity divs

Issue #123.September 29, 2022.2 Minute read.
Bytes

Welcome to #123.

Big congrats to Ludacris aficionado Rory Flint for winning last issue’s prize. For those wondering, the song was Southern Hospitality. Most of you went with Act a Fool or Get Back – both great choices as well.

For our last giveaway of Festival of Bytes, we’ll be giving away an SNES Nintendo Classic Mini. To win, you need to be the 200th person to respond to this email. GLHF, RIP in peace my inbox.

This week, we’ve got Steve the Pirate, an important reminder about teen drinking, and our good friend Evan helping us solve a hairy problem.


Eyeballs logo

The Main Thing

J-Kwon in the Tipsy music video with the tRPC logo

Everybody in the club gettin' tRPC

tRPC rhymes with Tipsy

The only people who love anything more than we love making early 2000’s rap references might be the folks on Twitter aggressively simping for tRPC. We respect the hustle, so we decided to see what the big deal is.

What’s tRPC? RPC (Remote Procedure Calls) is a network protocol for how different programs can communicate with each another. Google developed their own version of this called gRPC (gripsy?) back in 2016, which can do some cool stuff like auto generating bindings between clients and servers — but it never really took off for building apps in the browser.

Enter tRPC (“trip-C”) — a different take on the RPC protocol that uses TypeScript to give your app end-to-end type safety without schemas or code generation. Let’s take a look at some of its cooler features:

  • Type-safety: TS apps that don’t have end-to-end safety are like off-brand, glow in the dark condoms — exciting and fun, but full of unintended consequences (I’m told). tRPC helps you prevent unwanted type errors and gives you the peace of mind that comes from full coverage.

  • Runtime Adaptors: tRPC comes with out-of-the-box support for Express, Fastify, Next, AWS Lambda, and even Fetch (if you’re living on the edge).

  • Request batching: Requests made at the same time can be automatically combined into a single request. PerfLord approved.

  • Lightweight: tRPC has no dependencies and only a “tiny” client side footprint.

Bottom Line: J-Kwon taught us all that “teen drinking is very bad” — but thankfully, tRPC has showed us that remote procedure calls don’t have to be.

        

Bright Data logo

Our Friends
(With Benefits)

Guy with spiky hair on a laptop in coffee shop

Let's get this data

Bright Data is the easiest way to get public web data

Your team has a great idea for this new app. The problem? The data… isn’t easily accessible, you don’t want to spend tons of engineering time trying to get it, and the legal/HR team says you’re “never allowed to visit BlackHatWorld again.”

That’s where Bright Data can help. They can get you public data from anywhere on the internet, and make it easily consumable via JSON or Webhooks. Here’s how:

  • It comes with pre-built web scrapers you can use out of the box, or you can build your own in JavaScript with their IDE.

  • Their “Unblocker” tool lets you scrape public web data from super complex sites — including solutions for CAPTCHAs.

  • If you don’t want to worry about scraping, Bright Data has custom, unique datasets for industries like ecomm and finance that you can access via their API.

Want a practice use case? Check out this video where Nick White used Bright Data to build an app that alerted him when Airbnb prices dropped — even though Airbnb doesn’t even have a pricing API 🔥.

What data are you looking for? Bright Data can get it for you — just ask.


Trends logo

Trend of the Week

Sponsored by Datadog

Their Frontend Monitoring Guide demonstrates how to monitor three key aspects of your single-page apps to optimize the UX. (Your users will thank you for reading this.)

Commander vs. Minimist vs. Optionator vs. Yargs

CLI Trends -- data by npmtrends.com

Commander, Minimist, Optionator, Yargs (aka The 4 horsemen of the Apocalypse), are quietly crushing the npm download game.

Incredibly, these frameworks (in addition to having all having v solid names), represent over 200 million weekly downloads. Yes, two hundred million. Even if you’re in 4th place, it’s hard to feel like you’re losing with 40,000,000 weekly downloads (respect, Optionator).

Some takeaways:

  1. Sitting lower in the stack means you get a ton of downloads. Duh, but did you expect 40 milli to be the floor? Not me.

  2. Well maintained libraries that have been around for a long time do crazy numbers, especially if you were written by The Godfather of Node.js, TJ Holowaychuk.

  3. You can still do big numbers, even if you aren’t actively maintained. Case in point, Optionator — which hasn’t been updated in 2 years. Going all in on “if it ain’t broke don’t fix it”.

  4. Yargs went full Steve the Pirate with its branding and no one blinked an eye. File that away under “things you love to see.”

        

Cool Bits logo

Cool Bits

  1. The first-ever ViteConf is happening for free online on October 11-12 with a speaker lineup that’s full of bangers. Just remember, ViteConf rhymes with FeetConf, so we’ll be ready for a rousing game of “Guess whose foot this is?” during his keynote.

  2. Yuan Chuan wrote about Experimenting with a New Syntax to Write SVG. Because that’s what you can do when you’re Yuan, and you’ve forgotten more about SVG than most of us will ever learn in our lifetimes.

  3. Unlayer built this an embeddable Drag and Drop Editor for SaaS, so that your customers can easily create beautiful and responsive emails and websites. It’s a great way to unlock a ton of new functionality for your SaaS app without having to do much extra work. Win-win. [sponsored]

  4. Vivian had that Optionator energy when she wrote about Outdated vs. Complete apps as a “defense of apps that don’t need updates.” Here’s hoping she writes something similar about third-party routing libraries soon.

  5. The 2022nd edition of #divtober kicks off on Saturday. If you’re not familiar, it’s where Lynn uses a single div to create things that you couldn’t do with infinity divs.

  6. Paul Scanlon wrote about What’s new with Gatsby in 2022 — but he failed to mention anything about what the green light at the end of the dock really symbolizes.

  7. Cloudflare and a bunch of VC firms are launching Workers Launchpad — a $1.25 billion fund to invest in startups built on Cloudflare Workers. Perfect timing for the Guess whose foot this is? app I’m planning on building with Vite and Cloudflare Workers.

  8. Evan Bacon from Expo just announced the new Expo Router, which attempts to solve one of the hairiest problems in cross-platform app development: navigation. I DM’d Evan once to see if he could help me solve a hairy problem of my own, but all he said was “Please stop sending me pictures of your back. I literally don’t know who you are.” Classic Evan.