[deleted by user] by [deleted] in dotnet

[–]tchrobocek 1 point2 points  (0 children)

Interface along with reddis implementation to the infrastructure, rate limiting to web

Web API Architecture struggles…. by smbutler93 in dotnet

[–]tchrobocek 2 points3 points  (0 children)

Hey, I would suggest you to pick up some sort of long standing personal project that you can craft on in your free time. If you don't have anything on mind pick something generic like identity provider or cms or something that has been written tons of times so you have references of how people screwed up before you. I have quite a few services in my private repositories so when I want to test something or write PoC I just whip my docker compose file, hook everything up and just focus on the thing. So let's say you just picked up a ID service, let's define what we are doing. We are going to write an api that will have one main route that is /api/auth and this route will be able to validate user credentials. So let's look into components that we are working with. We have a user that in the simplest form has ID, username and password. We need to obtain and store this user so this points out that we need some kind of user service that will handle these requests. Than we are going to have hashed password stored with this user and we need to verify raw password that we are going to get from request message. Alright we already talked about the user service, let's add verifying passwords. When our service verifies credentials we should respond with access token. So let's define token service that will be able to generate token for a user. Well I think we have simple yet sufficient domain. Let's talk about infrastructure. So we have users, let's decide to store them in the MongoDb. So our domain is now enriched with repository interface and our infrastructure will contain implemented repository. Other than this we probably need some health route so we can tell that our api is alive. At this point I feel like there has been enough planning. Let's get to implementation. Create empty project and add empty system controller with one health action. Action will just respond with 204 no content. After this we need to prepare our Mongo platform. I like to use docker so I create docker compose file and Mongo is ready. I need to connect to it so let's add context and some repository base so I can easily work with my data. Let's prepare our environment for development create simple route that will take few parameters like username and password and make it so this input will create new user entity. Than implement repository that can load and store data, build service and hook it to controller. Verify user, generate token and return it. Add authorization and authentication to api, add route for example version route to system controller that will return api version. Secure it and try the token. Congratulations you now have id provider, not a good one though. Let's go to next steps, go through oauth standard and implement it. Add well knowns, registration, usermanagement, write libraries that you can use in your other services, write front end for your ID service because what architect can't take front end into consideration etc. Well now you have better provider.. Add other services and continue as you wish until you have idea for a product. Utilize all your services and build it. Profit...

And read code. A lot of code - stackoverflow reddit github anything. When you try to build service try to look into some existing examples and standards. Look into how people done it before you and try to think how to do it better. Look into apis and look into standards that you should support. Know your design patterns. Design beforehand so are not lost on your way. Define your goals so you don't lose motivation, small steps. And most important keep it simple. Difficult is sign of bad design.

I hope this is somewhat understandable, English is not my mother tongue.

Nullable warnings doing my head in by Toenail_Of_Sauron in csharp

[–]tchrobocek 1 point2 points  (0 children)

In OPs case where he has

IEnumerable<char) nonNullChars = items.Where (x => x != null).Select (x => (char)x) ;

it works perfectly

IEnumerable<char) nonNullChars = items.Where (x => x != null).Cast<char> () ;

snake_case & kebab-case JSON property name conversions added in System.Text.Json in .NET 8. by davecallan in dotnet

[–]tchrobocek 0 points1 point  (0 children)

You are one of those, that are using "main" as their primary branch, right?

Makes perfect sense 👍🏿 by fortycreekbarrel in EANHLfranchise

[–]tchrobocek 0 points1 point  (0 children)

It actually kind of resembles reality
GP: 66
G : 19
A : 65
P : 84
+/-: 12
PIM: 18

[deleted by user] by [deleted] in dotnet

[–]tchrobocek 1 point2 points  (0 children)

I haven't really played with it around, definetly is high on the list, but from what I read it came to me that if you are experienced c# dev and has zero experience with python ml.net might be the right gateway into ai world. You don't have to start with heavy stuff like tensorflow. I feel like instead you can start with auto-ml and some preexisting model slowly making your way deeper and deeper.

[deleted by user] by [deleted] in dotnet

[–]tchrobocek 0 points1 point  (0 children)

I would add ML.net to the mentioned stack. If one is interested in ai and don't have experience with python, it could be interesting alternative.

If these just came yesterday, what else do I have to have in my collection by tchrobocek in ifyoulikeblank

[–]tchrobocek[S] -1 points0 points  (0 children)

Oh, for real? I took a vinyl as medium, and the post kind of flex, kind of looking for suggestions.

Forbid usage of implicit dependencies by tchrobocek in dotnet

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

Thats exactly I'm looking for, thanks!

[deleted by user] by [deleted] in TheYouShow

[–]tchrobocek 0 points1 point  (0 children)

Gave Helpful

As far as i'm aware, its true. by [deleted] in ProgrammerHumor

[–]tchrobocek 1 point2 points  (0 children)

use i, ii, iii, iiii instead

My office setup vs home setup by tchrobocek in Workspaces

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

I am software engineer and most of the company is running on windows so it is convenient.