Posts

The Secret Life of JavaScript: Parallel Processing with Web Workers

Image
The Secret Life of JavaScript: Parallel Processing with Web Workers How to stop freezing your UI when parsing massive JSON #JavaScript   #Coding   #Frontend   #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 26 The Freeze Timothy watched the sleek CSS loading spinner twirl smoothly on his dashboard. It was a perfect sixty frames per second. But the moment the network request for the historical analytics data completed, the spinner violently froze mid-rotation. The entire browser tab locked up. For three agonizing seconds, Timothy couldn't scroll, couldn't click, and couldn't even highlight text. Then, just as suddenly, the data populated the grid and the UI snapped back to life. "I don't understand," Timothy muttered, aggressively clicking the refresh button ...

The Secret Life of Python: deepcopy

Image
  The Secret Life of Python: deepcopy Taking control of Python's  __deepcopy__ #Python   #Coding   #Programming   #SoftwareDevelopment 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 27 Timothy was looking at a new class he had built for the Chess Club—a  TournamentSession  object. It was a complex piece of data that tracked the start time of a match and a unique "Session ID." "Margaret," Timothy said, "I'm using  deepcopy  to create a backup of a match in progress. It works perfectly now, but I have a weird problem. The 'copy' has the exact same  start_time  and  session_id  as the original. If I'm making a new version of the match, shouldn't it have its own unique ID and a new timestamp?" Margaret smiled. "You've discovered th...

The Secret Life of AI: Patience and Flexibility

Image
  The Secret Life of AI: Patience and Flexibility How to prompt, think, and get results from any AI tool #WorkingWithAI   #Prompting   #AIConfidence Margaret is a senior software engineer. Timothy is her junior colleague. They work in a grand Victorian library in London — and in every episode, they'll show you exactly how to get what you want from AI. Episode 1 The fog had settled early over the city, pressing itself against the library windows as though curious about what lay inside. Timothy arrived at his usual hour, unwound his scarf with the mechanical patience of a man performing a habit he no longer noticed, and sat down across from Margaret without a word of greeting. She did not look up from her book immediately. She never needed to. "Tell me," she said, turning a page. Timothy stared at the grain of the oak table. "I've been using it for three weeks now. The AI. For work." He paused. "I don't think it's working." Margaret closed he...

The Secret Life of Claude Code: Plan First, Code Second

Image
  The Secret Life of Claude Code: Plan First, Code Second Why the most important conversation with Claude Code happens before you begin coding #ClaudeCode #CodingWithAI #Programming #DeveloperLife 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 no one is expected to know everything, but everyone is expected to know what they don't know. Episode 8 You Need a Plan The evening had turned cold, and Timothy had come prepared for it this time — coat buttoned, scarf wound twice around, a general air of having thought ahead. Margaret noticed this when he came through the tall doors and filed it away without comment. He settled into the chair across from her and set his notebook on the table. It was open already, to a page that was mostly blank. This, too, she noticed. "I've been thinking about something since Thursday," he said. Margaret set aside the monograph she had been rea...

The Secret Life of Go: Error Handling (Part 3)

Image
  The Secret Life of Go: Error Handling (Part 3) Behavioral errors, interfaces, and the retry loop #Golang #ErrorHandling #SoftwareArchitecture #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 32 Ethan was writing a background worker that synced data with a notoriously flaky external API. He had written a loop to retry the request if it failed, but the  if  statement was getting out of hand. "Look at this monster," Ethan said, pointing at his screen as Eleanor walked by with her tea. // Ethan's brittle retry logic response, err := externalAPI. FetchData () if err != nil { // Check every possible network failure identity if errors. Is (err, network.ErrTimeout) || errors. Is (err, network.ErrConnectionReset) || errors. Is (err, network.ErrDNSTimeout) { fmt. P...