Latest / DevQuestions with Tim Corey / 215. Knowing When to Upgrade .NET Versions And How To Get Your Boss On Board
Transcript
- 0:00SPEAKER_01: Why is upgrading to a new version of.NET important?
- 0:04SPEAKER_01: Is it even worth the time and effort?
- 0:06SPEAKER_01: How often should we upgrade?
- 0:16SPEAKER_00: Welcome to the Dev Questions podcast with Tim Corey.
- 0:20SPEAKER_01: Software development is more than just writing code.
- 0:23SPEAKER_01: So let's talk about the rest of it.
- 0:25SPEAKER_01: Let's talk about the extremes first to get a good baseline for when's a good time to upgrade.NET.
- 0:33SPEAKER_01: So if you're on.NET Framework 3.5, you're way behind.
- 0:40SPEAKER_01: So this is years old.
- 0:43SPEAKER_01: Multiple years, I think over 10, maybe 15.
- 0:46SPEAKER_01: So upgrades are going to be very hard.
- 0:49SPEAKER_01: You aren't going to get security updates on the platform you're currently on.
- 0:53SPEAKER_01: Developers are harder to find.
- 0:56SPEAKER_01: Dependencies are going to be well out of date if you could even find them.
- 1:00SPEAKER_01: And it's going to get hard, if not impossible, to add new dependencies.
- 1:05SPEAKER_01: So you're kind of stuck in a moment in time.
- 1:09SPEAKER_01: Think of it like the mosquito in amber in Jurassic Park.
- 1:14SPEAKER_01: You're kind of stuck in that moment of time.
- 1:17SPEAKER_01: You have not changed, you have not been able to grow or change your application.
- 1:22SPEAKER_01: Because while yes, you could add new features, you can't add a new email system necessarily.
- 1:28SPEAKER_01: It's the hard to change how your database works.
- 1:31SPEAKER_01: You're going to have to work on older versions of Windows and so many other things.
- 1:36SPEAKER_01: You're kind of locked in place.
- 1:38SPEAKER_01: And because of that, that starts spreading out to the rest of your applications and the rest of your company.
- 1:44SPEAKER_01: If you have to run an older version of Windows for your application, well, then you can't run the newer applications for things like Office or QuickBooks or other things because, well, your computer isn't compatible with those applications anymore because it's on Windows 7 or it's on Windows XP or something old where the newer software doesn't support it.
- 2:09SPEAKER_01: So now more things are behind the times.
- 2:12SPEAKER_01: And your servers are also behind the times, which means not just your application, not just.NET isn't getting security updates anymore, but your servers aren't anymore, and your desktops aren't anymore, potentially.
- 2:26SPEAKER_01: So on one extreme, if you don't update, not only does it affect your application, but it affects your security.
- 2:36SPEAKER_01: It affects which servers you can run, which desktops potentially you can run, and maybe even which applications your company can run.
- 2:56SPEAKER_01: Now there are some ways to get around that, and sometimes it's not quite so extreme, but we're talking about the extreme case here because you want to kind of have a comparison base point to look at.
- 3:08SPEAKER_01: We're look at the very extreme of it's too old, and then we'll look at the very extreme of it's really new, do we need to do it?
- 3:17SPEAKER_01: Okay, so we're kind of locked into a lot of things if we go too far down the never upgrade road.
- 3:25SPEAKER_01: But what happens if we upgrade all the time?
- 3:28SPEAKER_01: So if you're on.NET 8, you probably don't need to go to.NET 9.
- 3:33SPEAKER_01: The support window is still gonna be open for another two years on.NET 8.
- 3:38SPEAKER_01: You can still utilize the latest dependencies.
- 3:40SPEAKER_01: The documentation for your version is the prevalent amount of documentation, and developers want to work in.NET 8.
- 3:49SPEAKER_01: So you're okay, you don't have a whole lot of benefits when it comes to needing to change from.NET 8 to.NET 9.
- 3:58SPEAKER_01: So that's the other extreme where you're on the cutting edge or close to the cutting edge, you don't necessarily need to keep updating over and over to stay on that very end of the edge.
- 4:09SPEAKER_01: So we've got the I've never upgraded all the way through the I upgrade all the time.
- 4:14SPEAKER_01: There's those two extremes.
- 4:16SPEAKER_01: So now we know the two extremes.
- 4:19SPEAKER_01: One, if you're on the one extreme, you get out of date and endangers your application.
- 4:23SPEAKER_01: Upgrades are difficult and the application is often too expensive to rewrite.
- 4:28SPEAKER_01: You don't want to be there.
- 4:30SPEAKER_01: But on the other end, upgrading to every new version isn't necessary.
- 4:34SPEAKER_01: The time and effort can be more costly than the value that the upgrade provides, depending on your system.
- 4:42SPEAKER_01: So we know that we don't want either extreme necessarily.
- 4:46SPEAKER_01: So what's the balance?
- 4:48SPEAKER_01: How do we fit between these two systems and figure out where the right time is to upgrade versus when the right time is to not upgrade?
- 4:58SPEAKER_01: So here are some criteria I go through when evaluating the.NET version of a project.
- 5:03SPEAKER_01: Okay?
- 5:04SPEAKER_01: And sometimes people don't think through this criteria because they're not kind of being objective and stepping back from the application.
- 5:11SPEAKER_01: It helps be a consultant because you walk into the organization without some kind of preconceived notions about things.
- 5:17SPEAKER_01: So let's talk about these kind of step back ideas.
- 5:20SPEAKER_01: First, is the application being currently maintained or actively maintained?
- 5:25SPEAKER_01: And what I mean by that is sometimes people build applications and they just kind of sit there.
- 5:31SPEAKER_01: They just do their thing.
- 5:33SPEAKER_01: Maybe you create an application that takes in CSV files and you know updates the database from that.
- 5:40SPEAKER_01: It's a simple application.
- 5:41SPEAKER_01: It probably does not need to change very often.
- 5:44SPEAKER_01: And maybe it's been running just fine for the past five, 10, 15 years.
- 5:49SPEAKER_01: Well, do we need to keep changing that?
- 5:52SPEAKER_01: Probably not.
- 5:54SPEAKER_01: Because it's not being actively maintained, it can probably just chug away what it's at doing what it's doing.
- 6:00SPEAKER_01: But then if you want it to pin out for too long, that might be a problem.
- 6:04SPEAKER_01: So we'll get into that.
- 6:05SPEAKER_01: So that's one, is the application being actively maintained?
- 6:09SPEAKER_01: Now, you can't make a decision on one data point.
- 6:11SPEAKER_01: You gotta keep going in this list.
- 6:13SPEAKER_01: But with all these data points, you should have a better picture of yes or no.
- 6:18SPEAKER_01: So, number two, is the application in danger of being coming hard to upgrade?
- 6:24SPEAKER_01: So maybe it's been running for a while, that's fine, but is it in danger of being too hard?
- 6:31SPEAKER_01: For example, if you're still on.NET Framework 4.5, you're in danger of having your application be too hard to upgrade.
- 6:39SPEAKER_01: There is a very clear upgrade path and a very easy upgrade path, relatively speaking, in the.NET Core 3.1,.NET 5,.NET 6 range.
- 6:50SPEAKER_01: But we're starting to drift away from that.
- 6:53SPEAKER_01: Yes, you absolutely can go from.NET Framework to eventually.NET 8, but there's starting to become more steps along the way.
- 7:01SPEAKER_01: There's starting to come more things you have to adjust.
- 7:04SPEAKER_01: And don't forget that.NET Core 3.1,.NET 5, and coming soon,.NET 6 are all out of support.
- 7:14SPEAKER_01: They're no longer supported.
- 7:16SPEAKER_01: Right now,.NET 6 is still supported for another year or so.NET 7 is out of support.NET 8 is the one that's currently actively being supported as well.
- 7:26SPEAKER_01: So.NET 6 and.NET 8 for now, but that's kind of it.
- 7:30SPEAKER_01: So now you're starting to get multiple versions away from kind of that sweet spot of upgrading from.NET framework to.NET.
- 7:39SPEAKER_01: So the at that point, the application becomes in danger of being hard to upgrade.
- 7:45SPEAKER_01: Maybe you're on.NET, maybe you're on.NET Core 3.1.
- 7:49SPEAKER_01: Well, upgrading the.NET 5 was a pretty easy experience.
- 7:53SPEAKER_01: And going to six was easy as well.
- 7:56SPEAKER_01: But as you start adding more and more versions in between, well, all of a sudden those little steps start adding together and become a big step instead.
- 8:08SPEAKER_01: So the farther you go away, the harder it is.
- 8:12SPEAKER_01: So that's question number two.
- 8:14SPEAKER_01: Is the application in danger of becoming hard to upgrade?
- 8:18SPEAKER_01: Number three, how essential is the application?
- 8:22SPEAKER_01: Coming back to that CSV to SQL application.
- 8:26SPEAKER_01: You know what?
- 8:27SPEAKER_01: That probably wouldn't be that hard to replicate.
- 8:29SPEAKER_01: And maybe you don't need it for very long.
- 8:32SPEAKER_01: Maybe you don't only need it for the next five years.
- 8:35SPEAKER_01: That means you don't really have to invest a lot of time and effort into it.
- 8:39SPEAKER_01: But maybe it's the core of your business.
- 8:43SPEAKER_01: Maybe it's what's actually capturing and working with your data and is what the company relies on.
- 8:49SPEAKER_01: Well that's a different story, right?
- 8:51SPEAKER_01: And then number four, is it okay if the application stops being useful after five years?
- 8:58SPEAKER_01: Not today, five years.
- 9:00SPEAKER_01: In five years, is it okay if this application stopped being useful?
- 9:04SPEAKER_01: Because that might inform how you make a decision.
- 9:08SPEAKER_01: In fact all four of these questions will give you a better picture of, hey, this is pretty important and we're in danger so we need to do something quicker.
- 9:17SPEAKER_01: Or hey this isn't that important.
- 9:19SPEAKER_01: We don't really change it that often and we don't need it in five years.
- 9:22SPEAKER_01: Therefore we're okay to stay where we're at.
- 9:26SPEAKER_01: So this these four criteria will help you identify how critical is this and how critical is keeping it close to the upgrade path.
- 9:37SPEAKER_01: You don't have to be on cutting edge, but being closer is probably good.
- 9:41SPEAKER_01: In fact, if you're on.NET framework 4.5, you could be good going to.NET 6.
- 9:48SPEAKER_01: You wouldn't have to go to.NET 8 right away.
- 9:51SPEAKER_01: You could do an intermediate step and maybe even sit there for a little bit because you're getting closer to the modern application.
- 10:00SPEAKER_01: You're just not quite to the full modern yet.
- 10:03SPEAKER_01: And that's okay.
- 10:04SPEAKER_01: So figuring out these four answers will help you identify where your application is at and where your comfort level is with your application not working or going away.
- 10:17SPEAKER_01: Now if you decide that upgrading the.NET version is a good idea, you still need to get approval management for the upgrade.
- 10:25SPEAKER_01: Now here are some ways that I have found to communicate the value to management.
- 10:29SPEAKER_01: Because when you say to management, hey, I want to upgrade our application from let's just say.NET 6 to.NET 8, it's really an easy upgrade, but from the Microsoft standpoint, it's mostly about changing the version number.
- 10:42SPEAKER_01: But of course you have dependencies, you have certain code is changed a little bit, there's going to be some things that have to change.
- 10:49SPEAKER_01: You'll have to test all of that.
- 10:51SPEAKER_01: So there's going to be a lot of work that's done that at the end of the day the end user might not see any difference.
- 10:59SPEAKER_01: So what do you do to tell management this is important?
- 11:03SPEAKER_01: Because just saying we need to upgrade isn't going to sell most managers.
- 11:09SPEAKER_01: Most managers don't understand the reason why upgrades are so important.
- 11:14SPEAKER_01: So you need to give them a reason why upgrading is valuable.
- 11:18SPEAKER_01: And the number one way especially with.NET, which I'm very, very thankful that.NET is doing this because it's really important to help push this is you can talk about the performance improvements of a new version.
- 11:31SPEAKER_01: I've had applications where I just change the version number and the application gets faster.
- 11:36SPEAKER_01: And the reason why is because the newer versions of.NET are more performant than the previous versions of.NET.
- 11:43SPEAKER_01: So just upgrading a version can make your application in most like most cases will make your application faster.
- 11:51SPEAKER_01: So that right there is a feature and that's something you should push and say hey we can have performance improvements.
- 11:59SPEAKER_01: We know we're growing we know you want to be able to support more people we know that you want to be able to grow the business and we don't want the application to be the bottleneck.
- 12:10SPEAKER_01: And so we're going to do some changes to make the application more performant so that it will serve us well today and into the future that's a thing you can sell.
- 12:21SPEAKER_01: That's a thing you can talk to management about and get them behind to some extent.
- 12:26SPEAKER_01: Now it's not the silver bullet it's not the the thing that will always get management to go, yes, let's do that.
- 12:32SPEAKER_01: But it's the first step.
- 12:34SPEAKER_01: Now number two, I talk about the value of regular maintenance.
- 12:38SPEAKER_01: If you're a car owner and you own a gas powered car, well, talk about oil changes versus a new engine, right?
- 12:49SPEAKER_01: Like you can drive your car and just put gas in it and keep driving it and driving it and driving it.
- 12:54SPEAKER_01: And I've had friends and family who have done this.
- 12:57SPEAKER_01: They drive it and drive it and drive it until all of a sudden the the engine stops and there's a clunking noise and all of a sudden it no longer goes because the oil got you know evaporated out or burned off and all of a sudden the engine's running without lubrication and bad things happen.
- 13:16SPEAKER_01: Well you need a new engine at that point.
- 13:19SPEAKER_01: But if you had taken the time and some money to get regular oil changes you would have increased and improved the lifespan of that engine.
- 13:30SPEAKER_01: We kind of know this we're we're familiar with this concept you do a little bit of maintenance we call it preventive maintenance you do a little bit of maintenance and it helps extend the life of your vehicle well your application is the same way.
- 13:45SPEAKER_01: Regular maintenance is necessary and some of that regular maintenance means upgrading the versions of things your dependencies as well as the version of.NET doing that regular maintenance yes it does cost some time it does cost some money but doing that is much less expensive than replacing the entire application.
- 14:09SPEAKER_01: So talk about the value of regular maintenance.
- 14:14SPEAKER_01: Number three, talk about the complexity increase the more versions you skip.
- 14:19SPEAKER_01: So think of it like climbing stairs.
- 14:22SPEAKER_01: When you take one step at a time it's fairly easy.
- 14:26SPEAKER_01: But when you start saying I'm going to take two steps at a time it's a little harder.
- 14:31SPEAKER_01: Three steps is even harder by the time you get to four steps it's almost impossible.
- 14:37SPEAKER_01: That's what it's like when you upgrade when you have small upgrades because they're close inversion number it's an easier step process.
- 14:46SPEAKER_01: But when you have skip steps, well now you've got to go two steps, three steps, four steps at once that gets more and more complex and it makes it more and more difficult to the point where it becomes impossible to upgrade.
- 15:01SPEAKER_01: And at that point you're stuck.
- 15:03SPEAKER_01: You can't go anywhere you're just stuck where you're at and that can be a real danger to your application and your company.
- 15:10SPEAKER_01: Remember back to the initial explanation of a person on.NET 3.5 well they're stuck.
- 15:19SPEAKER_01: They've got a problem of it's expensive they have to run old servers they can't find people to work on it.
- 15:26SPEAKER_01: All these things take place because they got stuck on a specific version.
- 15:32SPEAKER_01: This is what you're in danger of the more you skip steps.
- 15:37SPEAKER_01: Okay so that's number three.
- 15:39SPEAKER_01: Number four, talk about the dangers of falling behind.
- 15:42SPEAKER_01: It's not just that you have to you know do more things to get up to date.
- 15:47SPEAKER_01: Like I said you're not going to be able to find developers who want to work on older versions.
- 15:52SPEAKER_01: You'll have a smaller pool of people and you're not going to find the people who are newer and potentially cheaper to work on your application.
- 16:02SPEAKER_01: The older your code gets the more expensive your developers become because less and less people want to work on it.
- 16:09SPEAKER_01: Therefore supply and demand says there's less supply therefore what demand there is has to pay more to get that supply.
- 16:18SPEAKER_01: So there's a lot of reasons why you know it's going to be expensive for your application, expensive your organization and potentially cause significant problems for your organizations.
- 16:30SPEAKER_01: Those dangers of falling behind are significant.
- 16:34SPEAKER_01: Now at the end of the day the organization will have to make their decision.
- 16:39SPEAKER_01: It might not be what you believe is the best choice, but one that you'll need to live with.
- 16:45SPEAKER_01: If possible do what you can over time.
- 16:48SPEAKER_01: So when you're working your application see if hey could I upgrade this library using.NET standard and make it a.NET library but then it still works with.NET framework could I do more of that until maybe I have a back end maybe through an API that's all.NET eight but everything else is.NET framework could I do something like that?
- 17:10SPEAKER_01: Think through how can I kind of not sneak it in, but how can you do some some things over time to improve your situation?
- 17:19SPEAKER_01: But don't forget you also have a choice.
- 17:22SPEAKER_01: You get to choose if the position you're working in is still the best one for you in your career.
- 17:27SPEAKER_01: And this is part of the danger that organizations face is you're going to say, you know what, it might not be and so you might make a choice to leave.
- 17:37SPEAKER_01: So you're trying to help your organization protect themselves from losing good people.
- 17:44SPEAKER_01: But don't forget you still get to choose if the position is right for you.
- 17:49SPEAKER_01: Okay?
- 17:49SPEAKER_01: So I hope that answers your questions.
- 17:51SPEAKER_01: Thanks for listening.
- 17:52SPEAKER_01: And as always I am Tim Corey.
- 17:55SPEAKER_00: Thank you for joining us for this episode of Dev Questions.
- 17:58SPEAKER_00: When you're ready to learn to think and code like a professional developer head over to I amtimcorey.com and enroll in a course