.NET for Beginners (2020)

dustinmoris | 196 points

.NET definitely has a messy past but someone arriving today probably has the easiest time ever getting started because so much has changed to become a single streamlined product. All these opinions are weighed down by the very history that beginners don't have.

The expansive standard library, web/desktop/mobile/gaming output, Visual Studio (Code) IDEs, fantastic in-depth guides and documentation [1], dev evangelists like Scott Hanselman [2], and constant stream of content from MS team and community [3] makes it not only easy to get started but also continue until you're an expert.

I find it strange to complain about a 12 year old stackoverflow answer when other environments like nodejs are a nightmare once you get past the toy project stage. Anyone can write a simple tutorial for a to-do app, but it's how well you can grow that to a real complex system that determines how well-designed and productive an environment really is. And I've yet to find anything better.

1. https://dotnet.microsoft.com/ 2. https://www.hanselman.com/ 3. https://dotnet.microsoft.com/platform/community

manigandham | 3 years ago

I'd like to see some data around the central claim. Is C# really that hard for beginners? I watch a lot of beginners on twitch (for several years now) start with C# and almost zero idea about programming. They all seem do pretty well, whether they are learning unity, winforms, web dev. They don't even stop and wonder any of the issues discussed in the article, they simply make the project type they want in visual studio and start learning the guts of programming. The issues discussed seem more of a problem with evolving your software over time, especially the framework -> core/.net 5+ transition. I'm not sure that really impacts beginners other than a few caught in the storm who needed to upgrade their software to a different version (given most would just stick to whatever they started with). The evolution of the C# language itself has caused fractures in recommendations on how you program in C# but then stabilize pretty quick. We've been through it quite a few times in the C# world, and if you are learning in a transition period, yeah, some tutorials are going to say one thing, and others another thing, but most beginners seem pretty ok with the idea that there is an "old" way and a "new" way. But like I said, I'd like to see actual data on the beginner learning experience rather than anecdotal accounts as there's always going to be people who find it hard and those who find it easy.

keithnz | 3 years ago

This goes on critiquing how C# has a high barrier to entry because you have to learn [insert long list of popular C# frameworks]. But no, you don't have to learn any of those things, you can just start learning C#.

Then: "Just think about the upcoming release of .NET 5 and how it will invalidate most of the lessons taught just a few months ago .... the wider .NET community has failed in making .NET a more beginner friendly language"

.NET isn't a language! It is, I will agree, absurd that Microsoft way back when decided to give the totality of the infrastructure around their language a name at all, let alone one as confusing as .NET, but that is all it is. A name applied to sometimes the compiler/runtime/core libraries or all of the above.

Unfortunately this has led to people wandering into forums asking "how can I learn C# and .NET?" nobody ever wanders into a forum asking "How can I learn C++ and llvm"?

gameswithgo | 3 years ago

I found the article fairly accurate, being a .NET developer now for upwards of 15 years, but perhaps the title is misleading.

I would have titled it, "Beginning .NET for Professionals."

Most of the concerns outlined in the article are really only relevant to professionals, or serious hobbyists. If you're truly a beginner most of those points are not concerns, at least until much later.

If you want to learn .NET, download Visual Studio Community Edition, fire up a console application, and tinker. Starting with C# is probably a good idea.

I did this with my sons, before there was a Community Edition, when they were about 11 and 8 - truly beginners. They had little problem getting going, writing small little programs to find primes or the lowest common denominator for a number. We didn't even cover OOP really, and the standard library only minimally.

So it can be done, even today after .NET has exploded. It's just hard for us pros who now have to confront that enormity.

redleggedfrog | 3 years ago

When I imagine starting to learn C# right now, I think I would need to:

- install the newest Visual Studio with default config

- create a new console app project

- start writing code in the template's main function

Granted, I have to know whether I want to create the console app in .Net Core 3.1 or .Net 5 or whatever, but I imagine I can find the answer to that pretty quickly and move on. Usually the answer will be "the newest version you have installed".

Any language feature I want to play with is just one automatic import tip away, and most of the features I would explore as a total novice don't even need that.

The complexity of various Nuget packages, ASP.Net versions, older versions of .Net only arrives once you need to uplift older projects, maintain libraries to be used across different framework versions etc. Those are tasks for a more experienced developer, for a good reason, and I believe this is true for any technology stack.

EDIT: formatting

paweladamczuk | 3 years ago

Oh wow did this title ever bury the lede, but what a great article. As a long time C# programmer very familiar with the .NET stack I definitely share and sympathize with many of the OP’s frustrations. I’ve been working in this world since .NET Framework 1.0 betas and I can’t keep track of all the developments. It’s exhausting.

Aside from hobby projects I’ve basically not given much thought to .NET Core because it’s such a moving target - and it’s a shame. In so many ways it’s far superior to the moribund .NET Framework - especially in terms of speed and memory use.

But there’s also many places in Core where there’s parity lacking with Framework, and migrating code can be a confusing and confounding experience. This is a place where things needed to be easy and they aren’t - and it doesn’t help that it’s so hard to figure out the difference between .NET Framework/Core/Standard/5 with UWP, WinRT, etc further confusing things.

Back in 2004 Joel Spolsky wrote the great article “How Microsoft Lost the API War” (https://www.joelonsoftware.com/2004/06/13/how-microsoft-lost...) and now some 17 years later it feels like little has changed. Some of the technology stacks may be different now but the frustrations are largely the same. It’s still the “MSDN Magazine camp” (or whatever today’s named equivalent would be) versus the “Raymond Chen camp”.

logbiscuitswave | 3 years ago

I didn't read the whole article, just scanned it. But I'm surprised he chose Golang as a low-cognition entry barrier language. As a developer on Windows (relevant since we're talking about .NET), setting up Go was a pain in the ass. Making sure that my PATH variables were set up correctly and all that jazz, and then I'd run into issue after issue with packages and paths.

I don't know what it is about golang, but man, it's hard unless you just start up a WSL and install it on there.

radicalriddler | 3 years ago

Like other design-by committee projects C# has considerable sprawl. As a result, it's overwhelming and confusing for brand new programmers to start writing hobby projects in.

But C# is beginner friendly in that it's easy for inexperienced programmers to contribute business value to existing codebases. The everything-in-one ecosystem (IDE + autocomplete + database + deployment + source control + package management) removes many sharp edges that experienced programmers are used to working around and take for granted in other languages. I've known smart high school kids with limited programming experience become productive C# developers in weeks, and that doesn't happen the same for e.g. Java.

DylanDmitri | 3 years ago

The complaint around all the different concurrent iterations of .NET rings true to me.

It used to be that you only needed "current version of .net" and then you just ran forward with all of the standard libaries and Visual Studio handled all of that for you and it was wonderful.

Now you need to work with .NET Core and download a bunch of disjoint nuget packages to make everything work; and, then you download a specific nuget package and it requires updating all your other nuget packages, on to forever.

I was tasked with transitioning some of a former company's .net 4.something code to .net core, to see if we could do it, and the transition was a shock to the system, for sure.

In the past, I could choose when to engage with Nuget and which packages to work with. When I went to .net core, it seemed like anything complex that I wanted to do required yet another package - in my case, anything related to running a webserver.

Working with .net definitely became more complicated post .net core.

edit: for clarity and enjoying the downvotes.

I'm a seasoned .net developer and used it from 2009 until 2018-2019 for desktop applications and webservices. I've used nuget packages plenty for a variety of things, including Akka.net.

t-writescode | 3 years ago

Read the whole article nodding my head at all the valid criticisms of .NET, but towards the end I began to wonder: when are the arguments in favour of .NET coming? And finally, at the very end, this paragraph appeared:

" .NET is a great technology for experienced developers who grew up with the platform as it matured, but I'm not sure if I'd still enjoy learning it today as much as I did in 2008. Whilst the complexity allows me to charge great fees to clients for writing software in .NET, I'd probably not recommend it to a friend who wants to learn how to code or I wouldn't use it for building my own startup from the grounds up. "

Is it really the case that the only argument for using .NET is that you can earn a lot of money by working as a .NET consultant? From my own experience I always assumed that it was, but I would love to learn about some actual benefits that .NET has over competing platforms.

fergie | 3 years ago

I recently tried to take a look at dotnet core since I heard it can compile and run on linux. Every tutorial I looked at for building a webapp started with "download visual studio and click these buttons..." which would result in a "mostly complete" program that it would go on to fill in some variables to. Literally every other language tutorial starts with a simple empty file and fills in functions with descriptions of what's going on and builds up understanding. When I want to learn how to make a webapp in .NET, I want to learn to make a webapp in .NET/C#, not how to install and click buttons in Visual Studio.

mbeattie | 3 years ago

.NET carries a lot of baggage, but .NET Core is absolutely awesome. I would really encourage everyone to give it a try. I have personally used Blazor and its really good. Not to mention building WebAPIs with ASP.NET Core and EntityFrameworkCore.

Most of your dev needs will be met by .NET Core.

kumarvvr | 3 years ago

Microsoft is just so bad at naming things. ".net framework" means versions of .net before version 5. Version 5 is of course also .net and it is a framework, but apparently it is not ".net framework", since this term refers to the versions up to 4.x.

Take "Enterprise Framework" (EF) and "EF Core". These are two independent ORM frameworks. From the names you would probably expect either that "EF Core" was the core of EF or that EF Core was a version of EF which ran on ".Net Core" (the previous name for .net 5). Neither is true - the frameworks are independent and both run on both .net 4.x and .net core/5. Apparently "core" just means "new incompatible version".

And how about ".net standard"? .Net Standard 2.0 was the standard API which was available with both .net 4.x and .net core/5. But from .net Standard 2.1, it was not compatible with .net framework anymore, which meant it wasn't standard anymore.

The actual technologies like C#, the BCL and EF Core are great, don't get me wrong, but the naming is so confusing.

goto11 | 3 years ago

If you want to get anything done with C you learn the stdlib. With python you need to learn the package system. With C# you have to learn .NET. I don't see that it is that much more complicated. Python also has problems with shared code versioning. Modern PHP still suffers from carrying old crufty PHP code along

okareaman | 3 years ago

I agree with all of the above. I love C# as a language having used it in Unity in the past.

I wanted to try to a server backend with it, but I was lost as to which framework to use (ASP.net / .NET Core / .Net 5) so I ended up choosing neither.

Which is a shame, because I really really like the language

syspec | 3 years ago

I can not agree more with this post. After being a C# developer for 5 years, I can not think of a worst language to learn that C#. The ecosystem is dead just check the latest startups from YC, how many are using C#? How many startups nowadays are using C#?

Currently there are better options than C# or .NET. You want simplicity, you have Go. You can create an API server so simple and easy to understand. You want a full framework, you have Rails. Rails give you everything so easy to be productive and start shipping. Just run gem install device and you have authentification. You need to storage files, images, etc., just a simple tag on your model and really to go.

alexon1234 | 3 years ago

There’s no doubt this a very truthful and in-depth review of .NET, but it leans a bit too negative for my beliefs.

I think if you just start with .NET Core and learn basic console programming, the rest will come easily enough.

ChicagoDave | 3 years ago

Definitely a frustration for those of us having done .Net for 20 years. Even the naming frustrates me. Every time they seem to create a new "one name to rule them all", it only lasts a short while until a new one comes along net framework, .net core, .net standard .net 5 and apparently now .net 6.

As the OP said, the overarching problem is probably trying to be all things to all people and pretending that all of those things are .Net. It also produces a sadly common attitude now of "we won't fix that in dotnet core 3, upgrade to .net 5" as-if that is even a possibility for many existing apps.

One idea that comes from way back in the day was having an IDE that you could set to beginner, intermediate and advanced so that when you start out, you only see a subset of things. You can then get more confident in the basics before seeing more options and windows.

Another idea I liked was removing older features so that you don't keep getting bigger and bigger.

lbriner | 3 years ago

The professionals in this field (programmers) are something of a different breed. I can't tell you how many time I've come across something I've been needing so badly to learn and it's put right in front of my nose explained in detail by people i look up to, just here to say thanks for the in depth article. great material.

jliving207 | 3 years ago

Complicated stuff will always be complicated.

The .NET ecosystem is huge, there are a lot of different frameworks associated to any kind of problem. Xamarin for mobile; EF 6, EF Core, ADO.NET for databases, and so on.

But as a beginner you shouldn't try to understand it all, right from the beginning. Just start somewehre.

It's like saying: "Biking is too complicated, there are so many different kind of bikes, who should know what to buy!" Just get the first best bike / framework (e.g. console app, or asp.net core) somebody recommends you and go with that until you know better. After a while you will understand the difference between a mountain bike and a downhill bike, or between EF 6 and EF Core.

andix | 3 years ago

I'm getting into F# and I couldn't agree more.

I'm still a little lost on how asp.net runs in a Linux container.

xupybd | 3 years ago

Anecdotally when I've had to show developers how to start with .NET Core the problem isn't the SDK (install dot.net at the website) or which template to use (i.e. just tell them to pick that one) its C#. This is especially true if they come from a JS, Python or Go background. I say this as someone who does doesn't mind C# and thinks its pretty capable once the learning curve has passed.

At one stage I had a JS developer just try the F# template instead and the difference was stark. Explained to them Async F# - Promise JS, Module F# - Module JS, showed them a unit test example and they were writing production code in two weeks to a month. It made me realise that over the years there is a lot of knowledge I just take for granted that many beginners just don't have especially now when there are much friendlier languages for beginners. Things like dependency injection, how it resolves based on types, and which framework to use and why, mocking framework choice (vs simple stub functions), can only mock interfaces and why, the class structure and how you should group functions into appropriate classes, abstract classes vs interface default methods, LINQ vs OO style coding, nullability annotations all over the place, OO design patterns, the need for Resharper or equivalent unless you can write C# syntax from scratch, the list goes on and on. With most C# apps there is a lot of knowledge assumed and baked in which can be daunting for a newcomer. C# is not alone here I understand that - the same thing can be said for other languages too. But it has made it harder than it needs to be especially when it is actually a good platform but C# scares many developers away especially as it adds more and more features on top.

Litmus test for a language to me: Does it need an IDE and tooling to be productive in? The more tooling it needs the more complex IMO the underlying language is in syntax and complexity. Complicated refactoring tools? If so its probably too complex for a beginner especially now that the language space has quite a bit of competition. As an example watching a developer do this in a previous role in F# you just create a new file and cut and paste the functions around; in C# the dev's I've had usually resort to Resharper and a full blown IDE to extract variables/methods, do code generation, and basic refactorings unless they want a lot of manual work.

akra | 3 years ago

W

subw00f | 3 years ago