Live data from Hacker News

The Case for C# and .NET

chrlschn.medium.com

151–160 of 376 posts

Re: The Case for C# and .NET

#151

Earlier quoted context omitted.

> dead to students or any new users because nobody is going to fork out a couple hundred $ As all JetBrains products, it's free for students, open source projects, and classroom assistance, and training courses. https://www.jetbrains.com/rider/buy/#discounts And it includes an excellent debugger.

.NET student (aka newbie) student in school And please stop this fake reality bullshit. NOBODY, not a single freaking person who wants to learn a new language will start off by searching the internet for an IDE and debugger where they can apply for a free license and then wait a few days so they can try it out. That is just ridiculous to even suggest. If one wants to learn a language they download the SDK, open VS Co…

> NET student (aka newbie) student in school

Then you should say: "a person who just starts with .Net".

> And please stop this fake reality bullshit. NOBODY, not a single freaking person who wants to learn a new language will start off by searching the internet for an IDE and debugger

I started with .net only 4 years ago. I went ahead and got myself Rider because I dislike VS Code and I already had 6 years experience with other JetBrains IDEs.

Oh look. I'm that "no single person" who went ahead and looked for an IDE. And bought it

> Let's stay real please okay.

Screaming nonsense at the top of your lungs doesn't make you any closer to reality.

Re: The Case for C# and .NET

#152

Earlier quoted context omitted.

I tried writing a simple crud api with asp.net, which should parse and respond json. It was the worst development experience I ever had while writing json apis. Validation? Not existent. OpenAPI/swagger documentation generation? Not existent. Then it also tried to force me into using MVC, while acting that it is express with its middlewares. I switched back to node.js with fastify and wrote my app in an hour. I reall…

As a C# developer I could say the same about my experience dealing with my first foray into [insert random language] and my attempt to develop [something with a non-trivial framework]. The issues you had could be attacked by navigating through this section of documentation, diving into the tutorial referenced in the beginning of the Overview section and the subsequent sections: https://docs.microsoft.com/en-us/aspnet…

I’ve been a C# developer for a decade and I still think it’s hopelessly convoluted for getting very simple things up and running. Maybe there is something wrong with me, but it’s just not intuitive to me and it has frankly never been. I do think the move to core and then core to .net has improved things, but it’s still a really weird and way of doing things compared to other languages that I have worked with, and most of the “boiler plate projects” are very rarely useful, so why are they there?

Then once you need to go beyond the standard libraries it becomes a nightmare to deal with. In some cases, like extending the AD libraries, it’s sort of easy to extend classes with methods but the documentation on how to do so tends to assume a lot of domain knowledge. In other cases like if EF’s standard functionality isn’t enough for you, or you need to deal with weirdly formatted XML or non standard SOAP requests (don’t ask) it can be such a nightmare that it’s sometimes easier to write a micro-service in another language to do the “translation”.

I think it speaks of a language that doesn’t see too much use by its own creators. I may be wrong on that, but having build a lot of things for Azure, Typescript has often felt more like a first class citizen than C#. Obviously not for everything, far from it, but sometimes and those sometimes are enough to make C# troublesome because unlike things like typescript that are great second class citizens in the Microsoft ecosystem, C# isn’t. It either fits really well or you have to fight it.

Re: The Case for C# and .NET

#153

This thread shows there is still a large amount of FUD around .NET and it’s community. Folks here still think it’s Windows-only and comparable to Java. Yet latest TechEmpower benchmarks shows .net running on Linux and being faster than Go, Python, Node, and Rust.

Until Microsoft can match the dev experience of writing front and backend in typescript with pnpm, I’m not touching the dotnet/nuget cli(s) with a 10-ft poll. If you want to write C# just write go

> If you want to write C# just write go

I don't get this. If you want to write C#, write C#. If you want to write Go, just write Go.

Go is a great language because of its simplicity and ecosystem, has lots of useful things in the standard library, has pretty good runtime performance and also compiles to static executables easily (which is especially useful for projects like Nomad). It's both a good fit for web development, as well as writing smaller or larger utilities. Honestly, its packaging situation is leaps and bounds ahead of something like Python, so I predict great future for it in DevOps too.

C# is a more advanced language with a rich history and a lot of the functionality for web development in particular coming as first party packages. Some of that historical baggage weighs it down and the complexity can be annoying, but ASP.NET Core, EF Core, Kestrel and many other components are great. Plus, running on *nix is good, even though the single executable/runtime/deployment situation isn't quite as easy as with Go.

Write code in whatever technologies work for you. My caveat to add would be that I'd (almost) always develop front end and back end separately, since the React/Angular/Vue webapp really shouldn't care much about what technologies are behind the APIs. Of course, being able to use a single language for both FE and BE development is also a worthwhile approach!

Re: The Case for C# and .NET

#154
post #52
post #5

> For the front-end, JavaScript is unavoidable (for now) Author really needs to give Blazor a try. I wrote some comments last week speculating that I'd use Dart or TypeScript with C# .NET on the client because WebAssembly doesn't do DOM manipulation, but turns out I should have waited to learn it better before making a comment. I've learned I can add events and event handlers to elements without ever leaving C#. Then…

> Blazor is in development and will only get better. How good can it get though? Blazor WASM suffers from the huge initial, multi-megabyte download of the .NET runtime. How is that expected to come down to something in the range of 50-500kb what we have with most JS frameworks now? I just cannot do that on public-facing parts of an application. It is unusable when accessed from a slow mobile network. Company-internal…

I know I'm coming across ad a blazor fanboy, but I'm curious what made you feel like server side was an afterthought?

The biggest way server side fucked us was originally db contexts are bound to scope via IOC in asp.net similar to MVC or razor pages.

Which is fine when your scope is a single request, but when the scope is a circuit you get so many weird fucking errors. We worked around this by disabling tracking. But the right fix is we should have used factories, but we didn't figure this out until it was too late and we had written a fuck ton of code.

This is such an obvious issue and should have been in the docs but wasn't.

But other than that it seemed fined.

Re: The Case for C# and .NET

#155

Earlier quoted context omitted.

> dead to students or any new users because nobody is going to fork out a couple hundred $ As all JetBrains products, it's free for students, open source projects, and classroom assistance, and training courses. https://www.jetbrains.com/rider/buy/#discounts And it includes an excellent debugger.

.NET student (aka newbie) student in school And please stop this fake reality bullshit. NOBODY, not a single freaking person who wants to learn a new language will start off by searching the internet for an IDE and debugger where they can apply for a free license and then wait a few days so they can try it out. That is just ridiculous to even suggest. If one wants to learn a language they download the SDK, open VS Co…

> And please stop this fake reality [...]. NOBODY, not a single freaking person who wants to learn a new language will start off by searching the internet for an IDE and debugger where they can apply for a free license and then wait a few days so they can try it out. That is just ridiculous to even suggest.

I actually did. JetBrains products were really nice to try out whilst studying in university and eventually lead to me purchasing the ultimate tools package for any personal or professional projects that I might want to do.

It's really amazing to have the same set of tools for almost all of the languages that you might want to work with, that work consistently across all of the OSes that you might use. Normally I avoid paid software because of the vendor lock in, but a lot of the time it feels like JetBrains are just the company that you should reach for to avoid headaches, for better or worse.

For comparison, in the Java ecosystem, you also have Eclipse which has performance problems and an odd/unstable plugin ecosystem (though some swear by it) and NetBeans which has been handed over to Apache but doesn't really get much love or attention towards its development at all. Of course, some might use Visual Studio Code or another text editor with plugins but not being able to do refactoring across a project with 4000+ source files makes that approach dead on arrival for me, for all but the smallest projects.

The situation is pretty similar in regards to C#: you have Visual Studio which limits the platforms, JetBrains Rider which is a paid project, Visual Studio Code plugins which are insufficient and also something like MonoDevelop, which has pretty much been abandoned.

Re: The Case for C# and .NET

#157

This thread shows there is still a large amount of FUD around .NET and it’s community. Folks here still think it’s Windows-only and comparable to Java. Yet latest TechEmpower benchmarks shows .net running on Linux and being faster than Go, Python, Node, and Rust.

Coming from Java, Go, and Javascript, C#/.net just plain sucks. Things that should be simple, e.g. Collections APIs.. aren't. I stopped trying after this realization. I preferred the C# from 15 years ago compared to whatever is going on over there at present. If you're already indoctrinated into the ecosystem, I'm sure it's fine. Otherwise, buckle up - things are going to get choppy.

How are collections in C# worse than in Go? In C# you have LINQ, in Go you're writing for loops around array slices.

Re: The Case for C# and .NET

#158

I also think that C# and .NET are awesome. Especially latest releases dotnet 6 and upcoming 7 have a ton of new things to be even more productive. I like the fact, that you can develop command line apps, Web APIs, Desktop Apps and smartphone apps all with the same toolset, including the fact that deployment is possible on nearly every major platform for every major platform (except iOS and macOS Apps, as always only…

> I don't like Visual Studio as IDE, but VS Code is an acceptable alternative tool, although I personally prefer the non-free JetBrains Rider.

I've used Visual Studio for 20 years now, and while the tooling has come a long way, I'm starting to feel like MS and the community are abandoning it for VS Code. I don't mind VS code, but unfortunately the stack I'm working in (Dynamics 365) requires plugins for Visual Studio that tend to lag behind the release cycle of Visual Studio versions by a few years. I use Rider for .net core projects on my mac and it's fantastic.

In fact my biggest criticism of my day to day job is Microsoft's support for this incredibly enterprisey framework I have to work in.

Re: The Case for C# and .NET

#159

Earlier quoted context omitted.

Coming from Java, Go, and Javascript, C#/.net just plain sucks. Things that should be simple, e.g. Collections APIs.. aren't. I stopped trying after this realization. I preferred the C# from 15 years ago compared to whatever is going on over there at present. If you're already indoctrinated into the ecosystem, I'm sure it's fine. Otherwise, buckle up - things are going to get choppy.

How are collections in C# worse than in Go? In C# you have LINQ, in Go you're writing for loops around array slices.

Maybe I was using it wrong? As I recall, "the usual" APIs present in most other OO languages were not available when I tried to help a friend with a project 3 montjs ago.
Post reply on HN