News for hackers. Stuff that matters.
Re:.NET for Beginners (2020) by VadimPR on Wednesday April 21, 2021 @02:09AM (#26885945)
Gave it a serious go but it still lives inside the Windows + Visual Studio bubble.

Trying to use .NET on Linux with Visual Studio Code is pain: .NET developers expect you to learn APIs through intellisense and don't publish API docs, Windows tutorials assume you're running Visual Studio, and a lot of MS's own API docs are bewildering with .NET jargon that you won't understand.

Re:.NET for Beginners (2020) by philliphaydon on Wednesday April 21, 2021 @03:51AM (#26886553)
I've been a .NET developer since 2003, I've been on Linux exclusively for the last 2 years.

.NET on Linux with Jetbrains Rider, is a far better experience than Windows and Visual Studio.

VSCode isn't worth looking at for .NET Development.

Re:.NET for Beginners (2020) by VadimPR on Wednesday April 21, 2021 @04:22AM (#26886773)
I jumped into .NET w/o any background while running Linux - it's not a pleasant experience when you lack the heavy Windows+VS background you've had. Perhaps Jetbrains Rider is better, but at this point you know all the ins and outs of the platforms - a beginner lack that.
Re:.NET for Beginners (2020) by philliphaydon on Wednesday April 21, 2021 @06:37AM (#26887703)
The experience of picking up a new IDE, language, framework, flow, etc, is no different regardless of it being .NET or anything else. There's a learning curve.

My point is not that experience is easy or hard, just that when comparing the two side by side, the experience of being a .NET developer on linux is good, and I would argue with jetbrains rider, is better than being on Windows with Visual Studio.

Re:.NET for Beginners (2020) by VadimPR on Wednesday April 21, 2021 @07:16AM (#26888034)
Sorry, I don't buy it - tried it for 4 years and that's just not the case. It was stumbling block to be on Linux and without Visual Studio with every tutorial or instructions. I think you have it easy since you know the ecosystem so well - and coming over from Windows, you know what alternatives to look for.

For me, even simple things like getting C# aliases working was a pain. I would not recommend a Linux developer to be picking up C# to do cross-platform development anytime soon. The only nice benefit I've seen is the amount of batteries included with .NET - but that's a solvable problem in other languages.

Re:.NET for Beginners (2020) by philliphaydon on Wednesday April 21, 2021 @08:24AM (#26888671)
> tried it for 4 years and that's just not the case.

So just fired up a VM with a clean install of Ubuntu.

No VSCode, No Rider.

> wget https://packages.microsoft.com/config/ubuntu/20.10/packages-... -O packages-microsoft-prod.deb

> sudo dpkg -i packages-microsoft-prod.deb

> sudo apt update && sudo apt install apt-transport-https dotnet-sdk-5.0 -y

> mkdir test

> cd test

> dotnet new console --output sample1

> dotnet run --project sample1

This is all on the MS Docs website for getting started.

So I'm really not sure what part you find difficult. Getting hello world is no more difficult than me getting hello world working for golang, nodejs, python.

> For me, even simple things like getting C# aliases working was a pain.

Aliases for what?!?

EDIT: Simplified the commands cos I can't format in comments.

Re:.NET for Beginners (2020) by VadimPR on Wednesday April 21, 2021 @11:18AM (#26890791)
Yeah, of course, now try to build a real world application with it.

Aliases: https://docs.microsoft.com/en-us/dotnet/csharp/language-refe.... Support for those was only added in the last year or so to the dotnet/nuget/roslyn/whatever it is needed things to make it work. Microsoft's own documentation only documents how to use it for Visual Studio: too bad if you're using another IDE or the command line like you did above.

Re:.NET for Beginners (2020) by philliphaydon on Wednesday April 21, 2021 @12:16PM (#26891609)
Using aliases have existed for like ever. So I guess you’re trying to use extern aliases which are super rare to ever need so still don’t know what you’re struggling with.

In terms of building a real world application. What are you struggling with? The code is no different regardless of IDE you use. VSCode, Visual Studio, and Rider all have a debugger and can step through code.

Right now it sounds like you’re just trying to make .net sound bad.

Re:.NET for Beginners (2020) by andix on Wednesday April 21, 2021 @07:32AM (#26888188)
Okay, what other programming languages did you master before? What is so much easier?

I suppose you mean using-aliases for types/namespaces? This is a C# language concept, not a very complicated one, and totally independent of the operating system

Re:.NET for Beginners (2020) by VadimPR on Wednesday April 21, 2021 @07:52AM (#26888382)
It's not complicated, but the .NET tooling on Linux did not understand it :) that's what my point is all about. For the best .NET experience, use Visual Studio on Windows. If you're not on those two, the tooling experience is not going to be particularly pleasant - nor the documentation.

My advice after having tried it seriously - .NET does work crossplatform, I've seen it, but you need to be a Windows dev to tap into that. Would not recommend a mac/linux dev who's looking to do cross-platform work to pick .NET as the foundation.

Re:.NET for Beginners (2020) by andix on Wednesday April 21, 2021 @07:28AM (#26888155)
For a typed language completion like Intellisense is a very important tool for any developer. There is limited completion support available in VS Code. If you want a proper IDE for .NET on Linux, try out JetBrains Rider. It is not free, but great.

I don't understand what you dislike about the API documentation Microsoft provides with .NET, it's not always perfect, but I would say it has nearly 100% coverage: https://docs.microsoft.com/en-us/dotnet/api/

And because .NET used to be Windows only there are a lot of Windows tutorials. But you can anyway skip them, as they mostly describe the old .NET 4.x. Find newer .NET Core tutorials. Even if they provide you screenshots of Visual Studio on Windows, you can do all of it with any text editor. Some scaffolding you maybe need to do on the command line.

Re:.NET for Beginners (2020) by VadimPR on Wednesday April 21, 2021 @11:20AM (#26890824)
You exactly understand and confirm my point - outside of the bubble Windows/VS bubble, it's not a super nice developer experience. If you want to work hard to make it work: you can, but... why go out of your way?

And I haven't said anything about building GUIs here yet, which is another world of pain on .NET.

Re:.NET for Beginners (2020) by net_greybeard on Wednesday April 21, 2021 @02:25AM (#26886028)
> Gave it a serious go but it still lives inside the Windows + Visual Studio bubble.

I work in a small shop and most of the developers use Visual Studio with Linux or a Mac. Most of the developers that don't bother with anything outside of Windows won't be open sourcing their libs or documenting their stuff anyways.

This may have been true back in 2016/7 when .NET Core first turned up but it just isn't true anymore.

> Trying to use .NET on Linux with Visual Studio Code is pain: .NET developers expect you to learn APIs through intellisense and don't publish API docs,

I've used VS Code for small projects fine on my Mac. However I can see it being a pain on larger projects and you will need a large IDE. However the same could be said for a large Java project.

> Windows tutorials assume you're running Visual Studio, and a lot of MS's own API docs are bewildering with .NET jargon that you won't understand.

I don't want to sound like a dick, but yes the Windows tutorials will expect you to use Visual Studio as that is the IDE that primary IDE of people using Windows.

As for complaints about jargon. As a C# developer that now transitioning to Python. The Python docs having lot of Python Jargon you won't understand (at first). Every language has its own jargon.

Re:.NET for Beginners (2020) by VadimPR on Wednesday April 21, 2021 @04:24AM (#26886789)
Java projects publish Javadoc which is good - you can sit down and understand an API. It's not the same story on .NET.

> Windows tutorials will expect you to use Visual Studio as that is the IDE that primary IDE of people using Windows.

Yep, hence the bubble. Python doesn't have this problem, for example.

Re:.NET for Beginners (2020) by net_greybeard on Wednesday April 21, 2021 @04:46AM (#26886910)
> Java projects publish Javadoc which is good - you can sit down and understand an API. It's not the same story on .NET.

Almost all the projects I use with .NET have sufficient docs on their sites. MSDN has the full docs on their site. If there are specific projects that are a problem that are outside of that. Well that is a problem with their project, go and complain to them.

> Yep, hence the bubble. Python doesn't have this problem, for example.

Yes Python does have similar problems. A lot of time people assume you are using a *nix machine and if you aren't then you normally have to faff with some work around. Go has the same problem a lot of things just don't work properly on Windows (at the least the last time I bothered). The same is true with Java, Go, Ruby etc.

As for the tutorials. I've just gone on the ASP.NET site and there is a tutorial for Windows, Linux and MacOS in the tabs on the site.