Skip to content

Writing

Articles

Notes on engineering, performance, tools, travel, books, and ideas I'm thinking through.

What fired my useEffect?
Tech8 min read

What fired my useEffect?

Developing in React brings its set of challenges, especially when dealing with side effects in functional components. React’s useEffect hook is a powerful tool but it can sometimes be a mystery figuring out which dependency change triggered a particular effect

Jest Spy on an Exported Function
Tech3 min read

Jest Spy on an Exported Function

The spyOn utility in Jest is incredibly versatile, enabling you to monitor, track, and even replace the behaviour of functions. However, applying this to a named export from a module can be a bit tricky due to the specific parameters required by spyOn

When to use useCallback vs useMemo
Tech4 min read

When to use useCallback vs useMemo

In the expansive ecosystem of React, hooks play a pivotal role in crafting functional components and managing their state and side effects. Among these hooks, useCallback and useMemo stand out for their ability to optimize performance, albeit serving distinct purposes.

You're About to Make a Terrible Mistake by Oliver Sibony
Books14 min read

You're About to Make a Terrible Mistake by Oliver Sibony

Whether you're making business decisions, investing, hiring, or planning your career, your biggest enemy often isn't a lack of information. It's the biases hidden inside your own thinking.

100M Leads: by Alex Hormozi
Books16 min read

100M Leads: by Alex Hormozi

How do you consistently get more people interested in what you sell?Most businesses don't have a product problem but an attention problem. You can't sell to people who don't know you exist !

Principles: by Ray Dalio
Books15 min read

Principles: by Ray Dalio

Think for yourself to decide: What you want and What is true, then What you should do to achieve what you want in the light of what is true.

React Performance: useState Lazy Initialization
Tech2 min read

React Performance: useState Lazy Initialization

Whenever you need to set the initial value of the state from a function that returns a value (see below), the function will get called at every re-render even though we only need it during the initial render

Deep Work: by Cal Newport
Books14 min read

Deep Work: by Cal Newport

High-quality work is a function of time spent and intensity of focus

Man's Search For Meaning: by Viktor Frankl
Books8 min read

Man's Search For Meaning: by Viktor Frankl

What is my "why"—and would it be strong enough to carry me through my hardest "how"?

Zero To One: by Peter Thiel
Books18 min read

Zero To One: by Peter Thiel

What important truth do very few people agree with you on?

Atomic Habits: by James Clear
Books20 min read

Atomic Habits: by James Clear

An Easy & Proven Way to Build Good Habits & Break Bad Ones

Factfulness: by Anna and Hans
Books5 min read

Factfulness: by Anna and Hans

Ten Reasons We're Wrong About the World — and Why Things Are Better Than You Think

TIL : Git Worktree
Tech4 min read

TIL : Git Worktree

A git repository can support multiple working trees, allowing you to check out more than one branch at a time. With git worktree you can add a new working tree that is associated with the repository, along with additional metadata.

TIL : Generator Functions
Tech10 min read

TIL : Generator Functions

General JavaScript functions can’t be interrupted in the middle of a function execution, once the function is invoked until function execution completes. When we want to execute functions which can be interrupted or which can execute after a while.

TIL : ES modules in browser
Tech3 min read

TIL : ES modules in browser

All you need is type = module on the script element, and the browser will treat the inline or external script as an ECMAScript module. I am sharing some few browser-specific things I'd learned while getting my hands dirty.