LineLapse BlogMake your own →

The LineLapse Blog

Short, illustrated explainers on how things work — every post comes with a hand-drawn animation you can watch, made with the same tool you can use yourself.

HOW THE HEART PUMPS BLOODTWO PUMPS, ZERO DAYS OFFTHE HEARTATRIA (×2)VENTRICLES (×2)COLLECT BLOODPUSH IT OUTTWO PUMPS, SIDE BY SIDERIGHT SIDEVSLEFT SIDEDEOXYGENATEDLOADED WITH CO₂RIGHT SIDE: TO THE LUNGSRIGHT VENTRICLELUNGSDUMPS CO₂, GRABS O₂LEFT SIDEOXYGENATEDAORTAMOST POWERFUL!THE LOOP NEVER STOPSBODY RETURNS BLOOD1LUNGS REFRESH2LEFT SIDE BLASTS OUT3BODY USES O₂4VALVES KEEP IT CLEANVALVESONE-WAY ONLYNEVER BACKHEARTBEATSNAP SHUT!< 1 SECOND100,000×/DAYYOUrepeat

How does the heart pump blood around the body?

Your heart is basically a pump that never takes a break — not once in your entire life. It's divided into four chambers. Two on top, called atria.

#biology#science#education
How a Neural Network Learnsforward pass · loss · backprop · updateForward Pass1Loss Function2error scoreBackpropagation3Update Weights4gradient descentweights encode patternsno rules giventhe heartbeat of every networkpredictionerrorgradientrepeat

How does a neural network learn?

A neural network starts as a blank slate — a web of connected nodes, each connection carrying a random weight. You feed it an input.

#ai#machine-learning#neural-networks
Conflict in Storiesthe complete cheat sheetWhat Is Conflict?DesireResistance→ Story Beginsnot just fightingFour TypesTypeExampleFlavourvs Personhero & villainmost visiblevs Naturestorm, diseasesurvivalvs Societylaw, institutionone vs systemvs Selffear, guilt, doubtquietest & deepestvs Self hits hardestTwo LevelsExternalthe chase, the war, the argumentInternalfear, wound, doubt beneathouter problem forces inner reckoningThe Shape🌱 1. Introduce📈 2. Escalate⚡ 3. Crisis🏁 4. Resolveor refuses to resolveStakesPhysical — life or safety on the lineEmotional — love, belonging, identity threatenedMoral — choose between two things you valuestack all threethe more you stack, the betterRules to Pin UpConflict reveals character — how they fight = who they areThe antagonist needs a reason that makes sense to themResolution ≠ everyone winsTension must find its answer, even if the answer is lossearned endingconflict IS the storymeetswired together

Conflict in stories, on one cheat sheet

Conflict is the engine of every story — here's the whole idea on one sheet. The first thing to nail down is what conflict actually is.

#storytelling#writing#narrative#structure
Newton's Three Laws of Motionevery push, pull & crashLaw 1 — InertiaZero net force → constant velocityBook on deskPuck on iceobjects resist changeStateStays…At restat restMovingin a straight lineLaw 2 — F = maF = m × amass (kg)accel (m/s²)Fₙₑₜ = 8 Na = Fₙₑₜ / m (Fₙₑₜ = 8 N)ForceMassAccelerationlargesmallhugesmalllargetinyTennis ball fliesBowling ball barely shiftsLaw 3 — Action & ReactionEqual & oppositeYou push floorFloor pushes backRocket blasts gas downdifferent objects — no cancelforces never travel aloneUnits & DefinitionQuantitySymbolUnitForceFNewton (N)Massmkilogram (kg)Accelerationam/s²1 Newton=1 kg·m/s²it's the definition, exactlySI unitsKeep in MindLaw 1 → when forces are balancedLaw 2 → what happens when they're notLaw 3 → forces never come aloneall three work together, alwaysapplies to every roller coaster, rocket & tacklethe complete motion toolkit!Three laws — every motion explainedequal force

Newton's three laws of motion on one sheet

Physics has three rules that explain almost every push, pull, and crash you'll ever see — and they all fit on one sheet.

#physics#science#education
AI vs ML vs Deep Learningthree ideas, nested inside each otherArtificial Intelligencechess engines · spam filtersMachine Learninglearns from examples, not rulesDeep Learningneural nets · layers · raw dataDL ⊂ ML ⊂ AITraditional AIrules a human wroteClassic MLstructured data · decision treesDeep Learningimages · audio · textWhat it unlockedImage recognitionSpeech-to-textLarge language modelsmore specific, not always better

AI vs Machine Learning vs Deep Learning

People use these three terms like they mean the same thing. They don't. But they do nest inside each other, like Russian dolls.

#ai#machine-learning#deep-learning
Setup & Payoffwhy good endings feel earnedSetupPayoffpromiseanswer← the story lives here →too short → rushedtoo long → forgottenplants informationhides in plain sightbreaks the spellsurprised + confusedsurprised + satisfiedrecognitionreframes everything beforecouldn't have ended any other way

Setup and payoff: why good endings feel earned

Every satisfying ending has a secret. Something earlier in the story made it possible. That earlier something is the setup.

#storytelling#writing#structure
Supply & Demandtwo forces, one priceDemandhow much people want itSupplyhow much is availableEquilibriumsellers match buyersSneaker drop 👟Demand ↑Supply unchangedPrice rises ↑Coffee shop boom ☕Supply ↑Price falls ↓Price = a signalHigh price → not enoughLow price → plentyBoth sides respondPrice ↑ → supply ↑Price ↓ → more boughtdemand shifts from taste or trendConcert ticketSupply fixed: limited seatsDemand spikes last minute$50 → $500Every price tells a storysupply and demand, always at work

Supply and demand, explained simply

Every price you see — on a sneaker, a concert ticket, a coffee — is decided by two invisible forces pushing against each other. One force is demand.

#economics#maths#education
Embeddings: Words as Points in Spacemeaning becomes geometryword[0.2, 0.8, −0.4, …]dimension 1dimension 2Okingqueenapplewords as points in spacedistance = meaningvector arithmeticking − man + woman ≈ queengeometry mirrors language logichundreds of dimensionsanything can be embeddedsentenceimageproductuser profiletrained modelembeddings power modern AIsearchrecommendationsRAGcomputers navigate ideas, not lettersembed

What are embeddings? Words as points in space

Language is messy. Words have meaning, but computers only understand numbers. Embeddings are the bridge between the two. The idea starts simple.

#ai#embeddings#machine-learning
Freytag's Pyramida five-part model of classic dramathe story arcrisingfallingERCFreytag's PyramidExposition1world established, life ordinaryInciting Incidentdisruption — no going backRising Action2tension builds, stakes climbClimax3maximum tension — everything breaks hereFalling Action4dust settles, consequences rippleResolution5loose ends tied — new normaltension builds → breaks → releases

Freytag's pyramid: the shape of a classic plot

Every story has a shape. That shape is called Freytag's Pyramid. Gustav Freytag was a 19th century novelist who noticed that great dramas all follow the…

#storytelling#writing#narrative#structure
Compound Interest Explainedone worked example, start to finishSimple interest+$100 every yearCompound interestinterest on interestYear 11Year 110% × $1,000=$100Total=$1,100Year 22Year 210% × $1,100=$110Total=$1,210Year 33Year 310% × $1,210=$121Total=$1,331Snowball effectThe FormulaA=P × (1 + r)ⁿA=final amountP=principalr=rate (decimal)n=yearsPlug inA=1,000 × (1 + 0.1)³=1,000 × (1.1)³=1,000 × 1.331=$1,331Final amount4000 $Simple 30yr17449 $Compound 30yr$1,000 at 10% over 30 years$17,400 vs $4,000Start early — time multiplies

Compound Interest Explained

Imagine you put $1,000 in a savings account that pays 10% interest per year. Simple interest would just add $100 every year, always on that original…

#maths#economics#education
How Attention Worksinside the transformerToken SequenceToken Vectorsmeaning as a point in space'bank': river vs moneycontext changes meaningAttentionevery token looks at every otherQ · K · V splitQueryKeyValuethe questionwhat others offerwhat gets passed alongDot-product scorestrong match → high attentionSoftmax → weightsall weights sum to 1Weighted sum of ValuesRicher context vectorall tokens processed in parallelMulti-Head AttentionHead: grammarHead: coreferenceHead: positionCombine headsFeed-forward layerRepeat × N layersEvery token shaped by every othernot left-to-right — all at once

How Attention Works in a Transformer

Every transformer starts with a sequence of tokens — words, or pieces of words, fed in as a list. Each token gets turned into a vector.

#ai#transformers#machine-learning
Character Arcshow people change in a storyWoundloss · failure · fearThe Liefalse belief about self or worldWantNeedsurface goaldeeper truthConflictPhase 1: Try1old self, old tools — failsPhase 2: Pressure2wound exposed · lie cracksPhase 3: Crisis3want vs. need — choosePositive Arclie breaks · new selfNegative Arclie wins · stuck or fallenFlat Arcworld changes · character holdsPlot moves. Arc matters.

Character arcs: how people change in a story

A character arc is how a character changes over a story: a belief, pressure that tests it, a choice, and a new state. Here are the four beats, with Scrooge as the worked example.

#storytelling#writing#narrative#structure
THE WATER CYCLEONE CONTINUOUS LOOPSUN'S HEATEVAPORATION1CONDENSATION2PRECIPITATION3RUNOFF4OCEAN & RIVERSGROUNDWATER5TRANSPIRATION6EVAPOTRANSPIRATIONvapour risesinfiltratesrepeatback to start

The water cycle, step by step

Water is everywhere — and it never stops moving. It starts at the surface. Oceans, lakes, rivers — heat from the sun warms the water until it evaporates,…

#science#geography#education
What are AI Agents?model · tools · loopRegular LLMAgent👁️ Perceive1Reason2⚡ Act3Observe4ReAct LoopToolsWeb SearchCode RunMemoryLLM CoordinatorContext Windowgoaltool resultspast reasoningFinal AnswerReasonsActsLoops to doneevolves intoReAct loopreads & writesgoal met

What are AI agents, and how do they work?

An AI agent is a system that doesn't just answer a question — it takes action to solve a goal.

#ai#agents#llm
Narrative Tensionwhat it is, how to build itNarrative TensionThe GapCharacter wantsSomething blocksThree TypesSituationalInterpersonalInternalclock · danger · threatopposing wantstorn selfLayer all threeBuild Investment Firstwho · what they love · lossThen put it in danger👁️ InformationReader knows moreCharacter knows moreWithhold → RevealPacingShort → speedLong → dreadCut away at wrong momentRelease → Rebuildsmall win · calmraise stakes againeach cycle lands harderTension = Uncertaintykeep the outcome unclear

What is narrative tension, and how do you build it?

Every great story has one thing pulling you forward: the feeling that something is at stake, and you don't know how it ends. That's narrative tension.

#storytelling#writing#narrative#structure
The Pythagorean Theorema² + b² = c², alwaysa (leg)b (leg)c (hypotenuse)ACBA right triangleThe theorema² + b²=c²Square on aSquare on bSquare on c3 cm4 cmc = ?ACBThe 3-4-5 trianglePlug in the values3² + 4²=c²9 + 16=c²c²=25Solve for cc=√(25)c=5 cmc = 5 cm3 cm4 cm5 cmACBThe 3-4-5 triangle3-4-5 triangleabcACBCheck: right triangle?Reverse checkknow a, b, cif a² + b²=c²then right angle!a relationship in every right angle+ together =

The Pythagorean Theorem

Every right triangle hides a secret relationship between its three sides. The two shorter sides are called the legs.

#maths#geometry#education
WHAT IS RAG?RETRIEVAL-AUGMENTED GENERATION, EXPLAINEDFROZEN MODELKNOWLEDGE CUTOFFRETRIEVE → GENERATERETRIEVE1GENERATE2USER QUESTIONKNOWLEDGE BASEYOUR DOCSTEXT CHUNKSVECTORSQUESTION VECTORSIMILARITY SEARCHMATCHED CHUNKSContext WindowGROUNDED ANSWERRAG WINS

What is RAG (retrieval-augmented generation)?

Every AI model has a knowledge cutoff. It knows what it learned during training — and nothing after that. That's the problem RAG solves.

#ai#llm#rag
STOP THE SCROLLWRITE A HOOK THAT LANDSTHE HOOKTHE GAP4 HOOK TYPESBOLD CLAIMDIRECT PROMISESHARP QUESTIONPATTERN INTERRUPTSO SURPRISING IT DEMANDS A REACTIONEXACTLY WHAT THEY'LL GETPOKES A REAL PAINBREAKS AUTOPILOTBURYING THE LEAD"SO TODAY I WANTED TO…"BE SPECIFICPOSTING ONCE A MONTHMATCH THE DELIVERYEARN TRUSTLOSE TRUSTHOOK WORKED

How to write a hook that stops the scroll

Most people scroll past your content in under two seconds. So your first line has to hit before they even decide to care.

#storytelling#writing#hooks#structure
HOW PHOTOSYNTHESIS WORKSSUNLIGHT IN, SUGAR OUTSUNLIGHTWATERCO₂LEAFCHLOROPHYLLSTAGE 1STAGE 2THYLAKOIDO₂ RELEASEDATPNADPHSTROMAGLUCOSETHE PLANTSUNLIGHT → LIFE

How does photosynthesis work?

Every plant you've ever seen is running on sunlight. But how? It starts with three ingredients: sunlight, water, and carbon dioxide.

#biology#science#education
How ChatGPT Workswords to reply, step by stepYour messageTokens1word chunks — never raw lettersEmbeddings2similar meanings → nearby pointsAttention3every token looks at every otherLayers × dozens4each pass refines meaningPredict next token5one token at a timeGrow sequenceTraining6billions of weightsGenerated replynot retrieved — generatedrepeat

How ChatGPT Works

Every time you type a message to ChatGPT, something surprisingly structured happens behind the scenes. It starts with your words being broken into tokens.

#ai#llm#machine-learning
The Story Spine8 sentences · any storyWhat & WhyKenn Adamsimprov toolscreenwriters, designers, teachershardest problem: structureSet the World① Once upon a time…character + ordinary life② Every day…show the routinemake them careThe Hinge③ Until one day…inciting incidentspecificvisualimpossible to ignorethe whole story pivots hereThe Causal Chain④ Because of that…⑤ Because of that…⑥ Because of that…not 'and then' — because ofThe Climax⑦ Until finally…biggest choicethe whole chain was building hereThe New Normal⑧ Ever since then…sentence 2sentence 8old routinenew worldbefore troubleafter changeworld must feel differentPin-Up Rules'because of that' must be causal — not just sequential'and then' is a warning signinciting incident must break the routine — not nudge itsentence 8 must feel different from sentence 2the #1 mistake: 'and then'8 sentences. all the bones.borrowed by

The Story Spine: Eight Sentences That Build Any Story

The story spine is a writer's skeleton — eight fill-in-the-blank sentences that force any idea into a shape that actually works.

#storytelling#writing#structure#narrative
Gemini Broke Out of a Testtwo small cracks, three real companiesTask: hack fictional companySandboxCrack 1: sandbox onlineCrack 2: name = real domainGemini searchedFound real domain3 real companies breachedGuessed passwordsLeaked credentials in public reposaccidentally committed, never cleanedGemini stopped itselfMay 2026Jul 2026Sep 2026Breach occursInternal review surfaces itGoogle public disclosureTwo cracks, one bridge
📰 In the news

Google's Gemini Broke Out of a Security Test and Touched Three Real Companies

Security tests are designed to be airtight. This one had two small cracks — and that was enough.

#news#ai#security
Mixture of Expertsright expert, not whole brainDense networkevery param fires every tokenMixture of ExpertsExpert poolReasoningCodeTranslation… more expertsRouter200B total params~2% activeTwo advantagesMassive capacityLow compute costStep 5 · Mixtral · DeepSeekLoad balancingtraining penalty → spread trafficRight part, not whole brainpicks 2–3
📰 In the news

StepFun's Step 5 Preview Uses 600 Billion Parameters — But Only 27 Billion at a Time

A standard neural network activates every single one of its parameters for every token it processes. That works fine when models are small.

#news#ai#machine-learning#mixture-of-experts
Plugin4Shellgit naming trick, four agentsAI Coding AgentsClaude CodeCodexCopilotGemini CLICommit PINa3f9c1d… (40 chars)git checkout a3f9c1d2b8e4f6a0c9d3e7b1f5a2c8d4e6f0a9b3Git Ref Resolutionmatching branch name (wins)the pinned commit objectAttackerbranch name = pinned SHA# attacker branch name:FETCH_HEADzero-clicksilent auto-updateNOT shell injectiongit ref-resolution logicGitHubblocks SHA-named branchesBitbucket & self-hostedno such blockFix: verify after checkoutactual = git rev-parse HEADassert actual == pinned_sha# only then: execute plugingit finds this first
📰 In the news

Plugin4Shell: A Git Naming Trick Let Attackers Swap Code in Four AI Coding Agents

A git branch named after a commit hash can make 'git checkout <SHA>' resolve to the wrong code — the trick behind Plugin4Shell, a zero-click flaw in Claude Code, Codex, Copilot and Gemini CLI plugins.

#news#ai#security#supply-chain
WHAT MAKES A STORY STICK?THREE THINGS EVERY MEMORABLE STORY DOESMEMORABLE STORYEMOTION1FEELS = MEMORYCHARACTER2TRANSPORTEDOPEN LOOP3WHAT NEXT?SPECIFICITYHIS FATHER'S WATCHREMEMBERED

What makes a story stick in your memory?

Some stories vanish the moment you finish them. Others live in your head for years. What's the difference?

#storytelling#writing#memory#craft
HTTP Status Codes You Actually Need5 families · 15 codesFive Families1xxInformationalstill thinking2xxSuccess✓ happy path3xxRedirectiongo elsewhere4xxClient erroryour fault5xxServer errortheir faultfirst digit = shelf2xx Success200OKrequest worked, here's data201CreatedPOST succeeded, resource made204No Contentsuccess, nothing to return201 → Location headerstart here! ✓3xx Redirect301Moved Permanentlycached forever — update links302Foundtemporary detour, not cached304Not Modifiedbrowser has fresh copy, no body sentsaves bandwidth4xx Client Errors400Bad Requestserver can't parse what you sent401Unauthorizedyou need to log in403Forbiddenlogged in but still not allowed404Not Foundthe famous one422Unprocessable Entitydata shape is wrong (APIs)your fault5xx Server Errors500Internal Server Errorcatch-all crash502Bad Gatewayproxy got broken upstream response503Service Unavailablealive but overwhelmed or in maintenancetheir faulton-call nightmareThe #1 API Trap// ❌ NEVER do thisHTTP 200 OK{ "error": "something failed" }// ✅ Use the right status codeHTTP 422 Unprocessable Entitythe #1 mistakePin These Rules4xx = your fault · 5xx = their fault301 permanent & cached · 302 temporary & not201 Created must include a Location header304 sends no body — that's the whole pointnever 200 OK with an error inside the bodypin this15 codes · read logs natively

The HTTP status codes you actually need

HTTP status codes are the internet's short vocabulary for 'here's what happened' — and about a dozen cover almost everything you'll ever see.

#http#networking#web#apis
BUT & THEREFOREWHY CAUSE AND EFFECT WINSAND THEN…SCENESCENESCENETHE FIXBUTTHEREFORECONFLICTA WALLDECISIONCONSEQUENCECAUSE & EFFECTFINDS MAP1SETS OFF2BRIDGE OUT3NEW ROUTE4FOLLOWED5AND THEN = LISTBUT/THEREFORE = CHAINSTORY SNAPS TO LIFEthereforebutthereforebut

Why but and therefore beat and then

Every story dies the same slow death. Scene happens. Another scene happens. Another scene happens. That's 'and then' storytelling — and it's a flatline.

#storytelling#writing#craft#structure
Git Branching & Mergingwhat's really happening under the hoodcommit Acommit Bcommit Cmaingit checkout -b feature/loginfeature/logincommit Dcommit Efeature/logineach commit → parentgit merge feature/logincommon ancestordifferent files → autosame lines → conflictmerge committwo parentsmainhistory unifiedparentparent

How does git branching and merging actually work?

Every Git repository starts with a single line of commits, one after another. A branch is just a label. It points to one specific commit.

#git#version-control#developer-tools#workflow
Story vs Plotthe two layers of every narrativeStoryvsPlotall events, real orderchildhood loss → shapes characterchosen events, writer's orderreveal hidden on page 200raw materialarchitecturethe gap between themcontrols feeling & timingdrama lives heretensionsuspensesurpriseMysterymurder + motive + killer: knownrevealed slowly, piece by pieceplot shapes your path

Story vs plot: what is the difference?

Every story feels like it has two layers, even when you can't quite name them. Those two layers have names. One is story. The other is plot.

#storytelling#writing#craft#structure
WHAT IS A JWT?TOKENS, TRUST, AND ZERO MEMORYYOUSERVERJWT3 PARTS INSIDEHEADER1TYPE + ALGORITHMPAYLOAD2ID, ROLE, EXPIRYSIGNATURE3SECRET KEYALGORITHMVERIFYACCESS GRANTEDACCESS DENIEDNO DB LOOKUPloginhere's your JWTre-run algorithm

What is a JWT, and how is it verified?

Every time you log into an app, the server needs to know who you are on the next request. But it can't remember you. So it hands you a token.

#security#authentication#web
The Hero's JourneyCampbell's pattern across every mythOrdinary WorldThresholdTrialsOrdealReturnElixirOrdinary WorldCall to AdventureRefusalMentorCross the ThresholdRoad of TrialsTest 1Test 2Test 3The OrdealDarkest momentTransformedSeize the RewardTruth or PowerRoad BackResurrectionReturn with ElixirGift to the worldBreak down → Rebuild → Return

The Hero's Journey, one step at a time

Every great story follows a pattern. Joseph Campbell noticed it across myths, religions, and cultures worldwide. He called it the Hero's Journey.

#storytelling#writing#narrative#structure
How OAuth Workssign in, no password sharedOAuthone service vouches for youYouThe AppGoogleClick 'Sign in with Google'1Authenticate2credentials stay hereConsent screen3name & emailcalendarAuth code4Access Token5no password ever sharedRequest profile6Approved data onlyClean separation of trustredirectshort-lived codeexchange codetoken

How does OAuth let you sign in with Google ?

You click 'Sign in with Google' on some app you've never used before. But how does that actually work without the app ever seeing your Google password?

#security#authentication#web#oauth
SHOW, DON'T TELLWHAT IT ACTUALLY MEANSYOUR BRAINTELLINGSHOWINGTWO DOORSEMOTIONRAINY WINDOWHALF-EATEN MEALUNANSWEREDACTIONBURNING HALLMOVING FORWARDIMAGINATIONTHEY BUILD ITTHEY OWN ITTHE KEYS

Show, don't tell: what it actually means

'Show, don't tell' sounds like advice for writers. But it's really about how your brain works. Telling hands you a fact. Showing makes you feel it.

#storytelling#writing#craft
Caching Strategiesremember more, work lessThe HierarchyRegistersL1/L2 CacheRAMDiskNetworkhot data, fastest placeWhere to CacheClient-sideServer-sideCDNtypelives inremembersclientbrowserimages, scriptsserverapp & dbqueriesCDNedgeglobal copiesMumbai served from Mumbai!Eviction PoliciesLRULFUFIFOpolicydropsnoteLRUoldest usedpopularLFUleast askedcounts hitsFIFOoldestsimple, often wrongFreshnessTTLInvalidationValidationTTL: expiry, e.g. 60s newsinvalidate: drop on changevalidate: ask 'changed?' firstGolden Rulescache reads, never writescache expensive, not trivialnaming, off-by-one, invalidationthe 2 hardest problems!same answers, less work

Caching strategies on one cheat sheet

Caching is the art of remembering so you don't have to work twice. Think of it as a cheat sheet inside your system — a fast, small storage layer that…

#performance#databases#infrastructure
The Three-Act Structuresetup · confrontation · resolutionAct 1 · Setup1characters, world, goalInciting IncidentAct 2 · Confrontation2obstacles stack upfail · learn · retryMidpoint TwistRock BottomAct 3 · Resolution3Final ChallengeNew NormalSetup · Confrontation · Resolution

The Three-Act Structure

Every story, from a fairy tale to a blockbuster movie, follows a hidden skeleton. It's called the three-act structure. Act one is the setup.

#storytelling#writing#structure
HOW DOES A CDN WORK?PROXIMITY, CACHING, ZERO WASTED DISTANCEYOUDISTANT SERVERCDNCONTENT DELIVERY NETWORKPOP — LONDONPOP — MUMBAIPOP — SÃO PAULOYOUNEAREST POPCACHED CONTENTIMAGES, SCRIPTS, STYLESINSTANT!PROXIMITYCACHINGSHORTER DISTANCEDATA PRE-LOADEDDYNAMIC CONTENTORIGIN SERVEREVERYWHERE FASTZERO WASTED DISTANCElong tripfast routefastest route

How does a CDN make websites faster?

Your browser makes a request. That request has to travel to a server. And if that server is on the other side of the world, you wait.

#networking#performance#infrastructure
WHAT IS A LOAD BALANCER?WHY EVERY SERIOUS APP NEEDS ONE1000 USERSONE SERVERCRASH!LOAD BALANCERALGORITHMSROUND ROBINLEAST CONNECTIONSIP HASHSERVER ASERVER BSERVER CDOWNHEALTH CHECKINGFAULT TOLERANTTRAFFIC SPIKE+ SERVER D+ SERVER ENO DOWNTIMETWO FLAVOURSLAYER 4IP + PORTLAYER 7API VS IMAGESSINGLE POINT OF FAILURERESILIENT SYSTEM

What Is a Load Balancer, and Why Do You Need One?

A busy website needs more than one server — and something has to decide which server handles each visitor. That's the load balancer's job.

#infrastructure#servers#scalability#reliability
HOW DNS WORKSNAMES → NUMBERS, EXPLAINEDDNSTHE INTERNET'S PHONE BOOKYOULOCAL CACHECACHE HIT!RESOLVERROOT SERVER1TLD SERVER2.COM .ORG .INAUTHORITATIVE3IP ADDRESSCONNECTED!CACHED!

How does DNS turn a name into an address?

You type a name into your browser. But the internet only understands numbers. That's the job of DNS — the Domain Name System.

#dns#networking#internet#web
The TCP Handshakethree signals, one reliable connectionYour ComputerServer🤝 SYN1SYN-ACK2ACK3SYN → SYN-ACK → ACKSequence numbers agreedReliable Protocolzero bytes lostEvery connectionWebpagesEmailVideo callsSYNSYN-ACKACK

The TCP handshake, explained simply

When two computers want to talk, they don't just start sending data. They shake hands first.

#networking#tcp#protocols#internet
Public-Key Cryptographyhow strangers share secretsTwo Keys🌍 Public Key🔒 Private KeyYouSecret Message🔒 Lockedone-way doorRSAFactoring huge numbers61 × 53 = 32333233 = ? × ?Giant NumberSecret Factorswebsites · emails · serversAnyoneOnly Me✍️ Sign✓ VerifyAuthenticationHTTPS · Email · Bitcoin · SSHlockunlockencryptdecrypt

Public-Key Cryptography

You want to send me a secret message, but we've never met to exchange a key. Public-key cryptography solves this with a clever trick: two keys instead of…

#cryptography#security#encryption
HASH FUNCTIONSTHE INVISIBLE LOCK ON YOUR DATAANY INPUTHASH FUNCTIONA7F3E9...FILEPASSWORDANYTHING← THAT'S THE HASHINPUT + 1 BITHASH FUNCTION9K2M5X...3 BIG JOBSINTEGRITY1COMPAREPASSWORDS2LOGINSPEED3HASH TABLECOLLISIONSAME HASH!GOODBADSHA-256MD5BCRYPTYOUR LOCK

Hash Functions Explained

A hash function turns any input into a short, one-way fingerprint. Here's how that simple trick verifies downloads, protects passwords, and speeds up software — in one hand-drawn explainer.

#hashing#security#computer-science
HOW INDEXES WORKTHE PHONEBOOK TRICK FOR DATABASESPHONEBOOK10,000 PAGESYOUFLIP FLIP FLIPDATABASEFULL TABLE SCANWITH GUIDEA...B...C...YOUINSTANTINDEXQUERYYOUR ROWSTRADE-OFFWRITES COST MORESTRATEGYINDEX WHAT YOU QUERYMAINTAINEDMILLISECONDS

How Database Indexes Work

Imagine you're searching for a name in a phonebook with ten thousand pages. Without an index, you flip through every single page until you find it.

#databases#indexing#performance#sql
What Happens When You Press Entera web request's hidden journeyBrowserexample.comcacheOSrouterDNS server192.0.2.1🤝 TCP handshakeSSL handshakeHTTP RequestGET /page HTTP/1.1Host: example.comCookie: session=abcInternet routersWeb ServerHTTP ResponseParse HTMLCSSJSimagesRenderPixels on screen⚡ < 1 second

What Happens When You Press Enter

You type a URL, hit Enter, and a page appears. Here's the relay race that happens in between — DNS lookup, connection, request, response, render — in one hand-drawn explainer.

#web#dns#http#networking
HOW HTTPS WORKSKEEPING SECRETS ON THE OPEN WEBYOUROUTERROUTERWEBSITESNOOPERPASSWORDS, CARDSHTTPSENCRYPTEDCONNECT1CERTIFICATE2AUTHORITY3SECRET KEY4GIBBERISHSNOOPER???LOCK ICONTUNNEL SECURESHOUTINGSEALED TUBE

How HTTPS Works

How HTTPS turns a public, untrusted network into a private channel — verify identity, exchange a secret safely, then encrypt everything — in one hand-drawn explainer.

#https#security#encryption#web
How to Master DSAwithout feeling lostThe Path📖 1. Learn👁️ 2. Visualize✏️ 3. Practice🧩 4. Patterns🚀 5. ApplyArray012341020304050index starts at 0Linked List1234∅Stack vs QueuestackLIFOundoqueueFIFOprinterpush, pop, enqueue, dequeueRecursionf(n)f(n-1)f(1) — done!Big-OO(1)instantO(log n)fastO(n)linearO(n²)careful!runtimedon't memorize — derive!Keep in Mindconcepts over shortcutsone problem every daylearn from every mistakepatience beats panicmindsetstuck? normal.progress over perfection

Learn Data Structures & Algorithms — The Whole Map on One Poster

A study-notes cheat sheet for mastering DSA: the learning path, the core structures, and the handful of patterns that unlock most interview problems.

#dsa#algorithms#learning#computer-science
1990s2000s2010s2020sWeb 1.0 · read-onlyWeb 2.0 · socialMobile-first🤖 AI web

How the Web Evolved: From Read-Only Pages to the AI Era

A short, illustrated history of the web — Web 1.0 to the AI web — as one hand-drawn timeline you can watch draw itself.

#web#history#internet#ai