Live data from Hacker News

Why I Left the .NET Framework

blog.jonathanoliver.com

61–70 of 109 posts

Re: Why I Left the .NET Framework

#61

Serious question: If you're building web products from scratch and can choose your environment why would you use .NET (other than "because I know it")? I've personally never used it because I'm opposed to closed-source single platform languages / frameworks and would like to understand the mindset of those who use it.

1. c# is a great language - LINQ and type inference make it as succint as python (or even more when I use extensions methods and generics!), static type system gives a lot of safety eliminating huge classes of bugs, decent performance compared to other succint languages like Python or ruby. Really hits the spot for me, and I would hate to go to a dynamically typed language now.

2. VS is a great IDE if you give it enough RAM.

3. LINQ2SQL makes for quite pleasurable, succint and type-safe database manipulation. Bulk updates suck though, but that's an ORM for you. SQL is also a good database, and when time is right I can make use of remote database mirroring, instantly boosting my fault-tolerance. I could use Postgres as well, but SQL tips the scales with LINQ2SQL.

4. Reasonably popular, compared to web dev in other succint statically typed languages say, Haskell. So I can find answers on stack overflow.

5. Nuget. Sometimes I need a commercial package, and I can often times just get it from Nuget, play with it, and then punch in serial number after paying to remove watermarks etc. It's nice to have those packages for when I need them, to be able to buy my way out of problems.

6. Backward compatibility. I heard that ruby was breaking it more than once and python did it once. .NET seems to be less prone to this.

And I really see no downsides to it. Windows is only 20% more expensive on AWS, and hosting is literally the last on my list of expenses. Performance is good enough for me - given my business model I will be able to afford a small data center before my single Windows server gets too small for my workload. VS is slow, but buying extra RAM is a small price to pay to get it up to speed.

Re: Why I Left the .NET Framework

#62

I think there is migration away from .NET underway, as Windows loses market share to other OSes. Desktop apps are becoming more rare. Web apps are being written in open-source platforms. A lot of the companies still using .NET are large fortune 500 ones, maintaining existing systems. Remember Cobol? I'm almost at the point where I consider .NET legacy. Perhaps, not yet, but maybe in 5 years. Does this mean the well i…

People said that about java ages ago. Never happened.

Re: Why I Left the .NET Framework

#63
post #15
post #4

Some really good criticisms, but I do wonder how long ago this developer left .NET. .NET is now heavily async based. WPF may have started it years ago, but async has been a keyword in the language for quite awhile! (I haven't used a proper lock in ages. Event queues are where it is at! Or pick your favorite paradigm, heck the framework comes with thread pools built in that it'll juggle for you!) In regards to .csproj…

I recently had to spend a lot of time with csproj files. They look and behave rather a lot like Ant/Maven. This is not a point in their favor. Ant/Maven was loved and then subsequently hated by a lot of java developers. XML is an extremely verbose syntax to have to deal with. But the real killer is one of lockin. Yes you can use msbuild to do things with them but the syntax is really designed not for a developer to r…

> I recently had to spend a lot of time with csproj files. They look and behave rather a lot like Ant/Maven. This is not a point in their favor.

Perhaps not, but it's glorious compared to, say, .xcodeproj.

Combined with .props files (same format as .csproj), managing .vcxproj s (also the same format as .csproj), to manage a build matrix of ~5 platforms x ~7 build configurations x ~20 projects via a few hundred .props files hasn't been that bad.

> XML is an extremely verbose syntax to have to deal with.

Easy to parse, though, if you want to automate keeping it in sync with other formats.

> As long as you stay in VS you won't really notice. As soon as you leave though its no longer comfortable.

The longer I use them the more often I drop down to simply firing up a text editor to edit my .props files. Configuring through the IDE is a great way to add a whole bunch of state which you may or may not have meant to set, and can get quite unwieldy... whereas I can see everything at a glance that a single .props file configures by simply opening it up.

At this point I have our .vcxproj file lists almost entirely decoupled from the .props build settings. Fewer merges, and each .props file is quite easy to digest at a glance.

Re: Why I Left the .NET Framework

#64

> Not having a debugger is actually a liberating experience because it forces you to code in a different way. Not having a debugger is like living in the stone age. Personally, the the ability to inspect application state at runtime is non-negotiable.

I used to always use the VS debugger when I used C# in school (my research lab used C#). Now, I use Python and C for work, and I never use a step debugger. For some reason I just don't miss it, and using print statements is just fine. This is especially true in multithreaded code. I do a lot of Qt programming, and everything tends to be executed in an auxiliary thread. I will say that I like step debuggers that come…

I know what you're getting at.

At home I develop with C# and use the debugger all the time. However, I'm a PHP dev at work and we can't connect to our dev server with debuggers. We have all sorts of various tools we built for getting around it, like dumping objects to email and so forth. Although I kinda miss a step debugger at work I've got enough tools to deal with it, even if it's a bit slower sometimes. In other cases it's kinda freeing in a strange way.

Re: Why I Left the .NET Framework

#65

> I consider .NET to be an ecosystem including all tools, projects, platforms, organizations, and groups of developers. Well, that explains the otherwise baffling statement "I left .Net because ... git is so much better than TFS" That is an opinion that I also hold, but isn't relevant. If the conclusion is that "but .Net comes with a mindset of using all and only the MS tools" then yeah, avoid narrow-minded people. A…

Yeah, I don't see this problem. Maybe I'm just an outlier, but when I was a .NET developer, I would use non-MS tools all the time. Git is better than TFS, just as nUnit is better than MSTest. TeamCity is better than TFS. Visual Studio with ReSharper is better than Visual Studio without.

Good technologists will use a heterogeneous toolkit no matter what ecosystem they're working in.

Re: Why I Left the .NET Framework

#66
post #4

Some really good criticisms, but I do wonder how long ago this developer left .NET. .NET is now heavily async based. WPF may have started it years ago, but async has been a keyword in the language for quite awhile! (I haven't used a proper lock in ages. Event queues are where it is at! Or pick your favorite paradigm, heck the framework comes with thread pools built in that it'll juggle for you!) In regards to .csproj…

Agreed - I see VS2013 running very well in a VM even. For me, VS is the strongest pull of the .Net platform after C# the language. It doesn't take me long in another IDE/language to sigh and wish for something to work as well as VS. However, I am one of the few that would never use resharper. There are no refactoring features in the world that make a good trade for laggy typing.

Hmm... Unless your computer is very old or poorly configured, there's no reason for ReSharper to cause laggy typing. Maybe you should give it another shot?

Re: Why I Left the .NET Framework

#67
post #15

Earlier quoted context omitted.

I recently had to spend a lot of time with csproj files. They look and behave rather a lot like Ant/Maven. This is not a point in their favor. Ant/Maven was loved and then subsequently hated by a lot of java developers. XML is an extremely verbose syntax to have to deal with. But the real killer is one of lockin. Yes you can use msbuild to do things with them but the syntax is really designed not for a developer to r…

> I recently had to spend a lot of time with csproj files. They look and behave rather a lot like Ant/Maven. This is not a point in their favor. Perhaps not, but it's glorious compared to, say, .xcodeproj. Combined with .props files (same format as .csproj), managing .vcxproj s (also the same format as .csproj), to manage a build matrix of ~5 platforms x ~7 build configurations x ~20 projects via a few hundred .props…

I've redone the build system at work completely half a year ago, as some .vcxproj files have gone through a few upgrade processes since VC++ 6 projects. Needless to say there was a lot of cruft in there. You can do a lot of nice things by offloading configuration into property sheets and including them as needed and this more or less cut down the project files to a list of dependencies and a list of files. It also doesn't help to have add-ins that insert custom build rules for every file where each change to some configuration property changes about 50 points in the project file.

I think it comes down to: Auto-generated build files are always horrible to read; write them yourself once you know what you're doing. It's probably a bit worse with MSBuild projects as Visual Studio uses them as its native project format, whereas no one else tries that with Makefiles (for good reason, I guess).

Re: Why I Left the .NET Framework

#68

Serious question: If you're building web products from scratch and can choose your environment why would you use .NET (other than "because I know it")? I've personally never used it because I'm opposed to closed-source single platform languages / frameworks and would like to understand the mindset of those who use it.

A very good reason that's not "because I know it" is that there aren't many good alternatives. And before you start yelling at the monitor and before you start listing languages like PHP, Ruby, Python, and server side JavaScript try to understand that I don't mean alternatives as in "other programming languages that work on the web" but alternatives as in "other programming languages that use the same paradigms". (I hate myself for using that word but it sort of works in this context.)

But what do I mean by this? C# is a statically typed object oriented programming language with functional constructs that has a good IDE and some good web frameworks. The other alternatives that I listed are dynamically typed and use text editors for the most part. And while there's nothing fundamentally wrong with that kind of workflow you should understand that not everyone is a fan of it. I've worked with Python and PHP before and done quite a bit of JavaScript and it always feels to me like giving instructions to the computer instead of having a conversation with it. Again, this is a matter of personal preference.

Two alternatives to C# that are a bit closer in terms of thinking would be Java and Scala. Java I don't love and Scala, while I'm OK with it as a language, has given me nothing but problems although I must say that I'm not giving up on it yet. Working with Scala on Windows was sub optimal, especially when trying to get Typesafe Activator running on PowerShell, and when I worked with it on Linux I quickly realized that IDE support for Scala is not particularly great. I tried Eclipse, Netbeans, and IntelliJ IDEA Community edition and none of them were at Visual Studio levels of quality with regards to Scala and Play.

About .NET being a closed-source single platform language / framework, that's kind of true, but Roslyn and friends should make that less true in the future. And besides, even though .NET runs best on Windows servers every other component that can form your web application like databases, load balancers, caching, etc. can run on its own native OS. The idea that if you're going to use .NET then everything that you use must have been made at Microsoft is so odd nowadays that not even Microsoft supports it. For example, the basic web application templates that are built into Visual Studio incorporate third party libraries like Bootstrap and jQuery, and guidance on how to use .NET technologies with technologies like AngularJS is commonly given by Microsoft itself.

Re: Why I Left the .NET Framework

#69
post #44
post #28

Earlier quoted context omitted.

FYI, next version will have a JSON-based project file (whether this is better or not is left as an exercise to the reader).

JSON vs. XML is largely irrelevant IMO. What is needed is something with as little extra crap as possible so that it is possible for a developer and/or diff tool figure out what is going on with the file.

The only real relevant part is that this means no comments. So if you DO decide to do something neat in your build files, you can't note anything about it. Or easily remove pieces for testing.

But it's JSON which is so hip instead of XML which is so bloated. /s

Re: Why I Left the .NET Framework

#70
post #8

> traditional Windows devs are typically only good at Windows and get lost very quickly outside of their comfort zones, which is not true for Linux devs Strongly disagree. I've watched scores of Linux-only developers try to do things on windows machines, stumble over small things, and then proceed to blame windows instead of realizing they simply lack experience.

i agree. windows devs are lazy in their majority do not like to think outside the box and often when we say "there is a project on github that can help you" guys just respond you will use an open source solution for this project?

I do not understand why they can not analyze a few lines of code and insert them into your projects to optimize your ideas.

Lastly I'm working on a MS Windows team and the time squeeze, I always turn to something in windows would be impossible to do with only 1 line. Example: parse a PDF with pdftotext, read the contents and drive to another file already positioned with the help of Perl, Python or even a simple grep.

I do not know the MS ecosystem deeply and am still getting used. Particularly consider VS a great tool. The problem with using a Git server is very serious and gets to be frustrating but nothing that you can not do otherwise.

The MS has lately shown to follow a path of opening many of their tools following an open source model and I see it as a sign to encourage the use of various technologies (open source or not) to solve a problem. Situation which MS devs are not accustomed

Post reply on HN