Posts

The Secret Life of JavaScript: Handling Streaming JSON

Image
  The Secret Life of JavaScript: Handling Streaming JSON How to use the Accumulator Pattern to handle NDJSON chunks #JavaScript   #WebDev   #StreamsAPI   #NDJSON Margaret is a senior software engineer. Timothy is her junior colleague. They work in a grand Victorian library in London — the kind of place where code quality is the unspoken objective, and craftsmanship is the only thing that matters. Episode 32 The Suspended Fragment Timothy leaned closer to his monitor, tracing the lines of the NDJSON accumulator they had written the day before. The progressive rendering was working flawlessly, but one specific line of logic was gnawing at him. "I understand why we split the buffer by the newline character," Timothy said to Margaret as she passed by. "But I don't understand this exact sequence. We split the string into an array of lines, and then immediately call  lines.pop()  to remove the last item and shove it right back into the buffer." Margaret looked at...

The Secret Life of JavaScript: NDJSON

Image
  The Secret Life of JavaScript: NDJSON How to stream complex data with NDJSON #JavaScript   #Frontend   #StreamsAPI   #NDJSON Margaret is a senior software engineer. Timothy is her junior colleague. They work in a grand Victorian library in London — the kind of place where code quality is the unspoken objective, and craftsmanship is the only thing that matters. Episode 31 The Broken Objects Timothy stared at his console, watching a waterfall of bright red text flood the screen. Every single line read:  SyntaxError: Unexpected end of JSON input . "The Streams API is incredibly fast," Timothy explained to Margaret as she walked up with her morning dark roast coffee. "We completely eliminated the memory buffer for the text logs. But now, I am trying to progressively render a massive payload of 100,000 user records from our database. Because the data is JSON, the network packets are slicing the objects right in half." Margaret looked at the network inspector. "Pac...

Tech-Reader AI Digest for Mon Apr 20 2026

Image
  Tech-Reader AI Digest Monday, April 20, 2026 #AI   #TechNews   #Digest Story 1: OpenAI Goes All-In on Inference — $20 Billion Cerebras Deal and the Rise of Inference-Specific Silicon What happened:  OpenAI announced on April 17 that it has dramatically expanded its compute partnership with chip startup  Cerebras Systems  — committing  more than $20 billion over three years  to use servers powered by Cerebras chips. That figure is double the previously reported $10 billion agreement signed in January. As part of the deal, OpenAI will receive  warrants for a minority equity stake  in Cerebras, with ownership potentially increasing as spending rises — up to a 10% stake if total spending reaches $30 billion. OpenAI will also provide Cerebras  approximately $1 billion  to help fund data center construction. (Source:  The Information / Reuters / Gurufocus / Manila Times ) The strategic logic is inference, not training. Nvidia'...

The Secret Life of Go: Execution Flow

Image
  The Secret Life of Go: Execution Flow Why your deferred logs always show zero seconds (and how to fix it) #Go   #Coding   #Defer   #BackendDev Eleanor is a senior software engineer. Ethan is her junior colleague. They work in a beautiful beaux arts library in Lower Manhattan — the kind of place where coding languages are discussed like poetry. Episode 38 The Beaux Arts library was quiet, the kind of quiet that usually helped Ethan focus, but today it only made the sound of his failing logs feel louder. He stared at a terminal output that refused to make sense. "Eleanor, I think I’ve found a bug in the  time  package," Ethan said, his voice dropping to a library-appropriate whisper. "I’m trying to profile this migration function, but the logs are reporting zero seconds every time. It clearly takes nearly a minute to run." The Argument Evaluation Trap Eleanor walked over, carrying a stack of architectural journals. She didn't look at the screen; she looked ...

The Secret Life of JavaScript: The Stream

Image
  The Secret Life of JavaScript: The Stream Render data instantly with the Streams API #JavaScript   #Frontend   #StreamsAPI   #WebDev Margaret is a senior software engineer. Timothy is her junior colleague. They work in a grand Victorian library in London — the kind of place where code quality is the unspoken objective, and craftsmanship is the only thing that matters. Episode 30 The Blank Screen Timothy tapped his fingers against his desk, watching the blank dashboard screen. He had built a new diagnostic view to pull a massive, 15-megabyte server log file from the backend. For five long seconds, the UI was completely empty. A tiny loading spinner twirled in the corner. Then, suddenly, the entire massive wall of text slammed into the DOM all at once, freezing the browser for a split second before finally rendering. "The data is huge, so it takes a few seconds to download," Timothy explained to Margaret, who was standing nearby with her dark roast coffee. "I put a l...

The Secret Life of JavaScript: The Background Sync

Image
  The Secret Life of JavaScript: The Background Sync Guaranteed delivery for offline mutations #JavaScript   #Frontend   #ServiceWorkers   #BackgroundSync Margaret is a senior software engineer. Timothy is her junior colleague. They work in a grand Victorian library in London — the kind of place where code quality is the unspoken objective, and craftsmanship is the only thing that matters. Episode 29 The Evaporating Form Timothy watched his screen with a mixture of pride and dread. The offline architecture was working perfectly for reading data. But then, he tested the "Update Profile" form. He toggled his network connection to "Offline," filled out three paragraphs of text in the bio section, and clicked "Save." The DevTools console immediately flashed angry red text:  TypeError: Failed to fetch . The application crashed, and the three paragraphs of text evaporated into the digital void. "Our offline users can read the dashboard perfectly," Timo...