Optimistic Locking: What Happens When Two Users Update the Same Row?Let's say you're building a todo app. Nothing complicated. You have a list of todos, and each todo has a title and a checkbox to mark it as completed. Your database looks something like this: CREATE TSep 16 · 9 min readfeaturingcode.com
A new perspective on recursion and the call stackEvery explanation of recursion I read told me the same thing: a function that calls itself, with a base case so it stops. Which is accurate, and which taught me nothing, because it never answered the Sep 8 · 6 min readfeaturingcode.com
fc-react-dndGlad to announce that I published my first npm library https://www.npmjs.com/package/fc-react-dnd and you can play with it here. How this drag-and-drop library works, traced through one tree Making a 2Aug 22 · 28 min readfeaturingcode.com
Big O notationI just figured out a simple way to understand BigO notation, aka the algorithm complexity numbers. Let's say you have your myFn function and inside it you have some logic (an algorithm) that takes somAug 14 · 3 min readfeaturingcode.com
Block-addressed editing: a 10x output-token cost reduction for document LLM agentsThis works perfectly when your LLM agent reads a document and updates it — the user asks "in the third paragraph, change 'retried three times' to 'retried five times'", and the agent edits the page. H32KJul 22 · 23 min readfeaturingcode.com