Programming & AI Tips 💡
45.8K subscribers
67 photos
11 videos
30 files
388 links
Programming & AI:
Tips 💡
Articles 📕
AI & LLMs 👾
Design, Architecture, Principles ✅

🇳🇱 Contact: @MoienTajik
Download Telegram
I Built a .NET App Using AI (with Cursor) - This Is Amazing ✅

Discover how Cursor AI can transform your .NET development workflow! 🚀

In this video, you will see how this AI-powered code editor can help you write better code faster, understand complex codebases, and automate repetitive tasks. Whether you're a seasoned developer or just getting started with .NET, Cursor's AI capabilities will change how you think about coding.


[ YouTube ] : https://youtu.be/5hyRBuW560c

〰️〰️〰️〰️〰️〰️
#AI #Cursor #DotNET #CSharp
@ProgrammingTip
Please open Telegram to view this post
VIEW IN TELEGRAM
Build a Model Context Protocol (MCP) Server in C# 🧠

Learn how to create an MCP server using .NET 8 and ASP.NET Core! ⚡️

This guide walks you through building a server that can interact with AI models via the Model Context Protocol — a standard for managing model prompts, memory, and tools. Great for AI agent developers! 🤖🧠


[ Blog ] : https://devblogs.microsoft.com/dotnet/build-a-model-context-protocol-mcp-server-in-csharp

〰️〰️〰️〰️〰️〰️
#AI #MCP #dotnet #csharp
@ProgrammingTip
Please open Telegram to view this post
VIEW IN TELEGRAM
C# 14 - Extension Members 🚀

C# 14 adds new syntax to define extension members. The new syntax enables you to declare extension properties in addition to extension methods. ✔️

You can also declare extension members that extend the type, rather than an instance of the type. In other words, these new extension members can appear as static members of the type you extend.

The following code example shows an example of the different kinds of extension members you can declare:
public static class Enumerable
{
// Extension block
extension<TSource>(IEnumerable<TSource> source) // extension members for IEnumerable<TSource>
{
// Extension property:
public bool IsEmpty => !source.Any();
// Extension indexer:
public TSource this[int index] => source.Skip(index).First();

// Extension method:
public IEnumerable<TSource> Where(Func<TSource, bool> predicate) { ... }
}

// extension block, with a receiver type only
extension<TSource>(IEnumerable<TSource>) // static extension members for IEnumerable<Source>
{
// static extension method:
public static IEnumerable<TSource> Combine(IEnumerable<TSource> first, IEnumerable<TSource> second) { ... }

// static extension property:
public static IEnumerable<TSource> Identity => yield return default;
}
}


The members in the first extension block are called as though they're instance members of IEnumerable<TSource>, for example sequence.IsEmpty. The members in the second extension block are called as though they're static members of IEnumerable<TSource>, for example IEnumerable<int>.Identity.


[ Blog ] : https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/extension-methods

〰️〰️〰️〰️〰️〰️
#csharp #dotnet
@ProgrammingTip
Please open Telegram to view this post
VIEW IN TELEGRAM
The Hidden Cost of DateTime.Now in .NET 🕰

You're Using DateTime.Now — and It's Breaking Your Code … ❌

Let's be honest: We've all written this:
if (DateTime.Now > token.Expiry)
{
return Unauthorized();
}


It works… until it doesn't.

In production, this little line can wreck your logic due to clock drift, time zone shifts, or mocking nightmares. 🐞


[ Article ]
: https://freedium.cfd/https://medium.com/@yaseer.arafat/the-hidden-cost-of-datetime-now-and-what-every-net-developer-should-use-instead-8859863257a1

〰️〰️〰️〰️〰️〰️
#dotnet #csharp
@ProgrammingTip
Please open Telegram to view this post
VIEW IN TELEGRAM
Preparing for the .NET 10 GC 🔥

In .NET 9 DATAS (Dynamic Adaptation To Application Sizes) got enabled by default, but .NET 9 is not an LTS release, so for many people they will be getting DATAS for the first time when they upgrade to .NET 10.


What does “application size” mean exactly?
This is the LDS (Live Data Size) from GC’s point of view, meaning that if we did the most aggressive GC possible, this is how much memory your application uses. Another way to look at it is this is your long lived data + whatever inflight data you have when a GC occurs.

The goal for DATAS is that you no longer need to do various configurations to try to achieve a heap size proportional to your application usage. The 2 main cases we target with DATAS are:

1) Bursty workloads running in memory constraint environments. DATAS aims to retract the heap size back when the application doesn’t require as much memory and grow it when the app requires more. This is especially important for apps running in containers with memory limits.

2) Small workloads using Server GC — for example, if someone wants to try out a small asp.net core app to see what the experience is like in .NET, DATAS aims provide a heap size much more inline with what the small app actually needs.


[ Article ]
: https://maoni0.medium.com/preparing-for-the-net-10-gc-88718b261ef2

〰️〰️〰️〰️〰️〰️
#dotnet #gc
@ProgrammingTip
Please open Telegram to view this post
VIEW IN TELEGRAM
🚀 .NET 10 is here! 🔥

The successor to .NET 9 is now out — and it’s a Long-Term Support (LTS) release, supported for the next 3 years.

👉 [ Learn what’s new ] :
https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-10/overview

〰️〰️〰️〰️〰️〰️
#dotnet #csharp #aspnetcore #maui
@ProgrammingTip
Make coding agents earn the green check 💡

Do not end an agent task with "implement this." End it with a command that can fail.

For a .NET repo, that might be dotnet test, a focused test project, a formatter check, or a small reproduction script. Tell the agent which command to run, what output to inspect, and what it should do if the command fails.

A good task contract has three parts:

• Change: the files or behavior to update.
• Proof: the exact command or test case.
• Stop condition: what needs human review instead of another retry.

This also makes PR review faster. You get a diff plus evidence, not a confident paragraph saying the fix should work.

〰〰〰〰〰〰
#AI #dotnet #Testing
@ProgrammingTip
.NET 11 performance work is landing across the stack 🔥

Microsoft published the running list of performance improvements headed for .NET 11. This is not one magic runtime switch. The work spans the runtime, JIT, libraries, and tooling paths that show up in normal application code.

Use the post as a migration checklist:

• Find code that is CPU-bound, allocation-heavy, or called per request.
• Run your benchmarks on the .NET 11 SDK, not a synthetic microbenchmark only.
• Check p50 and p99 latency, allocations, startup, and throughput separately.

The best upgrade wins are boring: existing C# gets faster with fewer code changes. But measure your service. A JIT win can disappear behind JSON, EF queries, network calls, or a container CPU limit.

[ Blog ] :
https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-11/

〰〰〰〰〰〰
#dotnet #csharp #Performance #dotnet11
@ProgrammingTip
GitHub improved the Copilot code review flow 🔥

GitHub shipped an improved Copilot code review experience. That matters most on the boring, high-volume PRs where reviewers need help finding a real issue, not another summary of changed files.

For C# teams, use Copilot review as an extra pass on every ASP.NET, EF Core, and library PR. Then keep the human review focused on contracts, failure behavior, and whether the change belongs in the codebase.

Practical rule:

• Let Copilot flag suspicious diffs.
• Do not merge because it found nothing.
• Keep analyzers and tests as the enforcement layer.

AI review is cheap coverage. It is not a replacement for someone who knows why that nullable property or cancellation token exists.

[ Read More ] :
https://github.blog/changelog/2026-09-18-copilot-code-review-an-improved-review-experience

〰〰〰〰〰〰
#dotnet #csharp #GitHub #Copilot
@ProgrammingTip
Cloudflare is porting TypeScript to Rust ⚡️

Cloudflare introduced tsrs, a port of TypeScript to Rust.

That name matters less than the direction. Language tooling sits on hot paths now: editors, CI checks, code generation, linters, and AI-assisted review. A faster implementation can reduce the wait developers feel dozens of times a day.

• Compiler and analyzer speed changes whether people run checks locally.
• Native tooling can cut CPU and memory pressure in large repos.
• Language infrastructure is product infrastructure, not background plumbing.

Do not rewrite a working compiler because Rust is fashionable. But do profile the slow path in your developer loop. It might be a parser, an analyzer, generated code, or an overloaded CI agent.

[ Blog ] :
https://blog.cloudflare.com/typescript-rust-port

〰️〰️〰️〰️〰️〰️
#dotnet #TypeScript #Rust #DevTools
@ProgrammingTip
GitHub is rebuilding Git storage for agent-scale work ⚡️

GitHub explained the storage work behind Git at agent scale. More coding agents means more branches, refs, fetches, pushes, and short-lived repositories hitting the platform at once.

What changed:

• Repository storage moved to Azure as part of the platform migration.
• Per-reference write quorums help coordinate Git ref updates.
• Virtual replicas backed by object storage reduce the need to copy every repository everywhere.

This is infrastructure work, but .NET teams feel it directly. When CI, bots, Copilot-style agents, and developer machines all create refs concurrently, a normal Git workflow becomes a distributed-systems workload.

Worth reading if your build automation creates branches or tags and you still treat a failed push as "just retry it."

[ Blog ] :
https://github.blog/engineering/architecture-optimization/the-bridge-to-agent-scale-git-infrastructure/

〰〰〰〰〰〰
#dotnet #GitHub #Git #DevOps
@ProgrammingTip
NuGet packages can deliver agent skills 🔥

Microsoft is showing how to ship skills in NuGet packages.

The idea is simple: a package can carry more than assemblies, analyzers, and build targets. It can also deliver instructions and reusable capability definitions that coding agents can discover in a repo.

Why this is useful:

• Package authors can document the right workflow next to the API.
• App teams get consistent agent guidance when they install a dependency.
• Platform teams can distribute internal conventions without pasting the same prompt into every project.

Treat these skills like any other package surface. Version them, keep the instructions narrow, and test them against real agent tasks before publishing.

[ Blog ] :
https://devblogs.microsoft.com/dotnet/delivering-skills-in-nuget-packages/

〰〰〰〰〰〰
#dotnet #NuGet #CSharp #AI
@ProgrammingTip
.NET 11 is out 🔥

.NET 11 has landed. The first practical move is not changing every project file. Get the SDK into CI, build a representative solution, and make the failures visible.

Start with:

• Install the .NET 11 SDK in a non-production pipeline.
• Test net11.0 alongside your current target framework.
• Review package compatibility, analyzers, source generators, and native dependencies.
• Pin the SDK with global.json before developers get different local results.

A major runtime release is a good excuse to delete old workarounds too. Run benchmarks before and after, especially around hot APIs, JSON, HTTP, and startup. "It builds" is only the first green check.

[ Blog ] :
https://devblogs.microsoft.com/dotnet/announcing-dotnet-11/

〰〰〰〰〰〰
#dotnet #csharp #dotnet11
@ProgrammingTip