- Hungry Minds
- Posts
- ๐๐ง A Deep Dive into Notion's SharedWorker Architecture for Caching
๐๐ง A Deep Dive into Notion's SharedWorker Architecture for Caching
PLUS: Instagram Did What!? ๐ซข, Distributed Systems Learning Guide ๐, How To Get Promoted Strategically ๐
Happy Monday! โ๏ธ
Welcome to the 928 new hungry minds who have joined us since last Monday!
If you arenโt subscribed yet, join smart, curious, and hungry folks by subscribing here.
๐ THIS WEEKโS MENU ๐ฅ
๐ธ Investing on Auto Pilot for Engineers ๐ธ
๐ Software Engineering Articles
Notion decreased latency by 20% using caching; find out how.
Learn about the CAP Theorem and its implications for distributed systems.
Explore API architectural styles to enhance your design skills.
Master personal finance as an engineer with tips from this article.
Overcome perfectionism and boost productivity with strategies from this insightful piece.
๐๏ธ Tech and AI Trends
Meta launches AI studio for personalized Instagram interactions.
Intel announces major layoffs as part of a cost-cutting plan.
Synchron integrates ChatGPT into a brain-computer interface for paralyzed users.
๐จ๐ปโ๐ป Coding Tip
Use the useReducer hook in React for enhanced state management flexibility.
Reading time: 5 minutes
A few words from our sponsor this week:
We put your money to work
Bettermentโs financial experts and automated investing technology are working behind the scenes to make your money hustle while you do whatever you want.
Food for Thought
A mindset, an example, and an action item to start the week
"Learning to code is useful no matter what your career ambitions are."
Mindset: Continuous learning is a superpower that empowers you to adapt and thrive in any field.
Example: Pixar, known for its innovative films, encourages all employees to learn coding to enhance their creative problem-solving skills.
Action: Explore a free online coding course that aligns with your interests and could complement your current skillset.
The Rabbit Hole
Deep dives, trends, and resources curated to stay ahead
๐พ SIDE DISHES ๐พ
ARTICLE (llama-tastic code wizard)
Llama Coder โ AI Code Generator
ARTICLE (distributed systems for dummies)
Learning about distributed systems: where to start?
ARTICLE (phone book indexing 101)
Database Indexes & Phone Books
ESSENTIAL (open-api-tional awareness)
Everything You Need to Know About OpenAPI
ARTICLE (2024 computer confessions)
How I Computer In 2024
GITHUB REPO (dice it!)
A drop-in replacement of Redis with SQL-based realtime reactivity.
GITHUB REPO (draw me like one of your database tools)
Free, simple, and intuitive online database design tool and SQL generator.
GITHUB REPO (comfy cozy UI)
The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
The Weekly Digest
Software, AI, and startup news worth your time
Brief: Meta's AI Studio enables US users to create AI avatars for Instagram, aiming to enhance creator-audience interaction while navigating potential ethical pitfalls.
Brief: Intel's massive layoffs of over 15,000 employees come as the company faces significant financial losses and aims to implement a $10 billion cost-saving strategy.
Brief: Synchron integrates ChatGPT into its brain-computer interface, enhancing communication for users with paralysis through intuitive AI-driven interactions.
Brief: Meta aims to integrate Hollywood voices into its upcoming AI digital assistant, negotiating deals with stars like Judi Dench and Awkwafina amidst industry concerns over AI-generated likenesses.
Brief: Google slashes Gemini 1.5 Flash prices by 80%, undercutting rivals and intensifying competition for AI startups plagued by challenges in the evolving LLM market.
Brief: Microsoft's annual report now lists OpenAI as a competitor despite their long-term partnership, highlighting a shift as OpenAI introduces its SearchGPT prototype.
The Quick Byte
One coding tip because youโre technical after all
This weekโs coding challenge:
This weekโs tip:
The useReducer
hook in React is a powerful alternative to useState
for managing complex state logic in functional components. It follows the reducer pattern, allowing you to define state transitions based on dispatched actions, making it particularly useful for managing state that involves multiple sub-values or more complex structures.
Wen?
Complex State Management: Ideal for scenarios where state changes are complex or involve multiple properties. The reducer pattern allows for better organization of state logic, particularly when dealing with intricate state updates.
Action Handling: Perfect for managing actions that contribute to state changes, enabling clear separation of concerns. Each action type in the reducer can have distinct transition logic, making it easier to reason about state changes.
Performance Optimization: Helps improve performance by minimizing re-renders. Since the reducer creates a new state object based on dispatched actions, you can effectively prevent unnecessary re-renders by ensuring components only update when their relevant state changes.
Why?
Predictable State Transitions: By centralizing state logic in one function (the reducer), it becomes easier to track how state changes through the dispatching of actions, enhancing predictability in your application.
Easier Testing: The reducer function can be tested independently. You can check various input states against expected outputs for different actions, allowing for isolated unit tests for your state management logic.
Scalability: The
useReducer
pattern promotes scalability. As your component grows in complexity, you can manage its state transitions in a structured manner, allowing for easier maintenance and enhancement of functionality.
Burp-A-Laugh
The most important meal of your day
Thatโs it for today! โ๏ธ
Enjoyed this issue? Send it to your friends here to sign up, or share it on Twitter!
If you want to submit a section to the newsletter or tell us what you think about todayโs issue, reply to this email or DM me on Twitter! ๐ฆ
Thanks for spending part of your Monday morning with Hungry Minds.
See you in a week โ Alex.
Icons by Icons8.
*I may earn a commission if you get a subscription through the links marked with โaff.โ or in italic (at no extra cost to you).