Stefan Đokić | .NET

2.5K posts

Stefan Đokić | .NET banner
Stefan Đokić | .NET

Stefan Đokić | .NET

@TheCodeMan__

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

Serbia Katılım Şubat 2012
243 Takip Edilen8.3K Takipçiler
Sabitlenmiş Tweet
Stefan Đokić | .NET
Stefan Đokić | .NET@TheCodeMan__·
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-dotn… Curious, what’s the one rule your current codebase is missing?
English
0
3
17
2.1K
Stefan Đokić | .NET
Stefan Đokić | .NET@TheCodeMan__·
5 MVPs. 1 journey. Belgrade → Redmond 🇺🇸✈️ We’re heading to Microsoft MVP Summit 2026. From countless hours of coding, debugging, sharing knowledge, and building things that matter…to finally meeting, learning, and connecting in one place. Grateful to be part of this community 🙌 👉 And this is not where the trip ends. After Seattle… we’re heading to one more destination. Any guesses where? 👀 Also, 'not promising anything 😄 But I *might* record a vlog from Seattle. @mjovanovictech @pavle_dav @Aleksandar_Gras and Uros. Stay tuned. #dotnet #microsoftmvp #mvpbuzz
Stefan Đokić | .NET tweet media
English
0
2
9
865
Stefan Đokić | .NET
Stefan Đokić | .NET@TheCodeMan__·
If you’re working on more than one #Dotnet project, Chances are, you keep repeating the same things: • C# language version • NuGet package versions • Warning settings • Code style rules • Build configuration … over and over again in every csproj. That’s not productivity - that’s pain. 😅 This is where 𝐃𝐢𝐫𝐞𝐜𝐭𝐨𝐫𝐲. 𝐁𝐮𝐢𝐥𝐝. 𝐩𝐫𝐨𝐩𝐬 comes to the rescue. It’s a single, central file that lets you define global settings for your entire solution. Instead of editing 15-20 csproj files, you edit just one. The result? 👉 Less duplication 👉 Fewer mistakes 👉 A consistent standard across the whole team 👉 Cleaner and easier code reviews And the best part - it works automatically. You don’t import anything manually. Just drop the file into the root folder, and MSBuild picks it up instantly. If you’re working on real-world, professional .NET codebases, Directory. Build. props isn’t optional - it’s a must-have. 𝐖𝐡𝐚𝐭 𝐈 𝐚𝐥𝐰𝐚𝐲𝐬 𝐢𝐧𝐜𝐥𝐮𝐝𝐞 𝐢𝐧 𝐦𝐲 𝐃𝐢𝐫𝐞𝐜𝐭𝐨𝐫𝐲 .𝐁𝐮𝐢𝐥𝐝 .𝐩𝐫𝐨𝐩𝐬 • C# language version • Warning level + TreatWarningsAsErrors • Shared NuGet package versions • Static analyzers • Code style settings • Implicit usings, nullable, deterministic builds • Default namespace patterns • Build/Publish configuration defaults 👉 Learn more here: thecodeman.net/posts/masterin… __ P.S. Want to automate your team’s code consistency? My Pragmatic .NET Code Rules course is in pre-order, and 4 early-access spots are available at a discounted price. Get it now → thecodeman.net/pragmatic-dotn… 📌 Don't miss the next newsletter issue, 20,000 engineers will read it, join them: thecodeman.net 📌 Join our Free Closed .NET Hub (1.2k members) and get access to content nobody publicly has: skool.com/thecodeman-com… ♻️ Repost to others. 📂 You can save this post for later, and you should do it. ➕ Follow me to learn .NET and Architecture every day.
Stefan Đokić | .NET tweet media
English
2
9
86
3K
Stefan Đokić | .NET
Stefan Đokić | .NET@TheCodeMan__·
The problem isn’t your AI agent. It’s the missing plan. I’ve seen this pattern too many times lately: You open Cursor / Claude / Copilot… Start generating code… And then: • prompts keep changing • output gets messy • you waste tokens • PR turns into a battlefield Not because AI is bad. But because there was no clear plan from the start. That’s why this new release from @coderabbitai caught my attention (sponsored). They just introduced CodeRabbit Plan. And the idea is simple, but powerful: 👉 Move the discussion from PR → to before any code is written Instead of: Build → PR → Debate → Rewrite You get: Plan → Align → Build Here’s how it works: You describe what you want to build (+ attach PRDs, designs, docs, context) ↓ It generates a structured, implementation-ready plan ↓ Your team (or you solo) aligns on it ↓ Then you build with confidence What I liked in practice: • It generates high-quality, context-aware prompts for coding agents • Helps avoid “AI slop” and random iterations • Saves tokens (less trial & error loops) • Keeps PRs focused on validation, not architecture debates And combined with their AI code reviews: You’re basically covering both sides: ✔ Plan before writing code ✔ Review while writing code The biggest shift for me: Good code doesn’t start with coding. It starts with clarity. If you're working with AI agents or in teams where PRs turn into redesign sessions… This is worth checking out: 👉fandf.co/4uzARyL Thanks to CodeRabbit for sponsoring this post.
Stefan Đokić | .NET tweet media
English
4
4
29
1.2K
Anton Martyniuk
Anton Martyniuk@AntonMartyniuk·
@TheCodeMan__ CodeRabbit is a great tool, we already use it for code reviews. Is this new plan feature available in the Pro subscription?
English
1
0
1
53
CodeRabbit
CodeRabbit@coderabbitai·
Introducing CodeRabbit Plan. Hand those prompts to whatever coding agent you use and start building!
English
64
78
583
427.4K
Stefan Đokić | .NET
Stefan Đokić | .NET@TheCodeMan__·
About 70% of my interview questions felt… familiar. Not because I got lucky - but because I prepared the right way 👇 A few months ago, I passed 7 technical interviews. And one pattern kept repeating: 👉 The same questions 👉 The same concepts 👉 The same traps That’s exactly why I spent months building a #Dotnet Interview Preparation Kit - not theory, but real questions that actually show up in interviews. Today, I moved everything into my private Skool community and decided to make it 100% FREE. 🆕 New update: I just added 20 Array questions with answers and source code. Inside, you’ll get: • 200+ real .NET interview questions • C#, ASP. NET, EF Core, SQL, LINQ, Async, DI • Design Patterns & System Design (practical, not academic) • PDF + GitHub repository • 2 eBooks (including the brand-new LinkedIn Handbook) • Source code from my YouTube videos & blog posts • Direct access to me + other developers • Continuous updates & discounts on future content 👉 Get the Interview Kit for FREE: thecodeman.net/pass-your-inte… 👉 Join the FREE community: skool.com/thecodeman-com… If you’re preparing for a .NET interview, this can save you weeks of unfocused prep. __ 📌 Don't miss the next newsletter issue, 20,000 engineers will read it, join them: 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.
Stefan Đokić | .NET tweet media
English
1
2
27
1.1K
Stefan Đokić | .NET
Stefan Đokić | .NET@TheCodeMan__·
If your frontend keeps asking the server every few seconds, you might be solving the wrong problem. A lot of “real-time” features on the web are implemented like this: Client → Request → Server → Response (wait a few seconds) Client → Request → Server → Response (wait again) Client → Request → Server → Response This is called polling. The client repeatedly asks: “Do you have new data?” And most of the time, the server responds with… Nothing new. Which means: • unnecessary requests • wasted server resources • extra latency for users Now imagine a different model. Instead of constantly asking the server for updates… The client opens one connection and waits. Client → Open connection Server → pushes events when data changes Event → Event → Event That’s exactly how Server-Sent Events (SSE) work. The browser opens a connection using: Content-Type: text/event-stream And the server can stream updates continuously through that same connection. No repeated requests. No polling loops. Just a single open connection where the server pushes updates when something actually happens. This makes SSE a great fit for things like: • live notifications • dashboards • progress updates • activity feeds • monitoring systems And here’s the interesting part. When developers think about real-time features, they often jump straight to WebSockets. But many times, you don’t need the complexity of full duplex communication. A simple server → client stream is enough. That’s exactly what SSE provides. Polling asks the server for updates. Server-Sent Events stream them when they happen. I just uploaded a video on how to implement it: youtube.com/watch?v=7cBYsq… #Dotnet
YouTube video
YouTube
Stefan Đokić | .NET tweet media
English
4
17
94
3.1K
Stefan Đokić | .NET
Stefan Đokić | .NET@TheCodeMan__·
Most developers use Dependency Injection. Very few understand what the DI container is actually doing. To many people, it feels like magic. You register a few services: builder. Services.AddScoped(); builder. Services.AddScoped(); Then suddenly this works: public class OrdersController(IOrderService service) No new keyword. No wiring dependencies. And the application runs. So what’s actually happening? When ASP. NET Core starts, the DI container builds a service registry. A map that says: IOrderService → OrderService IOrderRepository → OrderRepository Later, when the framework needs to create your controller, it asks the container: “How do I build this object?” The container looks at the constructor: OrdersController(IOrderService service) It sees that IOrderService is required. So it resolves it. But to build OrderService, it might need something else: OrderService(IOrderRepository repo) So the container resolves that too. And maybe the repository needs a database context. So the container resolves that as well. What you end up with is something called an object graph: Controller ↓ Service ↓ Repository ↓ DbContext You requested one object. The container constructed the entire dependency tree. That’s the real job of the DI container. Not “injecting services”. But building object graphs safely and consistently. Which is why DI becomes powerful when your system grows. Because instead of every class creating its own dependencies… The container becomes the single place responsible for object creation. And that gives you: • cleaner architecture • predictable lifetimes • easier testing • fewer hidden dependencies The moment this clicks, DI stops feeling like magic. It starts feeling like infrastructure. Curious: What part of Dependency Injection confused you the most at first? __ 📌 Don't miss the next newsletter issue, 20,000 engineers will read it, join them: thecodeman.net 📌 Join our Free Closed .NET Hub (1.2k members) and get access to content nobody publicly has: skool.com/thecodeman-com… ♻️ Repost to others. 📂 You can save this post for later, and you should do it. ➕ Follow me to learn #Dotnet and Architecture every day.
Stefan Đokić | .NET tweet media
English
6
16
130
4.4K
Stefan Đokić | .NET
Stefan Đokić | .NET@TheCodeMan__·
🚨 First Skool Live today I'll walk through: • what this .NET Hub is • how to use it to grow faster • what's coming next • premium learning tier plans • upcoming courses live Q&A 📅 Mar 14 🕕 6 PM CET Join here 👇 skool.com/thecodeman-com…
Stefan Đokić | .NET tweet media
English
3
0
8
413
Stefan Đokić | .NET retweetledi
Stefan Đokić | .NET
Stefan Đokić | .NET@TheCodeMan__·
Some developers think Tasks create threads. They don’t. In .NET, work is executed by the ThreadPool, a shared pool of worker threads reused across the entire application. Here’s the mental model that helps explain it. When a request arrives in your ASP.NET Core app: 1️⃣ The work is placed into a task queue 2️⃣ A ThreadPool worker thread picks up the task 3️⃣ The thread executes the work 4️⃣ When the task finishes, the thread returns to the pool Then it immediately picks up another task. Threads are reused constantly. That’s what makes the ThreadPool efficient. But here’s where things go wrong. If your code does blocking work, those threads can’t return to the pool. Examples: • .Result • .Wait() • synchronous database calls • blocking HTTP calls Now the thread stays stuck. Under load, this creates a chain reaction: Requests arrive ↓ Tasks enter the queue ↓ Threads are blocked ↓ The queue grows ↓ Latency spikes This is called ThreadPool starvation. Your server isn’t slow because .NET is slow. It’s slow because all worker threads are busy waiting. The key takeaway: Tasks are not threads. Threads execute tasks. And when they’re done, they go back to the ThreadPool to execute the next one. Unless you block them. Curious: What’s the most common ThreadPool killer you’ve seen in production? __ 📌 Don't miss the next newsletter issue, 20,000 engineers will read it, join them: thecodeman.net 📌 Join our Free Closed .NET Hub (1.2k members) and get access to content nobody publicly has: skool.com/thecodeman-com… ♻️ Repost to others. 📂 You can save this post for later, and you should do it. ➕ Follow me to learn #dotnet and Architecture every day.
Stefan Đokić | .NET tweet media
English
1
20
167
5.5K