DEV Community

Chadwin Deysel
Chadwin Deysel

Posted on

Why I Chose C#

Attention fullstack developers, there’s an imposter among us. Unfortunately, it’s me. I like to think of myself as a front end dev, disguised as a fullstack developer. So while I’m willing to on and learn multiple frontend options, the backend is maybe even more important.

Here’s why I’ve chosen C#

Open Source Project Maintained by Microsoft

While these two things don’t make it inherently better, it makes me sleep at night knowing that the language will always be optimized, improved on and supported.

Open source projects are always great as there is a high level of transparency and usually an active community of developers and companies that’s invested in the project.

Having the language backed by an active community is great, because if there are any short coming or ways to improve on it, the community will always do it’s best to improve on it.

It’s a Great Language

Apart from C#, I’ve briefly worked with languages such as Delphi, Python, Java and JavaScript. However C# has always been my preference.

It’s probably the Stockholm Syndrome talking as this was the language we had to learn in college. But I’ve never had any issues with the language itself getting in the way of my productivity and my ability to create applications.

It makes use of a syntax that is easy to understand, but it also doesn’t fall apart when the code starts getting too complex.

C# is fundamentally an OOP (Object Oriented Programing) language. This means that everything is comprised of objects and we can create and interact with objects and their methods and properties.

However C# also accommodates for certain Functional Programming, techniques such as Lambda Expressions, Fluent APIs etc. allowing you to speed up your productivity and the performance of your application.

.NET Ecosystem

or is it dotnet 🤔? either way...

You can’t mention C# without talking about the infamous .NET. While it has been the bane of developers in the past, due to it being proprietary, it has since become open source and the .NET Core update has pushed the limitations of what a development eco system can accomplish.

You can build pretty much everything with C# and .NET. From Mobile Applications, Web APIs, Video Games and AI tools.

Another benefit that .NET has introduced is it’s cross platform. .NET can be ran and hosted on both Windows and Linux.

This takes out a lot of frustration developers might have relating to hosting and opens up to organizations who either already have Windows Hosting or new organizations that wants to capitalize on Linux hosting.

NuGet Ecosystem

In as simple terms as possible, a NuGet package is a compressed file that is made up of compiled code (DLL). It can be created by any developer and then uploaded to the NuGet gallery, similar to NPM packages.

This has opened up the landscape for developers to create libraries that solve their organization's problems and even other developer’s problems.

There is also an infinite amount of great libraries that already exist out there. You have LINQ that acts as a universal data query syntax. AutoMapper for mapping types to other types. NUnit and Fluent Assertions for unrivaled Unit Testing. And many, many more.

You can also create your own private NuGet packages that’s specific to your organization. These packages can then be shared between developer teams to increase the consistency and productivity of your developers.

Bright Future

Since the introduction of .NET 6, the .NET eco system and C# has been on a contentious up.

New features are being added to C# as a language, such as record types, which focuses on maintaining records, typically from a database, without the extra leg work by doing things like making an Id of a record immutable once it’s been set, for example.

.NET has also put in a massive bid to run Web Assembly applications with Blazor. I’m a big fan of the idea of WASM for building web applications in a more performant and productive manner.

.NET Maui, is also another emerging technology out of the .NET eco system. This is going to allow developers to take their Blazor code and use that to create native cross platform applications on Android, IOS and Desktop.

Conclusion

C# is a great language that has a lot of useful features and interacts with one of the most powerful developer eco systems out there, .NET. It also has a future that I am keen to be a part of.

If you found this post useful, please follow me on Twitter for more Angular and development tips and check me out on GitHub.

Thanks for reading and have a great day! 😄

Discussion (28)

Collapse
jwp profile image
John Peters

Switched from Java to C# when it was released. Best decision I made career wise. Also, knowing C# allows for super fast ramp up in TypeScript.

As for WASM, super cool and not yet a big thing with large companies. This means learning it now has super strong future demand and marketability.

As for Maui, I'm just going to wait longer. Don't feel it's strong yet and I still have PTSD from Silverlight, WPF and all descendants. I'm convinced Microsoft didn't really want to give up the desktop for any .Net Architecture.

Collapse
chadwinjdeysel profile image
Chadwin Deysel Author

I agree with the conversion to TypeScript. Having a strong background in C# allowed me to pick up the fundamentals of TypeScript in no time to implement in my frontend applications as well.

As for the PTSD, I feel we're all suffering 😂 I came into .NET with the outcomes of my course resulting in me being a UWP application. However I think .NET has done a great job in responding to what their community has been requesting (some of the new C# 11 features), so all we can do is lean back and hope for the best.

Collapse
jwp profile image
John Peters

.NET fractured the desktop so badly that I refused to learn UWP or anything subsequent.

WPF was always stronger except for cross platform.

What they should have done was to continue with WPF.

The whole fiasco reminds me of the Silverlight fail. And now they are selling MAUI?

C'mon Microsoft fire some of your directors. Silverlight, WPF, UWP All died because of bad decisions and lack of disclosures.

Collapse
handsomebwonderful profile image
Mark Dochstader

Also, knowing C# allows for super fast ramp up in TypeScript.

Can you expand on this? TS definitely adopts some OO designs, and the same creator has his fingerprints all over both :) but I'm interested in why you think C# vs. for example, Java or Delphi?

Collapse
jwp profile image
John Peters • Edited on

Java was not being enhanced for many years. During that time Microsoft put out some of the best work in C#. Examples: System.Linq, Generics, and Async/Await.

When Java finally caught up it was too late because their implementations were and still are inferior.

Shockingly IntelliJ still is a minor league player to Visual Studio.

I had some work in Java a few years back, the environment sickened me daily. I was glad to get off that project. For me, I'll ever go back to Java for anything less than $200k.

Collapse
natescode profile image
Nathan Hedglin

Java is just a crappy C#, language-wise. Though you can do Groovy or Kotlin instead. The Java ecosystem is huge. Really depends what you're doing.

C# has solid tooling that just works.

Thread Thread
afheisleycook profile image
Aheisleycook

I have .net skills like c#alot considering f#

Thread Thread
jwp profile image
John Peters

Amen brother!

Collapse
eljayadobe profile image
Eljay-Adobe

I've worked on 3 big projects in C#. It's a good language. .NET is a good ecosystem. If you do TDD, NUnit and NCrunch are invaluable. (I'm also a fan of F#, with the introductory tutorial The Book of F# by Dave Fancher getting my recommendation.)

I've worked on a 2 big projects in Java. It's also a good language, with a good ecosystem.

These days I'm doing a big project in C++. I miss C#.

Collapse
chadwinjdeysel profile image
Chadwin Deysel Author

Hi Eljay, thanks for the recommendation. Would be really keen to hear more of your experience with the other languages and their ecosystems (Java and C++) compared to C#. I don't think we hear enough from people who has had real life experience with some other frameworks.

Collapse
eljayadobe profile image
Eljay-Adobe

For Java, the projects I worked on was AlterCast, Graphic Server, and Document Server. Those were targeting J2EE environments for enterprise customers. It was Java 1.4 era, and most devs were using Eclipse, amongst a few IntelliJ fans.

I had come from a C++ background, so the refactoring tools in Eclipse for Java were amazing.

At Microsoft, working on Expression Blend and porting it to Visual Studio, I worked in C# and WPF/XAML. That was my first exposure to C#, and I was struck by both how similar C#/.NET was to Java/JVM, and also how different. I don't consider one superior to the other; they're both very good, and they both have their quirks and peculiarities. (IDisposable, lookin' at you.) It was nice to work with Lutz Roeder, just don't mention Reflector ... he was completely done with it by then.

But I didn't have a "great" experience with C# for that project, because we didn't have the extra mojo of using developer enhancement tools like ReSharper or CodeRush.

After that project, I got to work on the IE10 dev tools, and then the IE11 dev tools. That's what I got to use TypeScript 0.8, which at the time brought ES6-isms to ES3/ES5 as well as other better expressivity to JavaScript. The ES3/ES5 "polyfill" is no longer relevant, but TypeScript is still wonderful anything larger than JavaScript snippets.

JavaScript was designed to be for tiny snippets of event handling glue code. It does that job really well. Scaling JavaScript up to medium or large size applications is not in its wheelhouse; TypeScript makes that a better value-add proposition.

During "the browser wars", the contenders were Microsoft Silverlight, Sun/Oracle Java, and Macromedia/Adobe Flash. Who would have thought the dark horse technology JavaScript would beat out those other well-funded behemoths?

After The Big Layoff of 2014, working at another company on their Inspire software in C#, I got to use ReSharper, and NCrunch. Both are amazing tools — NCrunch being pure magic. (I presume both have Java/JVM analogs.) One co-worker of mine (at the time, the maintainer of Snoop) was a big fan of CodeRush, also an excellent tool.

Now I'm back in C++ land. I started with C++ in 1990, I wouldn't have imagined at the time that 30+ years later I'd still be using C++.

Prior to C++, my languages I've worked with were C, Pascal, LISP, FORTRAN, Prolog, 68000 assembly, 6502 assembly, and a wide variety of BASIC. I've worked on Apple //e and IIgs, Commodore 8032, Amiga 500 & 3000, Macintosh II through today's versions (from 68000 to PowerPC to Intel 32-bit to Intel 64-bit to ARM). I've also programmed on DEC VMS, IBM 3090, and a variety of Unix machines.

In addition to all the programming languages I've used for work or academics, I've also enjoyed learning a new programming language every year. Kind of my hobby. This year I'm taking a look at Swift 5.5 (due in large part to my coworker Dave Abrahams, who was one of the developers of Swift)... since I hadn't looked at it since Swift 1.x and it has changed & improved greatly since then.

My favorite languages are D, Python, Lua, and F#.

Thread Thread
chadwinjdeysel profile image
Chadwin Deysel Author

What a journey, it's amazing how we tend to end up right where we started. And with regards to JavaScript beating out the established competition, I think a lot of developers at the time were rooting for JavaScript to win.

Thank you for taking the time to tell your story, was really great to read 😃.

Collapse
polterguy profile image
Thomas Hansen

I was 3 weeks away from abandoning C# when I discovered .Net Core. I threw .Net Framework in the garbage bin, for never to look back again, and I can now confidentially proclaim I'm developing on one of the best platforms in the world. You did a smart choice :)

Collapse
chadwinjdeysel profile image
Chadwin Deysel Author

I was in that very position as well. Starting off we worked primarily on UWP applications and ASP.NET with everyone's favorite .NET Framework 4 😭. The .NET Core update brought me back into the world of C# and I'm glad I made the decision to stick to it.

Collapse
polterguy profile image
Thomas Hansen

Yeah, it only took them 20 years, and 3 CEOs, but when they (Microsoft) finally figured out how to create amazing frameworks, they really figured it out :)

Collapse
natescode profile image
Nathan Hedglin

As a C# dev I agree. I wrote software for medical and financial institutions and it is all C#. I'd never use node due to lack of security and performance.

Collapse
chadwinjdeysel profile image
Chadwin Deysel Author

Hi Nate, thanks for mentioning the security and performance aspect of C# compared to something like Node. That's another aspect that C# does great that I didn't touch on in the article.

Collapse
mistval profile image
Randall

I used to work mainly with C#. Now I mainly work with TypeScript and JavaScript. I miss C#.

Collapse
chadwinjdeysel profile image
Chadwin Deysel Author

Hi Randall. I think we've all worked in other environments before at one point (I did a few projects using #gatsby), but nothing did it quite like C# for us.

Collapse
afheisleycook profile image
Aheisleycook

C# is very powerful and is used a lot in the commercial dev world yoy made a great choice

Collapse
chadwinjdeysel profile image
Chadwin Deysel Author

To that I agree. I really hope a lot more developers adopt C# going forward, especially with all the great features on the horizon.

natescode profile image
Nathan Hedglin

The language doesn't force it. That's an editor thing. Stop hating and actually learn the tools.

jayjeckel profile image
Jay Jeckel

It's not good or bad practice, it's naming conventions. Wherever you are, the best practice is following the local naming convention, regardless of what they are.

Collapse
natescode profile image
Nathan Hedglin

Best practices.

Collapse
andrewbaisden profile image
Andrew Baisden

Great write up this is why I decided to learn C# instead of Java.