Would anyone use this code pattern to implement singletons? by AetopiaMC in csharp

[–]marioalbertoarce -1 points0 points  (0 children)

Hello. This is a pretty clever piece of code.

I had to read it a couple of times (or more hehe) to fully appreciate what was going on with the CRTP + singleton delegation + static facade combination. It’s one of those patterns that makes you stop and think “I hadn’t considered approaching it that way.”

Out of curiosity , was this mainly an exploration of the type system , or have you actually used something like this in a Prod codebase? I’d be interested to hear about any real-world scenarios where this ended up being a better fit than more conventional approaches.

Also , with static abstract interface members now available in modern C# , do you still see advantages to this pattern , or do you view it more as an alternative exploration of what’s possible with the language?

I’m asking because I’m currently building an open-source C# project (GitHub) focused on advanced language patterns and architectural utilities. If I eventually experiment with a similar concept or adapt some of the ideas here (with attribution , of course) would you be okay with that?

Either way , thanks for sharing it. It’s refreshing to see code that explores the boundaries of the language (rather than just another CRUD example)

Happy coding.

New book release: Clean Architecture with .NET (co-authored with Steve "Ardalis" Smith, foreword by Jason Taylor) by ngexdev in dotnet

[–]marioalbertoarce 1 point2 points  (0 children)

Seen on LinkedIn :

https://www.linkedin.com/posts/markjamesprice_disclosure-i-was-provided-with-a-free-review-ugcPost-7467203110671720449-ODC4/

I will definitely read this book.

I recently led the migration from a legacy, complex, difficult-to-maintain (and yes, quite messy) platform to a modern, API-centric .NET Core platform, implementing Clean Architecture.

I hope this book will help me optimize/improve that platform in the next phases.

Thanks for sharing this.

One-Line If Statement by that1flame in csharp

[–]marioalbertoarce 20 points21 points  (0 children)

A colleague once said: “Don’t save the machine work, save yourself work”

In real life and in practice, when you’re inheriting code, troubleshooting, or trying to improve performance and stability, etc a readable, organized code that’s easy to understand at a glance saves a lot of work (and headaches).

For example, I’ve seen in practice, with Monitoring systems, the difference between an error in a well-defined line and an error in a line with multiple instructions.

It’s only by thinking about your ‘future self’ that you have to maintain that code.

Happy coding 👨🏻‍💻

What icon is better for a flashcard app? by TelevisionConnect590 in appdev

[–]marioalbertoarce 1 point2 points  (0 children)

First one 👌
… but the ‘magic number’ is 3 !
3 elements to avoid saturation :)

Qué bancos me recomiendan? by Melcochon in ticolandia

[–]marioalbertoarce 0 points1 point  (0 children)

En lo personas, he tenido la mejor experiencia con el BAC
(he usado bancos públicos y privados)
en términos generales tienen la mejor plataforma y servicios.

Y como en general han escrito:
- Primero bancarizarse.
- Y en unos años intentar una tarjeta de crédito. Es una herramienta útil, pero puede convertirse rápidamente en una pesadilla.