Cyno

joined 1 year ago
[–] Cyno@programming.dev 2 points 2 months ago

Yeah I'm the same way, there is a 6h video linked in your post but i can't imagine myself actually going through it like that lol. I'm also in the process of trying to move data and media off my main PC but haven't figured out the best way yet, I have an older laptop that I was considering setting up as a mini pc/home server but then there's also the option of buying a NAS... it gets complicated and more expensive fast either way.

[–] Cyno@programming.dev 2 points 2 months ago (3 children)

Can you elaborate? Googling linux vfio just gives me text heavy documents I dont understand. How does that replace dual booting and how would I use it?

[–] Cyno@programming.dev 2 points 2 months ago (2 children)

Oh didn't see that one, thanks! Of all the advice there did anything stick with you and help in the end?

[–] Cyno@programming.dev 6 points 2 months ago* (last edited 2 months ago) (14 children)

But to truly master Linux, you need to understand its internals, like how the system boots, how networking works, and what the kernel actually does. In this third edition of the bestselling How Linux Works, author Brian Ward peels back the layers of this well-loved operating system to make Linux internals accessible.

Isn't it too advanced? Seems like a good book but like the opposite of what I meant - I'm curious about beginner resources that will get people interested, knowledgeable and comfortable about using linux on a daily basis as much as they are with windows after decades of using it, not to turn them into a "superuser familiar with internals like kernel, networking, LVM".

[–] Cyno@programming.dev 2 points 3 months ago (1 children)

Well mocking a repository is pretty much the same process as mocking the dbcontext too, right? If that's the only purpose then I can see why they would seem unnecessary

[–] Cyno@programming.dev 1 points 3 months ago* (last edited 3 months ago) (1 children)
  1. but if I do it on the repository layer I have to have a separate method for every possible filter combination, right? if i want to do it on the service layer i have to return an IQueryable which is also allegedly a bad practice (and i might as well return the entire dbset at that point)? also, should the repository be aware of my application (or even view) layer dto models?
  2. this means the service has direct access to the database (dbcontext in this case)? or do you expose opening a transaction through some repository too?
[–] Cyno@programming.dev 1 points 3 months ago (1 children)

Additional question - I said at first that the "Service" should be doing the mandatory checks like uniqueness validation or whether the fields are filled in properly with good values, but is even that a good approach?

Instead of implementing this in every service that might create a new Movie (and it could be from different sources - import from file, different APIs, background worker, etc), wouldn't it make more sense to add these checks to the repository itself so they always gets called?

Alternatively, do we have to handle a constraint violation in every service or could we just have the repository return a result with failure if it happens?

In short, once I start thinking in this way I start to wonder why even have a separation between repository and service.

[–] Cyno@programming.dev 3 points 3 months ago* (last edited 3 months ago) (2 children)

I'm not that familiar with newer c# code and only recently started with result pattern but tbh, I can't tell what is this code supposed to do. Does opt resolve to true or false in this case? Why do you want TestStringFail to always execute, and what should it return? Why is opt.None true when it was initialized with a valid string value, what does None even mean in this context?

[–] Cyno@programming.dev 1 points 3 months ago* (last edited 3 months ago)

Saying I learned it is a stretch, we still dont use it at my workplace and I just read some random guides and tried it on my personal projects. I also wouldn't know about using it in frontend, I mostly just use it to make it easier to test my backend (c#) methods during development without having to struggle with setting up reproduction steps and go through the entire frontend every time.

https://learn.microsoft.com/en-us/visualstudio/test/quick-start-test-driven-development-with-test-explorer?view=vs-2022

[–] Cyno@programming.dev 1 points 3 months ago

Good point, that sounds nicer than just encoding the name for sure, thanks

[–] Cyno@programming.dev 1 points 3 months ago

Sure, but whoever's fault it was didn't really matter to me at the time. I just remember being annoyed at everyone constantly praising linux and saying how easy it is nowadays while I'm just jumping from one issue into another, that experience made me delay moving my main PC to it since I also have an nvidia GPU there. Had to go through like 3 different ways of installing drivers, various weird containers or bottles or wine and lutris or proton just for it all to constantly freeze or crash my PC.

It was a Dell laptop, not sure about specs but it's at least a few years old model, nothing too high end. The plan was to keep it as a small home server for hosting various stuff, services, media in the end, with varying success.

[–] Cyno@programming.dev 5 points 3 months ago (2 children)

I was so excited about Mint, seemed like the perfect distro to try but then I had nothing but issues on an laptop with nvidia. PopOS worked better right out of the box though

view more: ‹ prev next ›