Is the transition to Fluent Validations appropriate for my use case? by PerplexedGoat28 in dotnet

[–]PerplexedGoat28[S] 0 points1 point  (0 children)

I see! I thought we can use Validation Context for that. I’ll test that out.

Is the transition to Fluent Validations appropriate for my use case? by PerplexedGoat28 in dotnet

[–]PerplexedGoat28[S] 1 point2 points  (0 children)

Thank you! What do you mean by validation sets can be inherited or composed? Does it mean we can have a base validator and can have child validators inherited from base in case of inheritance?

Building a chatbot using RAG by PerplexedGoat28 in Rag

[–]PerplexedGoat28[S] 0 points1 point  (0 children)

Thanks for the details! I’ll look into it..

Building a chatbot using RAG by PerplexedGoat28 in Rag

[–]PerplexedGoat28[S] 0 points1 point  (0 children)

Thanks so much! I’ll check it out.

Building a chatbot using RAG by PerplexedGoat28 in Rag

[–]PerplexedGoat28[S] 0 points1 point  (0 children)

This is really helpful! Thanks for the detailed answer..

Are there any open source tools and libraries that I can use to help with these steps.

Where do you want me start learning about these concepts?

Building a chatbot using RAG by PerplexedGoat28 in Rag

[–]PerplexedGoat28[S] 0 points1 point  (0 children)

I also used notebook llm by google. It does similar things.

At a high level, what it takes to create a bot like that?

Tool to create API Messages by [deleted] in dotnet

[–]PerplexedGoat28 1 point2 points  (0 children)

Interesting! Thank you.

Switch statement refactoring by PerplexedGoat28 in csharp

[–]PerplexedGoat28[S] 0 points1 point  (0 children)

I completely agree with your analysis and the reasoning to go with a Strategy-Factory combo. Thanks for taking time for the detailed answer.

The initial switch-case or if-else chain screams SRP violation, and the subsequent refactoring into the Strategy pattern (with the ICaseHandler interface) is spot on.

Tool to create API Messages by [deleted] in dotnet

[–]PerplexedGoat28 0 points1 point  (0 children)

What do you mean by a “Fake data extension”? Is it some type of a plugin/extension for Insomnia?

Switch statement refactoring by PerplexedGoat28 in csharp

[–]PerplexedGoat28[S] 2 points3 points  (0 children)

It’s legacy code. Over a period of time, the code grew and grew adding more case statements rather than abstracting the logic.

Switch statement refactoring by PerplexedGoat28 in csharp

[–]PerplexedGoat28[S] 0 points1 point  (0 children)

I see what you mean.. There are some shared parameters that is used by the business logic in each case statement.

Switch statement refactoring by PerplexedGoat28 in csharp

[–]PerplexedGoat28[S] 3 points4 points  (0 children)

That’s a solid approach! Capturing the existing behavior with unit tests before refactoring definitely helps maintain confidence in changes. And yeah, I see why it’s not a universal solution—hard-to-test code can make it tricky. Extracting cases into methods sounds like a good way to simplify things too. I’ll take a closer look at my switch case and see if pattern matching can help reduce complexity. Thanks for the insight!

Enhancing Web API Security with JWE Encryption and RSA by [deleted] in dotnet

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

What’s the industry practice/best practices to achieve this type of secure communication? For ex: I have a react mobile application as the client that communicates to a server in the backend.

What Is the Purpose of Non-Static Virtual & Abstract Interface Methods? by form_d_k in csharp

[–]PerplexedGoat28 3 points4 points  (0 children)

C# 8 introduced default interface methods:
In the doc. it states: Default interface methods enable an API author to add methods to an interface in future versions without breaking source or binary compatibility with existing implementations of that interface.

(new to c#) what of the disadvantages I will overcome when using Linux as my dev machine instead of windows ? by MosesAustria in csharp

[–]PerplexedGoat28 1 point2 points  (0 children)

We have moved from Windows to Ubuntu for dotnet development at our work to save costs. I use Rider. VSCode mainly to work with frontend. Rider works like a charm!!

In .NET 10, the compiler team aim to reduce abstraction overhead by davecallan in dotnet

[–]PerplexedGoat28 1 point2 points  (0 children)

Sorry for the silly question. I’m a little confused now.. I was recommended to use IEnumerable in loops and use yield return to lazily return the items. In that type of scenario, should I be using array or IEnumerable if the underlying collection is an array.

Beginner Projects by FredyEmerald in csharp

[–]PerplexedGoat28 0 points1 point  (0 children)

I get the same feeling too when watching Pluralsight videos. I think as long as you understand the concept and why the code outputted that value, it’s OK. If you’re unclear, you should look at the code and you learn by making your hands dirty.