Live data from Hacker News

.NET 10

devblogs.microsoft.com

271–280 of 605 posts

Re: .NET 10

#271

Earlier quoted context omitted.

Moq, lots of PDF libraries, Avalonia, Automapper, MediatR, MassTransit,Telerik stuff,etc. I'm not inherently against it, we have a problem with opensource being asymmetrically underfunded and if people going commercial is the cost perhaps we've failed.

There are a few non-paid PDF libraries, but that is the biggest pain point in .NET, anytime you need advanced features for PDF, you're better off paying for a license (it's just insanely expensive unless you're a large company). Having worked on some basic parsing of metadata from PDF spec, I would rather pay than have to code something myself. PDF is such a PIA.

I've used libqpdf extensively from C++/CLI with excellent results, but since C++/CLI is deprecated-ish and Windows-only, I wouldn't disagree with PDF being a pain point, and if I get the time, a cross-platform open source .NET wrapper for libqpdf is at the top of my list of potential projects.

libqpdf also intentionally limits its scope to PDF structure, so doesn't address nontrivial content creation or manipulation (page content handling is pretty much limited to compressing/decompressing and parsing/unparsing the content stream).

Re: .NET 10

#272

Earlier quoted context omitted.

You might want to read https://learn.microsoft.com/en-us/dotnet/core/deploying/nati... Publishing your app as Native AOT produces an app that's self-contained and that has been ahead-of-time (AOT) compiled to native code. Native AOT apps have faster startup time and smaller memory footprints. These apps can run on machines that don't have the .NET runtime installed.

There are quite a few gotchas for this, especially web apps. THis is understandable because it was added after the fact, vs. a first-party design requirement. It's cool and might work for you, but taking a non-trivial .net codebase to native AOT can be tough, and if you're starting greenfield, why go .net?

Sure, legacy applications won't be easy to move over but Microsoft has been quite consistent in working towards making microservice applications easy to build and run with AOT by moving more and more components over to using source-generators and promoting minimal-API's.

Their target is probably not entirely greenfield projects (although I wouldn't mind it myself), but rather those with existing investments that start new projects that still want to share some parts.

Re: .NET 10

#273
post #2

For us, every .NET upgrade since .NET 5 has gone surprisingly smoothly and reduced CPU/RAM usage by 10–15%. We were even able to downgrade our cloud servers to smaller instances, literally. I wish .NET was more popular among startups, if only C# could get rid of the "enterpisey" stigma.

I think the key problem is that a large number of startups are shipping software in containers, and dotnet requiring a CLR is not particularly well-suited for containerization. It's like the old school Java JVM model. You have to ship a copy of the runtime with every container, and if you're doing proper microservices it's an awful lot of overhead. Yes I'm aware MS makes it easy to build containers and even single ex…

[deleted]

Re: .NET 10

#274

Earlier quoted context omitted.

Previously, if you wanted to add that Trim in, you needed to define the field behind. You could have: public string Name { get;set; } Or you could have: private string name; public string Name { get; set { this.name = value?.Trim() ?? string.Empty; } } So you needed in the second case to also declare name as a field. The new syntax avoids having to do that "double" declaration.

> The new syntax avoids having to do that "double" declaration. Yes, that's right. It is in other words a way to access the compile-time generated backing field for auto-implemented properties. It is quite nice to be honest, I just wish they presented a bit of context in their announcements.

They provide a bit more context around changes in their "What's new in C# 14" page:

https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/cs...

Re: .NET 10

#275
post #172

Earlier quoted context omitted.

It's good for, and I am not being sarcastic or snarky, justifying high pay and gate-keeping. Developers should set up more barriers for entry - look at doctors and lawyers.

I think I agree with you. When I was part of a growing F# team a number of years ago, everyone we hired was an enthusiast who just loved coding in F# and wanted an opportunity to do it professionally. It turned out that this love, combined with the constraints of the language, led to a super-clean and legible code base. The quality was (in my estimation) outstanding, and I was sad to leave it.

As an F# lover my heart sank at that "it turned out" at first. I'm glad someone got to live the dream somewhere haha

Re: .NET 10

#276
post #2

For us, every .NET upgrade since .NET 5 has gone surprisingly smoothly and reduced CPU/RAM usage by 10–15%. We were even able to downgrade our cloud servers to smaller instances, literally. I wish .NET was more popular among startups, if only C# could get rid of the "enterpisey" stigma.

I think the key problem is that a large number of startups are shipping software in containers, and dotnet requiring a CLR is not particularly well-suited for containerization. It's like the old school Java JVM model. You have to ship a copy of the runtime with every container, and if you're doing proper microservices it's an awful lot of overhead. Yes I'm aware MS makes it easy to build containers and even single ex…

[deleted]

Re: .NET 10

#277
post #121

Earlier quoted context omitted.

If you can justify with good reasons why you absolutely need this other tool then that's fair game - hence the data science example where I allow for specialists to use specialized languages for specialized tasks. I'm talking about general software development and web dev in particular. There's a trend where you'll see one org has or web app using .net ad react, another using next.js, another using Java and Vue, one…

>> And there is literally no reason for any of these choices I'm a manager now but definitely held a variation on this "people are idiots" view when an IC and younger. Question: are all your coworkers idiots? No? then why would all the work done before you be the product of idiots? I found it really valuable to approach scenarios where the initial response is "how could this possibly happen?" as a cultural anthropolo…

Some of my coworkers are awesome. Super talented, super smart people.

But most developers are pretty bad. I see a lot of developers who hardly do any work at all, and many who do lots of work but it's all trash. Buggy, overcomplicated, untested, dumb pointless decisions.

Like my current project. Two guys started it - .NET backend, React frontend. Sure, fine. But let's use Azure functions for the backend instead of a regular web api. What. We asked them why, no reason. And their whole codebase was trash, I've deleted about 90% of the code that they had written and I'll delete the rest too.

I've also been in a team that had the problem I highlighted in the OP. 20 different apps, 10 different JS frameworks etc. Speaking as someone who worked on these apps, there was absolutely no reason to choose one JS framework over another. I could have made them all in React no problem, they're just websites, not much more than glorified PDFs. How you generate the html is irrelevant. And the code was mostly trash. Overcomplicated, buggy, untested etc.

I did struggle with this early in my career - am I just a narcissist? Everywhere I turn the code is just trash, maybe I'm the problem? But now I've worked with people who do good work. I've seen my own ideas work in practice. I know for a fact my judgement is good.

In university I was the one who helped everyone else. I was always ahead, while my peers could hardly keep up. When we graduated a lot of them would have struggled to solve fizzbuzz in 20 minutes, yet we all have the same degree. No wonder there's so much trash code around.

Re: .NET 10

#278

Earlier quoted context omitted.

> The new syntax avoids having to do that "double" declaration. Yes, that's right. It is in other words a way to access the compile-time generated backing field for auto-implemented properties. It is quite nice to be honest, I just wish they presented a bit of context in their announcements.

They provide a bit more context around changes in their "What's new in C# 14" page: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/cs...

This is great thank you.

Re: .NET 10

#279
post #203

Earlier quoted context omitted.

They're self contained and native, but they're still massive. There's been some work on CoreRT and a general thrust to remove all dependencies on any reflection (so that all metadata can be stripped) and to get tree-shaking working (e.g. in Blazor WASM). It seems like in general they're going in this direction.

Smaller is better, of course, but I've never found the size of .NET binaries to be an issue. What problems does this cause?

If you're trying to pack hundreds of microservices into a cluster, having containers using 80MB of ram minimum instead of 500KB can become a big deal.

Re: .NET 10

#280
post #81
post #47

Earlier quoted context omitted.

As a startup, what is it in for me to switch from Java, Spring Boot, Hibernate, Beam, Flink, Pulsar, Vault, KeyCloak ecosystem to C#.Net? Is the documentation better? Do I get better performance? Is the community larger and more stable?

Vault, Keycloak, Flink are language agnostic or there exist bindings for most popular languages. Documentation is vastly better compared to Java ones, it's like day and night, LINQ is vastly superior to anything that Java offered - but i haven't used java in a very long time. And every time i had to write java it felt like i went backwards in time by 5-10 years. If i remember right Java's webserver beats ASP.NET in p…

> Documentation is vastly better compared to Java ones, it's like day and night

This is absolutely not my experience, especially when it comes to the ecosystem and third-party libraries. Like Java is pretty much the best in this category.

Post reply on HN