Latest / DevQuestions with Tim Corey / 016 What Do You Hate About C#? What Do You Wish C# Did Differently?
Transcript
- 0:00SPEAKER_00: Welcome to the Dev Questions Podcast with Tim Corey.
- 0:03SPEAKER_00: Join us each episode as we tackle the questions you are asking about a career in software development, understanding the industry, and new technology.
- 0:12SPEAKER_00: If you're just starting out or you want to grow stronger as a developer, this is the place to get your questions answered.
- 0:19SPEAKER_00: Now, here's your host, expert developer and online educator, Tim Corey.
- 0:25SPEAKER_01: What do I hate about C Sharp?
- 0:27SPEAKER_01: What are the things I wish C Sharp would have done differently?
- 0:31SPEAKER_01: Those are some great questions and ones we're going to answer on today's episode of DevQuestions.
- 0:38SPEAKER_01: Now to start off with, I do want to address the word hate because I don't think that there's anything in programming that comes to the level for me of hate.
- 0:49SPEAKER_01: There's a lot of things I dislike, there's a lot of things I wish were done differently, but I wouldn't say hate.
- 0:56SPEAKER_01: And so even if I were to say I hate something, it really just means that I dislike that.
- 1:00SPEAKER_01: Hate is a little too strong for me.
- 1:02SPEAKER_01: So let's start with the things that I dislike about C sharp.
- 1:07SPEAKER_01: And there's five things.
- 1:08SPEAKER_01: I actually have a list written down, so I may refer to that occasionally.
- 1:13SPEAKER_01: But the number one thing that I dislike is the history of C sharp.
- 1:18SPEAKER_01: And that may sound weird because what does the history matter?
- 1:22SPEAKER_01: Well, the history is what formed the C sharp community.
- 1:27SPEAKER_01: It's a thing that that gave the community in general a perception of what C sharp is.
- 1:34SPEAKER_01: And that that history has started off with a very Windows-centric US versus the world type view, the our way or the highway.
- 1:46SPEAKER_01: And that was what C Sharp grew up in.
- 1:50SPEAKER_01: That's when Microsoft was doing some of the things that we really look back at and go, ooh, that that that wasn't a good idea.
- 1:57SPEAKER_01: From you know, forcing the browser wars, where it was either I.
- 2:33SPEAKER_01: In fact, C sharp has taken a total 180 degree turn from that.
- 2:39SPEAKER_01: C sharp is extremely open source.
- 2:43SPEAKER_01: In fact, all of.NET Core, all of ASP.NET Core is open source.
- 2:48SPEAKER_01: So when we're talking about, you know, hating the open source community, it's just the opposite.
- 2:54SPEAKER_01: C Sharp loves open source.
- 2:56SPEAKER_01: When it comes to Windows only, that has changed dramatically too.NET Core works across platforms.
- 3:04SPEAKER_01: So now Mac and Linux have the same level of availability to work with C sharp code in most areas.
- 3:12SPEAKER_01: We'll get to that in a minute.
- 3:14SPEAKER_01: But that's another good thing.
- 3:17SPEAKER_01: And so that history isn't where C sharp is today.
- 3:22SPEAKER_01: But there's a lot of people out there that go, ah, C sharp, that's stupid, that's horrible.
- 3:26SPEAKER_01: I don't ever want to work with that community.
- 3:28SPEAKER_01: And that's hurt us.
- 3:30SPEAKER_01: And so there's still this perception as to what C Sharp is and what.NET is and what Microsoft is as a company.
- 3:40SPEAKER_01: And that is slowly going to change over time.
- 3:43SPEAKER_01: It it takes a lot of work.
- 3:44SPEAKER_01: And that's one of the things I dislike about C Sharp is just that lingering feeling of what was and the uh the bad impression that gave versus where we are now.
- 3:57SPEAKER_01: Now, number two is also something that for the most part is in the past that is still affecting us, those ripples are still affecting us, but there is still some of that's going on.
- 4:10SPEAKER_01: And that's the idea of complexity as a feature.
- 4:14SPEAKER_01: What I mean by that is when you're developing software, you have a few different options of how to build software.
- 4:22SPEAKER_01: One is to make all the decisions for the developer.
- 4:28SPEAKER_01: So when you're building a system, you say, this is how you will use it.
- 4:33SPEAKER_01: And you don't give them options.
- 4:34SPEAKER_01: And that's very limiting and restricting.
- 4:37SPEAKER_01: The other extreme of that is we're going to give you every possible feature and option for you to tweak.
- 4:45SPEAKER_01: The problem is that's where Microsoft has gone a lot with C, especially in the past, where it's so difficult to get in and get started and work with something because there's 18,000 options for how to do one simple thing.
- 5:02SPEAKER_01: And that's where I like tools that give you the starter, where we say, you know what, here's some decisions already pre-made.
- 5:12SPEAKER_01: They're probably the right decisions out of the box for you.
- 5:16SPEAKER_01: But then if you want to change something, go ahead and change it.
- 5:19SPEAKER_01: There is that option.
- 5:20SPEAKER_01: I like that middle ground.
- 5:22SPEAKER_01: And that's something that has been lacking in the past with C sharp where it's a little hard to get into.
- 5:28SPEAKER_01: It's a little hard to get started in something because you look at it and go, I don't know.
- 5:34SPEAKER_01: I don't know how to change this.
- 5:35SPEAKER_01: I don't know how to tweak this.
- 5:37SPEAKER_01: I don't know how to get it set up and get started in it.
- 5:40SPEAKER_01: And so it's a high barrier to entry.
- 5:42SPEAKER_01: Once you understand it, there is so many features and so much option that it's awesome.
- 5:48SPEAKER_01: But getting started in some areas of C sharp can be difficult.
- 5:51SPEAKER_01: And that's where I like how.NET Core has reimagined some of that, where they said, you know what?
- 5:58SPEAKER_01: This is probably the way you want, let's say, a web application configured, where you probably want GDPR compliance and you probably want HTTPS by default, and you want to enforce that, and you want uh HSTS.
- 6:13SPEAKER_01: And these are the things you want.
- 6:15SPEAKER_01: So here they are, they're already configured, they're already working.
- 6:19SPEAKER_01: But then if you want to tweak something, no problem.
- 6:21SPEAKER_01: There's options out there for you to change things.
- 6:24SPEAKER_01: The same with Blazor Server.
- 6:27SPEAKER_01: It relies on Signal R for that connection, but you don't have to know anything about Signal R in order to get Blazor Server to work.
- 6:36SPEAKER_01: The signal R will just work in the background and it just works.
- 6:40SPEAKER_01: But if you want to configure it, if you want to offload it to a different server, not a problem.
- 6:45SPEAKER_01: It will handle that because you can configure it, but the defaults work.
- 6:51SPEAKER_01: And so I like how that is now.
- 6:55SPEAKER_01: I dislike how it was, and in some cases, still is.
- 6:59SPEAKER_01: There are some places that are still kind of difficult, and that usually comes with newer stuff.
- 7:05SPEAKER_01: For example, um the uh GRPC.
- 7:11SPEAKER_01: So GRPC is still new for C sharp.
- 7:15SPEAKER_01: Now, it's not just a C sharp thing, it's actually an industry standard, but there is some complexity there to get started.
- 7:23SPEAKER_01: There's a lot of options, and the tooling isn't quite there to get started.
- 7:28SPEAKER_01: Another is uh VS Code.
- 7:30SPEAKER_01: Working with VS Code and.NET Core, totally possible.
- 7:36SPEAKER_01: And I understand they weren't designed to necessarily work together.
- 7:40SPEAKER_01: There's actually a plug-in for that instead of being built into the core, but yet there's a lot to know before you get started.
- 7:48SPEAKER_01: There's a that learning curve.
- 7:49SPEAKER_01: And so I like the idea of having some basic stuff that's already configured, or even just guidance of here's how to get started with your most used options, and then from there you can learn and branch.
- 8:06SPEAKER_01: Okay, but getting started that complexity as a feature isn't one I'm a big fan of.
- 8:12SPEAKER_01: Number three, lack of a cross-platform desktop story, and this is one that's going to be fixed.
- 8:21SPEAKER_01: But right now we have WinForms and WPF, and both are.NET Core or have a.NET Core version, which is a little confusing because.NET Core is cross-platform.
- 8:35SPEAKER_01: But Winforms or Windows Forms and WPF are not cross-platform, even though they're.NET Core.
- 8:43SPEAKER_01: And the reason why is because the clue is in the name Windows Forms and Windows Presentation Foundation, or WPF.
- 8:53SPEAKER_01: Both of those are reliant on Windows.
- 8:57SPEAKER_01: And there isn't a good story yet for desktop applications that work cross-platform.
- 9:04SPEAKER_01: Now, the Uno project has cross-platform desktop applications.
- 9:09SPEAKER_01: Very cool stuff that they're doing over there.
- 9:11SPEAKER_01: And there's other third-party uh projects and systems that do work cross-platform.
- 9:17SPEAKER_01: When it comes to native from Microsoft templates that work cross-platform, that's still coming.
- 9:24SPEAKER_01: Now it is coming between.NET 5 and.NET 6.
- 9:27SPEAKER_01: Really, it's coming in.NET 6, which is November of 2021.
- 9:33SPEAKER_01: So it's a little ways out yet, but it is coming.
- 9:38SPEAKER_01: So that's one of those things where I'm not a big fan of it right now because it does limit you, but it is going to get fixed in the future.
- 9:47SPEAKER_01: Number four, auto-generated documentation.
- 9:51SPEAKER_01: This is another area where the past of Microsoft is still kind of burning it today.
- 10:00SPEAKER_01: And that is documentation in general has been a pain point for Microsoft.
- 10:05SPEAKER_01: Now, if you haven't heard yet, docs.microsoft.com is an amazing resource for learning the C sharp platform, for learning about Azure, about learning SQL, about there's a lot of different things there you can learn about.
- 10:24SPEAKER_01: And it really is a great platform for learning.
- 10:28SPEAKER_01: Finally, it used to be that when you it was kind of a joke.
- 10:34SPEAKER_01: When you when you searched for let's just say console.write line, a simple example.
- 10:39SPEAKER_01: You search for console.write line and say, you know, what can this do or what does it do?
- 10:44SPEAKER_01: And you get console right line rights to the console.
- 10:48SPEAKER_01: That was the whole description.
- 10:50SPEAKER_01: And then it had a whole bunch of uh options that you didn't really understand how to implement.
- 10:55SPEAKER_01: There was no examples, it was just options.
- 10:57SPEAKER_01: It's kind of robotic in how it gave you the information.
- 11:01SPEAKER_01: That's because that was auto-generated documentation.
- 11:03SPEAKER_01: They said, okay, take our code and just generate docs for it.
- 11:08SPEAKER_01: That wasn't terribly helpful.
- 11:10SPEAKER_01: In fact, in a lot of ways, it was harmful because the fact that those documentations were so useless that I actually avoided anything with the MSDN URL or other similar URLs that would take me to those auto documents documents because I didn't want to read them.
- 11:29SPEAKER_01: It was a waste of my time.
- 11:31SPEAKER_01: I would go to Stack Overflow or I'd go somewhere else where someone would tell me what to do and then show me an example of that.
- 11:38SPEAKER_01: The new docs.microsoft.com does do a great job of telling you what the app what the thing does, and then show you an example of it.
- 11:49SPEAKER_01: That's awesome.
- 11:50SPEAKER_01: But there's still a lot of auto documentation out there.
- 11:54SPEAKER_01: Personally, I'd prefer to see those documents destroyed, or if they really do help somebody, maybe archive in a way that isn't searched normally.
- 12:06SPEAKER_01: Where maybe you can say, hey, include the auto documents, or something like that, where you know what you're getting when you're getting those documents.
- 12:14SPEAKER_01: But I really don't like those even being available because they're just a waste of my time and they're more confusing than they are helpful in almost every case.
- 12:26SPEAKER_01: And this comes to the last thing that I'm not a big fan of when it comes to C Sharp.
- 12:32SPEAKER_01: And it's about documentation, and it's talking about the why.
- 12:38SPEAKER_01: That's one of the areas that that software developers in general have a hard time in their documentation, in their explanations of something, is describing the why, not just what.
- 12:52SPEAKER_01: So let me explain.
- 12:55SPEAKER_01: You can explain what a certain system does.
- 12:59SPEAKER_01: Let's let's use Signal R as an example.
- 13:02SPEAKER_01: What does Signal R do?
- 13:04SPEAKER_01: It allows real-time communication between a server and a client.
- 13:08SPEAKER_01: That's pretty much it.
- 13:10SPEAKER_01: Now there's a lot more nuance to it.
- 13:12SPEAKER_01: It works in the web, it has fallback.
- 13:13SPEAKER_01: Cool.
- 13:14SPEAKER_01: That's all what stuff.
- 13:17SPEAKER_01: Why?
- 13:18SPEAKER_01: Why does it do it?
- 13:20SPEAKER_01: Why do we have it?
- 13:21SPEAKER_01: And then from there, you can explain when you would use it, what are some good use cases?
- 13:28SPEAKER_01: Those are the kind of explanations around the topic that are really helpful in helping you understand when to use something.
- 13:39SPEAKER_01: And that's one of the things that I work really hard on, filling in those gaps and explaining the why, explain the when.
- 13:48SPEAKER_01: Because just saying, here's what Signal R does, and here is the code to use it, very, very helpful.
- 13:55SPEAKER_01: But in order to get to that point, I need to know why I need it, why I would use it.
- 14:03SPEAKER_01: And that's where I think that there's still a lot of room to grow when it comes to documentation, is explaining the story around it so that you can understand when to use something, and you can understand this tool isn't for everything, but it is for something.
- 14:22SPEAKER_01: And knowing what that is and having confidence in knowing what those things are.
- 14:27SPEAKER_01: Because if you're not careful, you learn a new tool, you go, that's awesome, and you use it for everything.
- 14:33SPEAKER_01: And then find out, oh, there's downsides.
- 14:35SPEAKER_01: Oh, I shouldn't have used it there.
- 14:37SPEAKER_01: Oh, that's a problem.
- 14:39SPEAKER_01: And then you feel like you're not really sure if you should ever use that tool.
- 14:42SPEAKER_01: Well, there's a purpose for that tool.
- 14:45SPEAKER_01: But if you know why it's it's been built, why you should use it, why you shouldn't use it, that's when you get that confidence in understanding that new tool in your toolbox.
- 14:58SPEAKER_01: So there's not a lot that I hate about C Sharp.
- 15:03SPEAKER_01: It's more there's some dislikes, there's some there's some rough edges that need to get smoothed off.
- 15:09SPEAKER_01: C Sharp is my favorite programming language.
- 15:11SPEAKER_01: So I'm gonna have a lot of good to say about it.
- 15:14SPEAKER_01: I think it's a it's a a well-rounded application or language.
- 15:20SPEAKER_01: It's got a lot of great community support, it's got a lot of great support from Microsoft, and it's got a really bright future.
- 15:27SPEAKER_01: There's a lot good about it, but there are some rough edges that still need to be smoothed over.
- 15:32SPEAKER_01: And these five, these are the ones that I think that are the biggest for me.
- 15:37SPEAKER_01: Now, you may have other features or maybe even specific things that you don't like, and that's fine.
- 15:43SPEAKER_01: Um, but I think those are the ones that for me are the issue spots.
- 15:49SPEAKER_01: Okay.
- 15:50SPEAKER_01: So I'd love to hear your thoughts.
- 15:52SPEAKER_01: So let me know.
- 15:53SPEAKER_01: Hey, these are things I don't like about C Sharp.
- 15:56SPEAKER_01: Just try and keep it civil, okay?
- 15:58SPEAKER_01: Because remember, this isn't a religion, this is a software development.
- 16:04SPEAKER_01: And so it's not about hate, it's not about protesting, it's not about being angry.
- 16:10SPEAKER_01: It's about saying, hey, this could be better, and maybe even providing constructive suggestions for how to do so.
- 16:19SPEAKER_01: Because the development team is listening.
- 16:23SPEAKER_01: And if they can hear constructive things they could do better or differently to make the product and the platform better, then they're gonna take that to heart.
- 16:34SPEAKER_01: Okay.
- 16:34SPEAKER_01: So let us know down below or um send me an email, something like that.
- 16:39SPEAKER_01: Let me know how could C Sharp be better?
- 16:42SPEAKER_01: What do you think that you want to see better or different in the coming days?
- 16:47SPEAKER_01: Thanks for listening.
- 16:48SPEAKER_01: And as always, I am Tim Corey.
- 16:50SPEAKER_00: Thank you for joining us for this episode of Dev Questions.
- 16:53SPEAKER_00: Tim is committed to making it easier for you to become a developer.
- 16:57SPEAKER_00: If you would like to help make more content like this possible, please like, subscribe, rate, and share Dev Questions.
- 17:04SPEAKER_00: You can also send your questions to questions at IamTimcorey.com.
- 17:09SPEAKER_00: Until next time, remember, you are too smart and your time too valuable to waste it making all the mistakes Tim did.
- 17:16SPEAKER_00: When you're ready to learn to think and code like a professional developer, head over to IamtimCore.com and enroll in a course.