Disclaimer: Today's article is quite technical. If you're a developer, you might enjoy it even if it's not your usual stack. If not, feel free to share it with a developer friend or dive in any way—there's always something to learn.
o1 as your Software Architect companion
Once, during a project, we debated the need to use multiple database contexts (DbContext) in a .NET 6 solution with Entity Framework.
It's not an uncommon practice, but the main argument for it was to bring some clarity to a database that was becoming quite large. The idea wasn't to split the database, but to continue using the same database while accessing it through two different contexts.
This seemed like the perfect moment to test OpenAI's o1-preview model.
I asked it: "Is it a good practice to have 2 DbContexts pointing to the same database in different projects, each with its own repositories?" I tried to keep the question neutral, letting o1 decide whether it was a good practice or not (I already knew the answer and had several reasons why).
The response was spectacular! After doing some additional research online and on StackOverflow, I realized that most of the content out there doesn't outright discourage this practice. It's something EF allows, or at least doesn't prevent, and people explain how to do it without always mentioning the headaches that can follow from what seems like a harmless refactor to reduce the complexity of your schema.
At best, there are indirect mentions of scenarios where this might make sense—like having one DbContext for reads and another for writes (though that wasn’t our case).
Following the insightful response, I asked for more information on one of the use cases where using multiple contexts for the same database makes sense. It's a concept from Domain-Driven Design (DDD), but what's amazing is how o1 warns you about the risks and suggests carefully considering whether you really need to manage that added complexity.
I've included the AI's responses at the end of the post—they're quite instructive, even though they came from an AI.
A highly specialized tech podcast in just one click
And here's the cherry on top: thanks to @DotCSV, I recently learned that Google NotebookLM has a new feature. It generates a 4-15 minute audio with two synthetic voices, which sound impressively natural, discussing topics you've noted in your Notebook.
The format feels like an interview, and you have to hear it to believe the quality. It's currently available only in English, but we know this tech is pretty language-agnostic (more on that in a future post with other experiments).
So, I copy-pasted my questions and o1-preview's responses into a NotebookLM and hit "generate audio."
Honestly, it sounds like a real podcast of .NET experts debating the pros and cons of using two DbContexts for a single database. Even though it's generally discouraged, there are cases—like in Domain-Driven Development’s Bounded Context—where it might make sense.
What do you think? If you're a software architect and familiar with the topic, how do you rate o1-preview's responses and NotebookLM's re-interpretation?
Sobre el debat en sí no puc dir res per pur desconeixement, però sobre la conversa generada a partir de les anotacions estic positivament sorprès.
Fins que no ha sortit el tema pel canal mossegui, no en tenia ni idea que existís aquesta funcionalitat. I després d'escoltar l'àudio m'han vingut ganes de fer-hi proves.
És cert que en alguna ocasió es sent algun so estrany o alguna paraula amb una veu diferent, però el 99% es manté coherent i desenvolupa el tema de forma ordenada i entenedora.
Fa venir ganes de posar-li apunts i anotacions vàries i fer-lo còrrer per veure què en surt. O mesclar dubtes propis dins del text, referents al significat del text mateix, per veure com ho trasllada.
No sé si per bé o per mal, però en els propers anys estic convençut que a la ràdio i a la televisió començaran a sortir continguts generats així.
Per una vegada, crec que em decantaré per la vessant optimista i em limitaré a tenir curiositat per com ens sorprendran els bons periodistes quan integrin eines com aquesta a la seva feina.