Fullstack Friday #1: Deploying to production 2000 times a day.

Fullstack Friday #1: Deploying to production 2000 times a day.

Welcome to the first issue of Fullstack Friday. I'm so glad you're reading this because I'm so excited to write this. I occasionally write on my blog about the things I'm working on, about techniques and tools that I find useful, and the tutorials once in a while. Like many web developers, I'm also consuming content about the various technologies that power the internet. I do this so I can stay up-to-date in our field, become a better programmer, and do better work.

This newsletter is my way of sharing the things I'm learning, the content I'm consuming, and trying to be better than I was yesterday. But the most important reason for doing this is to connect with incredible people, experienced and new, in the world of web development. So please strike up a conversation by replying to this email, on Hashnode or Twitter. I will read and reply to each one.

I hope that you find the things I'm sharing useful. This newsletter will be available in multiple places. You can read this on my Hashnode blog or my website. If you'd rather receive it in your inbox every Friday, you can subscribe here.

Here's are the things I found fascinating this week:

Bravely deploying to production 2000 times a day. Even Fridays!

A lot of us use Spotify daily, because why wouldn't we, it's a great service! Have you wondered how the engineering team at Spotify works to make all of that magic happen? To put millions of songs at our fingertips, at the click of a button? Behind that interface and music, there are over 2000 microservices, 4000 data pipelines, 1000s of machine learning models, over 200 micro-features in the desktop, web, Android, and iOS client applications. And they deploy changes to these to production every day, which comes around to over 2000 times a day, spread across 500 engineering squads.

Just seeing those numbers makes my head swirl. How can they have all this complexity and still move fast?

Spotify uses an internal tool called Backstage (which they've open-sourced and is being used by some popular companies). Listen to Spotify's Head of Infrastructure and Operations and Principal Product Manager explain Backstage in this episode of The Changelog.

Memory Management in Javascript

JavaScript abstracts a lot of details about memory management away from us. But how do browsers or Node.js manage memory? What is happening behind the scenes when we declare a variable, an object, or a function? In a nutshell, there are two data structures used — stacks and heaps. Stacks are fixed in size and are used for primitive values like integers, strings, and boolean. Their size is known ahead of time so the engine allocates those memories in a stack. There is a maximum limit for stack memory that depends on the browser and machine. Heaps are used for complex data types like objects, arrays, and functions. Heaps are dynamic data structures and their sizes are only known during runtime. There is no limit for heaps.

We also don't want to hold these values in memory forever because it's inefficient. So there's a garbage collector that decides which ones to remove and which ones to keep around for longer. Several different algorithms handle this. The problem is we don't know when the garbage collector will run. So JavaScript applications usually end up taking more memory than is necessary. There are, however, things that we can do to keep this under control.

Check out this article for more details on garbage collectors and patterns we can use in code to prevent memory leaks.

Interesting things I read this week:

  1. Google Glass turned out to be a failure (which happened years ago) but Facebook is trying its hand at smart glasses now.
  2. Optimizing frontend performance is always fun to do. Here are nine quick ways we can optimize performance on the frontend in our applications. It's interesting to note that most of these steps are taken care of, with zero configuration by Next.js (and Vercel/Netlify).
  3. Another performance optimization article? Yeah, but this time for our AWS lambda functions. Learn how Victor reduced the function sizes by 80%!!
  4. NFTs are all the rage now with people spending ridiculous amounts of money for some of them. If you think that it's only for artists and designers though, you're wrong. A new app called GitNFT will turn Github commits into NFTs which you can then ...sell? I wonder who will buy these.

Library of the week

Rooks: Rooks is a React Hooks library with a large collection —about 63 — of useFul (see what I did there 😉) hooks we can use in our React projects. Hooks include countdowns, request animation frames, keybindings, local storage, scroll position, undoing state, and more.


And that's it for this week. Hope you enjoyed the first issue of Fullstack Friday. Follow/Subscribe to my Hashnode blog, or subscribe here to get the next issue in your inbox. Have a great weekend!