#1 underestimated risk in .NET projects: Libraries you add to your code. Yes. They are necessary in every project. Yes. They speed up development massively. But, I've faced many maintenance issues while working with libraries in the past 12 years. The most expensive time it happened to me? I was working on a project where I had to parse incoming Excel files. For that, I used EPPlus, a popular open-source library for handling Excel files. The library was great and made development faster and easier. But several months into the project, after we completed a lot of features:
Each license cost $409 per developer per year (a total of $2,045). In this case, the ROI of using this library was greater than the cost. But when you lock in on a library, you need to be prepared for things like this. After all, every library you add is a maintenance burden and a risk. Common risks when using libraries (and how to minimize them)Here are some common risks when using NuGet packages:
To minimize the risks:
4 wickedly effective questions you have to ask before adding a libraryBefore adding a new library, here are 4 questions I have:
Based on the assessment, I either decide to:
How to update libraries automatically using GitHub robotsYou can use a built-in GitHub app to automate NuGet version upgrades: Dependabot. Dependabot is a GitHub feature that makes it easy to update your NuGet packages. It can also notify you when the package you use has a security bug. But it’s not limited to NuGet. It also supports:
To enable it, follow the instructions on this page. After you set up everything, you will start to get automated Pull Requests: As a summary: Be picky. Use libraries. But treat them as a potential liability. Not as an asset. Enjoy your weekend.
|
Weekly newsletter packed with code-improving tips, tools, and strategies to become a better .NET developer.
Lately, I’ve been paying more attention to what’s happening in the AI space. Maybe because of all the hype that surrounds it. Maybe because of the anxiety of whether AI will take my software development job. That's why I’ve decided to spend some spare time during the Xmas holiday to explore the state of AI software development tools. This email combines: My 1+ years of experience using a paid version of GitHub Copilot. 5+ hours of YouTube videos I’ve consumed in the last 2 weeks. So, let’s...
Today's issue is brought to you by the C# 13 and .NET 9 – Modern Cross-Platform Development Fundamentals. Build confidence in creating professional and high-performance web applications using the latest technologies in C# 13 and .NET 9 by Mark Price. Find out more here: C# 13 and .NET 9 Yesterday, We had a company Xmas party. Before dinner at a restaurant, we went to the escape room event. If you are unfamiliar with escape rooms, they're interactive puzzle experiences where you and your...
2 weeks ago, .NET 9 was released. If you haven’t had time to read the official release docs, don’t worry. I spent 1 hour investigating what's new in .NET 9. So you don't have to. Here are the top 10 improvements for C#, ASP.NET Core, and EF Core. 1. LINQ Index LINQ has always been an extremely useful tool for .NET developers. However, with .NET 9, LINQ comes with 3 new methods. Let's begin with the LINQ Index. The Index method places every collection element against its position within that...