83 karma · joined May 24, 2023 (3y ago) · 41 submissions
comment 2y ago · link · parent
>I'm sorry for any confusion, but it seems there might be some mix-up in your query. The year 1979 does not have a widely recognized event matching your description, and "TS" and "Cydonia" do not correspond to any known geopolitical locations or events in historical records. "Cydonia" is often associated with a region on Mars that has been subject to various conspiracy theories, but it doesn't relate to any political events or protests.
>If you're referring to a specific historical event, it could possibly be the Tian
comment 2y ago · link · parent
https://learn.microsoft.com/en-us/ef/core/querying/single-sp...
comment 2y ago · link · parent
If you really need the branded type, in that you're inheriting from a base type that does more things than your child type.... you straight up should not inherit from that type, you've made the wrong abstraction. Wrap an instance of that type and write a new interface that actually makes sense.
I also don't really get what this branded type adds beyond the typical way of doing it i.e. what it does under the hood, type Hash = string & { tag: "hash" }. There's now an additional generic involved (for funnier error messages I guess) and there are issues that make it less robust than how it sells itself. Mainly that a Branded<string, "hash"> inherits from a wider type than itself and can still be treated as a string, uppercased and zalgo texted at will, so there's no real type safety there beyond the type itself, which protects little against the kind of developer who would modify a string called "hash" in the first place.
comment 2y ago · link · parent
The only upside of NoSQL is performance. Almost everything else is harder and worse than SQL. Sure you can get your denormalised schema and never have to join anything to get all your data. But, you need to know all of your access patterns at design-time and when you need to refactor the data model in some way you're fucked and need to, I dunno, rewrite an entire table, sometimes on the fly while the system is running, which is like changing a tyre on a moving car.
comment 2y ago · link · parent
The house isn't being lived in, rental income could easily pay for temporary accommodation, or it could be shared with roommates etc.
comment 2y ago · link · parent
YouTube doesn't really care if the search function gives you the right or wrong search result. Totally irrelevant as long as you click something, anything and your eyeballs are on the next ad. YouTube is optimised for keeping you watching ... literally anything... as long as they can play you some ads, preferably expensive ads.
comment 2y ago · link · parent
back to normal slight tinnitus once removed. very easy process.
comment 2y ago · link · parent
As soon as you have your services suddenly hooked up to something else - chron (or hangfire or whatever) jobs or a message bus - it gets a bit weird because your service layer thinks you're still responding to an HTTP request and whoever works on the service now has to think about HTTP as well which is pretty fucking bizarre to begin with.
And your unit tests for a business logic service method are gonna look at HTTP errors? It feels dirty, but not in a fun tap-your-nose way.
It's really not hard to just return errors relating to what actually happened (can't find user by id, user is blocked from logging in, whatever) and have the app's ingress points (API controllers, message handlers, job runners) decide how to surface that in a way that makes sense for the specific interface.
comment 3y ago · link · parent
comment 3y ago · link · parent
If I tell you that this week it's raining on Monday, raining on Tuesday, raining on Wednesday, etc..
Compressing that information into "it's raining every day this week" requires creating an abstraction around it. Finding a pattern. Producing more order from something more chaotic.