Posts

The Secret Life of Go: sync.Map

Image
  The Secret Life of Go: sync.Map The Concurrent Map, Shard Optimizations, and When Not to Use It #Golang #Concurrency #BackendDev #SoftwareArchitecture 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 28: The Concurrent Map, Shard Optimizations, and When Not to Use It Ethan was staring at a CPU profile on his monitor, looking perplexed. "We upgraded the server to 32 cores," he told Eleanor as she walked by. "But the application isn't running any faster. In fact, the CPU profile shows that almost all the cores are just... waiting." Eleanor pulled up a chair and looked at the flame graph on his screen. It was dominated by a massive red block labeled  sync.(*RWMutex).RLock . "Ah," she said. "You have discovered lock contention. Your cache from Episode 27 is a victim of its own success....

The Secret Life of Azure: The Discovery Engine

Image
  The Secret Life of Azure: The Discovery Engine Adapting to Change with Dynamic Tool Discovery #AzureAI #AgenticWorkflows #SelfHealingCode #CloudArchitecture Tool Discovery & Dynamic Capability The whiteboard was clean, but the project Timothy was working on had stalled. He was looking at a "Tool Not Found" error blinking on his screen. "Margaret," Timothy said, "the  Planning Agent  knows it needs to archive the old telemetry data, but the storage API we used last month has been deprecated. The system is stuck in a loop trying to call a function that doesn't exist anymore. I have to manually update the 'Box of Keys' every time Azure changes a service." Margaret picked up a blue marker and drew a small magnifying glass next to the agent's toolbelt. "That's because you're hard-coding the capability, Timothy. You're treating the system like a machine with a fixed set of gears. To survive in a changing environment, we nee...

The Secret Life of AWS: Managed Edge Policies (Amazon CloudFront)

Image
The Secret Life of AWS: Managed Edge Policies (Amazon CloudFront) When to use native CDN features instead of custom edge compute #AWS #CloudFront #Serverless #Caching Edge Compute Timothy was reviewing the CloudWatch metrics for the CloudFront Function he had deployed the previous week. The JavaScript code was successfully intercepting every Viewer Response and injecting the required HSTS and Content-Security-Policy headers in under a millisecond. "The edge compute layer is incredibly fast," Timothy noted to Margaret. "We process millions of requests, and the latency overhead is practically invisible." Margaret nodded approvingly. "You successfully proved that you can manipulate traffic at the physical edge of the network. However, as an architect, you must always evaluate operational overhead. Every line of custom code you write—even a six-line JavaScript function—is a liability that you must monitor, maintain, and pay for per invocation. Whenever AWS releases...

The Secret Life of Claude Code - The Art of the Follow-Up

Image
The Secret Life of Claude Code - The Art of the Follow-Up What to do when Claude Code gets it almost right — and how one disciplined follow-up gets you the rest of the way there #ClaudeCode #CodingWithAI #SoftwareEngineering #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 conversations are finished properly, and where almost right is understood to be a different thing entirely from right. Timothy has arrived today with something he is not sure what to do with. The Almost He sat down without his usual preamble and turned the laptop toward her immediately. This, Margaret had learned, meant he wanted her to look before he explained. He was uncertain about something and did not yet have the words for it. She looked. On the screen was a function — a data export utility, clean and reasonably structured. She read it the way she always read code: slowly, without expression, beginn...

The Secret Life of JavaScript: The Observer

Image
The Secret Life of JavaScript: The Observer Stop Polling the DOM: Mastering the Intersection Observer API #JavaScript #FrontEnd #IntersectionObserver #WebPerformance Timothy leaned back in his chair, listening to the sudden, aggressive whir of his laptop fan. He had just finished implementing a lazy-loading feature for a massive grid of user profile pictures. "The scroll is perfectly smooth," Timothy said, tapping his screen. "I used the  { passive: true }  flag we talked about yesterday. The Compositor Thread is completely unblocked. But my CPU usage just spiked to ninety percent, and my laptop sounds like it is preparing for takeoff." Margaret strolled over, her dark roast coffee in hand, and peered at the performance monitor on his secondary display. "You successfully unblocked the train," Margaret said, nodding at the screen. "But you are torturing the dispatcher." She pointed to the block of code responsible for the lazy loading. const imag...

The Secret Life of AWS: Edge Compute (CloudFront Functions & Lambda@Edge)

Image
The Secret Life of AWS: Edge Compute (CloudFront Functions & Lambda@Edge) How to execute code at the global network perimeter #AWS #CloudFront #EdgeCompute #Serverless Edge Compute Timothy was reviewing a new compliance requirement from the security team. They mandated that every HTTP response leaving the application must include strict security headers, specifically  Strict-Transport-Security  (HSTS) and a  Content-Security-Policy . "I am planning to update the backend," Timothy explained to Margaret, drawing on the whiteboard. "I will modify our core API Gateway and our backend Lambda functions in Virginia to append these security headers to every single response payload." Margaret looked at the architecture diagram and specifically pointed to the Amazon CloudFront distribution they had built the previous week. "That will work for your dynamic API calls," Margaret said kindly. "But what about the static assets? What about the product images and ...

The Secret Life of Claude: When Claude Code Gets It Wrong

Image
The Secret Life of Claude: When Claude Code Gets It Wrong Three ways Claude Code gets it wrong — and the discipline that catches all of them before they ship #ClaudeCode #CodingWithAI #SoftwareEngineering #AITools 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 precision matters and confidence is not the same thing as correctness. Timothy has arrived today in unusually good spirits. This, Margaret has learned, is sometimes cause for concern. What Timothy Was Proud Of He came through the door with the particular energy of someone who had solved something. "I fixed it," he said, settling into his chair with the satisfaction of a man who had earned his tea. "The user authentication bug. The one that's been sitting in the backlog for two weeks." "Tell me," Margaret said. "I described the problem to Claude Code — properly this time, the way we talked abo...