Joined February 2012
1,054 Photos and videos
Pinned Tweet
This reality hits: deadlines, new team members, rushed PRs, “we’ll fix it later.” Most #dotnet projects don’t fall apart because of bad developers. They fall apart because nobody decided how things should look when things get messy. At the beginning: ✔ clean structure ✔ good intentions ✔ “we’ll keep it tidy” Then reality hits: • deadlines • new team members • rushed PRs • “we’ll fix it later” And suddenly the codebase starts fighting back. This carousel shows the full curriculum of Pragmatic .NET Code Rules. Not as a syllabus. But as a system. A system that: - removes pointless decisions - enforces consistency automatically - keeps projects clean even when teams grow I made this course for developers who: • are tired of style debates • want predictable projects • care about long-term sanity, not quick wins Already 50 developers joined during pre-order. And yes, you get access immediately. And yes, you get access to the community. You don’t wait. You apply. You improve your project while the course grows. 40% OFF Preorder price: $59.89 (Only 4 spots left at the price and only today) Original price is $150. 👉 Get it now here: thecodeman.net/pragmatic-dot… Curious, what’s the one rule your current codebase is missing?
3
18
4,025
IT was expected
The US government, citing national security authorities, has issued an export control directive to suspend all access to Fable 5 and Mythos 5 by any foreign national, whether inside or outside the United States, including foreign national Anthropic employees. The net effect of this order is that we must abruptly disable Fable 5 and Mythos 5 for all our customers to ensure compliance. Access to all other Claude models is not affected. We apologize for this disruption to our customers. We believe this is a misunderstanding and are working to restore access as soon as possible. Read our full statement: anthropic.com/news/fable-myt…
1
4
508
Stefan Đokić | .NET retweeted
People underestimate how much of an on-call rotation is just figuring out whether the error is even real. I would love a world where AI can absorb all the noise, get to the bottom of the real issue, and help me land a fix
We ran an experiment. We pointed Antimetal at our own production environment, emitting 3,000 error logs a day, with no prior guidance. It cut our error volume by 76% in a single day. It found six unique problems, including one we'd misdiagnosed for weeks. It diagnosed and triaged each one, resolved it, and monitored the fix to confirm stability. Production that runs itself is no longer hypothetical. antimetal.com/blog/clearing-…
1
5
595
Stefan Đokić | .NET retweeted
My design patterns ebook isn't an ebook anymore. It's a written course. I rebuilt Design Patterns That Deliver: thecodeman.net/design-patter… from the ground up. Here's what you get now: → 10 production patterns instead of 5. Builder, Decorator, Strategy, Adapter, Mediator. Plus Result, Pipeline, Specification, Factory, and State. → Every chapter goes from a real problem to working C# code. Unit tests. Async. Trade-offs. And an honest "when NOT to use this." → A web reader to read it all online, with real copyable code. → A free Pattern Picker that tells you which pattern fits your problem in seconds. → An AI tutor, "Ask the Book," that answers from the book itself, cited by chapter. Not generic internet code. And it keeps growing. Coming soon: → more free AI tools → in-browser C# playground where you edit and run pattern code with no install, powered by .NET WebAssembly. Here's the part that matters if it's been on your list: The price is still $32.99. With everything that just went on, it's going to go up soon. Buy now, and you lock in today's price and get every future update free. The full Builder chapter is free to read first. The Pattern Picker is free too. Link in the comments. Check it out here: thecodeman.net/design-patter… Which of the 10 patterns do you reach for most in real projects?
3
4
28
1,508
My design patterns ebook isn't an ebook anymore. It's a written course. I rebuilt Design Patterns That Deliver: thecodeman.net/design-patter… from the ground up. Here's what you get now: → 10 production patterns instead of 5. Builder, Decorator, Strategy, Adapter, Mediator. Plus Result, Pipeline, Specification, Factory, and State. → Every chapter goes from a real problem to working C# code. Unit tests. Async. Trade-offs. And an honest "when NOT to use this." → A web reader to read it all online, with real copyable code. → A free Pattern Picker that tells you which pattern fits your problem in seconds. → An AI tutor, "Ask the Book," that answers from the book itself, cited by chapter. Not generic internet code. And it keeps growing. Coming soon: → more free AI tools → in-browser C# playground where you edit and run pattern code with no install, powered by .NET WebAssembly. Here's the part that matters if it's been on your list: The price is still $32.99. With everything that just went on, it's going to go up soon. Buy now, and you lock in today's price and get every future update free. The full Builder chapter is free to read first. The Pattern Picker is free too. Link in the comments. Check it out here: thecodeman.net/design-patter… Which of the 10 patterns do you reach for most in real projects?
3
4
28
1,508
A single API call that takes minutes punishes everyone. The user stares at a spinner. Your server holds a thread hostage. A load balancer or proxy quietly kills the request after 60 seconds. And retries just make it worse. The fix isn't a faster endpoint. It's a different shape. Stop making the client wait synchronously: → Accept the work, hand back a 202, and a status URL immediately. → Do the heavy lifting in a background job. → Let the client poll (or get notified) when the result is ready. Now, a 5-minute report doesn't tie up a request thread for 5 minutes. Your API stays responsive, timeouts disappear, and you can scale the workers independently of the web tier. The mental shift: long-running work is a resource you create, not a response you block on. __ 📌 Join the Newsletter and get "AI in .NET" Starter Kit projects for free: thecodeman.net
2
6
31
1,514
Stop returning BadRequest("some string"). Every endpoint inventing its own error shape = clients special-casing all of them. ASP .NET Core ships ProblemDetails: AddProblemDetails() Results.Problem() give you one RFC-standard, machine-readable error contract. thecodeman.net/posts/better-…
2
3
18
1,101
"Save the order, then publish the event." If the broker is down between those two steps, the order exists but the event is lost. Silent inconsistency. Outbox pattern: write the event to an Outbox table in the SAME transaction. A publisher ships it later. No lost messages. thecodeman.net/posts/outbox-…
2
10
281
I keep seeing the same thing with beginner .NET developers. They spend months “learning”… But never stay on one path long enough to actually build something real. One week: Clean Architecture Next week: microservices Then: • Kubernetes • event sourcing • AI agents • whatever YouTube recommends next …and after 6 months, they still haven’t deployed a real application. That’s why I made this roadmap. Not another: “Here are 97 technologies you should learn in 2026” PDF. I wanted something practical. A roadmap that answers: 1. What to build first 2. What to ignore 3. What actually matters for junior jobs 4. When to move to more advanced topics So the roadmap walks through building progressively: → first API → databases → authentication → Docker → CI/CD → background jobs → scaling → testing Step by step. Not theory collecting. Actual progression. And honestly, the most important part is probably what I left OUT. Because beginners lose insane amounts of time learning infrastructure and architecture patterns they simply do not need yet. Meanwhile, someone with fewer technologies but better direction usually becomes job-ready much faster. The roadmap has already crossed 1,200 downloads, so I figured I should share it here again. Download it for free: thecodeman.net/dotnet-roadma… Or comment: “roadmap” and I’ll send it over. __ 📌 Join the Newsletter and get "AI in .NET" Starter Kit projects for free: thecodeman.net ♻️ Repost to others. 📂 You can save this post for later, and you should do it. ➕ Follow me to learn .NET and Architecture every day.
1
14
822
The worst bug isn't the one that crashes. It's the one where your method returns "Success", and three systems disagree about what just happened. Classic version: customer gets charged, the payment provider has the money, but your SaveChanges() threw right after. The order rolls back to draft. The user gets a "Payment failed, please retry" email. One click, and every subsystem now tells a different story. The trap is that a use case *looks* like a transaction. It sits behind one method call. But the moment it touches more than one system, DB payment email, you're dealing with partial failure, and there's no single "handle errors properly" rule that saves you. What actually helps is classifying every side effect first: → Transactional (DB inserts/updates, in-process domain events) - commit these LAST, after the external work has succeeded. → External but reversible (charge → refund, reserve → release) - make it idempotent (an idempotency key so a retry is a no-op) or compensate via an event. → External and irreversible (emails, webhooks, SMS) - get them OUT of the use case entirely. Raise a domain event, let the Outbox dispatch it after commit. If the transaction never commits, the email never escapes the DB. The one thing you never do: swallow the failure to make the method "look successful." The symptom leaves your logs, the money stays gone, and the retry double-charges. The mental model that fixed this for me: a use case is a unit of *intent*, not a unit of *atomicity*. Most event-driven production bugs I've debugged come down to a method that lied about whether it actually succeeded. I break down production #dotnet patterns like this every Monday for 20,000 engineers → thecodeman.net How do you handle the charge-succeeds-but-commit-fails case in your services?
2
4
20
930
For years, we faked union types in C#. Marker interfaces. Base classes. The OneOf library. Anything to model "this is either a Success or a Failure." C# 15 finally bakes them into the language. What changes in practice: → You declare the shape once - Success or Failure - and the compiler knows the full set of cases. → Your switch becomes exhaustive. Miss a case, and the compiler tells you, instead of a NullReferenceException at runtime. → No more third-party library just to express a closed set of outcomes. This is one of those features that quietly removes a whole category of bugs. Modeling "one of N states" has always been clumsy in C#. Now it's first-class. What do you think about it? How have you created it so far? __ 📌 Join the Newsletter and get "AI in .NET" Starter Kit projects for free: thecodeman.net ♻️ Repost to others. 📂 You can save this post for later, and you should do it. ➕ Follow me to learn .NET and Architecture every day.
3
5
44
1,669
800 GitHub stars. 20,000 developers. And the most common thing they tell me? "I wish I had this before my last interview." So here it is -> Pass Your .NET Interview. 250 questions with answers, code, and complexity analysis. Free. What you get: 🔹 Arrays, Lists & Trees, 60 coding problems, each with 2–3 C# solutions and Big-O breakdown 🔹 General .NET / C# / SQL, 70 questions covering the full stack: async, SOLID, DI, EF, Blazor, CI/CD, SQL 🔹 Updated to #dotnet 10 🔹 2 bonus ebooks included Whether you're prepping for your first job or going for a senior role, this kit gives you the structure you need most. 👇 Grab it here (no credit card, no catch): thecodeman.net/pass-your-int…
1
3
258
A few days ago, I published an article about building an MCP server with .NET. And the most common response I got was: “Can you record a video version of this?” So I did. But I didn’t want to make another generic “AI chatbot talks to your app” demo. I wanted to show something more practical: How can an AI agent actually interact with a real .NET application and help us understand what is happening at runtime? The demo is simple. I have an ASP .NET Core API with two endpoints: /slow-thread-sleep /slow-task-delay At first glance, they look almost identical. Both wait. Both return a response. Both seem fine from the outside. But under load, they behave very differently. So I built an MCP server in #dotnet that exposes a few tools the AI agent can use: → run a load test → compare the endpoints → analyze the results → generate a performance report And this is where MCP becomes much more interesting. The AI is no longer just reading code and guessing. It can call real tools, collect real runtime data, and explain the behavior based on actual measurements. That’s the part I think many developers are missing when they look at MCP. MCP is not only about giving AI more context. It’s about giving AI controlled access to useful actions inside your system. That could be: → performance testing → logs → metrics → database diagnostics → deployment checks → feature flags → internal workflows Or anything else your team needs. I recorded a short video where I explain the concept and show the full demo in action. You can watch it here: lnkd.in/dPeXn2Ra 📌 Join the Newsletter and get "AI in .NET" Starter Kit projects for free: youtube.com/watch?v=RPz8f857… ♻️ Repost to others. 📂 You can save this post for later, and you should do it. ➕ Follow me to learn .NET and Architecture every day.
1
9
642
Stefan Đokić | .NET retweeted
After I published my article about building an MCP server in #dotnet, a lot of people asked me to record a video. So I did. In this one, I show how an AI agent can call real tools in a .NET app: - run load tests - compare API endpoints - analyze results - explain performance issues The point is simple: AI agents become much more useful when they stop guessing and start working with real data. Watch it here: youtube.com/watch?v=RPz8f857…
7
1
17
958
Stefan Đokić | .NET retweeted
The most underrated question in API versioning is not "how do we version?". It is "how do we know when it is safe to delete the old version?" A lot of teams treat version removal as a calendar event. The sunset date arrives, somebody opens a pull request to delete v1, and nobody really checks if the world is ready. Sometimes it works. Sometimes it takes down a key partner integration on a Friday afternoon. The difference between those two outcomes is rarely the code. It is the data you collected before pressing delete. A simple but effective practice is to track three things during the deprecation period. First, what percentage of total requests still hit v1. Second, which clients or API keys are responsible for that traffic. Third, which specific endpoints on v1 are still being used. With those three numbers, "should we remove v1?" stops being a debate and starts being a decision. If 2% of traffic still uses v1 and it is all coming from one internal team, you know exactly who to talk to. If 30% of traffic still uses v1 and it comes from twenty different consumers, you are not ready, no matter what the calendar says. The teams that do this well usually define removal thresholds upfront. Something like: "we remove a major version only when its traffic stays under 5% for 30 consecutive days, and no top-10 consumer is still on it." That kind of rule removes emotion and politics from the conversation. It also gives consumer teams a clear target. They know exactly what "done" looks like. There is one more benefit that is easy to miss. When you base removal on telemetry, your communication with customers improves. Instead of saying "we are removing v1 on this date, please migrate", you can say "you are currently using v1 on these specific endpoints, here is the migration guide for each of them." That level of specificity dramatically increases the chance that the migration actually happens on time. Version removal is a production event, not a cleanup task. Treat it like a release, with data, monitoring, and a rollback plan, and it will stop being scary. I cover the full decision framework and examples here: thecodeman.net/posts/why-do-… __ 📌 Join the Newsletter and get "AI in .NET" Starter Kit projects for free: thecodeman.net ♻️ Repost to others. 📂 You can save this post for later, and you should do it. ➕ Follow me to learn .NET and Architecture every day.
3
4
18
1,187
Let's see what it can do...
9
410
The most underrated question in API versioning is not "how do we version?". It is "how do we know when it is safe to delete the old version?" A lot of teams treat version removal as a calendar event. The sunset date arrives, somebody opens a pull request to delete v1, and nobody really checks if the world is ready. Sometimes it works. Sometimes it takes down a key partner integration on a Friday afternoon. The difference between those two outcomes is rarely the code. It is the data you collected before pressing delete. A simple but effective practice is to track three things during the deprecation period. First, what percentage of total requests still hit v1. Second, which clients or API keys are responsible for that traffic. Third, which specific endpoints on v1 are still being used. With those three numbers, "should we remove v1?" stops being a debate and starts being a decision. If 2% of traffic still uses v1 and it is all coming from one internal team, you know exactly who to talk to. If 30% of traffic still uses v1 and it comes from twenty different consumers, you are not ready, no matter what the calendar says. The teams that do this well usually define removal thresholds upfront. Something like: "we remove a major version only when its traffic stays under 5% for 30 consecutive days, and no top-10 consumer is still on it." That kind of rule removes emotion and politics from the conversation. It also gives consumer teams a clear target. They know exactly what "done" looks like. There is one more benefit that is easy to miss. When you base removal on telemetry, your communication with customers improves. Instead of saying "we are removing v1 on this date, please migrate", you can say "you are currently using v1 on these specific endpoints, here is the migration guide for each of them." That level of specificity dramatically increases the chance that the migration actually happens on time. Version removal is a production event, not a cleanup task. Treat it like a release, with data, monitoring, and a rollback plan, and it will stop being scary. I cover the full decision framework and examples here: thecodeman.net/posts/why-do-… __ 📌 Join the Newsletter and get "AI in .NET" Starter Kit projects for free: thecodeman.net ♻️ Repost to others. 📂 You can save this post for later, and you should do it. ➕ Follow me to learn .NET and Architecture every day.
3
4
18
1,187