➡️ Level Up with Everyday .NET Content | Microsoft MVP ➡️ YouTube: https://xitter.cf/t.co/9EgEGulWLN ➡️ https://xitter.cf/t.co/65gw5pGHO0 Newsletter | 20k+

Serbia
Joined February 2012
Stefan Đokić | .NET retweeted
A CLAUDE. md inside src/MyShop.Infrastructure/ only loads when the agent touches a file in that folder. So your EF Core rules don't have to sit in context while it writes an endpoint. Split instructions by where the code lives.
3
3
34
1,214
Stefan Đokić | .NET retweeted
JetBrains surveyed 15,000+ developers: Claude Code went from 18% in January to 39% use at work. Codex from 3% to 16%. Cursor dropped from 18% to 12%. The IDE plugin era isn't over, but the terminal agent is clearly winning this year.
11
3
34
1,782
Stefan Đokić | .NET retweeted
On Saturday, I was a speaker at a conference for the first time! Here is the one thing people liked most: the /rewind command in Claude Code. You are prompting your agent multiple times, which leads to mistakes, and you want to return it. Please remove the code and explain again what to do. Instead of doing that manual job, you can just use the /rewind command. It allows you to go back to a certain point in the conversation, code, or even both. That's what I showed in this video. It's the easiest way to learn how to use it. Watch it here: youtube.com/watch?v=UDBYkR0b…
5
2
16
996
Stefan Đokić | .NET retweeted
What if adding a new API endpoint took one line? /add-endpoint Customer Create No long prompt. No "remember to add validation". No "don't forget the test". It's a custom skill in Claude Code. One markdown file in the repo: .claude/skills/add-endpoint/SKILL. md name: add-endpoint description: Add a Minimal API endpoint following our conventions disable-model-invocation: true arguments: [entity, action] Add a $action endpoint for $entity. Existing endpoints !ls src/Api/Endpoints Rules: - Follow the pattern in src/Api/Endpoints/OrdersEndpoints.cs - Validate input with FluentValidation - Return typed results: Results, NotFound, ValidationProblem> - Add an integration test in tests/Api.Tests - Run dotnet build and dotnet test before you finish Three things that make this work: 1. arguments - "Customer" and "Create" land in $entity and $action. Same skill, any entity. 2. !ls src/Api/Endpoints - this runs BEFORE Claude reads the prompt. Claude sees your real endpoint files, not a guess. 3. disable-model-invocation: true - Claude never runs it on its own. Only when you type /add-endpoint. And because it's committed to .claude/skills, every dev on the team gets the same command. The best prompt your senior dev ever wrote is now a team standard, not something living in their head. Look at what you type to Claude every week. If you've written the same prompt 3 times, it should be a skill. Inside AI for .NET Developers, we have 50+ ready skills and agents for .NET (endpoints, EF Core, tests, reviews, event sourcing) that you can drop into your repo: skool.com/ai-for-dotnet-deve… Which prompt do you keep retyping?
1
3
24
1,017
Stefan Đokić | .NET retweeted
Every request returned 200 OK. And every request took 7 seconds. No exceptions. No failed calls. Nothing in the logs. Just an endpoint loading 40 rows that felt broken while every metric said it was fine. These are the worst bugs to chase, because there's nothing to grep for. So I stopped guessing and opened Sentry. The full trace was already there, with the suspicious part flagged. Then Seer, Sentry's AI debugger, went through the request and pointed straight at the root cause: A hidden N+1. Twice. → EF Core ran a separate query for every order's items → Then the endpoint made a separate HTTP call to another service for every item That's hundreds of DB queries and HTTP calls inside one "successful" request. The fix took a few minutes: → One Include → One batched HTTP call instead of many individual ones ~6,800ms → ~142ms. Same data. About 40× faster. Writing the fix is rarely the hard part of a performance bug. Finding the cause is. Sentry had the trace, and Seer explained it, so I spent my time fixing the problem instead of hunting for it. Full walkthrough on YouTube: youtube.com/watch?v=BnPmvDrN… What's the worst "it works, it's just slow" bug you've had to track down?
3
2
8
724
Stefan Đokić | .NET retweeted
AI can build your side project in an afternoon. That's exactly why you should still build one. Side projects used to teach you syntax. AI handles that now. What it can't give you is judgment: why the query takes 4 seconds, why the auth leaks, why the "working" solution falls apart at 50 users. There's a second gap too. Almost every .NET dev uses AI daily, but very few have built an app with AI inside it. Here are 12 projects that close both gaps, in 4 levels: 1. Starter: read AI code Expense tracker, to-do API, weather dashboard. Use AI freely, but if you can't explain a line, it doesn't ship. This is where LINQ, EF Core, and async stop being magic. 2. Intermediate: catch AI mistakes URL shortener with caching and rate limiting. Blog API with JWT and tests. Background job runner with retries. At this level, AI is wrong in small, sneaky ways, and you train your eye to spot them. 3. Advanced: put AI inside your app Support chatbot with streaming. Q&A over your own docs with RAG. Invoice parser that returns structured data and validates it, because models make stuff up. 4. Expert: build what AI plugs into Your own MCP server, so Claude or Copilot can call your API. A code review agent that runs tools in a loop. And one AI app running in production with evals, token cost tracking, and OpenTelemetry. That last one will teach you more than the other eleven combined. Full source code + step-by-step guides for all 12: skool.com/ai-for-dotnet-deve… One rule: let AI make you faster, never let it think for you. This October we're building them together. Pick one project and ship it, with weekly check-ins and someone to ask when you get stuck. It's inside AI for .NET Developers (7-day free trial): skool.com/ai-for-dotnet-deve… Which level are you at right now?
13
9
1
62
2,224
Stefan Đokić | .NET retweeted
I stopped asking Claude Code to "please format the code". Now it can't forget, because it's not up to Claude anymore. That's what Hooks are for. A hook is a shell command that Claude Code runs automatically at a specific moment - before a tool call, after a file edit, when it wants to stop. Not a suggestion in a prompt. A rule. My favorite one for .NET projects, in .claude/settings.json: { "hooks": { "PostToolUse": [ { "matcher": "Edit|Write", "hooks": [ { "type": "command", "command": "jq -r '.tool_input.file_path' | grep '\.cs$' | xargs -r dotnet format --include" } ] } ] } } What it does: • After every Edit or Write, Claude Code sends the tool call as JSON to the hook • jq pulls out the file path • if it's a .cs file, dotnet format fixes it right away Result: every file Claude touches follows your .editorconfig. No more "fix formatting" commits in the PR. Two more hooks I use: • PreToolUse on Bash - block dangerous commands. If the hook exits with code 2, the tool call is blocked, and Claude gets your error message as feedback. rm -rf, git push --force, dropping the database... gone. • Stop - run dotnet test when Claude says it's "done". If tests fail, the hook blocks the stop, and Claude has to keep going until they pass. The mindset shift: CLAUDE. md = what you'd like Claude to do. Hooks = what will happen every time, no matter what. Put the important stuff in hooks. I share my full hooks setup for .NET (format, build, test, secret scanning) inside AI for .NET Developers: skool.com/ai-for-dotnet-deve… Are you using hooks yet, or still asking nicely in the prompt?
4
14
52
1,984
Stefan Đokić | .NET retweeted
Most AI tooling quietly locks you in. So at the JetBrains Air launch, I asked @oleg_koverznev - VP, Head of Agent Systems at @jetbrains - the question I actually cared about: "What's the hardest part of staying truly open with AI?" His answer, from JetBrains' own internal experience: They made a deliberate choice - they do not force the tool. Some engineers use AI in the IDE, plenty use terminals, others use third-party agents entirely. Instead of fighting that, they built a gateway so any of those can plug into the system - and internal adoption went through the roof. "We want to give choice to developers, PMs, QAs - use whatever fits your habits." That's rare, and as a .NET dev it's exactly what I want from a platform: guardrails and governance without being boxed into one agent. Full announcement 👇 blog.jetbrains.com/blog/2026…
🤝 Paid partnership
1
1
10
757
Stefan Đokić | .NET retweeted
You don't fail interviews because you're bad. You fail because you prepare randomly. A bit of LeetCode on Monday. Some random async article on Wednesday. Then the interviewer asks about DI lifetimes and your brain goes blank. I built something for that a while ago - Pass Your .NET Interview. 250 questions with answers, code, and complexity analysis. Free. It's now at 900+ GitHub stars and 20,000+ developers. And the message I get most often is: "I wish I had this before my last interview." What's inside: - 60 coding problems (Arrays, Lists & Trees), each with 2-3 C# solutions and a Big-O breakdown - 70 .NET / C# / SQL questions: async, SOLID, DI, EF Core, Blazor, CI/CD, SQL - Updated to .NET 10 - 2 bonus ebooks Now the part I'm most excited about. Everyone who grabs the kit gets free early access to something I'm building right now: an AI .NET Interview Simulator. It's not another quiz. It's a real mock interview: → it asks you questions → pushes back with follow-ups when your answer is too shallow → gives you a coding task → and scores you at the end I built it from what actually gets asked in .NET interviews, and from sitting on both sides of the table myself. Because reading an answer is easy. Defending it while someone keeps asking "and why?" is a different skill. This is how you practice that one. It's coming in the next 1-2 weeks, and it's free for everyone who has the kit. Grab it here (free): lnkd.in/dn-iW-Rt What's the one .NET interview question that always catches you off guard?
3
28
1,188
Stefan Đokić | .NET retweeted
Polly is going commercial. But don't worry, as we can see, we are going to start coding in Rust. 😎
10
4
61
5,734
Stefan Đokić | .NET retweeted
The question I most wanted answered at the JetBrains Air launch: "Why isn’t the IDE enough anymore?" So I asked @elsegreen_ , VP of Strategy at @jetbrains , directly. Her answer reframed how I think about my own job: The bottleneck has shifted - from writing code to reviewing and debugging it, and it keeps getting pushed up the software development lifecycle. But AI can’t have skin in the game. The developer, the engineer, the team lead- they own the result. They make the commit. They make the architectural calls. That’s the whole point of Air: The IDE gets reinvented as one of many services, not the only tool, so context can be shared across people and the agents doing the work. As someone who writes .NET every day, that lands.Full announcement from JetBrains 👇blog.jetbrains.com/blog/2026…
🤝 Paid partnership
4
1
11
1,243
Stefan Đokić | .NET retweeted
For three months, I treated Claude Code like a chat window with extra steps. - Paste a file. - Re-explain the project. - Paste another file. - Fix the same bug I'd already fixed the day before, because every new session started from zero. The "/" hint was right there at the bottom of the screen. Every day. I just never gave it a second look. I was too busy shipping to read the manual. Then one evening everything went sideways. The context window filled up, the answers got worse with every message, and my patience ran out. So, half annoyed and half curious, I pressed "/". The list kept scrolling. /𝐜𝐨𝐧𝐭𝐞𝐱𝐭 showed me what was filling up my window. /𝐜𝐨𝐦𝐩𝐚𝐜𝐭 trimmed it down without losing the conversation. /𝐫𝐞𝐰𝐢𝐧𝐝 undid one bad step, so I didn't have to start over. /𝐜𝐨𝐝𝐞-𝐫𝐞𝐯𝐢𝐞𝐰 flagged a bug that was about to go to production. That's when it clicked: this was never a chat box. It's a full dev environment, and I'd been using maybe 10% of it. The worst part? All of it was one key away. The whole time. So I went through the list and wrote down the commands I actually use, sorted by when you need them: setup, daily work, shipping, and fixing things. It all fits on one sheet, so you don't have to lose three months like I did. If you use Claude Code, try this today: type "/" and read the whole list, top to bottom. I bet you'll find at least three commands you didn't know about. 𝐓𝐡𝐞 𝐜𝐨𝐦𝐩𝐥𝐞𝐭𝐞 𝐜𝐡𝐞𝐚𝐭 𝐬𝐡𝐞𝐞𝐭 (𝟏𝟎𝟎+ 𝐜𝐨𝐦𝐦𝐚𝐧𝐝𝐬) is free to download: skool.com/ai-for-dotnet-deve… Which slash command would you never give up? Drop it below. I'm sure I'm still missing a good one.
7
8
38
1,446
Stefan Đokić | .NET retweeted
You've probably seen this one. New project. Day one: 7 microservices, Kubernetes, a message broker, and a service mesh. Six months later: 7 services, 3 users, and a deployment pipeline nobody fully understands. Martin Fowler said it years ago - you shouldn't start a new project with microservices, even if you're sure it'll be big enough to need them. The reason is simple. Early on, you don't know where the real boundaries are. With microservices, a wrong boundary costs you network calls, distributed transactions, and a pile of glue code. In a monolith, a wrong boundary costs you a refactor. But "monolith first" doesn't mean "big ball of mud first". What I'd build instead is a modular monolith: → One deployable. One ASP.NET Core host, one pipeline, one thing to monitor. → Modules with real boundaries. Events, Ticketing, Users - each owns its code and its own database schema. No joins across modules. → Modules talk through contracts. A public API or integration events, never reaching into another module's internals. → Boundaries enforced by tests. An architecture test that fails the build when Ticketing references Events.Infrastructure. Without it, the rules last about two sprints. → An outbox for events. Start with in-process delivery, swap in RabbitMQ or Azure Service Bus later without touching the modules. Then if one module really needs to become its own service, it's already halfway there. Its data is separate, its dependencies are explicit, its communication is async. You move it, you don't untangle it. So when do you pull something out? When it has to scale on its own, ships on a different rhythm, is owned by a separate team, or needs different tech. Not because microservices look good on a CV. Read Monolith to Modular Monolith to Microservices at 100k Users: thecodeman.net/posts/monolit… Monolith, modular monolith, or microservices - what are you running right now, and would you pick it again?
9
10
1
51
1,412
Stefan Đokić | .NET retweeted
Your app asks an API, "Is it ready?" every 5 seconds. 99 times the answer is "no". The 100th time it's "yes". That's polling. It works, but you're paying for 99 useless requests to get one useful answer. A webhook flips it around. You tell the other system: "Here's my URL, call me when something happens." Then you stop asking. When the payment goes through, the file is processed, or the order ships - they send a POST to you. Don't call us, we'll call you. You see them everywhere: payments, GitHub events, notifications, file processing, keeping data in sync between two systems. Receiving your first webhook in ASP. NET Core takes about 10 lines. Making it production-ready is where people get burned. Four things I'd never skip: 1. Verify the signature. Your webhook URL is public. Anyone can POST to it. Check the HMAC signature header against the raw request body before you trust a single field. And compare with CryptographicOperations.FixedTimeEquals, not ==. 2. Return 200 fast. Many providers give you only a few seconds before they mark the delivery as failed. Save the event, push it to a queue or a Channel, return 200, and do the real work in a background service. 3. Be idempotent. You will get the same event twice. Store the event ID and skip it if you've seen it already. Otherwise, that "payment succeeded" event sends two confirmation emails. Or ships two orders. 4. Expect retries (and events out of order). Return a 500 or time out, and the sender tries again later. Sometimes "order.updated" shows up before "order.created". Design for it instead of hoping it won't happen. Webhooks aren't hard. They're just easy to get 90% right, and the last 10% is where the bugs hide. I write about stuff like this every week in my newsletter - practical .NET, straight to the point: thecodeman.net Polling or webhooks - which one do you deal with more at work?
3
9
1
58
1,521
Stefan Đokić | .NET retweeted
Bookmark this. 150+ free .NET resources I've made over the years. These are the ones I'd start with 👇 AI in .NET: • Claude Code for .NET devs: thecodeman.net/posts/claude-… • Build a C# MCP Server: thecodeman.net/posts/buildin… • RAG with Ollama + pgvector: thecodeman.net/posts/how-to-… • Vector search in EF Core 10: thecodeman.net/posts/your-do… • Semantic Search (video): youtube.com/watch?v=Y9qJSIF0… • C# AI agent that scrapes the web (video): youtube.com/watch?v=l9_e2sUf… Architecture: • Monolith to Microservices at 100k users: thecodeman.net/posts/monolit… • Architecture tests with NetArchTest: thecodeman.net/posts/archite… • Outbox Pattern: thecodeman.net/posts/outbox-… • Saga with Wolverine: thecodeman.net/posts/impleme… APIs & Production: • Retries that make outages worse: thecodeman.net/posts/when-re… • Request timeouts: thecodeman.net/posts/request… • Built-in rate limiting: thecodeman.net/posts/rate-li… • What breaks at 10k connections: thecodeman.net/posts/what-br… • Hunting a memory leak: thecodeman.net/posts/hunting… • Server-Sent Events (video): youtube.com/watch?v=7cBYsqvx… EF Core & Data: • 5 EF Core query techniques: thecodeman.net/posts/preopti… • EF Core bulk operations (video): youtube.com/watch?v=_C0Sz5rB… • Temporal tables: thecodeman.net/posts/tempora… • Bulk ops with Dapper (video): youtube.com/watch?v=tSCxjKTE… • HybridCache: thecodeman.net/posts/hybrid-… Messaging: • Producer-consumer with Channels: thecodeman.net/posts/produce… • RabbitMQ from scratch: thecodeman.net/posts/rabbitm… Communities: • AI for .NET Developers (my AI group): skool.com/ai-for-dotnet-deve… • .NET Community on Skool (free): lnkd.in/gu_5HiMD Everything else: • All 140+ articles: thecodeman.net/blog • YouTube channel: youtube.com/@thecodeman_ 📌 Every Monday I share a new one in my newsletter. Join 22k+ engineers: thecodeman.net
3
8
42
1,633
Stefan Đokić | .NET retweeted
A couple of weeks ago, I got an invitation I did not expect: @jetbrains flew me to Amsterdam to see JetBrains Air, before it went public. Here's my honest take as a .NET dev after two days there: Air is not JetBrains walking away from the IDE. It's the opposite. It's an open system built around the IDE for how we actually work now, one developer, a team, a whole org, while agents write more and more of the code. Three things stood out to me: → It doesn't force one tool. Bring your own agent, terminal, or model. → Context and governance stay coherent across you → your team → your org. → The IDE isn't dead - it's reinvented as one of many surfaces. I even got to record two interviews with the people who built it. More on that in the next clips. If you use Rider or ReSharper and you're trying to figure out where AI actually fits, read the full announcement 👇 blog.jetbrains.com/blog/2026…
🤝 Paid partnership
6
2
16
1,072
Stefan Đokić | .NET retweeted
I deleted my architecture diagram. Then I let an AI agent redraw it, from the code itself. Here's what happened 👇 I connected my AI coding agent to Miro using the Miro MCP server. Two lines of config, one login, now the agent can read and write my Miro boards directly. Then I pointed it at a normal .NET solution (Clean Architecture + EF Core) and asked for three things: • An architecture diagram → it read the project references and drew every layer + its dependencies. Instantly showed whether the dependency rule was actually respected. • An ER diagram → straight from my EF Core DbContext. Tables, keys, relationships. Generated from the code that runs in production, so it can't drift out of sync. • A sequence diagram → "trace the Create Order request." Controller → handler → repository → DB, drawn out end to end. A few minutes. Empty board → living map of the whole system. And because it's all on Miro, the team can refine it together instead of me explaining the architecture verbally for the 100th time. The part I like most: when the code changes, you re-run the prompt and the board updates. Diagrams that finally keep up with reality. Full video - every prompt, every diagram appearing live: 👉 youtu.be/UUO5heMgS34?si=UpFY… Huge thanks to Miro for sponsoring this one. The MCP server is free to set up with your AI coding tool. Try the Miro MCP Server here: miro.pxf.io/en2e3z Have you tried generating diagrams from your codebase yet? 👇
10
4
14
829
Stefan Đokić | .NET retweeted
MCP servers are the talk of the town right now. So I decided to build a realistic example in .NET and drop it completely FREE into: My AI in .NET Starter Kit: thecodeman.net/ai-in-dotnet-… I built an MCP Server in .NET for API performance analysis. It's not a "hello world" demo. A real example where GitHub Copilot Agent mode can actually call tools and analyze API performance for you. You type something like: "Compare slow-thread-sleep with slow-task-delay using 20 users for 15 seconds." And the MCP server: → Runs load tests → Compares endpoints → Measures p50/p95/p99 latency → Detects thread pool starvation → Suggests optimizations → Generates reports The whole idea was to show HOW MCP actually works in practice. Instead of building yet another toy calculator, I went with a performance-testing scenario, because it maps onto the MCP model so naturally. What's inside the project: → MCP Server in .NET → 10 MCP tools → Custom load testing engine in pure .NET → ASP .NET Core API with intentional performance issues → Blazor dashboard to visualize results → Unit tests → Full source code And yes, this leans educational rather than production-ready. The point is to help you understand: → How MCP servers expose tools → How AI agents call them → How tool orchestration works → How to structure an MCP server in .NET → How AI can plug into real developer workflows I truly believe MCP is about to become a critical skill for developers. Especially for anyone building AI-powered tooling and developer platforms. __ 📌 I run a closed AI group for .NET developers: skool.com/ai-for-dotnet-deve…
10
13
73
2,903
Stefan Đokić | .NET retweeted
"If AI writes the code now, what's even the point of building side projects?" Fair question. My take: the point changed, it didn't disappear. Before, a side project was about learning syntax. Now AI writes syntax in seconds. What it doesn't give you is the feel for whether that code is any good. Why the query is slow. Why the auth is leaking. Why the "working" solution falls apart with 50 users. And there's a second gap nobody talks about: most devs use AI every day, but have never built anything with AI inside it. So here are 12 projects that close both gaps. Learn by building. Starter: learn to read AI code. Expense tracker, to-do API, weather dashboard. Use AI, but if you can't explain a line, you don't ship it. This is where LINQ, EF Core, and async stop being magic. Intermediate: learn to catch AI mistakes. URL shortener with caching and rate limiting. Blog API with JWT and tests. Background job runner with retries. This is where AI suggestions are wrong in small, sneaky ways, and you learn to spot them. Advanced: learn to build AI into your app. A support chatbot with streaming. Q&A over your own docs with RAG. An invoice parser that returns structured data, and validates it, because models do make stuff up. Expert: learn to build what AI plugs into. Your own MCP server, so Claude or Copilot can use your API. A code review agent that calls tools in a loop. And one AI app you actually run in production, with evals, token costs, and OpenTelemetry. That last one teaches you more than the other eleven combined. All 12 projects: full source code + step-by-step build guides: skool.com/ai-for-dotnet-deve… One rule: let AI speed you up, never let it think for you. This October we're building them together. Pick one project, finish it by the 31st, with weekly check-ins and someone to ask when you get stuck, inside AI for .NET Developers (7-day free trial): skool.com/ai-for-dotnet-deve… Which level are you at right now?
13
6
78
2,507
Stefan Đokić | .NET retweeted
Performance doubled - 1h with Opus 5.5 looping while watching "The Rip" movie
2
1
7
701