Exciting news - GPT-Image-2 by @OpenAI has claimed the #1 spot across all Image Arena leaderboards!
A clean sweep with a record-breaking +242 point lead in Text-to-Image - the largest gap we’ve seen to date.
- #1 Text-to-Image (1512), +242 over #2 (Nano-banana-2 with web-search aka gemini-3.1-flash-image)
- #1 Single-Image Edit (1513), +125 over #2 (Nano-banana-pro aka gemini-3-pro-image)
- #1 Multi-Image Edit (1464), +90 over #2 (Nano-banana-2)
No model has dominated Image Arena with margins this wide.
Huge congratulations to @OpenAI on this major breakthrough in image generation! More performance breakdowns by category in the thread below.
𝗖# 𝗱𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗿𝘀 𝘄𝗮𝗶𝘁𝗲𝗱 𝟱 𝘆𝗲𝗮𝗿𝘀 𝗳𝗼𝗿 𝘁𝗵𝗶𝘀 𝗳𝗲𝗮𝘁𝘂𝗿𝗲
Discriminated unions were merged in .NET 11 Preview 3
Discriminated Unions are finally here.
This is the #1 most requested C# language feature.
And it changes how you model results, errors, and state - forever.
Before unions, returning multiple outcomes from a method was painful.
Here is what most developers did:
❌ Threw exceptions for control flow → expensive and hidden
❌ Returned nullable types → no way to express "why" it failed
❌ Used boolean flags with nullable fields → invalid states everywhere
❌ Relied on third-party libraries → extra dependency
❌ Built own Result Types
All of these approaches had one thing in common:
➡️ The compiler could not help you.
If you forgot to handle a case - you found out at runtime.
📌 𝗖# 𝟭𝟱 𝗶𝗻𝘁𝗿𝗼𝗱𝘂𝗰𝗲𝘀 𝘁𝗵𝗲 "𝘂𝗻𝗶𝗼𝗻" 𝗸𝗲𝘆𝘄𝗼𝗿𝗱
Now you can define a type that holds exactly one of several possible types.
The compiler knows the full set of options (some compiler features are still in progress).
Here is what unions give you:
𝟭. 𝗖𝗹𝗼𝘀𝗲𝗱 𝘀𝗲𝘁 𝗼𝗳 𝗼𝘂𝘁𝗰𝗼𝗺𝗲𝘀
→ a union can only be one of the declared types
𝟮. 𝗘𝘅𝗵𝗮𝘂𝘀𝘁𝗶𝘃𝗲 𝗽𝗮𝘁𝘁𝗲𝗿𝗻 𝗺𝗮𝘁𝗰𝗵𝗶𝗻𝗴
→ the compiler warns you if a case is missing
𝟯. 𝗡𝗼 𝗱𝗲𝗳𝗮𝘂𝗹𝘁 𝗯𝗿𝗮𝗻𝗰𝗵 𝗻𝗲𝗲𝗱𝗲𝗱
→ when all cases are handled, you are done
𝟰. 𝗜𝗺𝗽𝗹𝗶𝗰𝗶𝘁 𝗰𝗼𝗻𝘃𝗲𝗿𝘀𝗶𝗼𝗻𝘀
→ assign case types directly to the union variable
𝟱. 𝗩𝗶𝘀𝗶𝗯𝗹𝗲 𝗰𝗼𝗻𝘁𝗿𝗮𝗰𝘁𝘀
→ the method signature tells the full story
This is a massive shift in how we write C# code.
Unions work beautifully with pattern matching and switch expressions that C# already has.
In future .NET preview releases, we expect more features for discriminated unions and their official support in ASP .NET Core.
👉 If you want to be up to date with the latest .NET features and reach the top 1% of .NET developers, join 24,000+ engineers reading my .NET Newsletter: https://t.co/XJ8ufNM2yg
——
♻️ Repost to help other .NET developers discover discriminated unions
➕ Follow me ( @AntonMartyniuk ) to improve your .NET and Architecture Skills
Simplify Your Code with Guard Clauses
.NET makes it easy to check for bad input.
In .NET 6, we got:
- ArgumentNullException.ThrowIfNull
In .NET 7:
- ArgumentException.ThrowIfNullOrEmpty
In .NET 8, we now have:
- ThrowIfNullOrWhiteSpace
- ThrowIfNullOrEmpty (for collections)
- ThrowIfZero
- ThrowIfNegative
- ThrowIfGreaterThan
I use guard clauses when needed (it rarely is...).
Do you use them in your code?
A good use case for guard clauses: preventing invalid states in domain models.
---
Do you want to simplify your development process? Grab my Clean Architecture template here and save days of development time: https://t.co/q1GLPybAPh
Angular 21.1 is officially here! 🚀
This update is all about refining your developer experience with cleaner templates and better reactivity. Check out the highlights: ✅ Multi-case @switch matching ✅ Spread syntax in templates ✅ New isActive() Signals for routing ✅ Renamed [formField] for Signal Forms
Ready to upgrade? Run ng update @angular/core @angular/cli and let us know your favorite new feature! 🛠️
The riskiest line of code you'll write today is the one without a feature flag.
Fortunately, .NET has you covered right out of the box.
Feature flags are a software development technique that allows you to wrap application features in a conditional statement.
You can then toggle the feature on or off at runtime to control which features are enabled.
.NET already has feature flag support built in.
You can use the IFeatureManager in your code to check whether a feature is enabled.
Want to learn more about using feature flags?
Check out this article: https://t.co/cOY9oE7BWP
There are many popular services for managing feature flags.
I've used LaunchDarkly often, and recently also PostHog (it offers many more features).
---
Sign up for the .NET Weekly with 75K+ other engineers, and get a free Clean Architecture template: https://t.co/YfIcyukzaV
Researchers have found two new vulnerabilities in React Server Components while attempting to exploit the patches last week.
These are new issues, separate from the critical CVE last week. The patch for React2Shell remains effective for the Remote Code Execution exploit.
A critical vulnerability in React Server Components (CVE-2025-55182) affects React 19 and frameworks, including Next.js (CVE-2025-66478).
All users should upgrade to the latest patched version in their release line.
https://t.co/azJJgxS67J
Here is my favourite .editorconfig rule:
-> Naming conventions for async methods and fields
Define clear naming rules for private fields, async methods, interfaces, etc.
Why: Prevents confusion when working with async APIs and makes intentions clear.
For those who don't know:
.editorconfig is a plain-text configuration file that tells your editor or IDE how to format and style your code, so every developer on the team writes code the same way, no matter what their personal IDE settings are.
It works across many languages and IDEs (like Visual Studio, VS Code, JetBrains Rider, etc.), and in .NET it’s especially powerful because it integrates with Roslyn analyzers and code style settings.
📌 Don't miss the opportunity to learn more about .NET: https://t.co/Jp7zCTPAAo
__
P.S. Check pre-order on Pragmatic .NET Code Rules Course: https://t.co/QaredhAdXN
#dotnet
This is the best guide you ever need for code architecture in .NET projects
11 years of experience in 60 seconds
Choosing the proper project structure is one of the most impactful decisions for a .NET development team.
It shapes everything from onboarding speed and code maintainability to the speed of feature delivery.
In modern software development, there are 3 popular approaches to structuring your projects:
• N-Layered Architecture (Controller-Service-Repository)
• Clean Architecture
• Vertical Slice Architecture
Over the past years, I've built and scaled .NET solutions using all three approaches.
1️⃣ N-Layered Architecture
✅ Easy to understand, great for small CRUD apps
❌ Leads to fat Controllers/Services, too many Repositories, scattered business rules
2️⃣ Clean Architecture
✅ Clear separation of concerns, testability, flexibility
❌ Adds complexity, overhead, learning curve for juniors
3️⃣ Vertical Slice Architecture
✅ Feature-focused, fast to build, easier onboarding
❌ Risk of duplication, cross-cutting concerns require discipline
Tomorrow, I'll share with 13,000+ people:
➡️ N-Layered Architecture and why it's not the best choice anymore
➡️ Clean Architecture and it's natural evolution over the time
➡️ Vertical Slice Architecture and why it was invented
➡️ (New): Combining Vertical Slices with Clean Architecture
In tomorrow's post you will learn:
• The pros and cons of each architecture
• How they evolved as time passed
• What's the best approach for your new projects in 2025-2026
📌 If you want to join us, subscribe to my weekly newsletter:
↳ https://t.co/g45tyhE0cp
—
♻️ Repost to help others learn about different options of code architecture in .NET
➕ Follow me for more .NET and Architecture tips
#dotnet
Why are health checks and monitoring so important?
If something breaks in your application, you want to know immediately.
Health checks shorten the feedback loop.
You get a notification the second something goes wrong.
Health checks in ASP .NET Core:
- Implement IHealthCheck
- Custom checks are easy
- Pre-built checks available
- Customizable health response
- Plug into any monitoring or alerting tool
Here's how to start using Health Checks: https://t.co/E6Fd78UOsi
Are you using health checks in your applications?
Gemini CLI is our new #OpenSource AI agent that brings the power of Gemini directly into your terminal!
Access Gemini 2.5 Pro with 1M token context window, 60 requests/min, and 1,000 requests/day—at no cost with a free Gemini Code Assist license → https://t.co/Fp0wdxfbEW
Tired of jumping between dashboards to figure out why your .NET app is acting up? 🤔
The new #OpenTelemetry plugin for @JetBrainsRider brings all that observability data right into your IDE. No more context switching: just run your app and watch the logs, metrics, and traces alongside your code 📊
Available now in Rider 2025.2 EAP5!
All the details are in this blog post 👉 https://t.co/JhYX8M1wur
#dotnet #observability