another made up acronym to sound smart with your dev friends

Issue #113.August 15, 2022.2 Minute read.
Bytes

This week, we’ve got an Astro CEO bot, another made up acronym you can use to sound smart with your developer friends (NOT created by Vercel this time), and recurring nightmares from my visit to the Halifax Oyster Festival. Welcome to #113.


Monkey drinking Powerade

Framework early adopters drinking the Kool Aid.

Better late than never

Astro v1.0 was released this week, which mean’s its officially ready for production (like that’s ever stopped you savages).

The release was originally supposed to come out on June 8, but since we’re using the React team’s timeline, it’s technically still 3.5 years early. The big question is… was it worth the wait?

It turns out, a LOT goes into a major release. The Astro team cut 73 beta releases and 8 release candidates leading up to v1 (basically the developer version of astro_final_final_v3.psd for you designers out there).

There’s something to be said for taking the time to polish your APIs, fix bugs, update docs, and get your house in order before a major release. But this release also comes with a number of significant upgrades:

  1. Image Optimization — v1 adds two new components, <Picture and <Image />, which are built on sharp and do built-in image optimization.

  2. MDX Migration — At the 11th hour the team swapped out their home grown Markdown solution for the more established and faster MDX. Bryce felt good about it.

  3. Vite 3.0 — Astro is now running on the latest and greatest Vite has to offer, improving things like bundle size, SSR support, and a faster local dev server.

  4. SSR Builds — No longer experimental, Astro supports SSR with adaptors for all your favorite FaaS providers so you can lean into that MPA Island Boy lifestyle.

Bottom Line: It’s a great quality when a CEO can admit when they are wrong (👋 Fred), but creating a bot to code for you while you are procrastinating on a release CEOing is next level. I see you fredkbot.


Guy pouring wine in a shower

When you (kind of) get analytics working after 12 weeks of SQL hell [sponsored]

PostHog cracked the code

For centuries, product managers and philosophers have tried to solve The Analytics Dilemma: “The more engineering time you spend building product analytics, the less time you can spend on *actually building* your product.”

But PostHog has finally cut the Gordian Knot and set us all free.

They built an open source (8,000 GH stars with 280+ contributors) and fully-featured product analytics platform that you can self-host.

The best parts:

  1. You don’t have to write SQL 🤮

  2. You can build anything — heatmaps, user paths, session recordings, funnel analysis, feature flags, split tests in production, and lots more

  3. You get real-time analytics with their event pipelines and simple API

Hasura, SpaceX, and 10,000 other companies have built their entire data stack on PostHog.

That’s because they’re smart enough to realize that engineers should spend their time making the actual sausage, not building random tools to try and figure out if the customer likes how it tastes.

Check it out. Say goodbye to SQL.


Jay Z

Allow me to re-introduce myself

Is Gatsby Back-sby?

Sometimes it’s easy to forget about Gatsby when other React frameworks are busy starting flame wars on Twitter, making the new React 18 features actually usable, and… doing whatever RedwoodJS does.

But React’s OG SSG framework has been cooking up some big changes, which CEO Kyle Matthews (👋 Kyle) unveiled last week when he re-introduced Gatsby as a “Reactive Site Generator” (RSG). How does RSG compare to SSR/SSG/ISR/SPA/MPA/AT&T/BBQ/HAGS?

The Notorious RSG: With “reactive builds”, each page declares its data dependencies through GraphQL, then Gatsby makes sure all invalidated pages get updated whenever the data changes. But now, they’ve ported that architecture to Gatsby Cloud (their custom CDN), which builds sites into an RSG service that can instantly react to data changes.

Kyle refers to it as “hot reloading, but for your production website”, and it’s resulted in some solid perf gains (according to their benchmarks):

  • Gatsby Cloud can now publish changes in one second — 100x faster than the exact same Gatsby site building on a standard CI/CD service like Netlify or Vercel. (See demo).

  • The median publish time for content updates for all Gatsby v4 sites on Gatsby Cloud is five seconds.

  • RSG (is that gonna become a thing now?) is a lot faster than SSG, while beating or matching SSR caching techniques for real-time data updates.

Bottom Line: We’re here for the Gatsby 2022 Glow Up - just like we’ll be here when someone decides to run with this glow up of an old classic.


Quiz — Sponsored by Appwrite

Their secure, open-source backend as a service gives you all the core CPIs you need to build any web or mobile app. Check it out.

In what order will the logs below show up in the console?

console.log('First')

setTimeout(function () {
  console.log('Second')
}, 0)

new Promise(function (res) {
  res('Third')
}).then(console.log)

console.log('Fourth')

Cool Bits

  1. Ryan Dahl promised that three months from now, you’ll be able to easily import npm packages into Deno and their goal is to make Deno “the fastest JavaScript runtime”. The Deno vs Bun battle is shaping up to be one for the ages.

  2. The lovely Supabase team just kicked off their newest Launch Week this morning - which is like Coachella, but with more Postgres and less Billie Eilish.

  3. Retool offers a component library and app-building framework in one, powerful platform. Drag and drop 90+ UI components to build any interface—then connect your data, deploy the app, and share with your users. Ship in record time with easy-to-use settings, styles, and themes. [sponsored]

  4. Mahdi Yusuf wrote a technical deep dive on all things Redis. Which is convenient timing because I was just thinking about how my personal blog needed a Redis cache.

  5. Speaking of updates I could make to my blog which will allow me to continue procrastinating that blog post I wanted to write, System.css is a CSS library for building Apple-inspired UI’s from the ’80s and ’90s.

  6. Ryan Carniato wrote about The JavaScript Paradox — which apparently is not about how my side project is considered simultaneously both dead and alive until I turn on my laptop.

  7. Cloudflare wrote about how their new project, Crawler Hints can help cut down on the estimated 53% of search crawler traffic that is wasted when bots revisit pages that haven’t changed since the previous visit. They’re hopeful that Google will use it, but they also called Google “the world’s most wasteful user of Internet resources” — so maybe they need to take a quick field trip to the Dale Carnegie school of persuasion before the next blog post.

  8. Dominik wrote about Avoiding useEffect with callback refs. Any tips for avoiding eye contact with the mascot for the Halifax Oyster Festival, Dominik? I just want to enjoy my specialty Canadian oysters without having recurring nightmares for the rest of the year.


Spot the Bug Solution — Sponsored by Appwrite

In what order will the logs below show up in the console?

console.log('First')

setTimeout(function () {
  console.log('Second')
}, 0)

new Promise(function (res) {
  res('Third')
}).then(console.log)

console.log('Fourth')

First, Fourth, Third, Second.

To fully understand this one you need an understanding of JavaScript’s event loop. Specifically, the Call Stack, Task Queue, Web APIs (for setTimeout), and the Job Queue. You could watch this video, which is perhaps the most famous JS conference talk ever given. Or you could just, not do that and enjoy your Monday instead - no judgement here.