Advertisement · 728 × 90

Posts by Fahim khan

A bigger context window does not guarantee better retrieval. Needle-in-a-haystack shows many LLMs miss facts buried in the middle of the context, and agent systems can favour tools listed first over better later options. Better structure beats bigger prompts.
#LLMs #AIEngineering #AgentSystems

1 month ago 0 0 0 0

lesson: don't just design for scale. design for recovery. your system should degrade gracefully and have ways to break out of death spirals. (4/4)

1 month ago 0 0 0 0

fixes: exponential backoff with jitter, circuit breakers, load shedding (reject before you die), backpressure signals. your system needs escape hatches from failure states. (3/4)

1 month ago 0 0 1 0

the worst part? reducing traffic doesn't help. the backlog is too deep. clients keep timing out and retrying, creating a retry storm. you're stuck until you restart everything. (2/4)

1 month ago 0 0 1 0

"Why does our service keep crashing even after we reduce the load?"

metastable failure—your system is stuck in a vicious cycle. slow responses → timeouts → retries → more load → even slower. It can't escape on its own. #DistributedSystems (1/4)

1 month ago 0 0 1 0

(5/5) There's no perfect architecture. Just trade-offs. The goal is finding what works for YOUR context, not following someone else's blueprint blindly.

2 months ago 0 0 0 0

(4/5) The key insight: when related functionality is scattered across multiple services, changes will ripple everywhere. Things that change together should live together.

2 months ago 0 0 1 0
Advertisement

(3/5) What kills loose coupling:
- Picking the wrong integration patterns
- Services exposing way too many endpoints
- Chatty services that constantly ping each other

2 months ago 0 0 1 0

(2/5) Cohesion = stuff inside a service working together. Coupling = dependencies between services.

High cohesion + low coupling = you can actually deploy things independently. Otherwise you just have a distributed monolith.

2 months ago 0 0 1 0

(1/5) Constantine's Law: "A structure is stable if cohesion is strong and coupling is low"

This 1970s principle is why your microservices are probably harder to maintain than they should be. #Microservices #SoftwareArchitecture

2 months ago 1 0 1 0

(3/3) It's like Rust's exhaustive matching but for TS. Not perfect, but way better than hunting bugs in logs. Try it next time you write a switch statement!

2 months ago 0 0 0 0

(2/3) The fix: `${role satisfies never}` in default case. TypeScript immediately errors: "Type 'superadmin' does not satisfy 'never'". Caught at compile time!

2 months ago 1 0 1 0
Video

(1/3) TypeScript tip that changed how I write switch statements: Use `satisfies never` in your default case to get exhaustive checking 🔥 #TypeScript #CodingTips

The problem: Add "superadmin" to your Role union, forget to handle it in the switch, get "Unknown role" in production logs.

2 months ago 2 0 1 0

(5/5) Law of Forced Efficiency: there's never enough time for everything, but there's always time for what matters most. Start with your most important task. Eat that frog first.

2 months ago 0 0 0 0

(4/5) Best question from the book: "What's something only I can do that, if done well, will make a real difference?" If you can't answer it yourself, ask your boss or team. Their answer might surprise you.

2 months ago 0 0 1 0

(3/5) The "Proper Prior Planning Prevents Poor Performance" principle is so real. We tell ourselves we work better under pressure, but that just leads to mistakes and rework. Plan ahead, add a 20% buffer for surprises.

2 months ago 0 0 1 0

(2/5) Been rereading "Eat That Frog" and the 7-step system hits different now. Decide what you want → write it down → set deadlines → list what you need → make a plan → take action → do something daily.

2 months ago 0 0 1 0
Advertisement

(1/5) Real talk: you'll never finish your to-do list. And honestly? That's fine. The trick is focusing on the 20% that actually moves the needle. #Productivity #TimeManagement

2 months ago 1 0 1 0
Post image

How much typescript is too much typescript
#typescript #webdev #react

4 months ago 1 0 0 0
Preview
The Deferred Commit Pattern: Building Clean SaaS Onboarding with Node.js and Redis Learn how the Deferred Commit Pattern solves data integrity issues in multi-step onboarding flows by using Redis for temporary storage and only committing complete, validated data to your database.

Unlock cleaner SaaS onboarding with my Deferred Commit Pattern in Node.js + Redis + JWT. Learn how to prevent dirty data and turn abandoned signups into leads: fahim.shonif.com/blogs/deferr... #NodeJS #SaaS #webdev

4 months ago 2 0 0 0
Post image

OCaml’s type inference is wild: the compiler figures out precise, static types for everything, even when you never write a single explicit annotation.

#OCaml #FunctionalProgramming #TypeInference #HindleyMilner #StrongTyping #ProgrammingLanguages #FP

4 months ago 3 1 0 0
Post image

A language that doesn’t affect the way you think about programming is not worth knowing - Alan J. Perlis
#OCaml #FunctionalDesign #computerscience
github.com/M0rfes/OCaml...

4 months ago 8 1 0 0
Preview
AsyncLocalStorage in Node.js: Eliminating Context Passing Hell Learn how AsyncLocalStorage in Node.js eliminates parameter drilling and provides elegant context management for Express applications with automatic context propagation across async operations.

AsyncLocalStorage in Node.js transforms context management, ending “parameter drilling” with automatic async context propagation. Streamline request logging, auth, transactions, and more! Read: fahim.shonif.com/blogs/asyncl... #NodeJS #AsyncLocalStorage

4 months ago 0 0 0 0
Preview
Implementing Resumable Downloads in React and Node.js Learn how to implement resumable downloads for large files using HTTP Range requests, IndexedDB, and React hooks. Solve connection interruptions and enable pause/resume functionality for better user e...

Struggling with interrupted downloads in web apps?
I just published a guide on building fully resumable

fahim.shonif.com/blogs/resuma...

#ResumableDownloads #ReactJS #NodeJS #Express #NestJS #TypeScript #WebDev #Frontend #Backend

4 months ago 3 0 0 0
Advertisement

Streaming is deceptively hard, and two problems always top my list:

2. Correct order of delivery

1. Exactly one delivery

2. Correct order of delivery

Some things never get easier—especially when they get delivered twice but still out of order! 🚚🔄

#StreamingProblems #TechHumor

5 months ago 0 0 0 0
Preview
Streaming JSON Data with Multipart/Mixed and Meros Learn how to stream JSON chunks using multipart/mixed content type and Meros library for better perceived performance and immediate user feedback.

fahim.shonif.com/blogs/stream...

#golang #javascript #api

5 months ago 1 0 0 0

One of the key components of designing a distributed system is deciding when the “distributed” part is actually unnecessarily complex.
#SystemDesign #DistributedSystems #SoftwareArchitecture #TechLeadership #EngineeringDecisions #SimplicityMatters #DesignTradeoffs #ComplexityManagement

7 months ago 1 0 0 0
Which old sayings are true and which are myths? Do snice guys finish last"? Or first? A
Do quitters never win? Or is stubbornness the real enemy? Does confidence rule the day? When is itjust delusion?

Which old sayings are true and which are myths? Do snice guys finish last"? Or first? A Do quitters never win? Or is stubbornness the real enemy? Does confidence rule the day? When is itjust delusion?

Which old sayings are true and which are myths?
Do snice guys finish last? Or first?
A quitters never win? Or is stubbornness the real enemy?
Does confidence rule the day? When is it just a delusion?

#LeadershipMyths #SuccessTruths #ConfidenceVsDelusion #CareerWisdom #MindsetMatters #GrowthMindset

7 months ago 1 0 0 0

MeteorJS walked so Next.js could run.
#webdevelopment #JavaScript #MeteorJS #Nextjs #FullStack #TechEvolution #ReactJS #ModernWeb #SoftwareEngineering #StartupTech #Innovation

8 months ago 3 0 0 0
const express = require('express');
const app = express();

// Enable built-in ETag handling
app.set('etag', 'strong');

app.get('/data', (req, res) => {
  const responseData = JSON.stringify({ message: 'Hello World' });
  res.send(responseData);
});

app.listen(3000, () => {
  console.log('Server running on port 3000');
});

const express = require('express'); const app = express(); // Enable built-in ETag handling app.set('etag', 'strong'); app.get('/data', (req, res) => { const responseData = JSON.stringify({ message: 'Hello World' }); res.send(responseData); }); app.listen(3000, () => { console.log('Server running on port 3000'); });

ETag in HTTP empowers smarter caching! By allowing servers to signal resource changes, it prevents redundant downloads and saves bandwidth for both users and providers. Optimize your APIs with ETags for speed and efficiency. #WebDevelopment #HTTP #APIPerformance

8 months ago 1 0 0 0