32 comments

[ 2.5 ms ] story [ 74.3 ms ] thread
Just a note that this isn't me (hence the quotes), just a fascinating (and sadly relatable) story of Compaq culture in the mid 2000s.
(comment deleted)
> the developer who had implemented the function said he had heard that if/then was inefficient, so he used try/catch instead

I would love to see that function

I want to see the benchmarks that showed try catch as more efficient. It will certainly be Legendary or WTF category
You never see benchmarks after such statements.
I have heard bizarre statements backed up by benchmarks. Eg lodash uses recursion for faster string concatenation for _.repeat() and then proved it was faster.

That said, performance hacks are often temporary: people get one benchmark, update their codebases for 'performance reasons', then the compiler updates and the code is filled with workarounds for an issue that doesn't exist anymore. There's lots of bad JS/TS using other styles because because ES2017 async/await was slow five years ago.

Why does this feel so relatable?
I was a very early adopter of C#, became a bit of an evangelist consultant and introduced it with .NET into several companies with this kind of tech stack.

I had also previously worked at HP’s rival beforehand.

I’d developed a reputation (purely by chance) for migrating teams to .NET and that skill was in demand. When I would start with a new team the initial responses from developers were always the same. For VB6 and VBScript developers C# was a monumental paradigm shift.

They hated the Java style brackets. They wanted their IF’s, ELSE IF’s and END IF’s. Subroutines and functions were backwards. Everything to them felt foreign and wrong.

The truth was that many VB6 developers had come from background of VBA, working with Microsoft Access in corporate IT departments. Or they had come from classic ASP (VBScript) where you didn’t have to compile your code.

Many fought to use VB.NET instead. It felt closer to what they were used to.

However, I was convinced that C# was the future, and I’d impress this on the management teams that would hire me. Every piece of documentation Microsoft put out and every code sample they provided, pushed, promoted and prioritized C# over VB.NET and I was convinced that C# would eventually dominate VB.NET. I also believed that for the web, C# was closer to JavaScript and that had become the de facto browser scripting language, making the context switch easier for website developers.

The more they used C#, the more they loved it. Sure I came across the odd stubborn senior that refused to accept the inevitable, but critical mass and their management usually helped them along the way. In the end, the speed, structure, peers and power of .NET compared to VB6 would eventually win them over.

These days I still come across the odd old .NET Framework application written in VB.NET. Sometimes even on rare occasions a website written in classic ASP. However, they’re always legacy apps on their last legs, where there’s maybe one old programmer keeping it from falling apart and nobody else knows how to support it. Any developer with less than ten years experience probably hasn’t even seen VB.NET. At least, I’ve never seen a company start a new project in VB.NET in years. As far as I’m concerned VB.NET is a dead language now and I was proved right.

I still work in the .NET community and have watched it grow and thrive into what it is today. I never could have imagined being able to read the source code of .NET back then, but today I can. I’d never have believed .NET would run on Linux, and as a preference over Windows as well! I’d never have believed it would become one of the fastest and most performative languages either, but here we are 20+ years later.

Yes I danced with the devil that is Microsoft. I knew what I was getting into when I started, but it’s put food on the table for all these years and I don’t regret it at all. It’s been a wild ride.

Is .NET still used these days? I've never seen it in the wild, but that's probably just my particular experiences (web dev for small/medium companies).

I toyed with it back in the day, but Microsoft still felt like it was actively EEEing back then. Their dev tooling was so much better (I really miss Visual Studio), but the FOSS LAMP stack was, well, free.

I haven't heard .NET mentioned for decades now. Guess my circles got really small! Glad to know there are still other communities using completely different stacks.

Here in the Netherlands it's very big in the financial world. Mostly back-end stuff like mortgage or insurance processing. The question is what else are they going to use? Lots of M2M interactions are done with older protocols like SOAP or, God forbid, EDIFACT. There's zero interest in the community of newer languages like Go, Swift or Rust to implement that kind of legacy making them unsuitable for lots of business cases.
On my bubble it has been .NET, Java and nodejs since 2006, naturally nodejs came a bit later to the party.
It very much is. It is also prominent in gamedev and the downwards trend has been reversed after the .NET ecosystem gone FOSS. With that said, it’s extremely under-appreciated today still (which is completely unjustified - the market is full of technologies of magnitudes of orders worse like Ruby, Node.js or Go which are afforded truly massive amounts of good will despite their flaws which .NET does not have).
Is it popular in game dev because of Unity?

And when you say FOSS, is it a truly independent entity controlling and evolving it, or is it more like the Chromium/Chrome model where the FOSS stuff basically exists for the sake of the proprietary product that builds on top of it?

Unity but also the legacy of XNA/FNA, all sorts of custom game engines using it for scripting, and now Godot too (despite great resistance from the community that uses other, worse language that it offers).

As for the FOSS, the "core" itself is clean (which is pretty much everything you need). As in, just like with Oracle/Java and Google/Go, it is being developed primarily by engineers employed by its respective company, but there aren't really any abstractions that are made to work with specific e.g. Azure products. I would expect the runtime or language teams to actively resist should something like that happen and in fact it was already the case in the past [0]. This is notably where Chromium does so much worse with extremely concerning actions by Google like recent web integrity proposal.

C#, F# and .NET are MIT licensed meaning you can do pretty much whatever with the code, which another organization can make significant use of, with good example being aforementioned Unity. The main workhorse frameworks - ASP.NET Core and EF Core are platform and product-agnostic meaning ASP.NET Core today works best on Linux, and does not care which cloud provider you use, and probably the best DB to use EF Core with is PostgreSQL. There is garden variety of other protocols like gRPC and OpenTelemetry which have "first-party" integrations so it works well if you have a polyglot company (and no, if you use primarily Apache Foundation projects, you are a Java shop).

The tooling situation is probably closer to Java/Kotlin where you're expected to use a commercial product with free community options available (Visual Studio, Rider or Visual Studio Code - last two work great on both Linux and macOS). Some are using Neovim + LSP (Omnisharp) combo but it's very niche, the good debugger implementation is not OSS hence the remark.

[0] https://github.com/dotnet/runtime/issues/97711 here's an example of a request driven by an interest from Azure team which was rejected because it's not something e.g. dotnet/runtime should concern itself with, and was moved to a separate package (it is abstract enough to live as a System.* extensions but nonetheless)

Thanks! It sounds like Microsoft has changed a lot, for the better, since the old days. I'm glad to hear that. I might have to dig into this again!
I probably wouldn't 100% agree to "Microsoft changing". It seems their projects vary in quality greatly, on one hand you get to have something as good as the current day .NET, on the other you have Teams and Windows 11. It's a big company...
.net is used widely in enterprise, but the overlap between .net users and hacker news is slight at best. Microsoft is investing heavily in rust these days, but it'll be 5+ years before we see developer level support for it.
I use .NET everyday.

My entire company is primarily a .NET shop.

Most companies have stuff in .NET, especially if they were windows based.

Modern .net is fun and easy to write. I’d give it another shot!

I actually enjoyed it quite a lot when it first came out! But I wasn't a professional programmer then, just a kid who loved tinkering.

I don't exactly love the Javascript ecosystem, lol, and was thinking about learning more native languages. Swift was higher on that list, but .NET sounds like a lot of fun too! Do you still need to use Windows to develop for it?

And what's the deal with the GUI these days... last I heard, Winforms and WPF were deprecated (right?), and something else came along that nobody used... or something? And then what happened? What's the recommended way to do a UI in .NET today, and does it matter if you're targeting Windows-only vs cross-platform vs web?

You don’t need windows to develop .NET. Windows and Mac both have full fat visual studio. Linux only has vscode, but with the proper extensions, it’s flawless.

Jetbrains rider is also cross platform.

Most of the places I worked I develop on windows or Mac, then deploy on Linux containers.

Cross platform GUI is a bit of a mess. MAUI is the modern stack for cross platform, but in their big brain Microsoftness they decided to leave Linux to the community… so they only officially support, windows, Mac, IOS, and android… I haven’t used it, but i have heard good things.

There is also Avalon.net which is a community gui framework, but I haven’t used it.

You can also use electron with a .net backend, or web view with a blazor (web assembly).

Winforms and wpf aren’t deprecated, (as far as I know, but things could’ve changed in the last year) but they are feature complete. Essentially no new major features, but I believe they support .Net 6/8… they are windows only, since they use COM heavily. You can’t beat the simplicity of winforms for small windows apps, but I would pick UWP for modern windows only development… UWP was the thing no one used, it uses XAML (similar to android development) like WPF, I believe.

If I had to create a cross platform desktop gui for a company I worked at, I would reach for blazor and WASM and use web view or something to present it in a desktop app.

For web, i would have a .net web api, then use a SPA framework for the front-end. You could use blazor, but I’ve heard mixed experiences with it, my primary worry is the startup time of web assembly vs JavaScript. Plus I haven’t done blazor in Kubernetes, and I am hesitant due to the web socket stuff…

Native AOT is becoming big in .NET (no jit or reflection) so we can finally ship decent cli tools (JIT for cli just seems excessive).

Thank you for the details! I appreciate it.
.NET is the language that has put food on the table in my near 20 years as a software engineer.

I have a love/hate relationship with .NET -- However, it has gotten a lot better as time passed.

If I was to look for a job today in my areas.. I am certain there will be a lot of .NET positions going.

> As far as I’m concerned VB.NET is a dead language now and I was proved right.

It is still pretty much in life sciences, when the users cannot cope any longer with their VBA macros for Excel, usually they get IT to install them VB.NET.

Python, R are still strange words on those facilities.

The headline is clickbaity of course. It wasn't .NET that was costing him his job, but working in a shitty environment with incompetent management. So essentially, he dodged a bullet.
Sorry, but this is a really terribly written story that completely skips over the critical part. One moment they decide to use .NET for a proof of concept, and the very next sentence has a consultant come in to criticize the tons of code that they have already written. One moment the author is apparently driving the team to adopt a new technology, and in the next sentence it is all someone else's fault that the team has used that technology inappropriately by writing clumsy code that goes against the paradigm. He talks about having these double-workstations set up for pair-programming sessions, and yet somehow the team (not org) culture allows a lone developer to create utterly crazy code without anybody else on the team every reviewing or sanity checking it. None of this story adds up. None of this is caused by .NET. The title should be more like "poor leadership allowing my team to shoot themselves in the foot cost me my job."
I was a .NET developer for most of my early career. Only recently has a different stack replaced .NET as the one I have most YoE with.

I decided I wanted to leave the world of non-tech enterprise companies and get into a Silicon Valley style tech company for greater pay and perks. As my job search went on, I realized having .NET in my resume was a big problem. I was showered with recruiters pitching jobs at the types of companies I specifically did not want to work at - because .NET is a huge presence there.

Only after I removed every mention of .NET from my resume and LinkedIn profile did I get more focused (albeit fewer) attention from the types of companies I was interested in.

It just sounds like a case of poor management and territoriality, along with a bunch of lone wolf coders each doing their own thing, rather than the fault of any tech stack.

I wonder what they were trying to do in VB6 that was so much easier in .NET.

.net came with a massive amount of system libraries which did all kinds of things for you. Vb6 was just a programming language without a suite of libraries. I'm gonna guess it was one of those things.
I enjoyed reading this.

"Over the next few years, our team of five grew to 20. Four times the size does not equate to four times the productivity"

A lot of this reminds me of my first job as a software developer. My first big project, a complicated CMS web project, trying to peice together something with EVER CHANGING ideas from the client. There was a Senior developer and 2 juniors (myself included)

The senior was getting so fed up with the project, it was really me and the other dev trying to keep it together. At the time, we did not have the authority to speak up like the senior could.. so we did our best.

One day, without the senior, our manager wanted us to build a Gantt chart and see how long it would take to complete the project. We spent the whole day on it and were very proud of the flow. Everything was organised and reasonable. Our manager would look at it for a few seconds and say:- "This is really good, guys. I see the two of you believe you can get this done in 9 months. Try and slash it to two"

I looked at the other dev. We were both shocked. We spent a WHOLE DAY on this Gantt Chart yet the end date was already locked in place! What was the point doing this?

The manager would say other stupid comments, similar to the quote I covered above, that if we "could get another person on this with you, it would two weeks instead of four" type of thing. His viewpoint that, to get our gantt chart to two months, was simply to add more resources. Even a JUNIOR developer like myself at that time knew it doesn't work like that!

I couldn't help but think of various sentences from Fred Brooks' Mythical Man-Month.

This other junior dev... we went our seperate ways... but we are still in contact, and meet up a few times a year.

(looking back, I see areas I could have done better. Of course I have nearly 20 years experice as a software developer. I am just disappointed in the senior dev. I am basically his age now that he was then. As long as I am treated with respect and proof they are willing/keen, will go out of my way to help younger devs)