Posts
Integrating Problem Details RFC with FastAPI
During my past development projects, I built a lot of HTTP APIs using various langages (TypeScript, JavaScript, Python) and frameworks (fastify, FastAPI, flask, express). One thing I’ve noticed is that each of those frameworks have their own way of shaping HTTP error responses. This is actually not a big deal considering that most clients (i.e: HTTP clients) do not really rely on strict structure for such errors.
Testing Python code integration with an Azure Eventhub
On one of my project I needed to create a simple API allowing clients to publish some messages into an Azure EventHub. Because authentication is ensured by a JWT we could not rely on our clients to directly publish messages to the Eventhub (and by the way I prefer abstracting this away through a HTTP API).
Debugger doesn't stop at breakpoints with pytest if pytest-cov is used
Recently, while trying to debug some of my
pytest
tests using VSCode, I discovered that my breakpoints were completely ignored and the tests never stopped. After nearly breaking my keyboard in frustration, I stumbled upon this GitHub issue.Three Laws of Software Complexity
Lot of people think that building new softwares is complex. Actually, maintaining software is a lot more difficult than that. Just as for our universe, the entropy of all ours systems tend to increase more and more over time and thus, its complexity. This is where lies the challenge of our developers/ingeneers job.
One way to fix Python circular imports
I’ve already encountered issues regarding circular imports, most of the time it was related to typings only (two modules referencing types from each others) and is easily resolved using a
if TYPE_CHECKING:
block. For other cases I try my best to shape my modules in a way that it does not require circular imports. In the following article I discovered another way to overcome circular imports that I could not have think about simply by defering imported names lookup.The first software jobs AI will replace are...
An interesting short video of Dave Farley, interviewing Birgitta Böckeler, and discussing which software related jobs A.I may replace first. The interesting point is that both have a different opinion, what is your?
Software needs to be more expensive
In this article the author make an interesting statement: most companies actively use open source code for free to create products for making profit. Read this article to discover why this should change and how.
Don't use Python's property (for bad reasons)
I recently stumbled upon a code from one of my coworker who is rather new to Python. He is coming from a Java/Scala background and used python’s
property
decorator to mimic Java Getters/Setters. Let’s see why you should not do this.
subscribe via RSS