home

Welcome to 8 Protocols

I’m Alvis Ng, a technical lead based in Malaysia.

I write about the systems that shape how we build—from software architecture and AI to product strategy, team culture, and the human mind behind the code.

At 8 Protocols, I share principles, stories, and experiments that keep work sharp and human. Sometimes that means untangling a stubborn frontend structure. Sometimes it’s questioning a “best practice” that everyone treats as gospel. Sometimes it’s about faith, psychology, and the quiet forces that shape why we work the way we do.

I write to keep asking better questions: about craft, about meaning, and about how we balance precision with purpose.

I share these notes and stories at least three times a month. Long enough to stay with you. Short enough for a cup of coffee.

Latest

Jan 05
Beyond the Spotlight. Finding Strength When You’re Not the Favorite

Beyond the Spotlight. Finding Strength When You’re Not the Favorite

You’ve felt overlooked even when you worked hard. As an introvert, praise often went to extroverted peers while your work stayed quiet. That sting is valid. But not being the favorite can also become your edge—the space to reflect, grow quietly, and discover your own strengths.
7 min read
Jan 05
A Year with Next.js Server Actions: Lessons Learned

A Year with Next.js Server Actions: Lessons Learned

Server Actions in Next.js let you write server-side code directly in React components, cutting down boilerplate and simplifying client-server communication. They shine for data mutations and UI-tied operations, but require care to avoid tight coupling, overuse, or vendor lock-in.
11 min read
Jan 04
Slow Down to Move Faster

Slow Down to Move Faster

In software development, speed can be costly. Quick fixes often hide deeper issues, leading to more rework. Slowing down to think deliberately, plan, and explore options may feel slower at first but often produces better solutions, fewer bugs, and stronger long-term results.
4 min read
Jan 03
Are We Sleepwalking Through a Digital Deluge?

Are We Sleepwalking Through a Digital Deluge?

Our attention is being mined. From autoplay videos to endless scroll, every platform is built to keep us hooked. This constant stimulation rewires our brains, eroding focus. The same plasticity that harms can heal if we set boundaries, slow down, and choose deliberate engagement.
4 min read
Sep 11
Managing complexity: Shared business logic in Next.js (Part 1: Server-Side Architecture)

Managing complexity: Shared business logic in Next.js (Part 1: Server-Side Architecture)

In Next.js 14+, structuring shared business logic through repositories, action functions, and standardized error handling cuts duplication and keeps API routes and Server Actions consistent. This layered approach boosts maintainability, type safety, and sleep quality.
9 min read
Mar 05
Advanced Union Type Techniques in TypeScript — 05 Object Values with const Assertion

Advanced Union Type Techniques in TypeScript — 05 Object Values with const Assertion

Const assertions in TypeScript lock values to their exact literal types and make them readonly, preventing accidental changes. Used strategically in configs, mappings, and critical state, they catch errors early, keep code predictable, and boost maintainability without unnecessary rigidity.
6 min read
Jan 15
Advanced Union Type Techniques in TypeScript — 04 Extracting Types from Discriminated Unions

Advanced Union Type Techniques in TypeScript — 04 Extracting Types from Discriminated Unions

Discriminated unions use a shared property to let TypeScript narrow types automatically. From sorting messages to handling server errors, they boost clarity, IntelliSense, and safety, ensuring each variant is processed with the right properties and avoiding runtime surprises.
6 min read
Jan 12
Advanced Union Type Techniques in TypeScript — 03 Indexed Types

Advanced Union Type Techniques in TypeScript — 03 Indexed Types

Indexed access types let you pull property types directly from other types, combining JavaScript’s flexibility with TypeScript’s safety. From dynamic getters to deep extractions in nested objects, they keep complex structures consistent, reliable, and easier to maintain.
4 min read
Jan 09
Advanced Union Type Techniques in TypeScript — 02 Excluding Types

Advanced Union Type Techniques in TypeScript — 02 Excluding Types

The Exclude utility type in TypeScript filters out unwanted members from a union, leaving only the relevant ones. From hiding internal props to limiting event handlers or restricting state actions, Exclude keeps types precise, modular, and aligned with real-world usage.
4 min read
Jan 07
Advanced Union Type Techniques in TypeScript — 01 Extracting Types

Advanced Union Type Techniques in TypeScript — 01 Extracting Types

The Extract utility type in TypeScript lets you carve out specific members from a union, aligning types with real-world logic. From filtering text inputs to isolating premium product options or refining state in React, Extract helps create cleaner, safer, and more maintainable code.
4 min read
Dec 18
Why Being Chill All the Time Isn’t Always Cool: The Chaos of Complacency

Why Being Chill All the Time Isn’t Always Cool: The Chaos of Complacency

Complacency is a silent life-drainer that seeps into routines, relationships, and work, turning vibrant days into dull repeats. Breaking free starts with a decision to act, set boundaries, and pursue purpose. Life is too rich to live on autopilot—take the wheel and drive it forward.
6 min read
Dec 07
TypeScript Error Handling: A Closer Look into Custom Error Objects

TypeScript Error Handling: A Closer Look into Custom Error Objects

By re-creating errors from different sources with a consistent factory function, you can standardize formats, ensure predictable handling, and centralize customization. This pattern makes complex TypeScript apps easier to maintain and adapt as services and requirements evolve.
4 min read