News for hackers. Stuff that matters.
Re:Deep Dive Into C# 9 by dustinmoris on Friday December 06, 2019 @05:22AM (#21720547)
Quite honestly it really pisses me off how C# is evolving and to me this is a clear indication that Microsoft has still a largely wrong mindset in divdev.

C# was once a great language, but today it is so bloated with features that there is no clear way anymore on doing a single thing. Everything in C# has 3-10 different ways of doing it with huge BUTs, making the language harder and harder to learn for beginners.

It doesn't even make sense to make C# more funcitonal. It's trying to be too many things at the same time. It's almost like an obsession which Microsoft has with C#. Everything great they see somewhere they just shoehorn it into C# and actually really harming the language. What happened to just being a good OO language. .NET already has two other languages, one is functional and you can use F# and C# side by side in a project. What is the purpose of mudding C# to a point where nobody really knows anymore how to write clean and good C# code?

Honestly, I see C# developers constantly re-writing and re-designing their code for the sake of rewriting because there's constantly a new way of doing something. C# developers are like Java developers, spending so much time thinking how to write a feature instaed of just getting on with the work.

.NET Core is great, but .NET, C# and Microsoft in general is still the same old shit plagued by the same old MSFT mindset.

If developers want to write great applications then choose anything but .NET (Core), because in C# you'll constantly be chasing and re-writing existing code because things change for the sake of changing without really making the application any better.

.NET Core itself and ASP.NET Core is still changing so much that it's just tiring.

Re:Deep Dive Into C# 9 by m_fayer on Friday December 06, 2019 @05:58AM (#21720701)
Long time C# dev and team lead here. Can't say I agree with you.

C# has become a great language for the "functional core, imperative shell" way of doing things. That means it has to be a hybrid language. F# is more tilted toward functional-land, C# is tilted toward imperative/OO-land. Both have their place.

If C# devs are constantly rewriting their code, that means there's no vision for that particular codebase. It's true that there are many different ways to "do C#." So, a developer or team needs to pick a particular way (OO classic, or functional core/imp shell, or functional, or minimal golang-style) and stick to it. It's more of an architectural challenge than you would get with a language that can only do one of those. The upside is, your system can blend approaches as necessary, all within one codebase. Every module of the system is perfectly suited to its task, from philosophy all the way down. Of course there's the danger of it becoming a mess, but the risk is worth the reward IMO. With great power comes great responsibility as they say.

Re:Deep Dive Into C# 9 by dustinmoris on Friday December 06, 2019 @06:07AM (#21720738)
What you describe can only be achieved in the short term at best.

If something can be written in 10 different ways then it will be re-writting in 10 different ways, because today you are leading your team and defining 1/10 ways. Tomorrow you leave and another lead or senior comes onboard and will disagree with your architecture and then slowly re-write everything.

Even worse, every time you add a new person on your team there's a 9/10 chance that they will disagree with your code. Your team will waste so much time between people just talking about how to write something because people get hung up on minor details instead of just trying to build a good application solving a real problem. The micro benefits of doing something in c# one way or another are in 99.999% of applications a complete waste of time.

Whenever I'm trying to hire C# developers (something I've been doing a lot over the years) I'm amazed how little people even know about C#. There's literally so much when you go deep that most people are completely clueless and it's getting worse and worse.

Re:Deep Dive Into C# 9 by m_fayer on Friday December 06, 2019 @06:20AM (#21720801)
I've seen what you describe happen. But it doesn't have to be that way.

A wise lead may prefer a different path to their predecessor but respect the decisions that were made before them and realize that it's counterproductive to chaotically "drip-migrate." And good experienced developers will not get bogged down in endless debates with no clear winners.

It just sounds like you've had some bad experiences.

Re:Deep Dive Into C# 9 by Clubber on Friday December 06, 2019 @08:14AM (#21721472)
I've seen it happen too and it's not a C# problem. To attribute a social problem to a programming language seems odd.

A general rule is you made modifications to a codebase the same style / technology as the original codebase. I've seen bad developers not do this and it certainly turns into a mess.

Re:Deep Dive Into C# 9 by madiathomas on Friday December 06, 2019 @06:05AM (#21720733)
I have been programming in C# for 13 years now. Majority of new features are just syntactic sugar. Code I wrote in 2009 is still running even in 2019. I don't rewrite my applications in a newer version each time there is a new release of .NET Framework. I only use the latest language features on new projects. Problem starts when I am in a support and maintenance job because I quickly fall behind. When I go for interviews, I get asked questions about new features of the language, which I feel is unfair.

I feel sorry for new Developers because I learnt those features bit-by-bit over the years and they are expected to learn them at a go. It is also hard to understand why a syntatic was introduced when you never used the way it used to be done.

Re:Deep Dive Into C# 9 by scarface74 on Friday December 06, 2019 @07:47AM (#21721302)
I for the most part agree with you. But Entity Framework and ASP.NET changes significantly (for the better) with .Net Core.

I also use Resharper, it repeatedly reminds me of new syntactical ways of doing things.

Re:Deep Dive Into C# 9 by pdwetz on Friday December 06, 2019 @01:17PM (#21724501)
Visual Studio itself also does that (I forget when it was introduced; a few versions back I think?). I haven't used Resharper in a long time, so I'm not sure how it compares now, though.
Re:Deep Dive Into C# 9 by madiathomas on Sunday December 08, 2019 @03:47PM (#21738186)
I started seeing it on VS2017. I use it a lot in VS2019.
Re:Deep Dive Into C# 9 by madiathomas on Sunday December 08, 2019 @03:46PM (#21738180)
Visual Studio copied Resharper. VS now suggests some new language features.
Re:Deep Dive Into C# 9 by xmichael99 on Friday December 06, 2019 @09:36AM (#21722077)
I read your comment twice trying to fully understand your perspective. I've been working in C# off an on now for about 10 years and as a guy who "grew up" on version 2, I mostly use the core features, but wow do I love some of the new features. The introduction of Tuples in 7 changed the way I program so dramatically in a positive way - every has their own style for me Tuples as per my example allow me to return a code + the data. I welcome the improvements and think MS is doing an amazing job.
Re:Deep Dive Into C# 9 by adelarsq on Friday December 06, 2019 @10:21AM (#21722510)
For me tuples are a game changer. The code stays clean and easy to undestand.
Re:Deep Dive Into C# 9 by crc32 on Friday December 06, 2019 @06:30AM (#21720862)
Every language has a lifecycle.

I understood from a Microsoft conference I attended (regrettably I forget the speaker) that their decision to incorporate new features so rapidly was a very conscious decision, based on what I thought to be a quite perceptive look at the landscape - to some extent C# has always been a reaction to Java; a language that often comes under fire for its extremely slow and cautious incorporation of features.

Re:Deep Dive Into C# 9 by NicoJuicy on Friday December 06, 2019 @05:43AM (#21720629)
You don't have to, asp.net mvc still works. WPF, ..

I think the big changes between .net framework and . Net Core weren't that big for a project.

And it got a lot faster.

Re:Deep Dive Into C# 9 by dustinmoris on Friday December 06, 2019 @05:51AM (#21720664)
I'm not talking about the changes between .NET and .NET Core. As far as I'm concerned .NET doesn't exist to me anymore and it's not even worth talking about.

I am angry that .NET Core keeps changing faster than Kim Kardashian changes her outfits. First they focused on making .NET Core all about ASP.NET with a clear focus on MVC and making everything super granular. Then they didn't like how granular it was and started to put lots of featurs into smaller pacakges again. Then they keep re-inventing things. First introduce Newtonsoft Json into the default .NET Core stack. Then rewrite everything. The webhost model keeps constnantly changing. The ASP.NET Core team now is realising that people hate MVC and they are splitting out more features from MVC into more basic ASP.NET Core features, which is why routing has completely changed again with endpoint routing. Honestly nothing is constant, not even for 6 months. Every version of .NET Core almost requires a developer to completely rewrite their Startup.cs class. It's just ridiculous.

The reason for all of this is old MSFT thinking. It's not bloody rocket science, people have been saying it for years that they don't want to be forced into MVC, they want things to be more lightweight, bla bla bla. But obviously MSFT cares more about making a shit hello world demo at BUILD and therefore they first must hack together ASP.NET Core which was mostly just about MVC before being allowed to build the core platform to something that is actually useful to others.

They'll constantly keep changing the fundamentals, moving the carpet under developers feet and distracting businesses with stupid useless excercises or rewriting shit instead of just creating a stable base platform on which people can freely build applications and actually focus on their own apps.

Re:Deep Dive Into C# 9 by huzaif on Friday December 06, 2019 @09:10AM (#21721851)
I will try to attempt to address some of your concerns...

"First they focused on making .NET Core all about ASP.NET with a clear focus on MVC and making everything super granular. Then they didn't like how granular it was and started to put lots of featurs into smaller pacakges again."

.Net core was a ground-up re-write and was the vehicle used to opensource all .Net. It was always meant to grow into a full-scale offering and eventually bring along all the features users demanded. I personally love reading all the fun library code: https://github.com/dotnet/runtime/tree/master/src/libraries

" First introduce Newtonsoft Json into the default .NET Core stack. Then rewrite everything."

Newtonsoft itself is bloated and there is no turning back for that library. MS is providing an option to use a lightweight JSON library that uses the new SPAN ref struct.

"The ASP.NET Core team now is realising that people hate MVC and they are splitting out more features from MVC into more basic ASP.NET Core features, which is why routing has completely changed again with endpoint routing."

Endpoint mapping wasn't born out of hate for MVC, it facilitates the separation of framework/transport/protocol without introducing config files (or handler code) for each. https://github.com/aspnet/AspNetCore/issues/4772

"The reason for all of this is old MSFT thinking. It's not bloody rocket science, people have been saying it for years that they don't want to be forced into MVC, they want things to be more lightweight, bla bla bla."

Maybe I am old but I remember when MS was almost forced to adopt MVC. They kept webforms alive for a long time. They introduced razor pages when SPA world demanded an easier solution. I am not sure if there was going to be a way to satisfy everyone here.

Re:Deep Dive Into C# 9 by NicoJuicy on Thursday December 12, 2019 @05:56PM (#21777527)
> The webhost model keeps constnantly changing.

The name changed and there is an obsolete attribute on it with instructions.

> First introduce Newtonsoft Json into the default .NET Core stack.

With the same usage/properties/methods but faster

> routing has completely changed

Another method, the older one is still available ( also, obsolete attribute)

> completely rewrite their Startup.cs class

Wait what? You already named 2 of the 3 changes and there is probably a year in between. Also, the third change is related to the webhost change.

Kim changes every day

Re:Deep Dive Into C# 9 by Roonerelli on Friday December 06, 2019 @06:19AM (#21720793)
that is quite a rant for someone who feels its not even worth talking about
Re:Deep Dive Into C# 9 by Nelkins on Friday December 06, 2019 @07:50AM (#21721319)
I think he meant specifically .NET framework, the older .NET runtime.
Re:Deep Dive Into C# 9 by jolux on Friday December 06, 2019 @07:53AM (#21721340)
Newtonsoft.Json was the default JSON parser in ASP.NET Core for a bit, but that’s changed with .NET Core 3’s System.Text.Json. Newtonsoft was never tied to .NET Core itself directly.
Re:Deep Dive Into C# 9 by NicoJuicy on Sunday December 08, 2019 @10:02AM (#21736180)
Then you are lucky, they mentioned .net core 3.1 with Enterprise support.

That means you don't have to update for a very long time ;)

Re:Deep Dive Into C# 9 by Stubb on Friday December 06, 2019 @09:06AM (#21721817)
What platform do you like for development?
Re:Deep Dive Into C# 9 by pjmlp on Friday December 06, 2019 @05:46AM (#21720641)
There are quite a few re-writes required for .NET Core migrations, hence why many enterprises are holding on to .NET Framework.
Re:Deep Dive Into C# 9 by arethuza on Friday December 06, 2019 @05:53AM (#21720670)
Doesn't that happen with any toolset though - when I used Java (a long time ago) I remember a lot of similar complaints when new version were introduced. And look at the fuss around Python 2 and 3.

Are there any popular application programming platforms that are widely used that haven't evolved fairly rapidly and caused a lot of complaints along the way?

Re:Deep Dive Into C# 9 by hvidgaard on Friday December 06, 2019 @07:23AM (#21721153)
All of this happened within less than 2 years to the point where you had to do extensive rewriting for just starting your old code. Python 2 was mostly stable 8 years, and you could continue to run Python 2. Java as far as I know (it's not a stack I regularly work in) rarely require rewrite because a new version comes out.
Re:Deep Dive Into C# 9 by Clubber on Friday December 06, 2019 @08:18AM (#21721498)
I suspect it's because it's new and they are still flushing out how they want the overall framework to "feel." In my experience, this is more the norm than the anomaly. IIRC, Delphi would create breaking changes nearly every release.

It's two philosophies: 1. Backwards compatibility is king, 2. The best framework possible is king. #1, over time, can lead to a hot mess.

Re:Deep Dive Into C# 9 by scarface74 on Friday December 06, 2019 @07:51AM (#21721327)
That’s true for anything. There are still VB6 maintenance jobs popping up every now and then.
Re:Deep Dive Into C# 9 by pjmlp on Friday December 06, 2019 @08:05AM (#21721420)
Indeed, hence why it is a fallacy to think everyone is running to deliver .NET Core applications.

I am yet to get a RFP that even mentions it.

Re:Deep Dive Into C# 9 by scarface74 on Friday December 06, 2019 @08:12AM (#21721458)
Well how much does your anecdotal experience really say about the broad adoption of .Net Core?

I know a lot of companies that really want to run away from a dependency on Windows - especially in cloud environments. Every time you introduce Windows into the mix it costs more for licenses and resources.

This is coming from someone who has exclusively developed and deployed to Windows servers until 2 years ago and even now my only Linux deployments are Lambda and Docker.

Re:Deep Dive Into C# 9 by pjmlp on Friday December 06, 2019 @08:30AM (#21721572)
Those RFP are coming from either DAX or Fortune 500 companies, none of them eager to rewrite WCF into gRPC, rewrite EF 6 stuff with unavailable features on Core, buy new licenses for 3rd party dependencies or buy replacements with the respective rewrite and so on.
Re:Deep Dive Into C# 9 by scarface74 on Friday December 06, 2019 @08:42AM (#21721653)
And again your anecdotal experiences doesn’t say much about the broader market. I see plenty of “Fortune 500” companies trying to find a migration path from .Net Framework and Windows. Heck even MS is abandoning .Net Framework.
Re:Deep Dive Into C# 9 by pjmlp on Friday December 06, 2019 @08:57AM (#21721754)
My anecdotal experiences are as good as yours.

Better pay attention to MS conferences then, they have stressed multiple times that VS is going to stay .NET Framework and how they are commited to keep it as long as there is Windows.

And at .NET Core 3.0 release conference it was visible in multiple occasions how they are fighting the re-writing fatige from many enterprises.

Re:Deep Dive Into C# 9 by scarface74 on Friday December 06, 2019 @09:01AM (#21721786)
They’ve also said that .Net Framework is in maintenance mode and won’t get any new features. Does that sound like a carriage you want to tie your horse to?

I think JetBrains knows a little about the .Net ecosystem.

https://www.jetbrains.com/lp/devecosystem-2019/csharp/

As far as cloud and server adoption.

https://www.makeuseof.com/tag/linux-market-share/

On Amazon EC2, standard Linux (along with its various distros) controls 92 percent of the market. It boasts more than 350,000 individual instances. Again, Windows is responsible for the other eight percent.

Even MS said that 2/3 of their VMs on Azure are running Linux.

Re:Deep Dive Into C# 9 by pjmlp on Friday December 06, 2019 @09:31AM (#21722028)
Our DAX and Fortune 500 customers decide where to tide the hourses, we just follow along.

Those VMs running Linux is where we put our Java stuff not .NET.

Re:Deep Dive Into C# 9 by scarface74 on Friday December 06, 2019 @09:56AM (#21722250)
So now that I’ve shown you non anecdotal evidence of the adoption rate of .Net Core, you’re going back to what you see in your one company?
Re:Deep Dive Into C# 9 by pjmlp on Friday December 06, 2019 @10:32AM (#21722620)
JetBrains? It is the sample of the anecdotes of their user base.

Just like my anecdotes are the sample of our DAX and Fortune 500 customers.

Linux adoption? Yes it is wiping Windows on the server, that is why I always worked for Java/.NET shops since 2006, switching stacks as per customer project requirements, in some projects even both get equally used.

Somehow your replies always feel being about fear of using outdated tech, always having to jump into new toys to keep being employable.

Never felt the need to worry about that, as long as we have happy customers, opportunities abound, regardless of what is the latest tech stack fashion.

Re:Deep Dive Into C# 9 by scarface74 on Friday December 06, 2019 @11:10AM (#21723043)
Resharper is quite a popular plug in for C#.

I think JetBrains sample size is a lot larger than yours.

.Net Core isn’t “new”. It’s been around since 2016 and the direction that Microsoft is headed in.

never felt the need to worry about that, as long as we have happy customers, opportunities abound, regardless of what is the latest tech stack fashion.

And what happens when either you want to or are forced to change jobs? Someone who is 40+ will be seen as just another old head who hasn’t kept up with technology and be on HN screaming about “ageism”. Not directed at you personally. I’m also in my mid 40s and seen it happen time and time again. Someone staying at a job for 20 years and then gets laid off and all they have to offer is that they are really good at ASP.Net WebForms when the world has moved on.

Heck it happen to me at 35 looking for a job and my experience after staying with a company for 10 years was VB6 and C++/MFC.

Instead of moving on to technologies that are in the “slope of enlightenment” phase of the hype cycle would you suggest that I kept doing C on DEC and Stratus mainframes like I did on my first job?

The average tenure of a developer in the US is 3-4 years.

Re:Deep Dive Into C# 9 by pjmlp on Friday December 06, 2019 @01:36PM (#21724700)
> .Net Core isn’t “new”. It’s been around since 2016 and the direction that Microsoft is headed in.

And yet most of those RFP keep referring to stuff like .NET Framework 4.6 and .NET 4.7.1.

As for the job, luckily Europe is not as bad as US in what concerns ageism.

Over 40 here as well and so far no problems switching jobs, because I always strived not to be labelled as only being good at technology X, without anything else to offer.

My advice is to diversify domain knowledge, master soft skills, be able to jump between developer, QA and technical lead roles across delivery sprints, and most customers will find less relevant how well one masters the very latest version of technology X, rather what is the business value one brings to the organization.

And some of them, do value a lot that one is able to keep that old clunky VB 6 application running, instead of sinking several thousand euros attempting an half-baked rewrite into the latest stack trend, and do pay accordingly as well.

Re:Deep Dive Into C# 9 by scarface74 on Friday December 06, 2019 @01:50PM (#21724816)
And yet most of those RFP keep referring to stuff like .NET Framework 4.6 and .NET 4.7.1.

And yet again you use your own anecdotal evidence without any large sample size.....

As for the job, luckily Europe is not as bad as US in what concerns ageism.

So how competitive is someone all other things being equal who hasn’t kept up with technology as someone who has?

And some of them, do value a lot that one is able to keep that old clunky VB 6 application running, instead of sinking several thousand euros attempting an half-baked rewrite into the latest stack trend, and do pay accordingly as well.

Until Microsoft introduces an operating system that doesn’t support it and you’re stuck with an unsupported OS with an unsupported runtime with security and compliance concerns.

Re:Deep Dive Into C# 9 by pjmlp on Friday December 06, 2019 @03:22PM (#21725603)
Competitive enough not to worry about being unemployed.

If they get the job of their dreams, it is a completely different matter though.

Re:Deep Dive Into C# 9 by carlosrg on Friday December 06, 2019 @09:47AM (#21722173)
Totally agree with you. In fact feature and syntax bloat seems common is most popular languages today, like Javascript, C#, Python or even C++, as they keep adding things to compete with new languages like Rust or Swift (and these languages keep adding new things on every iteration too). It's very tiring to keep up.
Re:Deep Dive Into C# 9 by bjoli on Friday December 06, 2019 @10:54AM (#21722862)
Which is the amazing part of lisps. Syntactic changes can be implemented as libraries. You have to have some idea of what is a macro and what isn't, but following the rule "if it can be written a a procedure, write it as a procedure" has never failed me.

The world's best OOP-system (CLOS) was conceived using macos.

Re:Deep Dive Into C# 9 by apta on Friday December 06, 2019 @01:12PM (#21724467)
> C# developers are like Java developers, spending so much time thinking how to write a feature instaed of just getting on with the work.

I see this in Scala, not Java, as the latter's feature set is much more restricted.

Re:Deep Dive Into C# 9 by m0xte on Friday December 06, 2019 @05:58AM (#21720703)
Aye it’s a burning trash heap of everything thrown on top now.

MSFT stacks are an ever ending wild ride of change, deprecation, constant direction shifting and bugs.

I’ve been writing c# since 2002 and I’m quite frankly done now. It doesn’t help me solve problems now. It just creates new ones I don’t want to solve or have to pay to solve.

The IDE is buggy, the platform is buggy and the churn is so bad it’s a ridiculous prospect trying to build a non trivial business on it now.

Most companies are still stuck on classic .net because hardly anything is really portable to core. On top of that when you do finally drag it to core 2.2 then it’s deprecated so you have to rewrite half your MVC stack for 3.0.

And then there’s the customer abuse like opt out Telemetry.

Re:Deep Dive Into C# 9 by scarface74 on Friday December 06, 2019 @07:49AM (#21721312)
Have you looked at the Javascript and front end ecosystem over the past 10 years? .Net is remarkably stable comparatively.
Re:Deep Dive Into C# 9 by m0xte on Friday December 06, 2019 @09:29AM (#21722022)
Yeah I’ve avoided it intentionally!
Re:Deep Dive Into C# 9 by philliphaydon on Friday December 06, 2019 @07:59AM (#21721368)
Disagreed. Upgrading from 2.2 to 3.0/3.1 is not rewrite half your stack. I literally just upgraded a 1.5yo project at work from 2.2 to 3.1 in a couple of hours. I had 1 undocumented issue which took the bulk of the time to fix. Everything else was pretty much namespace fixes or EF being more explicit.

2.2 to 3.1 is probably the easiest upgrade I’ve ever done. You wanna talk about mvc 1 to 2/3, now that was a painful upgrade.

Re:Deep Dive Into C# 9 by yread on Friday December 06, 2019 @04:52PM (#21726329)
2.1 to 2.2 can be a bit of a pain though