Hacker Newsnew | past | comments | ask | show | jobs | submit | functionstooge's commentslogin

I haven't used it for years and I have never looked back! Even in extremely large systems, manually writing a mapping layer is quick (although admittedly obnoxious) and has helped me identify issues so much easier.


It's been many years since I was a (.NET) developer and therefore since I used automapper. Are there any VS plugins that take the tedium out of this mapping? Right click on a class, choose a class to map it to, and it creates the boilerplate code for the mapping layer?



I'm curious, why would this be bad? I've generally always seen it as best practice to create classes in your domain model and try to write your ideal code and then have separate classes/DTOs that are used for communicating outside your domain model such as reading/writing to a database using an ORM or responding from an API with your ideal model for the consumer (since more often than not consumers don't need or want all of the cruft inside the domain model and your DB will likely have stored the information in a different format in a large system). I always love thinking of ways to simplify architecture though and I absolutely hate having classes/records that looks so similar though so I'm intrigued about a simpler solution if there is one? Domain Driven Design practices really encourage a bloated/complex architecture so I try to avoid it if possible but more often than not business requirements end up becoming so complex that I immediately fall back to those abstractions when the logic starts to get complex.


Abstractions are useful to make a box and put horrors of edge case handling or business requirements variability in it :)

But if there are little of those, no need to make them prematurely. Field mapping is something for EF Core mapper configuration or repository implementation to worry about, no need to do the job twice.

You often don't need separate "Host" and "Core" projects either. And if you ever need to migrate to a new hosting solution, it happens maybe once during application lifecycle, and even then it requires some effort.

Replace-all and IDE tools work just as fine if not better for this, no need to inflict easily avoidable pain simply because it looks consistent with "other" solutions that were written 10 years ago.


The amount of time C#/.NET developers waste on abstracting away all kinds of shit, creating three different layers for "separation of concerns", having 10 projects in some basic web app solution.. my god, they truly are suckers for punishment.

Yeah mate, let's create a generic repository over the top of EF's perfectly decent DbSet<T>, just in case we ever decide to switch ORMs!


> customers don’t need or want all of the cruft inside the domain model and your DB…

Why would the customer need to know about the cruft? The view/UI shouldn’t be exposing what’s not needed. Same with the DB, frameworks like MyBatis put the mapping where it belongs.


The 2 things aren't mutually exclusive. Because it reduces complexity you will likely see a financial benefit from the cost of the engineering team alone. Having managed an infrastructure with a ton of subdomains I can say that it's almost certainly in their best interest to standardize the domain across all tools at least for engineering. Your data is just an added bonus :)


I've found the thing that works for me to do is to log every single bit of food I eat from the office.

I keep measuring cups in the office kitchen and a food scale to weigh my food. If you're eating premade food that doesn't have a label, it makes it a little more difficult to count but apps like MyFitnessPal suggest similar items that make it easier to get a rough estimation of how many calories you're ingesting as well as how the macros break down for the items.

Luckily for me, my office tends to buy a lot of prepackaged items that have labels I can scan into the app to record everything but even then it can be hard to be precise. I've found that forcing myself to log the food I eat makes me think twice about going after the junk food and snacks. Also, the data you'll collect will be invaluable if you're tracking your weight as well and you can play around and see what calorie levels/macros work best for you.

As a side note, intermittent fasting has worked wonders for me when trying to cut weight. It makes it almost difficult for me to go over 1800 calories.


It definitely depends on how it’s cooked. I’ve had quite a few of these and certain places tend to make them oily. I’ve found that to be the case when ordering a Beyond Meat patty as well from Carl’s Jr./Hardys even though they aren’t nearly as oily when I make them myself.


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: