News for hackers. Stuff that matters.
Re:.NET 5.0 by _acco on Tuesday November 10, 2020 @04:29PM (#25052215)
The future is very bright for .NET. It has the right raison d'etre - .NET is part of the growth story for Nadella-Microsoft.

They already have you programming in their editors (VS/Code) and pushing to their VCS (Github). They're even teaching you the C# type system with TypeScript :) If they can just convince you to use their stack, Azure will win you over from AWS every time.

As a result, I really wanted to adopt .NET earlier this year. But they have some work to do to make the ecosystem approachable to newcomers.

One of the core issues feels so... trite. But experiencing it, I realized how real it really was:

The Names. Microsoft has created a Ninja Warrior obstacle course of proper nouns.

It is comical. It is worthy of parody.

.NET, the CLR, and their relation to C# and F#. ASP.NET, ASP.NET MVC, ASP.NET Web Api, Blazor vs Razor, .NET Core vs .NET Framework vs .NET Standard.

I think I could draw the lines between all those with about 50% accuracy. And I read like 3 books on .NET before diving in.

It's bad off the top when you're trying to figure out which way is up in the ecosystem. It goes from bad to worse when you're looking through docs and Stack Overflow answers.

It was almost never immediately clear if a document I was looking at on Microsoft's own website applied to me or not. That is a cardinal sin of technical documentation.

Ultimately, this meant that .NET Core Web API (or whatever I was using) felt poorly documented.

I'd find myself looking at docs that mention .NET Web API - but I can't remember if that rolls up to .NET Core or Framework -- or both? Am I using MVC? Is Web API a subset of MVC? No clue.

It's definitely a hard problem. Here's to hoping that now that everything is unified, they can work on paving clearer roads into their ecosystem.

Re:.NET 5.0 by FridgeSeal on Tuesday November 10, 2020 @05:37PM (#25053023)
> Azure will win you over from AWS every time.

Going to have to disagree here.

That might be the case if Azure was not literally a tire-fire. I have been using Azure for work and it's the most frustrating, inconsistent, often-broken, confusing and stress-inducing cloud service that my teammates and I have ever been subjected to. It left such a bad taste that I am quite certain I would flat-out refuse to use it again in the future, or work somewhere that uses it.

Take my advice: just don't use it. It's not worth it. Use AWS, use GCP, use Digital Ocean. Use some random cloud provider. Just don't use Azure.

Re:.NET 5.0 by moron4hire on Tuesday November 10, 2020 @06:58PM (#25053802)
I've been using Azure for all of my projects for 5 years now, with zero problems.
Re:.NET 5.0 by ashtonian on Tuesday November 10, 2020 @10:05PM (#25055082)
If you do the Microsoft way. But i find their batteries included approach to be broken more often than not. Tried deploying a docker image with cors on azure. Literally could not do it because of bugs and the gsc that they were intercepting cors packets. Opened up 3 bugs took Months to fix one. It's a tire fire.
Re:.NET 5.0 by flamtap on Tuesday November 10, 2020 @05:48PM (#25053136)
Wow! Hot take. What Azure services were you using?
Re:.NET 5.0 by FridgeSeal on Wednesday November 11, 2020 @05:56PM (#25064016)
Front door, firewalls, LB’s, AKS, Azure Functions, Azure Disk (in AKS), scale sets and file-share storage accounts.

All of it was painful. There docs were lacking or sent you in circles. The documentation for their firewall product is three-quarters known issues and errors. Azure functions were painful to run locally, good forbid you’re not using Windows. Azure would take ages to attach a node on K8’s. Like, over an hour. It consistently had issues moving Azure disks between nodes in K8s: “can’t mount disk, attached to another host” in comparison AWS will speedily and happily re-attach an EBS disk to a new machine.

Permissions were opaque and distributed across the whole interface.

It silently deprecated keys underneath us, broke a number of services (couldn’t write to attached disks in K8s, couldn’t move them), didn’t inform us that this happened, we only figured it out by trawling through GitHub issues.

Storage Account explorer application breaks/stops consistently.

“Alert but permit” mode on firewalls doesn’t do what it’s supposed to: it will permit, but totally fails to alert you.

Scale sets operate weirdly, I didn’t personally deal with this too much, but my teammates had consistent issues with strange caching issues and more or less machines being spun up than should have.

Until we fixed it, every Azure PoP was health-checking our web app 2-3 times a minute: our logs and servers were being flooded with literally thousands of pointless requests.

If you have an AKS cluster with n machines currently in it, with a minimum and maximum of (n, m) machines, and you want to say, increase the minimum number, you cannot: it will refuse and tell you “the minimum number of nodes must include the current number”, so rather than just automatically adding a new node (a la AWS, and I presume GCP), you have to force the cluster to scale up to the new number of machines by throwing workload at it, then make the change.

AWS has a single Python package called “Boto3”, from which you can do pretty much everything. Microsoft in their infinite wisdom has a separate Python package for every service, and sometimes subset of service. Do you know whether you need the package for Storage Accounts, File Share, Share Accounts, Object Store or whatever else they had? Also, authenticating against these was a pain: sometimes you need a key provided by the service (let’s hope your permissions let you see that), sometimes you need to generate a service principal for your app (unless there is already one? In which case it’s listed in the UI, but nowhere you’ll find it, and certainly not under “service principals”, and you probably won’t have the permissions to see the information you need anyways) and then sometimes you need both!

Azure let us spin up a K8s cluster on a version of 1.18, but then didn’t let us scale the cluster a few weeks later, because apparently that version just didn’t exist, so we should either use 1.17, or update to a newer version of 1.18, but you can’t skip point-releases, so you’re going to have to update everything in your cluster before you can have another node.

Re:.NET 5.0 by masterofmisc on Wednesday November 11, 2020 @02:43AM (#25056321)
Gee.. Sounds like you have had an awful time of it. Any chance you could speak more of some of the issues you encountered? We are looking at cloud providers and was kinda leaning towards Azure.
Re:.NET 5.0 by richjdsmith on Wednesday November 11, 2020 @02:51PM (#25062186)
For what it is worth, I have been migrating from AWS to Azure for a few projects over the past year and have had nothing but good things to say about Azure. Documentation is superb, as is support and experience consistency.

AWS is still great, I just happen to like Azure more.

Re:.NET 5.0 by dustinmoris on Wednesday November 11, 2020 @03:16AM (#25056484)
My advice, stay the f*ck away from Azure as far as you can. It’s the biggest clusterfuck I have ever had to deal with. Unless you are a Microsoft Gold Partner and you simply buy every shit which your Microsoft Account Manager tells you then you have no reason to use Azure. Unlike the Google Cloud or AWS, Azure has not a single service which is unique or good in any particular way. On the other side, they have many services which are uniquely so bad that they are unusable in Azure.

Example of unique services in the GCloud: Spanner, Firestore, BigQuery,...

AWS: Face recognition service and other neat things

Uniquely fucked up in Azure: Functions, Web Apps, Storage, Application Insights (FML!), ... many many more

Re:.NET 5.0 by MaKey on Wednesday November 11, 2020 @06:32AM (#25057484)
Your post is not going to help him because you're just ranting without providing details on issues you encountered.
Re:.NET 5.0 by brtkdotse on Wednesday November 11, 2020 @07:03AM (#25057656)
> Uniquely fucked up in Azure: Functions, Web Apps, Storage, Application Insights

I’m using all of these and it’s... fine? It does what is says on the tin basically.

Re:.NET 5.0 by FridgeSeal on Wednesday November 11, 2020 @05:32PM (#25063801)
Oh my god Azure functions. What a pain they were, nevermind getting them running locally.

AWS Lambda: run the code, because it’s easy to write code to be fully independent of lambda specifics.

Azure functions: oh no you need to run this thing to simulate stuff. Oh you’re not on Windows? Uhhhh too bad, that doesn’t work. You’ll have to use this other, random beta software. Oh it failed to run now, because you didn’t provide it with some arcane set of azure credentials which are inexplicably required to run it locally.

Storage-especially on Kubernetes is Alpha quality at best. The amount of pain we had was wild considering it is a fairly basic requirement.

Re:.NET 5.0 by MaKey on Thursday November 12, 2020 @08:09AM (#25069424)
I had no trouble developing Azure Functions with VS Code on my ThinkPad running Ubuntu.

Getting them to run locally [0] or in your Kubernetes Cluster [1] isn't too difficult. With AWS Lambdas that isn't possible at all.

Regarding the storage for Kubernetes, as long as you don't provide details it looks like just another rant. I get that you like AWS more than Azure but your opinion may not reflect the actual experience someone else will have.

[0] https://docs.microsoft.com/en-us/azure/azure-functions/funct... [1] https://docs.microsoft.com/en-us/azure/azure-functions/funct...

Re:.NET 5.0 by bhandziuk on Wednesday November 11, 2020 @09:02AM (#25058446)
> Functions, Web Apps, Storage, Application Insights

What are the issue with these? What's missing/could be better?

Re:.NET 5.0 by MaKey on Wednesday November 11, 2020 @07:00AM (#25057634)
What kind of workloads are you looking to run in the cloud? Chances are you won't have major issues despite the rants on here making Azure sound like a dumpster fire.
Re:.NET 5.0 by masterofmisc on Thursday November 12, 2020 @12:42PM (#25072360)
Honestly our stuff is pretty pedestrian. We have a front end website and API service, a couple of application servers for our telemetry IoT outstations and of course a backend database server.
Re:.NET 5.0 by MaKey on Friday November 13, 2020 @04:54AM (#25080756)
I think you'll be fine with Azure then. You should use the pricing calculator beforehand to not be surprised by the costs and figure out how to reduce them but this applies to any cloud provider.
Re:.NET 5.0 by masterofmisc on Saturday November 14, 2020 @05:40AM (#25091428)
Thanks for the reply MaKey. Thats good advice.
Re:.NET 5.0 by henrikschroder on Tuesday November 10, 2020 @08:18PM (#25054465)
Microsoft has always, always been awful at naming things, and all the intermediate steps in this unification have all been terribly named. However, this unification removes all the intermediates, which means they can simplify the naming as well. Let's hope they can stick to it...
Re:.NET 5.0 by recursive on Tuesday November 10, 2020 @06:30PM (#25053531)
The type system in typescript is a lot more advanced than the one available in C#.
Re:.NET 5.0 by littlecranky67 on Wednesday November 11, 2020 @04:29AM (#25056892)
This is due to the fact that typescript needs to interop with javascript, and existing js ecosystem has some very weird "typing" decisions. In TypeScript you can express types that you would never ever do in a "sane" language like C# which has proper typing design in place.
Re:.NET 5.0 by recursive on Wednesday November 11, 2020 @11:15AM (#25059555)
I have wanted union types plenty of times in C#.

Nullability analysis was recently added to C# (nullable reference types) but it was in tyepscript first.

Re:.NET 5.0 by layoric on Tuesday November 10, 2020 @07:26PM (#25054056)
Interested in what you mean by 'lot more advanced'?

The optional nature of the typing can be very useful for the web for sure. From my experience that same flexibility means you can't do as much reflection at runtime as in .NET but I have been for the most part away from typescript for last couple of years, so be interested in any resources around this subject.

Re:.NET 5.0 by recursive on Tuesday November 10, 2020 @08:19PM (#25054466)
* Structural types rather than nominal * Type unions and intersections * Type guards * `keyof` operator * String and number literal types

See https://www.typescriptlang.org/docs/handbook/advanced-types.... for more. There are a lot of utility types in the standard library that could not be expressed in C# as well.

Reflection is very different. It kind of still exists, but in a very different way.

Re:.NET 5.0 by seanmcdirmid on Wednesday November 11, 2020 @12:43AM (#25055822)
It isn’t really more advanced as it is different. What typescript achieves with structural typing it loses in terms of good error messages and the encapsulation benefits of nominal typing.

I’ve gotten used to typescript, but I still enjoy using C#. Some things I really miss in C# (limited operator overloading) that will never come to typescript (not because of the type system, but because of javascript source compatibility).

Re:.NET 5.0 by WorldMaker on Wednesday November 11, 2020 @01:20PM (#25061088)
Some things like conditional types and string template literal types start to get way out into abstract type land that is certainly more advanced than C#'s type system. Typescript is inching closer and closer to the Haskell-ish land of turing complete type systems where the type system itself is nearly it's own meta-programming language with each version.

(A recent example was the "SQL engine" written using string template literal types to type safe "query" an in-memory database. That's quite more advanced than anything C# is capable of, albeit a strange hack and unlikely to be specifically something useful in production anytime soon, though still built out of things that make Typescript useful to some JS projects.)

Re:.NET 5.0 by seanmcdirmid on Wednesday November 11, 2020 @11:15PM (#25066371)
Typescript lacks the goal of soundness, which makes it much easier to introduce powerful features than in Haskell.
Re:.NET 5.0 by branko_d on Thursday November 12, 2020 @08:21PM (#25077706)
Part of it is that TypeScript doesn't need to worry about memory layout - everything is basically a hashtable.
Re:.NET 5.0 by kqr on Wednesday November 11, 2020 @01:01AM (#25055905)
Yeah, this is a big problem. I wanted to understand the differences between just C#, F#, .NET Standard, .NET Framework, and .NET Core, and it took a somewhat long article[1] just to figure that out!

[1]: .NET on Non-Windows Platforms, a Brief History. https://two-wrongs.com/dotnet-on-non-windows-platforms-brief...

Re:.NET 5.0 by ripley12 on Wednesday November 11, 2020 @01:52AM (#25056107)
...and if you’re creating a new class library today, you also need to understand how UWP and .NET 5 fit into the picture!

I’m not complaining too much, they are intentionally addressing this fragmentation, but it’s a real mess for newcomers.