Perhaps this is indicative of the larger Microsoft ecosystem, but it feels like my peers at university and in the industry tend to stay far away from .NET for personal projects, etc.
Why is this?
Perhaps this is indicative of the larger Microsoft ecosystem, but it feels like my peers at university and in the industry tend to stay far away from .NET for personal projects, etc.
Why is this?
Both .NET/C# and Java are the core of Dark Matter Development [0]. They're what a huge chunk of developers and enterprise actually use but they're not cool and they don't get blogged about.
Obviously the history of EEE and Windows only legacy means there's a lot of hostility to anything .NET specifically amongst a subpopulation of developers. However I don't think it sufficiently explains the lack of noise about both Java and C#.
It's a bit of a shame because it would be nice to have more startup opportunities in .NET (or Java/Kotlin - rather than slow, dynamically typed, error-prone scripting language du-jour), there are some but they're a tiny minority.
It's hard not to get caught up in worrying about the future of one's favorite language/ecosystem but then I think over time the obvious benefits of the ecosystem will win people over, I hope.
[0]: https://www.hanselman.com/blog/dark-matter-developers-the-un...
Getting blogged on a site that is dedicated to that tech is not noteworthy.
You can find such blogs or forums for every obscure language that has more than a 1000 users.
Even if you ignore the history of companies like MS and Oracle what it comes down to is vendor lockin. If there's a chance a vendor will pop up in 3 years time with a huge bill, why take the risk when there are plenty of free alternatives.
MS recently made one tiny decision that was unfriendly to open source, it caused a huge outcry and a reversal within 48 hours on a weekend. I can't even imagine what the reaction would be in your scenario.
Besides, basically everything is open source now and you can't put that genie back into the bottle.
Microsoft's handling of .NET 's OSS community has been haphazard at best. Just a week or two prior to the 'dotnet watch' debacle, there were issues and concerns with the .NET Foundation that led to the Executive Director stepping down [0].
I bring this up, because in many cases the perception is that there is -still- lock in, just in a different fashion.
By that, I mean, if you Ask a typical .NET developer what they use, they'll probably say ASPNETCORE, EF Core, maybe you'll hear Hangfire, MediatR, RestSharp, or Dapper.
So, you've got a bunch of .NET devs that -only- know Microsoft technologies for the most part. Yeah there's some other stuff like MongoDb, Kafka, Redis, stuff like that, but It's not very frequent you hear about teams reaching out to other technologies.
It's very rare I hear people bring up Linq2Db, a beautiful* Micro-ORM that is best described as a type-safe, extensible SQL DSL. Or Websharper, a really-freaking-cool library that basically lets you transpile your C#/F# code into Javascript and/or Reactive HTML, complete with seamless server calls if you'd like.
You might run into some interesting things at different places. One shop I was at used MassTransit, which was kinda cool. I've wound up using Akka.NET a few times in the past, which has always been super fun.
The end result of this though, is the -perception- of what .NET Developers are like. And sometimes those perceptions are real. I remember the dev that felt Dapper was some sort of 'black magic' and would stick to writing DataReaders and or datatables by hand, and another that was so against the idea including Non-MS tech in a project that it wound up costing him his job; he insisted there was a way to get EF to do things in a performant way (answer: not sanely, and not easily the way the app was built on an arch level,) and refused to accept a PR that solved the problem with Dapper.
He wound up doing the thing I've seen a -lot- of .NET developers do; fight the Framework.
To be clear here, I'm not referring to the BCL. It's not always perfect (I'd love for an analogue to SSLEngine, please?), but it's -fine-. I'm referring to bits like ASPNETCORE, EFCore, SignalR, and Microsoft.Extensions.(DependencyInjection/Logging) where developers wind up getting in awkward tarpits around some weird edge case because of a business requirement or some other decision that, unfortunately, can't be undone.
Or are just plain 'well, that sounds sensible in theory' like "I would like to update N rows in an new status that are older than 1 month and set to overdue, and not have it be N update statements." Maybe EF does that now, but last I knew the answer was not really.
At my first 'Real' Dev job, we were a .NET shop, that often had to 'fight the framework' (it didn't help that we were on an Oracle Backend, which made -everything- more of a PITA before we discovered Dapper.) When the .NET guys hit one of these roadblocks, it would often take sprint after sprint of fighting to either have no solution, or have a solution that would render the app hard to maintain. The newer teams using Java? They didn't have those problems. We later heard they had 5 different ORM-ish libraries in use over there. At the time, a lot of the .NET devs kinda treated it as a sort of derision. 'hows somebody gonna understand it?'... But the Java teams delivered. It is also worth considering, maybe those were the best libraries to solve the problems that the app in question needed to deal with.
And that's kinda the 'mindset' that is a set of .NET developers that fit the stereotype; if it's not an app that fits their cookie-cutter world, they break down and can't understand it. In other words, they're afraid to step outside the box, which means they're less likely to think outside the box.
The typical 'litmus-test' of this type for me is a sliding scale based on their past/current experience with other languages and willingness to work with them.
* - I do some contribution work to Linq2Db, so my opinion may be a little biased.
[0] - https://github.com/dotnet-foundation/Home/discussions/39#
From your linked article: "Where are the dark matter developers? Probably getting work done. Maybe using ASP.NET 1.1 at a local municipality or small office. Maybe working at a bottling plant in Mexico in VB6. Perhaps they are writing PHP calendar applications at a large chip manufacturer"
i.e. in Cost Centers not Revenue Centers, which is to say in jobs that do not pay well, and their management is trying to figure out how to spend less money, not make more money.
I see Microsoft attempting to make C#/ASP.NET more lean and faster to get started with (eg. minimal APIs) but I doubt they can overcome the stigma.
That doesn't change the fact that .NET roots are in old enterprise and Java - which was dumbed down by design to make it easy to onboard unskilled developers (look at their arguments against local type inference and lambdas before they were added).
Things like ASP.NET core slam you with heavy duty abstractions from ground up and justify it by project scaling and reducing maintenance cost at the expense of iteration speed - again tradeoffs made for large enterprise const center style projects.
With recent iterations (minimal APIs, top level functions, namespace declaration, etc.) they are trying to reduce those tradeoffs and cater to the startup crowd but the MS + corporate budget development stigma is going to be there.
Sometimes you see articles on the Internet where someone basically says something along the lines of "All developers use the Linux bash command-line workflow", and I just look at statements like that and wonder what on earth are they talking about!?
I have never seen a developer familiar with the command line. I have never seen a developer willingly use a Linux desktop. I have never seen anyone do anything but boring, "dark matter" .NET and Java development using IDEs on Windows.
I'm not talking about a couple of guys here. I mean that I have met or interacted with hundreds of developers across dozens of organisations!
Literally not one has ever said: "I wish I had bash", or any similar statement.
I tell a lie. I just remember that the one startup that I worked for had: Linux, bash scripting, allergies to Microsoft, hip-new-technologies, etc, etc...
90% of the articles on the web, are 100% certain that I have a use VIM / Emacs, on a Linux machine.
Where are the articles that focus on the rest of us?
Similarly, Microsoft broke how clear screen works in both Windows Terminal and VS Code to match the UNIX terminal standard.
Hint: Neither of these are standards by any definition, and UNIX people were arguing over both of these things at length themselves.
Before we forget: VS Code is made by Microsoft employees and is primarily deployed by people using Microsoft Windows.
But it has to adhere to the "standards" that Microsoft developers are used to and expect.
There are a lot of CLI devs out there, even in enterprises! I highly recommend gaining proficiency with the command line, as it will make you a more productive developer in the long run. While most everyday tasks may have a GUI, if you end up working near the cutting edge, you will likely encounter problems that do not have any GUI alternative. And if you end up working on a rare problem, no GUI may ever emerge. Your CLI skills may be the difference between a 10-minute solve and not being able to accomplish the task at all.
I spent > 10 years building on Windows, and this advice definitely applies to the .NET ecosystem as much as others. On Windows, Powershell mastery will set you apart.
In .NET there is usually one way to do things, the MS way. You don't have options. Whatever MS prescribes is practiced by most enterprise shops. I remember arguing for something closer to MVC (several open source solutions) when ASP.NET forms was the way to do things. It wasn't until ASP.NET MVC came out that enterprise shops came on board.
I still see a lot of documentation that shows Visual Studio screenshots. How am I supposed to do that on Linux? .NET still feels like a Windows first solution. You will not find official docs for Python, Node or Go using OS-specific IDE or editor screenshots.
There are infinite ways to do things. But the most easier way to do things is one. And that is good because anyone can understand anyone's code.
Anyway, my point is there are very legitimate reasons why most startups don't use .NET. And it rarely has anything to do with being cool.
When the .Net Foundation was announcing that they were going to drop the hotreload support from dotnet watch in favour of supporting it in the Visual Studio editor I was again reminded of how (some parts of) MSFT think that dotnet should still be a fully integrated development platform for Windows, rather than a multi platform, open community and open source project. I guess there might be some internal power struggle there between various business interests.
There are already more Linux VMs on Azure than there are Windows VMs. And if they still insist on making the dotnet experience on Linux and MacOS subpar compared to Windows they will very quickly find that people who develop for these OSs will move towards Java or other languages and frameworks with better support for these operating systems.
It's leftover industry bias because of Microsoft's long history of a proprietary tech stack that costs money to use. Today's Microsoft of promoting open source VSCode doesn't really undo the mindshare they lost in the 1990s and 2000s when the internet got big. I wrote previous comment about this: https://news.ycombinator.com/item?id=20256825
C#/.NET (including WinForms and ASP.NET) was instantly popular with corporate enterprises but Microsoft never captured emerging startups with their tech stack. E.g. 1990s startups like Ebay, Amazon, Google, etc all used Java+MySQL+Linux instead of C#+MSSQLServer+MSWinNT. And new high-profile open-source projects like Hadoop, Cassandra, Elasticsearch, etc chose Java instead of C#. I currently can't think of a famous project where the canonical source is C#. I use iText C# library but that was ported from Java. That's how it usually evolves. A lot of C# libraries were actually Java projects at first.
In Microsoft Land, the SQL Server team considers this an Enterprise feature, which basically translates to: "We added a couple of zeros to the price".
THIS, I feel, more than anything, meant that the Microsoft stack was just a dead end for many startups. The licensing cost for the database alone exceeded their revenue.
This was already crazy back then, but since then Microsoft has doubled down and increased SQL Server licensing. It is eyewateringly expensive now, and even their Enterprise customers are slowly starting to switch away from it.
They're slowly but surely turning SQL Server into Oracle.
But if your personal projects are a stepping stone to a programming job, then .NET has a monstrous legacy problem. In 2002-2007 a lot of code was written using .NET in enterprises: it was the best way to write a rich desktop application for Windows and ASP.NET WebForms, while terrible, were an okay stack for intranet websites, certainly not worse than PHP5 without Yii or Laravel. And if you were a Microsoft shop, you got the best integration with MS SQL Server and (oh Lord) BizTalk if you used .Net.
But then Rails and Google Chrome came out and completely upended the webapp industry. Microsoft has been playing catch-up ever since.
A modern startup could certainly use .NET 6 instead of the framework of the month to write their world-shattering program, but they won't, because .NET isn't cool. A lot of .NET jobs are in stuffy enterprises where you likely won't be paid to write a backend to a Svelte SPA in .NET 6, you will be paid to maintain an ASP.NET WebForms 2.0 monster that uses WCF to talk to some SOAP/XML webservices.
Of course, the same applies to JavaEE, but Java has a second leg to stand on: people wrote FOSS in Java back when it was a dirty word at Microsoft, so not everything in Java shops is a terrible Spring/JavaEE mutant that has to be configured using vendor-specific XML.
Microsoft does not play catchup in the web space. It is in the pack for some years already. The stuff they do with Blazor is at the upper end of the pack.
.NET, like Java, is not cool. It does not need to. It gets the job done without any experiments in a very modern platform. Doing a startup with boring tech is a thing.
So in summary: .NET is a very good choice for a beginner or converts. It is fresh, you can do solid stuff, do the full stack in one platform (web, desktop, apps, games, iot, ML, ...) and there are plenty of jobs (greenfield or brownfield).
I'm working on migrating an ASP.NET 4.0 application right now, and it's basically stuck in the past.
Physically, yes, it could be updated by the developers to work on .NET 6.0, but no manager will ever fund this. They don't understand the benefits, and no amount of explanation will justify this effort in their minds.
So Microsoft basically stranded their customers on an iceberg floating away from the shore that is very slowly, almost imperceptibly melting...
Looks like the way to convince them is to tell them we will be moving to a <gasp> microservices <gasp> based stack and slowly start building the services on modern stacks (and gRPC)
We did just this at the company I work for. We are replacing an old monolith with modern architecture.
Every enterprise targeting technology has the same issue.
In fact, that legacy is an opportunity to move into modern stacks.
TLDR: Microsoft wanted .NET developers to only use tech from Microsoft, used various tactics to achieve that, and people got the message. If you wanted to use modern tech or develop innovative stuff, .NET was not a comfortable place to be.
Microsoft have tried to move past that, but never really have. .NET has never had a healthy Open Source eco-system.
And where is Rails now? .NET is still thriving.
>A modern startup could certainly use .NET 6 instead of the framework of the month to write their world-shattering program, but they won't, because .NET isn't cool. A lot of .NET jobs are in stuffy enterprises where you likely won't be paid to write a backend to a Svelte SPA in .NET 6, you will be paid to maintain an ASP.NET WebForms 2.0 monster that uses WCF to talk to some SOAP/XML webservices.
I get paid to write a modern microservice based application using .NET, Kubernetes, Docker, Consul, Redis, Postgres. I can't say it's boring. But it is true, the app is for an enterprise, not a startup. The payment is relatively good and the app is making money for the company, so we aren't a cost center.
Another aspect is that M$ tools are used by millions, it's just that there's a selection bias for tried-and-true tool users to just quietly make things work. "Blue collar programmer" comes to mind. All the leading-edge churn, noise, and fatigue is the corner of the industry that generates tons of blog posts and HN links.
Most/all of their offerings seemed like legacy software/tools once IntelliJ, big JS projects, and SPAs became such a popular solution for software development on macOS and Ubuntu.
Now with VS Code, TypeScript, heavy dev in GitHub platform, cross-plat .NET, vcpkg, etc... and generally very powerful dev tooling, they actually have excellent offerings.
All that said, M$ clearly has a long road ahead of earning back good will in "high" tech corner of the industry and Academia.
So, I'm a *nix guy. You know, running Sway WM, using Doom Emacs as my daily driver, that sort of a thing. Learned vim to write my thesis at night on an armchair where using the mouse was not comfortable.
Not long ago I accidentally got involved with a kind of a .NET consulting gig. Rather, I got involved as a domain expert to help out some SaaS startup dealing with that domain, and it just so happened that they were writing their thing in C#. Before that I hadn't used C# at all, mainly dealing with Python and C++. I liked the language, I thought the tooling on Linux was pretty decent. The ecosystem was a bit lacking for the domain in question, but it had other nice things going for it.
But there was definitely a bit of a culture clash with the .NET guys. As an example, I did my domain thing in a pretty much self-contained library. While writing it I needed something that would be 'just data' without any additional 'functionality' attached to it, so I naturally reached for `struct`, given that it exists in the language. The .NET guys asked why it was not a `class` instead. See, somewhere deep inside they felt that not wrapping everything in a `class` is wrong on some fundamental level. Later, I had to touch the rest of the codebase a bit. At one point there was something I felt was a 'one-line change', that took 12 files to edit. Mostly routing calls through different auxiliary classes because 'architecture'. And you know, I'm really not trying to diss those guys. They were nice, capable, smart, productive, good people. It's just that I was very evidently from a different 'tribe'.
So, I personally like the direction that .NET is taking. I think that this release has very nice things in it. Such as the statically linked binaries, and compilation to webassembly. I also believe that modern .NET has a nice value proposition in being able to use your code across the board in many contexts and settings. On top of that, both C# and F# are nice languages.
But I won't be looking for .NET jobs, or putting that .NET stint on my resume, lest some recruiter gets the wrong ideas!
The difference between a class and a struct in C# is not the same as between a class and a struct in C++. In C#, structs can definitely be useful, but also have some gotchas, so they're mostly used only in performance-critical parts of the code.
If you visit a foreign tribe, I think you should listen to the locals, unless you are really certain your way of doing things is better in the local context.
In this case though, the struct usage was completely in line with C# documentation regarding what structs are for. I wasn't trying to write C++ in C#. But hey, I do agree that code should be idiomatic to the particular community such that it doesn't feel out of place! In that case the struct did become a class.
Edit: Just re-read C# documentation on structs. Yes, it absolutely made sense to have a value type there. As in, the documentation mentions the use case almost verbatim.
And there can certainly be a culture clash, there is a bit of a tendency towards more complex patterns in the .NET world. But you don't have to do that, and MS is quite explicitly adding versions with less boilerplate in this release, if you prefer that.
Basically, I consciously researched the differences between class and struct in C# beforehand. And decided to use struct as the 'thing' was a kind of a coordinate that would be instantiated a lot for simple coordinate-space transformations, so it made sense for it to actually be a value type.
I should've been more assertive about it. Well, worst case some periodic imports are taking somewhat longer than they should.
https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...
Don't confuse inexperience with culture.
I'm from a mostly-.NET background I argue with typical .NET developers all the time.
I also argue with Java developers, and C++ developers, and...
The fist that comes to mind is that with a class invariants of the type can be ensured in the constructor or by making the constructor private and exposing static factory methods. A struct, on the other hand, is always simply declared, so don't afford these protection measures. For some reason C# still supports constructors in structs though, and even uses the `new` keyword to invoke them. This creates a kind of trap where structs almost, but not quite, behaves like classes.
Another gotcha is the defensive copy semantics. When a method is invoked on a struct, and that struct is a readonly field, a copy of the struct is created for the method to avoid mutating the field. This is not at all how classes referenced by a readonly field behaves.
I guess the same can be said for the simpler case of just passing a struct as parameter to a method mutating its now local copy. Again different outcome for structs and classes.
Since the code look so similar (its just a different keyword at declaration site) it creates an uncanny valley tripping people up. Not least when refactoring between the two. After all, being a language with a GC means memory layout is seldom a primary concern for people.
However you can now declare structs readonly to avoid the defensive copy thing, or as a ref-struct to retain mutability, almost like a class. And as long as the default value is perfectly valid, like say (0,0) there shouldn't be much surprises anymore.
Have heard this sentiment in more than one comment in places like HN. "The {tech} is great, but the culture was ... so I'm not putting {tech} on my resume". And So it becomes a self-fulfilling prophecy :). Yet some tech seem immune to this. They don't say "X is great but the culture was crap, so I'm abandoning X", they say "X is great but the culture was crap so I'm changing jobs".
It really drives home that culture is critical, and even the worst tech can be tolerable if it is thought of as cool. Though of course the thought of abandoning ship to learn the latest and greatest solely to avoid legacy C++98/Spring/WebForms/whatever is naturally appealing.
But then, do you really believe one would be a smart person if they were to look for .NET jobs where at the same time Windows is not the dominant environment that people use at work?
Are you sure about that? Maybe Windows is not dominant when you look at startups.
Anyway, what .NET has to do with Windows now? You can happily use it on Linux or macOS.
I would say that has only just become the case and still isn't for desktop development.
I won't blame .NET for this. Needlessly complicated architectures are because OOP everywhere minded guys, Uncle Bob and GoF patterns. If you worked with a Java shop you cold have been hit by the same scenario.
1) Region (for example, my data point is from Boston)
2) Framework language choice (https://insights.stackoverflow.com/survey/2021)
3) Ecosystem (i.e. Microsoft vs. Unix)
4) Experience level (probably)
If anyone has any SF data points I am extremely curious.
And it's an especially hard sell given that it doesn't have a good GUI situation. Support for Windows GUIs is back since .NET 5, but the cross platform options are weak. It's very possible when the MAUI library finally releases that we'll see more people deciding to use .NET.
Avalonia is great and recommended by most people that used it. Or do we now only count Microsoft-made solutions and then whine that .NET is not open to OSS?
Rider is the perfect replacement, though. Comes with all the features of ReSharper (this is a big deal for many .NET workflows, VS may have integrated many of its features, but not all of them) and extensions and themes you can actually use (IME with VS of the 50% that promise to do what I want 90% are broken).
JetBrains just know what they’re doing. They’re clearly prioritizing quality (something the VS team seems to be actively working against).
Oh, and it’s damn near 100% compatible with VS projects (one thing I missed about 2 years ago were live updates of WPF XAML, everything else just worked).
.NET/C#/F#/VB are old. 20 years for C# and VB. And they weren't friendly on non-Windows platforms until recently (last five years or so).
Microsoft procured the open source version of .NET (Mono) and decided to push the platform to a unified, cross-platform deployment. That started with .NET Core and has evolved to .NET 6.
So you're coming to .NET awareness exactly when it's at its most effective cross-platform capabilities.
And AWS and Azure both let you build C# functions/lambdas for serverless API's, so it has market appeal.
I'm building my startup, Mach9Poker, in C# and the debugging/unit testing are top notch. The language C# is easy enough. It's the libraries you have to really learn and there is a "way" to Microsoft things that's different. But there are also massive helpers in IO, list management (Linq is one of the greatest technologies ever created), generics, lambdas, and more.
I started with C# with 1.0, back when structs inside structs didn't serialize properly. I've written iOS apps with Xamarin. I am a C# fan. I haven't used it professionally in a decade and my last personal project was years ago.
When is C# the right idea? The only time is when the project is entirely captured by the Microsoft ecosystem. There are plenty of places where this is the case. Windows desktop applications. Small business contract work who are still using Windows. Big business IT who still use Windows. Opportunities to migrate to Azure.
Where is C# the wrong idea? Everywhere else.
Writing for the best monetized mobile market? Swift.
Writing for cross-platform mobile market? Javascript.
Writing for cross-platform desktop market? Javascript. Maybe Java if you have a history of it.
Writing for the cloud? Something linux first. Javascript, Python. If you want a big GC language, why would you pick C# over Java?
AAA games? C++
Not AAA games? Maybe C# with Unity?
In every category where C# is used (outside Microsoft captured environments), there is a dominant solution which is not C#.
And that sucks. Because C# is awesome.
From a management perspective, this is not bad. You get movable team members. In my company we have moved people from WinForms app, to cloud deployed micro-portals and then to a Apple/Android App (all different solutions .. not a migration). C# play a big role in that.
I think this is again a dark-matter-developer / line-of-business situation.
I have a friend-of-a-friend who has a successful 30 person contracting business. They do C#. He, the co-owner benefits from this.
I was responding to a question from a FAANG developer. FAANG developers don't get moved. FAANG developers move when they want to move: to projects that they find interesting; to other FAANGs; or to start-ups.
And FAANGs don't pick one language because "hey, it's possible to do what you want in it".
If a developer knows C# he can tackle more than one domain. Suppose you got bored and want to switch. Or there are new interesting opportunities. If you know C#, you just switch without having to learn a new language and libraries.
Well, at least you can if Blazor gets finished.
This. You see this as a positive. I see this as a negative. And we're both right, right? You are right in your domain, and I am right in mine.
>Why is this?
It's a reminiscence from the times .NET was Windows only and MS was considered evil by the Linux guys.
Some older people haven't learned that times have changed.
And for young people is missing the coolness factor, it isn't promoted and made fashionable like the shiny new framework X for Javascript.