Directly Handling Errors in PowerShell Tip #47 #softwareengineering #coding #LearnPowerShell #softwaredeveloper #PowerShellScripting #CodingForBeginners #csharp #bash #Scripting #PowerShellTutorial #linux #windows
Directly Handling Errors in PowerShell Tip #47 #softwareengineering #coding #LearnPowerShell #softwaredeveloper #PowerShellScripting #CodingForBeginners #csharp #bash #Scripting #PowerShellTutorial #linux #windows
Day 9 of learning Rust as a C# dev:
I moved a variable, and the compiler yelled at me.
It turns out that Move Semantics isn't just a feature... it's a mindset shift.
Here’s what I learned:
https://woodruff.dev/move-semantics-in-rust-what-just-happened-to-my-variable/
Thrilled to announce that I have earned my C# certificate by Udemy . This journey has been full of learning and Growth.
#csharp #coding #programmer #levelup #newskills #learning #development
https://www.udemy.com/certificate/UC-07c31bee-d706-4e87-a446-dc299a81627f/
️ Semantic Search in .NET with Build5Nines.SharpVector
Red Hat .NET developer Tom Deseyn makes a list of key C# 13/.NET 9 features that are new with this iteration, namely:
1. Params Collections
2. Partial Properties and Indexers
3. Implicit Index Access in Object Initializers
4. 'ref' and 'unsafe' in Iterators and Async Methods
"C# 13"
https://developers.redhat.com/articles/2025/04/16/c-13-new-features
Lights, music, action - Friday night at #nwc47 is here! Time to shake off the serious and embrace the spotlight. Whether you’re a rockstar in the making or a diva at heart, DJ #CSharp hosts an electrifying karaoke extravaganza starting at 8 p.m in Maxi's. Don’t worry, liquid courage will be available. Not into singing? Slide into the glow of the Blacklight Ball with mc300baud at 9:30 p.m. in Grand 2 & 3. Dance your heart out under neon lights, where the music isn't the only thing that shines!
Day 8 of learning Rust as a C# dev:
Ownership is the most C++-ish thing I’ve seen in Rust, and I actually love it.
It’s strict, it’s smart, and it makes you think before you move anything.
https://woodruff.dev/ownership-in-rust-the-most-c-ish-thing-ive-loved-and-i-mean-that-in-a-good-way/
@maxitb I find that MSDI is good enough for 80% of my work but the more complex setups are painful.
Modular setups is the biggest reason I've defaulted to Autofac. MSDI doesn't have a baked in method for "and include DI from this project". There are extension libraries that do it but not in the core. Nor ones that give me options to extend registrations (like adding CLI commands from an assembly) or replace (having default services, then replacing them with mock or test ones).
Mostly I use that to have a single point of setup. In Nitride (my ecs ssg), I have extension methods to pull in features like Gemini, feeds, or front matter processing.
The second reason is because I do a lot of registration by interfaces. In Nitride, all of the operations are pulled in by reflection so I don't have to list each one. Autofac makes that easy, MSDI requires another library to do that.
Third is partial DI. I like Autofac's delegate handling that let's me provide some parameters for a service but then use DI for the others constructor parameters. I'm not aware of a MSDI library that does that but I know verbose techniques to do it. That let's me create a service that takes a UserId and have it passed into the constructor along with ILogger and other DI injected components.
Fourth is ascetics (much like my frustration with MS logging). MSDI's method calls are verbose on the consumption side but terse on the registration. I prefer the reverse.
Ultimately, I don't enjoy using MSDI as much as Autofac. I'm trying to convince myself to accept MSDI but I find I keep hitting its limitations or have to jump though excessive hoops compared to Autofac (such as setting up unit testing, nested scopes). And if I have to use a library to get the features I want, it seems logical to use one library that does everything cohesively across all my projects instead of making that choice per project.
That all said, I'm still trying to write my CLI library to only use MSDI and MSL (because I prefer Serilog also for the same reasons). It is painful but also a chance to see if the DX has improved since last time.
.NET Testing : pushing the Limits et Roslyn: compiler-as-a-Service
12 mai 2025, 19:00:00 CEST - GMT+2 - La Cantine by La Mêlée, Toulousehttps://mobilizon.mtg-france.org/events/00862bef-84fc-4800-8e9a-7dd0a7bfa282
I find C#'s features to always somehow be incomplete. For example, I can declare a class without a constructor, like below, and use new HandInfo{... to create with names. However, it doesn't work nullable: enable, thus I have to revert back to manually creating a constructor.
Played a few hours of Palworld with Child.0.
Also worked on my C# CLI parsing library. Mostly I worked out some ideas and patterns to make sure they fit. One implementation I'm doing is based on C#'s XElement pattern:
var root = new ComponentCliCommand(
new ValueCliOption<string>("option"),
new ValueCliOption<int>('n', "number"),
new SwitchCliOption("help"),
new CliHandler(_ => Console.WriteLine("I ran a command!"));
Since the entire purpose is to make this DI-friendly and also Autofac-module friendly, all of the classes and subclasses can be extended and then added into the service provider.
public RootCommand(IEnumerable<IMyLocalVerbs> verbList, CurrentDateOption currentDateOption)
: base(currentDateOption)
{
this.AddRange(verbList);
}
So far, the pattern seems "reasonable"?
I can also easily convert a reflection-based version of the command and convert them into components, which would let me do a CommandLineParser-style command object. And the handler (CliHandler
) doesn't have to be in the same class (though I prefer it does).
Today, I implemented the #async / #await pattern (as known from #csharp and meanwhile quite some other languages) ...
... in good old #C!
Well, at least sort of.
* It requires some standard library support, namely #POSIX user context switching with #getcontext and friends, which was deprecated in POSIX-1.2008. But it's still available on many systems, including #FreeBSD, #NetBSD, #Linux (with #glibc). It's NOT available e.g. on #OpenBSD, or Linux with some alternative libc.
* I can't do anything about the basic language syntax, so some boilerplate comes with using it.
* It has some overhead (room for extra stacks, even extra syscalls as getcontext unfortunately also always saves/restores the signal mask)
But then ... async/await in C!
Here are the docs:
https://zirias.github.io/poser/api/latest/class_p_s_c___async_task.html
Week 1 of learning Rust as a C# dev:
Fewer keywords. Stricter rules. More thinking.
Rust’s minimalism doesn’t just simplify, it reshapes how you code.
Here are my takeaways from the first 7 days:
https://woodruff.dev/reflections-on-week-1-rusts-minimalism-hits-different/
I'm learning Rust from a C# developer's perspective—one day at a time for 42 days.
I have 36 days left.
If you're curious how Rust stacks up against .NET, follow along here:
https://woodruff.dev/from-c-to-rust-a-42-day-developer-challenge/
SpacetimeDB is an interesting new type of relational database that I haven't quite wrapped my head around yet.
It is designed for real time massive multiplayer games and uses some sort event sourcing (CRDTs?) but has many more potential use cases than just games.
It works particularly well with .NET and C#. So I have cleaned up and simplified the C# quickstart sample.
️ ReSharper 2025.1 Adds C# 14 Support and New Tools
Day 6 of learning Rust as a C# dev:
No classes. No objects. Just tuples, arrays, and a compiler that keeps you honest.
Rust’s types feel simple until they don’t.
Here’s what I learned:
https://woodruff.dev/rust-scalar-and-compound-types-where-are-my-c-classes/
️ Microsoft Build 2025 Highlights .NET and C#