News for hackers. Stuff that matters.
Re:Making life easier for newcomers to the .NET ecosystem by bob1029 on Monday November 15, 2021 @05:53AM (#29225944)
Getting productive and happy in the .NET ecosystem has a learning curve similar to that of Eve Online. There is this amazing world locked away behind a byzantine matrix of legacy bullshit. You could waste an entire month struggling with differences between legacy framework and new framework tutorials.

The branding is honestly trash. I feel like if C#10 and latest .NET framework were renamed to something completely different and relaunched under some new company, we wouldn't go a single day without it gracing the front page of HN.

What % of developers are missing out based on principles alone? Microsoft is certainly an oppressive monster but they arguably produce some of the best tools in town right now.

Re:Making life easier for newcomers to the .NET ecosystem by torginus on Monday November 15, 2021 @02:07PM (#29231257)
I just don't get why .NET is percieved as having a high learning curve - I mean it's probably non-trivial, but I hardly think getting into any other complex tech stack is easy.

For example, I'm a newly minted C++ programmer as of 2 weeks ago - while the language is not that easy, my biggest struggle was getting everything to compile and link, and I felt like it's in a different class of difficulty.

Another example, while node.js/Typescript is often seen as an easy language, I remember trying to set up webpack+scss+typescript+react+styled components + a zillion other made me very sympathetic towards Mr. Cobain's life choices.

And another thing - I don't get the Microsoft is evil angle - I mean they are certainly no saints, but neither is any other FAANG company.

Re:Making life easier for newcomers to the .NET ecosystem by bob1029 on Monday November 15, 2021 @02:28PM (#29231533)
> I just don't get why .NET is percieved as having a high learning curve

I feel like 99% of this is the historical perspective. If you dropped a totally new developer into a pure .NET 6 codebase w/ VS2022, I strongly suspect they would have a reasonable time of it.

IMO, senior developers who stopped following tech news are the primary reason the community has to struggle with this perception today. There are shops where legacy .NET Framework 4.x solutions are being spun up today for no reason other than ignorance has taken hold.

Arguably, the marketing disaster is still primarily Microsoft's fault, but I feel the community could do better with listening and adapting too.

Re:Making life easier for newcomers to the .NET ecosystem by jmnicolas on Monday November 15, 2021 @04:09PM (#29232790)
> There are shops where legacy .NET Framework 4.x solutions are being spun up today for no reason other than ignorance has taken hold.

I wish! 2 years ago we visited one of our providers and I soon discovered their solution was being actively developed on .net 3.5 and Visual Studio 2008.

To this day I still have to install .net 3.5 on our machines that use their software (.net 3.5 isn't installed by default on Windows 10) so I know for a fact they didn't upgrade.

Re:Making life easier for newcomers to the .NET ecosystem by torginus on Monday November 15, 2021 @02:38PM (#29231673)
That's understandable - I've just very recently had the 'privilege' of fixing something in a .net 4.5 project - everything, from the tooling, the testing, the baroque xml project format felt super complex, Visual Studio-centric and a huge downgrade from what I'm used to nowadays.
Re:Making life easier for newcomers to the .NET ecosystem by ethbr0 on Monday November 15, 2021 @02:42PM (#29231713)
Microsoft has a bizarre habit of overcomplicating every@&$1ing thing in their ecosystems.

I think because most of the features come out of customer request >> architecture plans.

As a result, you end up with a billion different weird behind-the-scene links and requirements that didn't have to be that way and consume unnecessary cognitive load when working with it.

Re:Making life easier for newcomers to the .NET ecosystem by the_only_law on Wednesday November 17, 2021 @12:59PM (#29256449)
> There are shops where legacy .NET Framework 4.x solutions are being spun up today for no reason other than ignorance has taken hold.

I’ve just about mentally broken down, unable to use the pattern matching features, among other features.

Re:Making life easier for newcomers to the .NET ecosystem by ethbr0 on Monday November 15, 2021 @02:40PM (#29231689)
I think the basic problem boils down to this: poorly (or completely lacking) version and dependency references in external documentation.

That is, blogs, Stack Overflow, code examples, etc.

Most of that is the fault of authors, but presumably you don't want a 20 year .NET veteran to be the only person capable of writing a complete "Hello World"?

As a consequence, the new developer experience feels like the bad old Java days of "Oh, you want too foo? Well, that tutorial is built using the bar framework, which is incompatible with the nubar libraries you have on your machine."

Agree with another comment here that Microsoft needs to clearly cut legacy off + rename, in order to have a future.

Re:Making life easier for newcomers to the .NET ecosystem by animal531 on Tuesday November 16, 2021 @08:22AM (#29240213)
This isn't remotely true. Any person that has learned for example C/C++ can be productive in a week of having picked up C#.

At the start you can just translate all the basic C constructs such as classes/structs/methods/for loops/ifs etc. to their C# version (which is extremely similar in nature).

After that you can add C# specifics such as LINQ etc, but it's not necessary to be proficient in the language.

Online snippets of anything you search for invariably just works, I've never had an issue of something being outdated.

Re:Making life easier for newcomers to the .NET ecosystem by jmnicolas on Monday November 15, 2021 @04:12PM (#29232850)
I don't get where you're coming from: last week I upgraded a WPF .net 4.6 project (probably from 2017) to .net 6 without a glitch except of course the things I wanted to change (I moved all database calls to Dapper), while reopening a very simple Flutter project made in January this year I find a few deprecated things that needs to be corrected.
Re:Making life easier for newcomers to the .NET ecosystem by torginus on Monday November 15, 2021 @03:10PM (#29232059)
That's a weird perception - in my experience, .NET APIs have largely remained stable, at least when going back like half a decade. It's nothing compared to the node ecosystem, where yearly breaking changes are common, and looking at ta 5+ year old project, you'll see that the popular libraries for every problem used to be different.
Re:Making life easier for newcomers to the .NET ecosystem by ducharmdev on Monday November 15, 2021 @11:02AM (#29228922)
As a joke, I'd love to see someone create a landing page of a "new" language with some eye-catching name similar to Kotlin, except it's all C#. I could easily see that hitting the top page of HN.
Re:Making life easier for newcomers to the .NET ecosystem by Guest42 on Monday November 15, 2021 @11:42AM (#29229350)
Cotlin?
Re:Making life easier for newcomers to the .NET ecosystem by jjtheblunt on Monday November 15, 2021 @02:14PM (#29231344)
that made me laugh out loud. excellent
Re:Making life easier for newcomers to the .NET ecosystem by tata71 on Monday November 15, 2021 @01:04PM (#29230371)
CotTime
Re:Making life easier for newcomers to the .NET ecosystem by tata71 on Monday November 15, 2021 @01:59PM (#29231146)
CotNET
Re:Making life easier for newcomers to the .NET ecosystem by ducharmdev on Tuesday November 16, 2021 @01:58PM (#29244861)
sCala
Re:Making life easier for newcomers to the .NET ecosystem by kej on Monday November 15, 2021 @06:11PM (#29234186)
That reminds me of the "Mojave Experiment" where Microsoft demoed the new version of Windows and after people said they liked it they revealed that it was just the same Windows Vista that people thought they didn't like.

https://en.wikipedia.org/wiki/Mojave_Experiment

Re:Making life easier for newcomers to the .NET ecosystem by redhale on Monday November 15, 2021 @01:47PM (#29230976)
D♭
Re:Making life easier for newcomers to the .NET ecosystem by GiorgioG on Monday November 15, 2021 @10:02AM (#29228183)
> Getting productive and happy in the .NET ecosystem has a learning curve similar to that of Eve Online.

I'd be curious to know why you feel that way? I've been doing .NET development for ~20 years (since the original beta) so it's hard for me to see it through a newcomer's eyes.

ASP.NET Core doesn't seem more complex to start with than any other web framework I've tried (most recently actix-web (Rust), Phoenix (Elixir), Django, etc.)

Re:Making life easier for newcomers to the .NET ecosystem by Philip-J-Fry on Monday November 15, 2021 @11:06AM (#29228980)
I can open a file in notepad and get a high performance HTTP server spun up and responding in under 10 lines with Go. With a simple single function abstraction around what can modify the incoming request and what can write to response.

In .NET I find that it's incredibly powerful when you know what you're doing. But there's just so much crap to wade through that I'm just thinking "why isn't this easier?".

The abstractions that .NET throws at you to start developing with it encourages developers to write their own applications as these crazy complex mazes of abstraction too.

Why can't .NET just be simple? Hand me a request with a Stream, give me a Stream to write my response to. That's all a HTTP handler needs to be, whether it's middleware or not. But instead it's just overwhelming.

Re:Making life easier for newcomers to the .NET ecosystem by nightski on Monday November 15, 2021 @11:17AM (#29229097)
In .net 6 you just run the command -

dotnet new web

then type

dotnet run

and you have a web app running.

If you'd like to edit Program.cs with notepad or w/e (the default text is below, which is incredibly simple).

var builder = WebApplication.CreateBuilder(args); var app = builder.Build();

app.MapGet("/", () => "Hello World!");

app.Run();

Re:Making life easier for newcomers to the .NET ecosystem by 3np on Monday November 15, 2021 @12:45PM (#29230119)
Right. I don't know if this changed significantly with 6, but my experience from previous versions have been that as soon as you start adding things like caches, authentication middleware that interacts with certain other components, or rewrite requests or responses in other ways it soon becomes a goose chase across the web and incomplete documentation.

This is what comes to mind to me from GP's mention of crazy abstraction mazes.

Re:Making life easier for newcomers to the .NET ecosystem by GordonS on Monday November 15, 2021 @02:20PM (#29231412)
A lot of this stuff was fiddly a long time back, before dotnet core, but it's all pretty sweet these days.

For example, `AddMemoryCache() ` gives you a memory cache with the default settings - or you can change them by using the options argument. Request rewriting is really simple too, and even authentication is relatively straightforward.

I get what you mean about "crazy abstraction mazes", but thankfully over the past few years we've been trending away from the madness of ludicrous inheritance hierarchies that were sold as "clean code" and dogmatically hoovered up by junior devs (including me, once upon a time!).

Re:Making life easier for newcomers to the .NET ecosystem by thrower123 on Monday November 15, 2021 @03:19PM (#29232164)
It does get a little complicated when you try adding in the middleware components, and it doesn't Just Work. Frequently then you end up at some GitHub readme file as the only documentation (for first-party Microsoft components) with some very brief examples, maybe with some samples that don't quite show how you'd want to do what you want to do. Then you start digging in the source code and learning how the guts of aspnet core work.

I would agree that bailing on dogmatic 2000s OOP has been an improvement.

Re:Making life easier for newcomers to the .NET ecosystem by pipeline_peak on Tuesday November 16, 2021 @02:37AM (#29237905)
I think The command and observer aspects of WPF are really elegant and OOP patterns certainly have their place.

But app development isn’t a pretty place where time crunched developers are expected to carefully design complex data structures…..at all.

Re:Making life easier for newcomers to the .NET ecosystem by bluefirebrand on Monday November 15, 2021 @02:51PM (#29231824)
How much boilerplate and configuration does "dotnet new web" generate?
Re:Making life easier for newcomers to the .NET ecosystem by nightski on Monday November 15, 2021 @05:26PM (#29233701)
That was the entire source code. There is a project file, but it's incredibly simple and they are meant to be human consumed/edited nowadays.
Re:Making life easier for newcomers to the .NET ecosystem by GiorgioG on Monday November 15, 2021 @11:13AM (#29229058)
.NET 6.0 minimal APIs allows you to do just that:

https://www.hanselman.com/blog/a-net-6-minimal-api-todo-exam...

Re:Making life easier for newcomers to the .NET ecosystem by potta_coffee on Monday November 15, 2021 @11:53AM (#29229482)
This was my observation. 50 lines of Go translate to 500 lines of .NET. All based on assumptions of what proper OOP and SOLID should be, things that I neither need nor care about when 50 lines of simple code could get me there.
Re:Making life easier for newcomers to the .NET ecosystem by metaltyphoon on Monday November 15, 2021 @12:56PM (#29230263)
Perhaps you have the old view of .NET?

In fact there is more reinventing the well in go because all the std lib is just that… a library. When you need all the fluff around parsing routes, validating objects, preventing XSRF and a multitude of common solved problems, you have to reach for third party.

Re:Making life easier for newcomers to the .NET ecosystem by potta_coffee on Monday November 15, 2021 @01:33PM (#29230790)
I need surprisingly few 3rd party packages to build projects in Go. Most if not all of them are in the "nice to have category". Also, I've seen more then a few .NET projects now and they all had 3rd party packages installed as well. Perhaps it's possible to build without 3rd parties but how many real world projects are built this way?
Re:Making life easier for newcomers to the .NET ecosystem by oneplane on Monday November 15, 2021 @01:27PM (#29230699)
You make it sound like everything has to be first party (i.e. a locked-in ecosystem).

I also don't agree that one is 'reaching' for anything, since as soon as you interact with the broader world of interconnected systems, most of the first-party Microsoft things just don't work. They are almost all designed for their own standards that are too different or have to be manipulated too much to be compatible with something else.

Some things don't even exist like a basic Redis client. At that point even a highly experienced Microsoft developer has no choice but to get that non-first-party library.

dotnet tries to do too much by itself and that makes it annoying to use unless you happen to be building what it wants you to build.

Re:Making life easier for newcomers to the .NET ecosystem by Scarbutt on Monday November 15, 2021 @10:34AM (#29228574)
asp.net core is a clusterfuck of over-architecture and over-abstraction.
Re:Making life easier for newcomers to the .NET ecosystem by bob1029 on Monday November 15, 2021 @11:02AM (#29228914)
A lot of the asp.net core configuration nonsense can be entirely sidestepped, but the way in which you would do this is not published as a headline article or otherwise made clear to the developer.

I suspect Microsoft wants most developers to throw their hands up and just follow the "hook your app up to our $$$ azure authentication products $$$" tutorial.

The happy path for AspNetCore could be achieved if Microsoft started the entire conversation with "Here's a request pipeline and here's how you add middleware to it". Everything else is some form of abstraction on top of that. You can learn about how to do all of this 1 afternoon if you know what to focus on.

Once you figure out how to get at HttpContext with your services available in that scope, you have the rabbit entirely cornered. Relying on Micrsoft's middleware to do everything for you is how you get trapped in their puzzle box for all eternity.

Re:Making life easier for newcomers to the .NET ecosystem by oaiey on Monday November 15, 2021 @11:32AM (#29229247)
This is so not true. It is the opposite of a clusterfuck. The old ASP.NET was a clusterfuck.

It has a excellent server (kestrel), a middleware pipeline, routing system and common dispatching patterns like pages, MVC or minimal apis.

It is excellent in every degree of abstraction. Love the basics, go for kestrel. Work with http basics go for middlewares. Want to work with request and response principles and routes go for minimal API. MVC for a bit more structure. Pages for a traditional set. And Blazor Serverside if you love state.

All of this experiences are good.

I would prefer some examples what is bad here! And spare me DI.

Re:Making life easier for newcomers to the .NET ecosystem by hmrr on Monday November 15, 2021 @10:56AM (#29228837)
This. I have to support it in production among other platforms. It’s painful to reverse engineer the stack every time something goes bang which is often and usually something utterly obscure. It also has a much higher amount of hands on work required to keep the plates spinning than any other platform I’ve used.

To be clear I have .Net experience going back to the beta frameworks in the early 2000’s and have hand held some huge products on the platform from inception to maintenance phase architecturally and infrastructure wise. It’s been a bloody rough ride and I regret every moment of it and wish I’d picked another platform bet. I’ve had the entire stack rug pulled from underneath major projects multiple times and burned months in pointless rewrites due to tech changes and obsolescence. The majority of the open source ecosystem is broken or abandonware and the commercial bits are overpriced, with poor support and barely work. It’s hell.

The only good bit has been being paid by the hour to unfuck stuff which has been profitable.

Re:Making life easier for newcomers to the .NET ecosystem by tluyben2 on Monday November 15, 2021 @11:01AM (#29228904)
You are talking about the old asp.net, not the Core one? Because I do not recognize any of this. I find asp.net core, especially 5 and 6, rather trivial to handle vs a lot of other products running in production.
Re:Making life easier for newcomers to the .NET ecosystem by hmrr on Monday November 15, 2021 @11:06AM (#29228983)
Both. Core is probably 50% less painful but it does some weird stuff sometimes including GC problems and a wonderful issue we have where it just does an exit(0) intermittently.
Re:Making life easier for newcomers to the .NET ecosystem by jaywalk on Monday November 15, 2021 @01:48PM (#29230994)
Sounds like your developers might be doing the damage themselves. I run a lot of .NET Core/.NET 5 applications, and I've experienced none of those issues.
Re:Making life easier for newcomers to the .NET ecosystem by hmrr on Monday November 15, 2021 @03:22PM (#29232202)
Quite possibly. I don’t disagree with that.

But that doesn’t give me much confidence when it comes to finding out how to fix things that go wrong.

Re:Making life easier for newcomers to the .NET ecosystem by throw1234651234 on Monday November 15, 2021 @11:02AM (#29228918)
I just talked to a bunch of Python engineers who feel that way. They didn't have a single solid argument - what's yours? .NET is a bit verbose, but there is a clarity that comes with it.

The Microsoft documentation is garbage, the worst I have seen. But the language and framework are good.

Re:Making life easier for newcomers to the .NET ecosystem by hmrr on Monday November 15, 2021 @11:09AM (#29229003)
Python is just as horrible. It’s ok for a bit of automation with system packages but the moment you end up with a venv it starts getting painful. I have seen much criminality rammed into AWS Lambda for example.

The c# language is now like an Indian train at rush hour. Busy and dangerous. Very easy to shoot yourself in the foot if you don’t know what you’re doing. LINQ and its contract breaking promises are a fun one for example. One interface returning IEnumerable<T> and you’re in big trouble when someone assumes the data is already materialised.

Re:Making life easier for newcomers to the .NET ecosystem by throw1234651234 on Monday November 15, 2021 @12:32PM (#29229974)
This isn't an excuse or an explanation, but in prod, most devs ToList() any async calls / anything using IEnumerable. They don't want to think about the nuance and have the additional methods available on the List interface out of the box. Seems to be a decent convention, since the performance diffs between IEnumerable and IList are miniscule for paginated 20-record calls that are 99% of Line-of-Business apps.

If you are referring to lazy loading, awaiting calls and ToList()..ing them solves that too.

I know I will get crucified for this, but that's what happens in practice.

Re:Making life easier for newcomers to the .NET ecosystem by viraptor on Monday November 15, 2021 @02:10PM (#29231288)
Ms docs, as in msdn documentation? Nothing's perfect, but actually covering almost every single class it's better than what other languages normally offer.
Re:Making life easier for newcomers to the .NET ecosystem by jmnicolas on Monday November 15, 2021 @10:59AM (#29228892)
What would you recommend that is fast enough (ie not Ruby or Python)?
Re:Making life easier for newcomers to the .NET ecosystem by hmrr on Monday November 15, 2021 @11:04AM (#29228946)
I’m hedging my bets on lots of small bits of well decoupled and well designed Go with micro frontends in JS sitting on top of Kubernetes. It sits in the niche area of being typed, quite fast, light weight, reliable, fast startup, decent tooling and concise enough to be able to build knowledge and retain it.
Re:Making life easier for newcomers to the .NET ecosystem by tomnipotent on Monday November 15, 2021 @01:15PM (#29230548)
If all you're doing is web dev, Ruby and Python are both more than fast enough.
Re:Making life easier for newcomers to the .NET ecosystem by jmnicolas on Monday November 15, 2021 @01:24PM (#29230672)
Imagine how much less compute capacity we would need if Ruby and Python were as fast as .net core.

We're talking a lot about doing something for the environment, it could start with using "fast enough" languages.

Of course we need to find a compromise between performances and ease of use. So I wouldn't abandon .net core for Ruby or Python, but I would for something as performant (or better ofc) but friendlier to use.

Re:Making life easier for newcomers to the .NET ecosystem by romero-jk on Monday November 15, 2021 @01:41PM (#29230899)
In that case, the elephant in the room is of course Javascript ;) It can be up to 50x faster than python or ruby.
Re:Making life easier for newcomers to the .NET ecosystem by tomnipotent on Monday November 15, 2021 @02:17PM (#29231387)
A single RDS instance and a handful of web servers can handle hundreds of millions to low billions of requests a month with last byte responses under 200-300ms.
Re:Making life easier for newcomers to the .NET ecosystem by manigandham on Monday November 15, 2021 @05:40PM (#29233873)
How so? It's about as lean as it gets. It also provides so much standard functionality which is where other frameworks fall down.

Easy to make a simple endpoint for a tutorial, but after building any serious application the other language stacks end up hooking together several large packages and modules just to get the same standard functionality that ASP.NET provides.

Re:Making life easier for newcomers to the .NET ecosystem by city41 on Monday November 15, 2021 @10:24AM (#29228446)
I was a C# dev from 2004 to 2010. It's a nice language and .NET is (was?) quite pleasant. So I often think about switching back to a C# job. But every time I realize I gotta wade through all of this stuff it really turns me off and I still haven't fully made the leap. Maybe one of these days. I do think understanding all this legacy and getting up to speed would be worth it for me.
Re:Making life easier for newcomers to the .NET ecosystem by potta_coffee on Monday November 15, 2021 @11:50AM (#29229445)
I landed on a team that does .NET. They're using the latest dotnetcore stuff. I've worked in various frameworks in many different languages and I can say that from my perspective, the Microsoft ecosystem is the most nihilistic, un-fun, fiddly environment I've ever had to use. The guys that always try to sell it to me never seem to have much exposure to anything else.

I can admit that there are different ways of thinking and different styles for different people and teams and that .NET is a valid choice, and lots of decent software is built with it. But I've chosen to stay away.

Re:Making life easier for newcomers to the .NET ecosystem by COM2323 on Monday November 15, 2021 @01:04PM (#29230382)
What is the exact opposite then? What is "fun" these days? :) Am I boring? :)

I have done a lot of stuff in a lot of languages/frameworks, from electronics to desktop applications to websites and server stuff. Never cared that much about specific technology. It's fine if it gets stuff done is my motto, but I must admit that .NET is my go-to technology. Everything else I touch seems like a huge mess in terms of design, documentation, tools etc. I'm not saying that .NET is perfect, but at least someone spend some time on design before it's release and it has certain consistency that other projects rarely have.

Re:Making life easier for newcomers to the .NET ecosystem by potta_coffee on Monday November 15, 2021 @01:46PM (#29230963)
Not that I need to have fun but .NET is the opposite of fun to me, in other words, painful. I'd rather not split hairs on what's right or wrong but the maximal OOP style of .NET's structure is just not for me. There's so much boilerplate that I don't need in other frameworks, and from what I've experienced, I'd need to buy in completely to the tooling and ecosystem to become productive, which means Visual Studio or similar IDE. In terms of functionality, the project I was last contributing to in .NET would have been much smaller and simpler in Go, Python or Javascript for the same set of features. I've built so many CRUD apps and APIs now that I can whip out these kinds of projects quickly with nothing more than a text editor. I just can't see any upsides for me to jump into .NET now.

FWIW, I did try to give it a shot with an open mind, but shortly after that project I decided I'm not accepting any more .NET work.

Re:Making life easier for newcomers to the .NET ecosystem by COM2323 on Monday November 15, 2021 @07:06PM (#29234752)
In the end isn't the biggest difference the knowledge and experiences we have gathered over the years? I have no problem writing C# code on Raspberry Pi using terminal and simple nano editor, but I would have to google quite a bit if I was supposed to do the same stuff in Python, JavaScript or C++.

I use these languages every now and then, I just don't have the deep knowledge required to do everything effortlessly and I get frustated by things that people accepted as "the norm" on those platforms. Like the whole depencdecy stuff and node_modules blackhole in node.js, string handling in C++, weird Python syntax etc. People used to these platforms probably don't have an issue with any of this and accept it as a trade-off for some other amazing stuff on that platform that I don't know about and don't appreciate.

Re:Making life easier for newcomers to the .NET ecosystem by DeathArrow on Monday November 15, 2021 @02:33PM (#29231609)
>the maximal OOP style of .NET's structure is just not for me

You can use C# .NET in a simple, non OOP way.

You can use F# in a functionaly style.

Nobody forces OOP upon you.

Re:Making life easier for newcomers to the .NET ecosystem by potta_coffee on Monday November 15, 2021 @02:39PM (#29231684)
If I were working by myself on a project, I could make those choices. Unfortunately it's not the common approach to take, nor is it really the documented / recommended way.
Re:Making life easier for newcomers to the .NET ecosystem by aninteger on Monday November 15, 2021 @12:13PM (#29229712)
But ".NET core" is "dead". The latest is .NET 5 or even .NET 6 (bleeding edge).
Re:Making life easier for newcomers to the .NET ecosystem by potta_coffee on Monday November 15, 2021 @12:58PM (#29230282)
I left that team a couple of months ago but keeping all the different iterations of .NET separate is one of my gripes. The documentation is some of the worst I've ever seen and I simply have no patience for it when I have so many other tools that I can use to get the job done with less friction.
Re:Making life easier for newcomers to the .NET ecosystem by piva00 on Monday November 15, 2021 @06:02AM (#29225992)
> Microsoft is certainly an oppressive monster but they arguably produce some of the best tools in town right now.

Can you expand on this point? What tools Microsoft provides that are the top-of-the-crop right now?

Re:Making life easier for newcomers to the .NET ecosystem by tasogare on Monday November 15, 2021 @06:03AM (#29226004)
Visual Studio. Always has been. And the base class library of .net.
Re:Making life easier for newcomers to the .NET ecosystem by 5e92cb50239222b on Monday November 15, 2021 @06:07AM (#29226030)
Did you actually try the alternatives? If we're talking about dotnet specifically, then Rider? It's miles ahead of VS in every way that I can think of. I don't personally know a single dotnet developer who kept using VS after trying out Rider for a few weeks.
Re:Making life easier for newcomers to the .NET ecosystem by Const-me on Monday November 15, 2021 @06:27AM (#29226185)
> It's miles ahead of VS in every way that I can think of

When I need to write advanced SIMD code, or consume C libraries like FreeType designed to be hostile towards FFI, I often make C++ DLLs to be consumes from C#.

Unlike Rider, Visual Studio is not just .NET IDE, it's a C++ IDE as well. The two debuggers are integrated too, it's easy to debug both C# and C++ at the same time.

Re:Making life easier for newcomers to the .NET ecosystem by dotancohen on Monday November 15, 2021 @10:10AM (#29228290)
As a Linux user, what do I need to experiment with .NET 6 to replace Python for mostly simple file processing?

90% of my use would be to open and read/write files, read from stdin and argv, regex, maybe some http requests and math no heavier than the occasional integral or limit.

Re:Making life easier for newcomers to the .NET ecosystem by Const-me on Tuesday November 16, 2021 @01:18AM (#29237483)
Can’t recommend a Linux IDE. I develop quite a lot of .NET for Linux lately, but I’m using a Windows computer with visual studio 2019 to compile and debug. Only using the runtime on Linux to test things, with printf debugging when needed. Still, quite a few people on the internets, in this thread even, are saying Rider is actually good.

About programming, most of the things you have mentioned (except integrals and limits) are in the C# standard library. Here’s a few tips.

Be sure to handle exceptions in your Main(). On Linux, I usually printing messages into `Console.Error` stream and returning a non-zero status code. Without the top-level try/catch in the main, unhandled exceptions crash the process with no information about what happened.

Set <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> compiler switch in all your *.csproj files. It causes the runtime to detect integer overflows and throw exceptions in runtime when it happens. It’s very useful to debug things (exceptions come with stack traces, if you keep the *.pdb files they will even contain source file names and line numbers), but I usually keeping the setting in release builds too, for a bit of extra safety. The performance overhead is negligible on modern computers.

About the I/O, use modern APIs, the usability’s better. For instance, when you need to read a text file line by line, call File.ReadLines() method, returns a lazily-evaluated sequence of these lines. Also, modern .NET supports spans pretty much everywhere and therefore you can read/write stack allocated buffers or unmanaged memory. Albeit depending on your use cases, stack allocated buffers might be a premature optimization.

About web request, the standard library has two HTTP clients, older WebClient, and newer HttpClient. For many use cases the functionality is equivalent, pick whichever API you like better. In both cases, I recommend their async-await APIs to make requests. The language supports async main for a few versions now.

Re:Making life easier for newcomers to the .NET ecosystem by dotancohen on Tuesday November 16, 2021 @02:00AM (#29237714)
Perfect, thank you. I do love the Jetbrains IDEs professionally, but its an expensive purchase for occasional use.

I much appreciate the mention of catching exceptions. For my own programs I usually don't catch exceptions because I want the failure to be hard and informative. It seems that dotnet is the exception here.

Re:Making life easier for newcomers to the .NET ecosystem by Const-me on Tuesday November 16, 2021 @04:40AM (#29238665)
Couple more things.

Don’t abuse LINQ. It’s awesome, but I can only recommend for simple use cases. For advanced ones, too easy to screw up, and too hard to debug. When that’s the case, I’m usually writing a foreach loop instead, and/or generator methods. Also, when I do use LINQ I prefer the C# syntax like `seq.Select( x => x.something )` instead of the SQL syntax `select something from seq`. It’s a matter of taste but IMO compiler is doing too much magic with the SQL syntax.

A few years ago, .NET finally got what MS calls string interpolation. Good stuff, can recommend, I think Python has an equivalent for a decade: https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...

Most articles on the internets view C# as an object-oriented language. That’s only part of the story. In the typical code I’m writing, at least 50% of code is pure functions (in FP sense) in static classes. And at least 50% of non-static classes are structures (these are value types, an array or List<> of them will keep items at sequential memory addresses, good for performance) with all the fields marked readonly, i.e. immutable types. .NET 6.0 even has record structs now, with automatic readonly.

Re:Making life easier for newcomers to the .NET ecosystem by S04dKHzrKT on Monday November 15, 2021 @01:50PM (#29231020)
Depending on what kinds of files you read/write, you might want to take a look at F#'s type providers.

https://fsprojects.github.io/FSharp.Data/library/CsvProvider...

Re:Making life easier for newcomers to the .NET ecosystem by jmnicolas on Monday November 15, 2021 @04:26PM (#29232985)
Right now you probably can't experiment coding with .net 6 on Linux (I'm not sure with VSCode but it didn't work for me last week with Rider so I'm still on .net 5).

So if you wait a few weeks to get full support assuming you want an IDE experience and not running everything from the console:

- if you want free (as in beer): Visual Studio Code - if you have a Jetbrains license or don't mind paying for one: Rider

Re:Making life easier for newcomers to the .NET ecosystem by thrower123 on Monday November 15, 2021 @10:44AM (#29228688)
You're probably better just sticking with Python if that is all you are doing.

DotNet and C# works fine for all of those things, but it's definitely simpler to get spun up with a Python script for the quick and dirty. DotNet really shines as things get bigger and you need to have more structure.

Re:Making life easier for newcomers to the .NET ecosystem by dotancohen on Tuesday November 16, 2021 @02:02AM (#29237719)
Thanks. I just figured that text scripting, which I do often enough, would be a good foot in the door. I'm not looking for a better Python replacement, rather, I'm looking to get familiar with dotnet with a small project that I would be doing anyway.
Re:Making life easier for newcomers to the .NET ecosystem by throw1234651234 on Monday November 15, 2021 @11:04AM (#29228958)
Absolutely no reason. I prefer .NET over Python, but for your use case, there is no point, and .NET might be a downgrade since it's more verbose.

For huge projects, that verbosity is what makes it maintainable.

Re:Making life easier for newcomers to the .NET ecosystem by dotancohen on Monday November 15, 2021 @11:21AM (#29229148)
My mindset is to experiment and become familiar with .NET. Python is great and I can continue to use it, but I see text processing as a low barrier to entry way to get familiar with a new tech.
Re:Making life easier for newcomers to the .NET ecosystem by Scarbutt on Monday November 15, 2021 @10:24AM (#29228442)
Downloading .NET 6, a text editor and reading docs?
Re:Making life easier for newcomers to the .NET ecosystem by dotancohen on Tuesday November 16, 2021 @02:03AM (#29237729)
Yes, of course!

There was much mention in this thread of the docs being out of date, referring mostly to older dotnet APIs. Also, by mentioning specific use cases, I was hoping - and got - very specific and helpful recommendations.

Re:Making life easier for newcomers to the .NET ecosystem by piva00 on Tuesday November 16, 2021 @03:59AM (#29238415)
And Rider is not just Rider, it's based on the IntelliJ platform that can also support multiple different languages, including C++, Python, Java and so on.
Re:Making life easier for newcomers to the .NET ecosystem by pjmlp on Monday November 15, 2021 @10:26AM (#29228474)
Miles ahead only for those that don't know how to use VS properly.

It has tons of features missing for Windows development, debugging across .NET languages, C++, COM and WinRT.

Debugging of GPU code, parallel code, integration with mocking frameworks like Fakes, architecture modeling even for files without source available (code maps).

Re:Making life easier for newcomers to the .NET ecosystem by R0b0t1 on Monday November 15, 2021 @10:40AM (#29228642)
Those latter things (COM, WinRT) are gated behind the enterprise license, IIRC. Most people will not have cause to want them.

I know I don't.

Re:Making life easier for newcomers to the .NET ecosystem by pjmlp on Monday November 15, 2021 @11:25AM (#29229189)
Any serious Windows developer will.
Re:Making life easier for newcomers to the .NET ecosystem by R0b0t1 on Monday November 15, 2021 @02:18PM (#29231401)
They're a sign of dated tech. Nothing modern necessarily needs them. I know how to use them and I can respect the design, but pay gating them for so long has made them irrelevant.
Re:Making life easier for newcomers to the .NET ecosystem by pjmlp on Tuesday November 16, 2021 @04:41AM (#29238675)
Not only those things aren't gated, they are the modern APIs on Windows since Longhorn, they are only irrelevant if you are stuck on Windows XP.
Re:Making life easier for newcomers to the .NET ecosystem by R0b0t1 on Tuesday November 16, 2021 @01:53PM (#29244819)
The developer tooling was pay gated until VS2019 or something. You needed this tooling to make use of the APIs in a reasonable way, or alternative tooling.

Most people just responded by not using those APIs or recreating them.

Re:Making life easier for newcomers to the .NET ecosystem by GordonS on Monday November 15, 2021 @02:23PM (#29231472)
Serious Windows developer here - I want nothing to do with COM or WinRt!
Re:Making life easier for newcomers to the .NET ecosystem by pjmlp on Tuesday November 16, 2021 @02:14AM (#29237787)
Given that since Longhorn debacle, for better or worse all new APIs are COM based, and WinRT is still COM with extras, I cannot take that as serious Windows developer, rather a developer stuck with a Windows XP.
Re:Making life easier for newcomers to the .NET ecosystem by radicalbyte on Monday November 15, 2021 @06:24AM (#29226172)
It depends on what you're doing; Visual Studio with ReSharper is still very good (as long as you have a beast of a machine).
Re:Making life easier for newcomers to the .NET ecosystem by tonyedgecombe on Monday November 15, 2021 @10:24AM (#29228444)
Every time there is a new version of Visual Studio I try and use it for as long as possible before I give up and install ReSharper. So far VS 2022 looks like it might be good enough without it.
Re:Making life easier for newcomers to the .NET ecosystem by jmnicolas on Monday November 15, 2021 @04:30PM (#29233031)
I'm using Visual Studio without Resharper since 2009. What did I miss? :p

I never felt I was lacking anything in stock Visual Studio and since my company won't pay for anything I never considered Resharper.

Fwiw I have Linux at home and trying Rider (I have used Android Studio before) I much prefer Visual Studio.

Re:Making life easier for newcomers to the .NET ecosystem by tester756 on Monday November 15, 2021 @01:41PM (#29230898)
Visual Studio with Roslynator (free, needs less resources)
Re:Making life easier for newcomers to the .NET ecosystem by konamicode on Monday November 15, 2021 @06:22AM (#29226152)
VS's windowing system is better than Rider's. I often use VS with a layout which takes up two full screens (editor on one and Tests Explorer/Solution Explorer/Output Window/Find window etc on the other). I haven't yet found a way to replicate this in Rider.
Re:Making life easier for newcomers to the .NET ecosystem by GordonS on Monday November 15, 2021 @02:27PM (#29231521)
I use Rider, and often have a code editor on my main monitor, debugger at the top of my secondary monitor, and tests at the bottom of my secondary monitor - it all works great.

At the top right of each window pane is a popup menu that let's you change the window mode, it's that simple.

Re:Making life easier for newcomers to the .NET ecosystem by kovac on Monday November 15, 2021 @06:18AM (#29226117)
I did. I tried Rider and continued to use VS when I was programming on Windows. On Linux I use Rider (though I'm mostly off. Net stuff now). Reason for using VS is because I like it's UI (like the colour scheme more) and I think there are at times issues with resolving dependency issues like nuget stuff (which is what my colleague told me who is a fulltime rider user but fires up VS rarely to resolve them). I haven't tried things like parallel stack watches, debugging dlls and remote debugging. I just liked these things the way they are in VS. Though I'd rank Rider higher than VS since it runs on Linux.
Re:Making life easier for newcomers to the .NET ecosystem by dmitriid on Monday November 15, 2021 @10:21AM (#29228419)
Tried Visual Studio 22 Preview. It couldn't run a debugger because "property program isn't defined". Apparently you need to specify some launch.json file god knows where, and god knows why.

VSCode kinda works (but also creates a launch.json file somewhere).

Rider just works. If it creates something somewhere, I couldn't care less (as I couldn't care less for any other IntelliJ product which tend to just work).

Also. Obligatory rant by Casey Muratori on Visual Studio: https://www.youtube.com/watch?v=GC-0tCy4P1U

Re:Making life easier for newcomers to the .NET ecosystem by Dennip on Monday November 15, 2021 @10:25AM (#29228455)
Why not the stable version (2019) instead of a literal preview...
Re:Making life easier for newcomers to the .NET ecosystem by dmitriid on Monday November 15, 2021 @10:28AM (#29228519)
I'm on a Mac, so decided to give it a try. It's an interface overhaul, why wouldn't it be able to launch something though?

I tried to install a previous version. It started installing, and then ... just failed. With no description of what failed, and how to deal with it.

So eventually I gave up.

WHat's launch.json and where is it described? And why can't it figure stuff automatically like Rider? And why does VSCode create a separate launch.json and why can't the two share the same one?

So many questions, so few answers.

Re:Making life easier for newcomers to the .NET ecosystem by mook on Monday November 15, 2021 @11:02AM (#29228924)
Visual Studio for Mac is a completely unrelated product that happens to share a name; when people say Visual Studio without any qualifiers they _probably_ don't mean the Mac version.

Microsoft overall has a terrible naming sense, with occasional good accidents.

Re:Making life easier for newcomers to the .NET ecosystem by plorkyeran on Monday November 15, 2021 @11:15AM (#29229074)
Visual Studio is Windows only. VS for Mac is an unrelated program which used to be named Xamarin Studio.
Re:Making life easier for newcomers to the .NET ecosystem by rharb on Monday November 15, 2021 @11:43AM (#29229363)
2022 launched last week along side the production .NET 6 launch
Re:Making life easier for newcomers to the .NET ecosystem by SketchySeaBeast on Monday November 15, 2021 @09:49AM (#29228028)
Some would argue VSCode is there as well. I know a lot of my coworkers swear by it.
Re:Making life easier for newcomers to the .NET ecosystem by throw1234651234 on Monday November 15, 2021 @11:05AM (#29228965)
I personally don't like it at all. I use it to write Azure Cloud Functions, but I use WebStorm for Angular/React dev, even though I am used to Visual Studio for .NET.
Re:Making life easier for newcomers to the .NET ecosystem by aliswe on Monday November 15, 2021 @09:59AM (#29228145)
But its not an IDE /s
Re:Making life easier for newcomers to the .NET ecosystem by barrenko on Monday November 15, 2021 @10:58AM (#29228881)
Ugly bloated eye-sore. Pardon my language.

Just rip off JetBrains already.

Re:Making life easier for newcomers to the .NET ecosystem by onemoresoop on Monday November 15, 2021 @11:24AM (#29229173)
I use Visual Studio on a daily basis and I abhor it. It is hard to navigate without a mouse, things are shoved in small boxes and requires a lot of clicking around. But my coworkers love it so it must be a subjective thing, right? The amount of bugs make me hesitant to ever upgrade when I get a stable version. VS 2018 is riddled with UI bugs. One of them that is annoying me is the basic functionality for undo, text no longer focuses on the latest undo chunk and you don't know how far you got.