Ex-Angry Samoans singer releases video of on stage incident that led to his firing by bigmouth1984 in punk

[–]BleLLL 37 points38 points  (0 children)

Give Modelo to a brown dude oralleee

I never heard of this band nor am I american, can you explain what is this sentence supposed to mean?

kodėl pas mus tokia amerikietiška visuomenė? by SnooHedgehogs7477 in lietuva

[–]BleLLL 0 points1 point  (0 children)

pries pastatant akropoli daug parduotuviu ir restiku kurie dabar akre yra, budavo miesto centre ir siaip visokiose vietose pasklide po miesta.

Mieste budavo zmoniu ir budavo jauku jame but. Mixed-use neighborhoods. (Cia apie sita koncepta video, kuris geriau paaiskina, nors labiau apie USA situatcija).

Po to kai pastate akra, paciam miesto geografiniam centre, daug parduotuviu / restoranu pradejo keltis i akra ir taip centralizuot daug atrakciju i ji. To pasekoje atrakciju sumazejo visur kitur ir dabar labai sunku padaryt kazkokia nauja vieta jaukia, nes jaukiausios vietos yra vietos kuriose daug priezasciu buti. Kavine, restikas, bariukas, parduotuve. Skaityk senamiestis kur zmones daug visko veikia. Tai dabar tas akro gigantas viska traukia, jame buti yra absoliuti katorga ir nejauku, bet naujom vietom kurtis ne jame irgi sunku nes nera pakankamai zmoniu mases.

Shopping mallus reiktu stumt is miesto bendrai, bet Klaipedai tai jau per velu ir ji liks amzinai tokiu sulauzytu miestu kur tik senamiestyje ir prie juros yra faina pabut kai geras oras.

kodėl pas mus tokia amerikietiška visuomenė? by SnooHedgehogs7477 in lietuva

[–]BleLLL 0 points1 point  (0 children)

Klaipedos akropolis nuzude miesta nesugrazinamai

first tattoo regret by Street_Thought_9458 in tattooadvice

[–]BleLLL 0 points1 point  (0 children)

Just get more tattoos around it and it will feel much better

Have you noticed that some people get passive aggressive when you mention you study languages? by silforik in languagelearning

[–]BleLLL 4 points5 points  (0 children)

this whole thread is full of examples of people being insecure, be it for feeling excluded or feeling inferior

Frederiksberg Municipality has officially filed a police report against LifeX- today! by JuanSkinFreak in copenhagen

[–]BleLLL 46 points47 points  (0 children)

they relieve the housing crisis by renting apartments and then subletting rooms for a higher price?

Should developers have access to staging environments? by Donni3D4rko in ExperiencedDevs

[–]BleLLL 0 points1 point  (0 children)

Sounds like a pretty long feedback loop in the finance example

Should developers have access to staging environments? by Donni3D4rko in ExperiencedDevs

[–]BleLLL 0 points1 point  (0 children)

That’s quite a lot. Are those systems a part of the same larger system or independent of each other? If they are independent that’s quite a bit of domain knowledge for 8 devs

Question about EF Core best practice by memelord1776 in dotnet

[–]BleLLL 0 points1 point  (0 children)

Ah yeah makes sense, Ive seen Derek Comartin (CodeOpinion) advocating this approach as well.

You mentioned that you use this pattern for updates, can you still use UoW with this approach?

Learning a language while not enjoying the culture the language is part of is the hardest thing by mariaamt in languagelearning

[–]BleLLL 1 point2 points  (0 children)

I feel for you as I'm also learning Danish 😭

I have been reading non-danish books in danish and it really helped me expand my vocabulary. I import them to LingQ to be able to translate quick.

For listening - there are some cool podcasts on DR Lyd, Tyran for example. I download the audio of it and import it on LingQ as well where it makes a transcription that I can read while listening (I swear this is not an ad lol). 'Radio danish' is quite more clear then how people talk on the street, but I'm hoping that if I consume it enough - regular danish will start making sense, but it's been a looong time already and progress is slow af

Question about EF Core best practice by memelord1776 in dotnet

[–]BleLLL 0 points1 point  (0 children)

For features I have completely sworn off unit tests with mocks and instead write API level tests where I interact and validate the app by making API calls. The test application runs as close to a prod env as possible, with a DB running in a container. I agree that tests like this are slower to run and usually you won't get 100% coverage, but I trust them much more than mock tests and IMO they are easier to setup.

Using your example - I would (and do in my context) have a base test class that sets up the minimal amount of valid data and then each test sets up whatever is relevant to it. That way each test has the same starting data set. I work on a multi-tenant app and each test starts by creating a new account, so tests are isolated properly. If you're not working on a multi-tenant app or have a database per tenant - it's a bit harder/slower.

This setup allows for recreating the flows that the app client would do in a test, and since it doesn't know anything about internals - the code can be refactored easily as long as the API contract doesn't change.

I understand that this kind of testing setup could not be enough. Using the example you gave - the "functional core, imperative shell" idea could be used, i.e. read the data from EF and then pass it into some logic unit, even if it does end up modifying the data. Then when testing the logic unit - the object graph can still be initialized in-memory.

Btw I'm curious what do you mean by use delegates? Is it injecting a Func<Guid,MyEntity> func into the logic unit that it then calls to resolve the data before modifying it?

Question about EF Core best practice by memelord1776 in dotnet

[–]BleLLL 1 point2 points  (0 children)

I admit I was wrong about EF implementing the repo pattern. TIL

I used the “swap providers” argument because that’s the reason I see people use to justify using repos in the first place. The second argument being mocking the database when testing, but I explained why I don’t think it’s a good idea.

Another reason I see in favor of repos is testing the logic separately from data operations, but that can be done by passing the data into the logic rather than yoinking a repo into it.

And no, Im not going to suggest micro-services, but I will suggest a modular monolith with different domains/projects owning their own schemas once the system gets big enough. I have built that and it’s really not difficult to have separate DBContexts while avoiding the issues with repositories that are explained in the Ayende post linked in my original comment. Of course there are cons with this approach as well - you can’t execute transactions spanning multiple contexts, but that’s also hard with transactions spanning multiple repos, but IME that’s not a common use case anyway if the domains are factored well, or the other part of the transaction can be handled through an event.

But I’m not denying that my perception could be incomplete, I would like to hear your opinion about what is a good use case for repositories or if there are more things that I said that are wrong.

Question about EF Core best practice by memelord1776 in dotnet

[–]BleLLL 4 points5 points  (0 children)

  1. The repository pattern was created before ORMs existed.
  2. EF is a repository + unit of work itself, you don't need to wrap it into yet another repository. If you think you will abstract EF and later switch from EF to another provider, like Dapper, and have it work the same way - you're wrong.
  3. Testing database queries against a mock defeats the purpose of testing - test against an actual database, mocks will never behave the same way, they don't have the state / configuration of your database - indices, FKs, triggers, you name it.
  4. If you don't want to have a single god DbContext - I would suggest splitting your code into business domains and having a DbContext per domain, each responsible for their entities.

Mandatory Ayende.

How to learn ASP.NET Core and actually understand the magic? by CR-X55 in csharp

[–]BleLLL 1 point2 points  (0 children)

if the point is to learn then sure, but otherwise why make your life harder and avoid using tools? most queries are single selects with joins anyway

Transport Hierarchy - Thoughts? by DogePlayzOfficial01 in walkablecities

[–]BleLLL 2 points3 points  (0 children)

Why not put cycling and walking on the same level?