Sabitlenmiş Tweet
Milan Jovanović
18.5K posts

Milan Jovanović
@mjovanovictech
I make .NET content. Running https://t.co/RdXeNGAz25 🚀
Katılım Haziran 2022
801 Takip Edilen49.1K Takipçiler

45,000+ developers use my Clean Architecture template. The most common question I get about it now is how to make AI write code that fits it.
So I made it a first-class feature.
My Clean Architecture template now ships with 4 agent skills:
/add-feature turns one sentence into a full vertical slice. Command or query, handler, validator, minimal API endpoint, unit and integration tests.
/add-entity wires a new entity through every layer. Error catalog, domain events, EF configuration, migration.
/add-tests reads an existing use case, lists every outcome, then covers each failure path and the happy path.
/ca-review checks your pending changes before you commit. Layer violations, missing auth, cache invalidation, test gaps.
I type "/add-feature snooze a todo until a given date" and get the command, the validator, the handler with an ownership check and a domain event, the endpoint, and 9 tests. Built and verified, in the same shape as every other feature in the solution.
Each skill is a plain Markdown file. Renamed your layers or swapped your test stack? Edit the skill once and every future feature follows suit. It's your team's conventions doc, except it executes.
Get it here: milanjovanovic.tech/templates/clau…

English

You should never return null collections in C#.
I've said this many times already.
But what's the problem with returning null collections?
You will typically iterate over a collection in a loop.
But if your method returns null collections, this can lead to potential errors.
Your code must handle the null case and check for null before accessing any collection elements.
Adding a null check every time can make the code harder to read.
It's even worse if the calling code doesn't handle the null case.
Things will blow up at runtime, which is challenging to diagnose.
You could argue that a null value expresses some intent.
But I still prefer avoiding null in my code as much as possible.
I think it's a best practice to return:
- a new List()
- Enumerable.Empty
- Array.Empty
- C# 12 collection expressions → []
This way, your code can safely iterate over the collection without worrying about null checks.

English

One of many upcoming.
Substack@Substack
Today, Substack is launching an AI detection feature, via an integration with @pangram. Going forward, you’ll be able to scan posts, replies, and comments on the Substack app to see an estimate of how much of it was written by a human, or with AI assistance.
English

@zajkowskimarcin Sol is amazing at driving things to completion with minimal intervention
English

@mjovanovictech 🙋🏼 especially when talking to Fable or Sol. I let more casual models write code these days ;)
English

@DanielGlejzner funny how lots of us come to the same ideas
English

@petarivanovv9 makes for less error conditions, so easier to reason about
English

@mjovanovictech I've noticed code reviews get smoother when collections are always non-null. The mental overhead drops and folks can focus on actual logic instead of defensive patterns everywhere.
English

@TheCodeMan__ @csharpfritz There is a big possibility that there will be no .NET Conf in 2026
English

𝗪𝗵𝗮𝘁 𝗶𝘀 𝗮𝗻 𝗔𝗣𝗜 𝗚𝗮𝘁𝗲𝘄𝗮𝘆?
An API gateway is the "front door" to your backend services and APIs.
It acts as an intermediary layer, handling client requests and routing them to the appropriate destinations.
The key characteristics of an API gateway are:
- Request routing and composition
- Authentication and Authorization
- Load balancing
- Rate limiting
- Monitoring
- Caching
An important role of API gateways is security.
You can implement authentication at the gateway level, and only authenticated requests can be proxied to the backend services.
A popular proxy library in .NET is YARP, which integrates with the built-in authentication and authorization components.

English
Milan Jovanović retweetledi

I've been thinking about where software actually gets written, and I don't think it stays on our PCs much longer.
My prediction: the inner loop of development moves into the cloud. Not the deploy step. We did that years ago. The writing step.
For most of my career, the cloud was where code ran. The writing stayed local: editor, runtime, git.
Agents break that. Once an agent can write code, run the tests, and open a PR on its own, the bottleneck stops being me at the keyboard. It becomes how many agent loops I can run at once.
And I can't run many on a PC. Two or three and it chokes. It's also the worst place to run them: ambient credentials, full network access, one hallucinated rm -rf running with my permissions.
So the loop has to move to where the compute and guardrails already live. That's what got me looking at Coder.
Coder Agents runs that loop on infrastructure you control, whether that's your VPC, on-prem, or even air-gapped. Underneath, the open-source Workspaces platform spins up a sandboxed workspace per agent and throws it away when the work is done. My PC goes back to being where I review the work, not where it happens.
I had the same objection you probably do: doesn't "cloud" mean my code leaves the building? Not if it's your infrastructure. With Coder, the model key never sits in the workspace with your code. Only the control plane makes the model call. And you pick the boundary: a self-hosted model and nothing leaves your network, or an endpoint in your own cloud.
It's model-agnostic, too. I'm not betting my whole workflow on whoever's ahead this quarter.
Coder got the order right: Workspaces first, Agents on top. Not an agent with infrastructure bolted on after. The agents will keep changing. Where they run is the decision that doesn't. So I don't think the question stays "which agent is smartest". It becomes "where do your agents run".
Here's how Coder Agents approaches it: fandf.co/4dZwi9l
Curious whether you're seeing it the same way. Let me know in the comments.
Thanks to @coderhq for collaborating with me on this post.

English

@mjovanovictech Yes but with caveats
- needs clear business requirements
- needs robust technical documentation
- needs constant vetting and manual intervention
And let's be honest most tech companies dont really have that, so in many cases AI agent just produce slop
English
Milan Jovanović retweetledi

actually, vibe coding can look like the right (whatever that is) if you are using it like a software engineer (and not vibing)
Austen Allred@Austen
Lol the amount of cope on Reddit is incredible
English

@AntonMartyniuk Traefik is nice, using it via Dokploy for my SaaS
Easy to configure also
English

@mjovanovictech Gateway choices you have:
- Cloud Gateways offered by Azure, AWS, GCP
- Traefik
- Envoy
- YARP (best ASP .NET Core integration, fast but fewer features than those above)
- Nginx (super fast, but hard to configure)
- Apache (hell to configure)
English






