News for hackers. Stuff that matters.

pinetlk

Re:.NET Myths Dispelled on Sunday March 13, 2022 @07:47AM (#30660411)
No it is definitely very slow. Stackoverflow did a test once, and switched to their light-weight ORM. The thing is, you mention disabling change tracking, and then there are things like having to make sure you aren't accessing a field that is outside of the included fields to prevent multiple queries, etc, etc. When I write SQL, I just write it once, and then it lives forever going very fast. When I look back on the projects written in EF/Linq, they are still going year after year, still using up lots of resources. I could have just written them in SQL. Maybe it would have taken an hour more over the entire project (internal enterprise thing), but it would still be running to this day, quickly and efficiently.
Re:Tell HN: China Is Entering Lockdown on Sunday March 13, 2022 @07:38AM (#30660355)
It seems the 0-covid policy is a negative consequence of having so many people so close together. It changes the dynamic of infectious diseases so that you suddenly have 100k people die instead of 100. Still, I am strongly against lockdowns and mandates and so on. The cure is much worse than the disease from my perspective. I have no concern over covid, all of my concern is over what the government will do next. Will I be allowed to go to the gym, which is essentially a life-line for me? They closed those for months last time.
Re:.NET Myths Dispelled on Sunday March 13, 2022 @07:31AM (#30660318)
>Entity framework is one of the best ORMs

Yes, I think it is the best ORM in terms of productivity, but it is very, very slow. This is usually not a concern for internal enterprise applications that only have a few people using them at a time though. I guess the other issue is just an issue with ORMs in general - you lose a lot of the in-built features of your sql database, which as projects progress, can ultimately result in you writing the same amount of code as if you didn't use the ORM.

You also can't switch programming languages without rewriting the entire database section. Personally, I stopped using ORMs altogether because I find that they make easy things a little easier, and hard things harder, which isn't a very good value proposition overall. They don't really save me time anymore.

Re:The case for induction cooking on Sunday March 13, 2022 @07:24AM (#30660284)
I have an induction stove. It works (fine-grained temperature, fast heating, easy cleaning, no heat in kitchen) but I find stove cooking in general to be unsatisfying. It just seems like a very tricky way to cook food. For starters, you have to use some kind of oil, and most oil is not even good for you when heated at high temperatures. I would much prefer to cook everything on a bbq or some kind of oven method. That bbq taste is so obvious and special, and oven cooking is so easy.
Re:Storing UTC is not a silver bullet (2019) on Sunday March 13, 2022 @07:19AM (#30660256)
The tricky part is the conversion process from the server to the client. As JavaScript doesn't have any way to make dates with specific timezones other than the local timezone, you have to do some things to make up for it.

In my last project, I convert the time using the timezone information I have stored by doing t at time zone x in postgres, so that it shows the time at that location, but then when it gets to the client, the actual Date object underneath is in the local timezone, even though it is displaying the time in a different timezone. It doesn't really matter because it is just for display purposes essentially.

When I send the time back to the server, I strip the timezone information from the date object and add in my own timezone information to a newly created string in a postgres-specific format and send it back.