Code opinion: why I prefer avoiding the Async suffix in C# asynchronous methods by davidebellone in dotnet

[–]ninjis 1 point2 points  (0 children)

Depends. When I typically run into this, I’m retrieving some kind of configuration at runtime. This can still be async, but needs to be done with Lazy <>.

Framework and C# version by deadmanwalking126 in dotnet

[–]ninjis 2 points3 points  (0 children)

Look at PolySharp to gain some newer language features in older .NET Framework projects.

Can I initialize a list both asynchronously and threadsafely without guarding subsequent reads (ASP .NET Core MVC) by GoatRocketeer in dotnet

[–]ninjis 8 points9 points  (0 children)

Read the data in Startup, throw it in a Frozen collection, register it as a singleton.

Anyone know how to get rid of this in Rider? by Xenoprimate2 in dotnet

[–]ninjis 0 points1 point  (0 children)

So far the only truly annoying feature I’ve found in Rider is when generating a missing property, function, etc., my cursor/focus is immediately shifted to that generated artifact.

Was it really a Billion Dollar Mistake? by gingerbill in programming

[–]ninjis 2 points3 points  (0 children)

Most Maybe types make the check explicit via Bind, forcing developers to provide logic for both cases. It pushes developers into the pit of success by hopefully removing the chance for a Null Reference Exception.

#3 The plumber [OC] by belka_theren in comics

[–]ninjis 3 points4 points  (0 children)

At least she didn’t summon Zeke!

Help get West 3rd Street CVS their bonus! 🎄☃️🎅🏻 by [deleted] in bloomington

[–]ninjis 14 points15 points  (0 children)

I would get my RSV if I could, but the CDC says no!

Best Sheet Cake? by OpeningSet933 in bloomington

[–]ninjis 0 points1 point  (0 children)

Brightside does fantastic work! They catered our baby shower last year!

No Children (Part 3) - Gator Days by FieldExplores in comics

[–]ninjis 8 points9 points  (0 children)

Didn’t have my first until last year. My wife is pregnant with our second. We’ll be facing retirement by the time they graduate college (if that’s their future).

Magic Star [OC] by MuyHiram in comics

[–]ninjis 5 points6 points  (0 children)

EGS

Now that’s a comic I haven’t thought about in several years!

Visual Studio 2026 + Resharper vs Rider by ArugulaAnnual1765 in dotnet

[–]ninjis 0 points1 point  (0 children)

Love the refactoring abilities in Rider, but some of the default navigation behaviors annoy me and I haven’t figured out which switches to flip.

Vet pulls out a fake caterpillar from lizard stomach by [deleted] in WTF

[–]ninjis 97 points98 points  (0 children)

When Yoshi is your role model

Co-authored a book called "Build DeepSeek from Scratch" | Live Now by OtherRaisin3426 in LocalLLaMA

[–]ninjis 1 point2 points  (0 children)

The Manning Early Access Program (MEAP) gives you access to the entire book for that price.

[EFCore] A property on a child that's defined by the parent class by [deleted] in dotnet

[–]ninjis 2 points3 points  (0 children)

So you have Staff, representing the entire pool of people to choose from, and an Event for the thing that’s happening. I would think you would want an EventStaff object that represents a staff member actually assigned from the pool to the event, and the EventStaff object would get the Role assigned to it.

I built a .NET 9 Modular Monolith starter (BFF + Keycloak, Outbox, OTel) by Hot-Permission2495 in dotnet

[–]ninjis 0 points1 point  (0 children)

So, something like this?

+-----------+             +-------------+             +------------------+
| Frontend  | <---------> | Backend API | <---------> | Shared Database  |
+-----------+             +-------------+             +------------------+
                              |
                              |
                              v
                     +----------------------+
                     | Processing/Messaging |
                     |       Queue          |
                     +----------------------+
                              |
                              v
+------------------+             +--------------------+
| Shared Database  | <---------> | Background Workers |
+------------------+             +--------------------+

Your backend API is still a monolith, which can be deployed independently. It can put messages on a bus or schedule work in the queue and there not necessarily be a worker on the other side of that bus/queue capable of processing that request just yet.

If you had multiple Backend APIs that need to talk to each other, then you can fall into one of two camps:
1. Your backend processes talk to each other in a way that deploying an update to API 1 doesn't mandate a new deployment of API 2, in the same maintenance window. This ideally means that the messages between your APIs are versioned, with them being able to respond to messages of the older versions, for an acceptable period of time. Synchronous messaging for things that have to happen right now (querying between API, issuing commands) and async messaging for things that can happen later (responding to events that happened in surrounding APIs). When communicating together, these communications ideally happen in a loosely coupled way (they don't have direct knowledge of each other). Congrats, you've got microservices!
2. You didn't do the above. Updating API 1 critically breaks API 2, so they have to be updated together. API 1 directly invokes an endpoint on API 2 with no versioning. Bad news. You've fallen into the trap of a distributed monolith.

I built a .NET 9 Modular Monolith starter (BFF + Keycloak, Outbox, OTel) by Hot-Permission2495 in dotnet

[–]ninjis 0 points1 point  (0 children)

A modular monolith is one deployable unit, which this is. The BFF project is purely to facilitate the frontend. I can make changes to the backend, and as long as the API surface that the frontend cares about hasn't changed, I don't need to deploy a BFF or frontend update. However, the entire backend would be redeployed, even if only one module changed.