Shreyash

Shreyash

@webdevcaptain.com

Software Engineer with a strong focus on Full-Stack development and a curiosity for AI and Machine Learning. https://www.webdevcaptain.com/

50 followers129 following52 posts

Spent this weekend coding fully by hand for the first time in almost a year. No agents. No AI autocomplete. Just docs open in Chrome, insomnia for firing requests, and Zed. Honestly, the slow part isn’t writing business logic. It’s all the scaffolding and maintenance work around it.

View full thread

What changed is this: If you deeply understand the architecture and can structure the problem clearly, agents become insanely effective. At that point, coding is no longer the bottleneck. Thinking is.

The best engineers won’t be the fastest typers. They’ll be the people who can design systems clearly enough for humans and models to execute.

Spent this weekend coding fully by hand for the first time in almost a year. No agents. No AI autocomplete. Just docs open in Chrome, insomnia for firing requests, and Zed. Honestly, the slow part isn’t writing business logic. It’s all the scaffolding and maintenance work around it.

But once the setup is done, the muscle memory comes back fast. Backend design still feels natural. I was worried a year of reviewing AI-generated code had melted my brain, but nope 🤗

1/ Ever watched your servers start sweating because a single rogue bot or a buggy client retry loop went wild and hammered your API with hundreds of requests per second? That’s rate limiting in action – the invisible guardrail that keeps your system alive, fair, and costs in check.

View full thread

11/ Tips • Dynamic limits per tier ? Pull from Consul/etcd. • Log every 429 → spot abuse patterns early. • Test race conditions and window boundaries like your on-call depends on it (it does). • Real war story: badly tuned rate limiters have taken down major services during flash sales.

12/ Rate limiting isn’t flashy. But it’s the difference between “we survived peak traffic” and “we’re trending for the wrong reasons.” Which algorithm are you actually running in production? Token Bucket? Sliding Window Counter? Repost if this helped. #SystemDesign #RateLimiting #Interview

1/ Ever watched your servers start sweating because a single rogue bot or a buggy client retry loop went wild and hammered your API with hundreds of requests per second? That’s rate limiting in action – the invisible guardrail that keeps your system alive, fair, and costs in check.

View full thread

9/ Placement is the real engineering decision: • Edge/CDN → kill junk before it hits your VPC • API Gateway → cleanest for most teams • Server-side → only when you need deep per-user business logic Layer them. That’s how you think like someone who actually ships.

10/ Resilience Redis dies ? Fail-open (keep UX alive with circuit breaker) or Fail-closed (429 everyone to protect the farm) ? I bias open. Always return these headers: X-RateLimit-Remaining X-RateLimit-Reset Retry-After Your frontend team will love you.

1/ Ever watched your servers start sweating because a single rogue bot or a buggy client retry loop went wild and hammered your API with hundreds of requests per second? That’s rate limiting in action – the invisible guardrail that keeps your system alive, fair, and costs in check.

View full thread

8/ At real scale, in-memory counters are useless. One user round-robins across 10 pods and cheats the limit. Fix: Central Redis (or equivalent). Store counters there. Wrap “check + increment” in Lua scripts → atomic, one network hop, zero races even at 10k+ RPS.

1/ Ever watched your servers start sweating because a single rogue bot or a buggy client retry loop went wild and hammered your API with hundreds of requests per second? That’s rate limiting in action – the invisible guardrail that keeps your system alive, fair, and costs in check.

View full thread

6/ 4. Sliding Window Log Store a timestamp for every single req. On new req, drop anything older than the window & count the rest. Superpower: Most accurate – no boundary tricks possible. Catch: Memory explodes at scale (millions of timestamps = pain) Only when absolute fairness is non-negotiable.

7/ 5. Sliding Window Counter (Big Tech’s default) Hybrid genius. Keep counters for previous + current window + smart weighted math. Example: 100 req/min limit, 30s into the minute. Previous window: 80 Current: 20 Weighted = (80 × 0.5) + 20 = 60 → still under limit.

1/ Ever watched your servers start sweating because a single rogue bot or a buggy client retry loop went wild and hammered your API with hundreds of requests per second? That’s rate limiting in action – the invisible guardrail that keeps your system alive, fair, and costs in check.

View full thread

4/ 2. Leaky Bucket Requests pour in but only “leak out” to your servers at a fixed constant rate. Bucket fills up? Extra requests get dropped. Superpower: Perfectly smooth downstream traffic – your DB never sees spikes. Catch: Zero bursts allowed. Use when stability > flexibility.

5/ 3. Fixed Window Time sliced into rigid blocks (every 60 seconds). Count inside the block, reset sharp at the boundary. Superpower: Dead simple, almost zero memory. Big catch: Everyone games it – spam at 11:59 + 12:01 and you sneak double the limit.

1/ Ever watched your servers start sweating because a single rogue bot or a buggy client retry loop went wild and hammered your API with hundreds of requests per second? That’s rate limiting in action – the invisible guardrail that keeps your system alive, fair, and costs in check.

2/ There are exactly 5 algorithms you must know. I’ll give you the mental model, when to pick each, and the real trade-offs (the stuff interviewers actually test).

3/ 1. Token Bucket Tokens refill at a steady rate into a bucket. Each request grabs one. Run out? Block or queue. Superpower: Allows natural bursts (uploading 20 photos at once feels smooth). Real-world: Stripe, GitHub, AWS APIs. Pick this when your users are humans, not robots.

AI agents code Go maps like they’re Node objects 😂 Spawn 10 goroutines writing to the same map ? → instant “fatal error: concurrent map writes” panic. Node would just shrug. Go nukes your pod. Run -race and guard it with sync.RWMutex. Don’t let stupid models crash your system. #Go #Concurrency

This sounds amazing! 🔥 I’ve seen many projects using a combo of tools like esbuild and the TypeScript compiler, so with tsc speeding up, I’m sure we’ll see simpler, faster builds across the board. Thanks @typescriptlang.org team

TypeScript@typescriptlang.org

Today we're thrilled to announce our effort to port the TypeScript compiler and language service to native code, gaining a 10x speed boost in build times and editor responsiveness! devblogs.microsoft.com/typescript/t...

Shreyash reposted

Replying to @joshwcomeau.com

This problem is very present in software job interviews too. They are often too knowledge driven. The interviewer wrongly assumes that people should have the same facts as them, when memorized knowledge is really only a small part of problem solving.

After years of selectively reading in tech, Machine Learning with Pytorch and Scikit Learn is my first book read cover to cover! (except the math, I needed a second round for that 😅) Thankyou @sebastianraschka.com, I guess this is the most well-rounded and comprehensive book on Machine Learning

Took almost 2 months of reading and practicing. Quick feedback for @sebastianraschka.com, Yuxi and Vahid - book is great, but I feel like it’d be even more engaging if it showed practical applications first, and then broke down the theory behind it, or maybe that’s just my learning style ? 😅

After 5 years of on-and-off learning, I finally published my first package on crates.io It might not be super useful, but I’m proud of it I’m comfortable with Rust now, though work keeps me busy with JS, Python & Go 😅 Would love to build some devtools and OSS

You are up to date.