๐ฌ๐ผ๐ ๐ฐ๐ฎ๐ป ๐ฟ๐ฒ๐ฐ๐ถ๐๐ฒ ๐ฆ๐ข๐๐๐. ๐๐ฎ๐ป ๐๐ผ๐ ๐ฎ๐ฐ๐๐๐ฎ๐น๐น๐ ๐ฎ๐ฝ๐ฝ๐น๐ ๐ถ๐?
I have reviewed hundreds of codebases. The pattern is always the same.
Developers know the definitions. They fail the moment a real design decision appears.
Here is what each principle actually means in production:
๐ฆ โ Single Responsibility
Not "one class, one job."
It means one reason to change. If your OrderService sends emails AND processes payments AND logs activity, you have three reasons to change one class. That is three bugs waiting to happen.
๐ข โ Open/Closed
Your code should be open for extension, closed for modification.
Stop adding if/else blocks every time a new requirement arrives. Use abstractions. A new payment method should not touch existing payment logic.
๐ โ Liskov Substitution
If you replace a parent with a child, behavior should not break.
When your Square inherits Rectangle and overrides SetWidth, you have already violated this. Inheritance is not always the answer.
๐ โ Interface Segregation
Do not force classes to implement methods they do not need.
A fat IUserRepository with 20 methods means every mock in your tests implements 19 methods it does not care about. Split them.
๐ โ Dependency Inversion
Depend on abstractions, not concretions.
Your service should not new up a UserRepository. Inject IUserRepository. This is what makes your code testable, swappable, and production-ready.
The real lesson nobody talks about:
==> SOLID is not a checklist. It is a set of signals.
==> When your code becomes painful to change, SOLID tells you exactly which rule you broke.
==> The developers who apply it well are not the ones who memorized it.
==> They are the ones who felt the pain of violating it first.
Which principle did you violate before you truly understood it?
๐ If you found it helpful then you should join my weekly .NET newsletter with 10k+ engineers.
Subscribe here โ https://t.co/xD0dyrLiSr
Repost โป๏ธ would be appreciated
๐ฌ๐ผ๐ ๐๐ต๐ผ๐๐น๐ฑ ๐๐๐ผ๐ฝ ๐๐๐ถ๐ป๐ด ๐๐ผ๐ป๐๐ฟ๐ผ๐น๐น๐ฒ๐ฟ๐ ๐ถ๐ป .๐ก๐๐ง ๐ญ๐ฌ
While I was at Microsoft .NET Conf 2025
I saw this shocking benchmark ๐
In TechEmpower benchmarks for minimal APIs:
โ .NET 10 uses 93% less memory than .NET 8
โ While still being ~15% faster in throughput
.NET 10 also introduces significant garbage collection (GC) improvements, particularly through Dynamic Adaptation to Application Sizes (DATAS) and enhanced write barriers.
This automatically benefits both workstation and server GC modes (<ServerGarbageCollection> property in *csproj).
After migrating my projects to .NET 10 with Minimal APIs I have experienced:
โ Less RAM usage
โ Better throughput
โ Faster APIs
This is why I recommend everyone to use Minimal APIs instead of Controllers in every new .NET project.
Why is .NET so fast?
- ๐๐ฑ๐ฎ๐ฝ๐๐ถ๐๐ฒ ๐ฆ๐ฒ๐ฟ๐๐ฒ๐ฟ ๐๐ adjusts in real time, reducing pause frequency and sustaining throughput during traffic spikes.
- ๐ฆ๐บ๐ฎ๐ฟ๐๐ฒ๐ฟ ๐๐๐ง trims warmโup time and accelerates hot methods, producing consistently shorter response cycles.
- ๐๐ฑ๐๐ฎ๐ป๐ฐ๐ฒ๐ฑ ๐๐ฒ๐ฐ๐๐ผ๐ฟ๐ถ๐๐ฎ๐๐ถ๐ผ๐ป leverages AVX10 and Arm SVE, letting loops process multiple data points per tick.
- ๐ก๐ฎ๐๐ถ๐๐ฒ ๐๐ข๐ง further cuts binaries and startup cost, ideal for containers, IoT, and edge workloads.
- ๐ข๐ฝ๐๐ถ๐บ๐ถ๐๐ฒ๐ฑ ๐ป๐ฒ๐๐๐ผ๐ฟ๐ธ๐ถ๐ป๐ด improves socket handling and HTTP/3 support, delivering lower latency for highโconnection services.
- ๐๐ฎ๐๐๐ฒ๐ฟ ๐๐ฆ๐ข๐ก processing in System.Text.Json reduces allocation, enabling leaner APIs and realโtime data streams.
- ๐๐ผ๐๐ฒ๐ฟ ๐ฎ๐น๐น๐ผ๐ฐ๐ฎ๐๐ถ๐ผ๐ป๐ via spans, inline arrays, and pooled buffers lighten GC pressure and memory footprint.
- ๐ง๐ต๐ฟ๐ฒ๐ฎ๐ฑโ๐ฝ๐ผ๐ผ๐น logic minimizes contention, ensuring asynchronous operations remain smooth under mixed loads.
- ๐๐ป๐ต๐ฎ๐ป๐ฐ๐ฒ๐ฑ ๐บ๐๐น๐๐ถ๐๐ต๐ฟ๐ฒ๐ฎ๐ฑ๐ถ๐ป๐ด schedules tasks more evenly, unlocking full core capacity for parallel workloads.
- ๐๐ฟ๐๐ฝ๐๐ผ๐ด๐ฟ๐ฎ๐ฝ๐ต๐ ๐ฟ๐ผ๐๐๐ถ๐ป๐ฒ๐ are streamlined, providing robust security without incurring excessive computational overhead.
- ๐๐น๐ผ๐๐ฑโ๐ป๐ฎ๐๐ถ๐๐ฒ tooling reduces cold starts and aligns neatly with Kubernetes, simplifying microservice deployment.
- ๐๐ถ๐น๐ฒ ๐/๐ข now buffers intelligently, boosting throughput for applications that read or write extensive data.
- ๐ฅ๐ฒ๐ณ๐น๐ฒ๐ฐ๐๐ถ๐ผ๐ป ๐ฎ๐ป๐ฑ ๐๐ ๐ฐ๐ฒ๐ฝ๐๐ถ๐ผ๐ป pathways are optimized, cutting overhead for dependency injection and dynamic object scenarios.
- ๐๐ ๐ฐ๐ฒ๐ฝ๐๐ถ๐ผ๐ป๐ became 2-4 times faster in .NET 10, according to Microsoft Benchmarks
Here is what you need to know to migrate your projects to .NET 10:
โณ https://t.co/UIdUqy8NS6
โโ
โป๏ธ Repost to help others migrate to .NET 10
โ Follow me ( @AntonMartyniuk ) to improve your .NET and Architecture Skills
Most people think using Claude Code is about writing better prompts.
Itโs not.
The real unlock is structuring your repository so Claude can think like an engineer.
If your repo is messy, Claude behaves like a chatbot.
If your repo is structured, Claude behaves like a developer living inside your codebase.
Your project only needs 4 things:
โข the why โ what the system does
โข the map โ where things live
โข the rules โ whatโs allowed / forbidden
โข the workflows โ how work gets done
I call this:
The Anatomy of a Claude Code Project ๐
โโโโโโโโโโโโโโโ
1๏ธโฃ CLAUDE.md = Repo Memory (Keep it Short)
This file is the north star for Claude.
Not a massive document.
Just three things:
โข Purpose โ why the system exists
โข Repo map โ how the project is structured
โข Rules + commands โ how Claude should operate
If CLAUDE.md becomes too long, the model starts missing critical signals.
Clarity beats size.
โโโโโโโโโโโโโโโ
2๏ธโฃ .claude/skills/ = Reusable Expert Modes
Stop repeating instructions in prompts.
Turn common workflows into reusable skills.
Examples:
โข code review checklist
โข refactoring playbook
โข debugging workflow
โข release procedures
Now Claude can switch into specialized modes instantly.
Result:
More consistent outputs across sessions and teammates.
โโโโโโโโโโโโโโโ
3๏ธโฃ .claude/hooks/ = Guardrails
Models forget.
Hooks donโt.
Use hooks for things that must always happen automatically.
Examples:
โข run formatters after edits
โข trigger tests after core changes
โข block sensitive directories (auth, billing, migrations)
Hooks turn AI workflows into reliable engineering systems.
โโโโโโโโโโโโโโโ
4๏ธโฃ docs/ = Progressive Context
Donโt overload prompts with information.
Instead, let Claude navigate your documentation.
Examples:
โข architecture overview
โข ADRs (engineering decisions)
โข operational runbooks
Claude doesnโt need everything in memory.
It just needs to know where truth lives.
โโโโโโโโโโโโโโโ
5๏ธโฃ Local CLAUDE.md for Critical Modules
Some areas of your system have hidden complexity.
Add local context files there.
Example:
src/auth/CLAUDE.md
src/persistence/CLAUDE.md
infra/CLAUDE.md
Now Claude understands the danger zones exactly when it works in them.
This dramatically reduces mistakes.
โโโโโโโโโโโโโโโ
Hereโs the shift most people miss:
Prompting is temporary.
Structure is permanent.
Once your repository is designed for AI:
Claude stops acting like a chatbot...
โฆand starts behaving like a project-native engineer. ๐
800 Million Users. Millions of queries per second. 1 Primary Write Node.
OpenAI just revealed their database architecture.
The stack is simpler than you think:
- Single primary write DB
- 50 read replicas
- PgBouncer
I drew out the entire architecture: https://t.co/eRdEhC4U98
How can you version Minimal APIs?
You need to define an ApiVersionSet and apply it to your endpoints.
A smarter approach is to create a route group and apply the API version. Then, you'll use the route group to map individual endpoints.
Did you check out the resilience improvements in .NET 9?
We have two official NuGet packages:
- Microsoft.Extensions.Resilience
- Microsoft.Extensions.Http.Resilience
They're built on top of Polly, so the API should be familiar. You can use them to define resilience policies in C#.
They extend Polly with some useful features. For example, a standard pipeline you can add to HttpClients. There's also an OpenTelemetry integration.
A few strategies that are available out of the box:
- Retries
- Timeouts
- Fallbacks
- Circuit breakers
Want to learn more about resilience in .NET?
Start here: https://t.co/iVQQ2oWW2M
If this saves you from even one network failure, it'll be worth it.
---
Sign up for the .NET Weekly with 75K+ other engineers, and get a free Clean Architecture template: https://t.co/XPFjaPrtFG
Unitree G1 has mastered more quirky skills ๐คฉ
Unitree G1 has learned the "Anti-Gravity" mode: stability is greatly improved under any action sequence, and even if it falls, it can quickly get back up.
๐๐ฎ๐๐๐๐ป๐ฑ๐ฝ๐ผ๐ถ๐ป๐๐ > ๐ ๐ถ๐ป๐ถ๐บ๐ฎ๐น ๐๐ฃ๐๐ > ๐๐ผ๐ป๐๐ฟ๐ผ๐น๐น๐ฒ๐ฟ๐
I used all 3 in production, here is the comparison
Most developers struggle to choose between these three.
I spent months comparing them in real large-scale projects, so you don't have to ๐
1. Controllers (โญ๏ธ 3.5/5)
โข Rich MVC ecosystem with built-in features
โข Well-organized, familiar architecture
โข Strong routing & filters
โข Battle-tested in enterprise
โข Full OpenAPI support
But... more ceremony, slower performance ๐
2. Minimal APIs (โญ๏ธ 4.5/5)
โข Lightweight & blazing fast (10-15% boost)
โข Less boilerplate code
โข Simple endpoint mapping
โข Authentication built-in
โข Built-in parameter binding
โข Perfect for Vertical Slices
But... requires manual setup in large apps ๐
3. FastEndpoints (โญ๏ธ 5/5) ๐
โข Fastest development speed
โข Ready endpoint structure
โข Type-safe requests/responses
โข FluentValidation built-in
โข Authentication built-in
โข Perfect for Vertical Slices
โข Nearly Minimal APIs performance
The clear winner for me? FastEndpoints.
Why? It gives you:
โ Minimal APIs speed
โ Strongly-typed
โ Best dev experience
Which approach do you prefer? Share below ๐
๐ Subscribe to my free .NET newsletter, improve how you write software (link in my profile)
โ
โป๏ธ Repost to help others compare ASP .NET Core options to build APIs
โ Follow me ( @anton-martyniuk ) for more
Here are 9 excellent libraries I use in my projects:
1. YARP
2. Polly
3. EF Core
4. Refit
5. Testcontainers
6. OpenTelemetry
7. FluentValidation
8. SignalR
9. Dapper
Which library would you add to the list?
P.S. Here's a free Clean Architecture template showing you how to use these libraries: https://t.co/DEiKR3ed2K
I struggled with Modular Monoliths until I learned these concepts:
1. What Is a Modular Monolith?
https://t.co/r63cHLNiGI
2. Monolith to Microservices: How a Modular Monolith Helps
https://t.co/1l5nEREWd8
3. Modular Monolith Data Isolation
https://t.co/LA8jWffHMW
4. Modular Monolith Communication Patterns
https://t.co/aW2Tjj2IgQ
5. Testing Modular Monoliths: System Integration Testing
https://t.co/IHyfwJ7wiC
6. How to Keep Your Data Boundaries Intact in a Modular Monolith
https://t.co/aMZOkyVuwu
7. How to Migrate Your Modular Monolith to Microservices
https://t.co/UaQwTGKpuf
8. Internal vs. Public APIs in Modular Monoliths
https://t.co/z0n4NmFOuS
9. Refactoring Overgrown Bounded Contexts in Modular Monoliths
https://t.co/EPJ6mSkQYU
10. Scaling Monoliths: A Practical Guide
https://t.co/u66dxu0xfS
The articles above will be a great foundation.
But if you truly want to master modular monoliths from scratch, I created the Modular Monolith Architecture course.
If you wanted to see a practical implementation of this architecture, this is it.
We're going to build a production-ready system from scratch. This includes dozens of API endpoints, 50+ use cases, and 6,000+ lines of code.
Get started today: https://t.co/0u3gr3RsjG
I run my integration tests inside the CI/CD pipeline.
This gives me maximum confidence in my code.
It's all thanks to Testcontainers and Docker.
You can run external services as containers and access them in the tests.
Here's how to spin up:
- PostgreSQL
- Keycloak
- Redis
And now you can connect to these services from your application code.
Ready to take your integration testing in .NET to the next level?
You will love this article: https://t.co/eYjqyvgKRv