AI-Written Code and Tests: The Shared Blind Spots Trap

You ask your AI coding agent to implement a FastAPI endpoint, then ask it to write the unit tests. pytest turns green. pytest --cov reports 100% line coverage. The diff looks clean, the assertions are readable, and the PR is ready to merge. Three days later, a client sends a slightly malformed payload and your endpoint returns a 500 error or silently applies a negative discount. This is not a freak incident. With AI-written tests generated in the same session as the implementation, both artifacts share the exact same implicit assumptions. The tests do not prove that the code survives reality: they only prove that the code matches what the model had in mind when it wrote it. ...

November 28, 2026 · 5 min · Anthony
AI-Written Code and Tests: The Shared Blind Spots Trap

Polling, Long Polling or SSE: What to Choose in Python?

An order changes status, an export finishes, a message arrives. The server knows, the browser doesn’t. Polling, long polling and Server-Sent Events (SSE) all answer that same question, and they often get mixed up because the result on screen looks alike. What separates them is who triggers the delivery and what silence costs, when nothing changes. Let’s look at how each one works, what it really costs, and why the simplest solution is often the right one. ...

October 5, 2026 · 7 min · Anthony
Polling, Long Polling or SSE: What to Choose in Python?

Server-Sent Events vs WebSocket: Which to Choose in Python?

As soon as a screen has to update without a page reload, WebSocket enters the conversation. Order tracking, export progress, notifications, an LLM answer appearing token by token: the reflex is to open a bidirectional channel. Yet in all of these cases, the client has nothing to say to the server once the connection is established. The Server-Sent Events (SSE) pattern meets exactly this need with a plain HTTP response that never ends. The choice goes beyond protocol preference. It determines what you get for free (reconnection, resumption, HTTP authentication) and what you will have to build yourself. Let’s compare the two in Python, with FastAPI and Django, all the way to the problems that only show up in production. ...

September 15, 2026 · 11 min · Anthony
Server-Sent Events vs WebSocket: Which to Choose in Python?

Why a blog about Python, Django, Architecture and best practices?

This blog is first and foremost a place to share: discoveries, thoughts, things that have been useful to me and might be useful to others. Python, Django, Architecture and best practices: the heart of this blog The heart of the blog is Python development, and more specifically the frameworks that shape my daily work: Django, FastAPI and Flask. Each has its strengths, its use cases, its pitfalls. We’ll dig into all of them. ...

May 4, 2026 · 2 min · Anthony
Why a blog about Python, Django, Architecture and best practices?

Newsletter

Get new articles delivered straight to your inbox.