Bytes worth your attention.

Notes from Anil Gurindapalli

Cover for Kadane's Algorithm (Maximum Subarray)
Kadane's Algorithm (Maximum Subarray)

At each index, extend the running sum or start fresh — that's Kadane's. Here's a full guide: intuition, when to use it, walkthroughs, pitfalls, and code — from O(n²) brute force down to O(n) with O(1) space.

26 min read

Cover for Build a Zero-Cost Portfolio Website With AI
Build a Zero-Cost Portfolio Website With AI

No database. No CMS. No vendor lock-in. Here's how I built a production-grade portfolio site (including a technical blog) with Next.js 16, GitHub as a content store, Cloudinary, Vercel, and Cloudflare — brainstorming with Gemini, ChatGPT, and Claude, using ChatGPT-generated artwork, and automating consistency with a single AGENTS.md file.

15 min read

Cover for Rate Limiting — Token Bucket & Leaky Bucket
Rate Limiting — Token Bucket & Leaky Bucket

Fixed and sliding windows argue about counting; token and leaky buckets argue about bursts. Here’s the contract each one enforces — and why production systems layer both.

6 min read

Cover for Rate Limiting Algo — Fixed Window
Rate Limiting Algo — Fixed Window

Fixed window rate limiting looks simple and behaves well on dashboards — until traffic piles up at window boundaries. Here’s why the contract is met while the system still overloads.

3 min read

Cover for Rate Limiting Algo — Sliding Window
Rate Limiting Algo — Sliding Window

Sliding windows answer the right question — how many requests in the last N seconds — but log-based precision doesn’t scale, and bucketed counters still miss microbursts.

4 min read

Cover for Rate Limiting: Introduction
Rate Limiting: Introduction

What rate limiting really is, why systems need it, and how to think about capacity enforcement. A practical guide from a 4 AM post-launch incident to the mental models that prevent them.

6 min read

Cover for 🧠 Module 1: How Large Language Models Think
🧠 Module 1: How Large Language Models Think

Discover why your senior gets perfect AI responses while yours feel generic. Learn the secret of Machine English and how to structure prompts that align with how LLMs actually process information. This comprehensive guide walks through the complete lifecycle of a prompt—from tokenization and embeddings to transformer layers, logits, and decoding strategies—so you can write prompts that produce sharp, high-quality outputs instead of generic or hallucinated responses.

12 min read

Cover for 🎯 Module 2: Prompt Structure & Role Engineering
🎯 Module 2: Prompt Structure & Role Engineering

Master the Machine English Prompt Template and the art of Role Engineering so you can control an LLM’s tone, depth, structure, and reasoning the way top prompt engineers do.

10 min read

Cover for 🃏 Sorting Your Cards: Understanding Insertion Sort
🃏 Sorting Your Cards: Understanding Insertion Sort

Master the Insertion Sort algorithm through real-world analogies, step-by-step examples, and practical applications. Learn why this simple algorithm is perfect for small datasets and nearly-sorted lists.

11 min read