← back to notes

rebuildin' the wheel

everyone says "don't reinvent the wheel." but how do you know what a wheel even does if you never built one from scratch?
will any of these be production ready? absolutely not. will i mess up and learn? absolutely yes.

what is this?

  1. oltp database - postgres didn't build itself. btrees, wal logs, query parsers, buffer pools. i wanna feel that pain firsthand.
  2. olap database - columnar storage, vectorized execution, compression. basically build a baby clickhouse and cry tryin'.
  3. programmin' language - lexer, parser, ast, interpreter. doesn't need to be useful. just needs to run "hello world" and make me mass of proud.
  4. llm from scratch - not fine-tunin'. not prompt engineerin'. actually trainin' a transformer from raw weights. even if it only learns to say "the" repeatedly.
  5. vector database - embeddin' storage, approximate nearest neighbor search, hnsw index. it's just math with extra steps.
  6. in-memory database - basically redis but mass of worse. key-value store, expiration, pub/sub. how hard can it be? (famous last words.)
  7. website without any framework - oh wait, i already did this one. you're lookin' at it.
  8. web framework - routing, middleware, templatin'. build the thing i refuse to use on this website.
  9. container runtime - cgroups, namespaces, union filesystems. docker is just linux features in a trench coat.
  10. git - objects, trees, blobs, refs. understand why merge conflicts exist and hate it even more.
  11. search engine - crawlin', indexin', rankin'. google started in a garage, i'll start in a terminal.
  12. load balancer - round robin, least connections, health checks. nginx is just a for loop with extra steps. (it's not. i'll find out.)
  13. message queue - producers, consumers, topics, acknowledgments. kafka but mass of simpler and mass of buggier.
  14. operating system - bootloader, kernel, scheduler, filesystem. this one might actually take a lifetime.
  15. compiler - tokenizer, parser, code gen. turn text into machine code and feel like a mass of wizard.
  16. http server - sockets, tcp, request parsin', response buildin'. the thing that runs the internet and is surprisingly simple at its core.
  17. dns resolver - recursive queries, cachin', root servers. the phonebook of the internet that nobody thinks about.
  18. blockchain - hashing, consensus, merkle trees. not for crypto bro reasons, just to understand the actual data structure.
  19. shell - read, eval, print, loop. pipin', redirections, job control. bash is just a while loop readin' your commands.
  20. regex engine - nfa, dfa, backtracking. the thing that makes every developer question their career choices.
  21. 3d renderer - ray tracin', rasterization, shaders. make pixels appear on screen and feel like god.
  22. bittorrent client - peer discovery, piece selection, chokin' algorithms. piracy education purposes only obviously.
  23. neural network - forward pass, backprop, gradient descent. no pytorch, no tensorflow, just raw matrix math and tears.
  24. text editor - gap buffers, syntax highlightin', undo/redo. vim started somewhere too.
  25. web browser - html parser, css layout engine, js interpreter. the most complex piece of software most people use daily.
  26. template engine - parsin' mustache/jinja style templates. it's just string replacement with opinions.
  27. physics engine - collision detection, rigid body dynamics, gravity. make things fall and bounce realistically.
  28. emulator - cpu cycles, memory mappin', instruction decoding. make a gameboy run on your laptop.
  29. memory allocator - malloc/free from scratch. understand why memory leaks happen and respect garbage collectors forever.
  30. network stack - tcp/ip from raw sockets. syn, ack, fin. the handshake that holds the internet together.
  31. bot framework - event loops, command parsin', state management. discord bots are just glorified if-else chains.
  32. diffusion model - noise schedulin', u-net, denoising. generate images from static and question reality.
  33. rag pipeline - chunkin', embeddin', retrieval, generation. the thing every ai startup is sellin' as magic.
  34. processor - logic gates, alu, registers, instruction set. build a cpu and finally understand what "clock speed" means.
  35. random number generator - computers can't do true randomness. it's all pseudorandom math pretendin' to be chaotic. build one and realize every "random" thing you've ever seen was a lie.
  36. hash map - arrays, hashing, collision resolution. the data structure that makes everything O(1) and then doesn't.
  37. package manager - dependency resolution, version lockin', conflict handling. npm does this and somehow still breaks.
  38. cron job scheduler - parse time expressions, schedule tasks, handle misses. time is harder than you think.
  39. garbage collector - mark, sweep, compact. understand why your java app pauses for no reason.

if you're insane enough to build any of these, hit me up.

there's a github repo that explored this space a bit, check it out.