.NET Annotated Monthly | February 2021
Happy February! Do you know this computing trivia fact? Why is the C language is named C? Because it comes after B. It almost seems too simple. But we’re not kidding!
- Happy 10th Birthday, NuGet!
- The Plan for Entity Framework Core 6.0
- Diagnostics improvements in .NET 5
- Azure Active Directory’s gateway is on .NET Core 3.1
- Windows Terminal Preview 1.6 Release
How to become a better developer by asking questions – Asking questions in a way that will bring about helpful answers is a skill. Whether that question is at popular sites like StackOverflow or when asking a teammate in person, there are some steps you can take to form an effective question to get your answers! Steve Gordon gives us all the details about asking the right questions in this excellent blog post.
How we quickly refactored with Resharper more than 23.000 calls to Debug.Assert() into more meaningful assertions – Patrick Smacchia’s team created the NDepend static analysis tool. Recently, they used ReSharper to refactor a massive amount of assertions! Refactoring is where ReSharper shines. It can help improve the quality of any code base, including those that are mature and large, like NDepend.
With the help of Konrad’s book you too can understand .NET memory management internal workings and pitfalls. You can learn many techniques to address performance and scalability problems in code. Learn to write better code by knowing what’s going on under the hood. Pro .NET Memory Management is the "go to" guide to understanding and working with memory management in .NET.
Tutorials and articles
Enjoy these articles published in the past month that focus on all different types of .NET development. C#, ASP.NET, Xamarin, WinForms, Blazor and more, we got you covered!
- Xamarin Essentials: Features, Advantages and Benefits – Leomaris Reyes blogs about what you need to know about Xamarin including the features, advantages, and benefits of using it.
- Design for Developers—An Introduction to Xamarin Forms – Developers often eschew design, but Leomaris Reyes points out how important design for developers really is.
- Using Partials to Remove Duplication in Razor Pages – Ilyana Smith covers using partials to keep your Razor Pages nice and DRY.
- Select Tag Helper in ASP.NET Core MVC – Tag Helpers are a great way to wrap bits of UI functionality together. Jeetendra Gund shows us how.
- Role-Based Authorization in ASP.NET Core MVC – Authorization and access to resources is necessary for most apps. So check out this post by Golda at CodeMurals who takes us on a quick walk through role-based auth in ASP.NET Core MVC.
- Asynchronous Messaging, Part 1: Basic Distributed Architecture – Async development is a necessary tool in any developers toolbelt. This excellent post by Stephen Cleary demonstrates what is imporant in asynchronous messaging architecture.
- Using ValueTask to create methods that can work as sync or async – To async, or not to async. Jon P. Smith has the answers in this excellent post about using ValueTask that works either way.
- .NET GC Internals mini-series – Konrad Kokosa dives into GC internals for us, so we can make our code as high performing as possible.
- .NET 5 Source Generators Jump Start – Source generators are a new feature in .NET 5 and in this post Khalid Abuhakmeh demonstrates how to get started using them.
- .NET 5 Source Generators – MediatR – CQRS – OMG! – While it all seems like a lot of moving pparts, this post covers some important aspects of using a mediator pattern with MEdiatR, CQRS, and source generatorsin .NET by Tore Nestenius.
- Find Prime Numbers With C# 9 – It’s back to basics with this post by Khalid Abuhakmeh on finding prime numbers in C#. This is great for preparing for job interviews, or for those who are new to algorithms.
- The process, thought and technology behind building a friendly .NET SDK for JetBrains Space – Even if you’re not using Space as a basis for an SDK, this post is great material for SDK building in general. Maarten Balliauw throws down the gauntlet and gives us all the info we need.
- How to update a database’s schema without using EF Core’s migrate feature – This post by Jon P. Smith gives us some advice in updating a database without EF Core migrations. It’s always great to have an alternative way to do things.
- Useful SQL statements when writing EF Core 5 migrations – Here’s a few useful SQL statements Michał Białecki when you’re creating EF Core 5 migrations. Keep these handy.
- Prerendering a Blazor WebAssembly app to static files, without an ASP.NET Core host app – Andrew Lock blogs about Blazor and prerendering, which helps us optimize our apps and make the UI smoother.
- Canceling background tasks when a user navigates away from a Blazor component – Having to cancel actions in an app is an important and frequent occurence. Gérald Barré gives us instructions on how to do this when people navigate elsewhere from your Blazor component.
- Using Blazor in Your Existing ASP.Net Core MVC Applications – Since we can’t just dump our existing projects and start all new greenfield ones, Simon Goodwin shows us how to use Blazor in our existing ASP.NET apps.
- Clean Architecture — Best Exception Handling with Consistent Responses in ASP.NET Core API – Shawn Shi demonstrates the value of consistency as it applies to exception handing. This is an important strategy for APIs.
- Understanding Microsoft’s Docker Images for .NET Apps – Elton Stoneman has a great explanation of Docker images, from the base image and those that build on top of it.
- Video: How to deploy Blazor WebAssembly to Firebase Hosting – Catch this great video by Niels Swimberghe on hosting Blazor WebAssemby in Firebase.
- The Unhandled Exception Podcast Episode 10: F# and Functional Programming – In this podcast, Dan Clarke hosts Scott Wlaschin, Isaac Abraham, and Ian Russell to talk all about F#!
- Download Files with ASP.NET Core Web API and Angular – A lot of ASP.NET developers have to use Angular, and downloading files are incorporated into so many web apps. So the folks at Code Maze have this nice tutorial on how to download in ASP.NET Web API with Angular.
- Using Yarn with ASP.NET Core Projects – Yarn is a web based package and project manager that can help you clean up those unnecessary files before deployment. Post by Joseph Guadagno.
- The Many Flavors of .NET – Sean Killeen breaks down all those questions many people have about .NET. What is .NET Core vs .NET 5? What happened to .NET Standard? How do Mono & Xamarin fit in? It’s all in here.
Related programming tutorials
.NET developers almost always have to know other languages and technologies, so here are articles on technologies that .NET devs are likely to use.
- My Top CSS Tips As Shared on Twitter – Part 1 – This blog post summarizes several tweet tips by Stephanie Eckles on some fun and valuable CSS tricks.
- Seven ways to test for accessibility of your web site with browser Developer Tools – Repeat it with me: Accessibility is important. Accessibility is important. Accessibility is important. Your code isn’t high quality code unless it’s accessible. This post by Christian Heilmann shows seven ways to verify that your software is accessible.
- SQL Server Move Database Files Step By Step – This is something we all have to occasionally do – move database files. Sergey Gigoyan gives walks us through it step bys tep.
- Polymorphic deserialization with System.Text.Json – Josef Ottosson demonstrates how to build variability into your code that deserializes JSON for a wide variety of scenarios.
- Service Oriented Architecture: Commands & Events Explained! – In this video, Derek Comartin succinctly explains service oriented architecture. SOA is an important architectural paradigm for developers of many backgrounds, and this is an excellent primer for it.
- The Case for Codeless Testing – Unit tests aren’t the only way to test! This is a nice post by Karl Hughes covers the value of codeless testing.
— Maarten Balliauw (@maartenballiauw) January 22, 2021
Awesome tip, thank you Maarten!
.NET exception advice:
Q: What should I throw?
Q: What should I catch?
The .NET exception model is a Pokémon based system. Gotta catch them all.
— Jared Parsons (@jaredpar) January 29, 2021
There’s more! Read the entire thread!
Interesting and cool stuff
Articles, tweets, and other items of interest that we’ve found.
- Watch the Rise and Fall of Programming Languages – Sue Gee
- Brain activity while coding differs from processing language or doing maths – Ryan Daws
- Managing Up: How Developers Can Better Communicate to Management Tyler Hakes
- Experiments in 8080 static/jit compilation – Because why not write a JIT compiler for the 8080 CPU? (8080 recompilation into CIL/MSIL) – David Tyler
- The Ultimate Experience: A Guide to the Principles of Sensory Design Micah Bowers
- Learning from Incidents – Jessica DeVita & Nick Stenning
no you misunderstand "bug free" does not mean "free of bugs" it means "we have included the bugs free of charge" cheers mate
— Computer Facts (@computerfact) January 6, 2021
Yes, the bugs are free! :smiley:
Devs watching QA test the product pic.twitter.com/uuLTButB3x
— sanja zakovska 🌱 (@sanjazakovska) January 22, 2021
True story! Testers make you cry! :joy:
And finally, the latest from JetBrains
Here’s a chance to catch up on JetBrains news that you might have missed:
:memo: Take part in the Developer Ecosystem 2021 survey! :memo:
- .NET Tools Guide
- ReSharper 2021.1 roadmap
- Rider 2021.1 Roadmap
- Answering Your Questions: AMA with the .NET Team on Reddit
- Webinar – OOPs, I did it again
- Xamarin, the best way to make NFC Apps – Webinar recording
- OSS Power-Ups: FluentValidation – Webinar recording
- Fluent Validation Plugin
Sharing is caring! So share your content with other readers. Don’t keep it to yourself! Send a Tweet or email with tips or content for publication in future newsletters! Share with a comment here, email me at firstname.lastname@example.org, or drop me a message via Twitter.
Subscribe to Blog updates
ReSharper 2024.1 EAP 7: Updates to C# and C++ Support
The ReSharper 2024.1 EAP 7 build has just been released and is ready for you to download! This build contains several improvements to C# and C++ support. Let’s take a look! C# support You will get suggestions to convert more code constructions in your source code to collection express…
Boost Code Quality with Qodana and GitHub Actions
It’s been roughly half a year since we introduced Qodana to .NET in our blog post about how to elevate your C# code quality with Qodana. Since then, we’ve been quite busy! Qodana went out of preview and into GA. Furthermore, we greatly improved the integration with our IDEs, providing an effortless …
Rider 2024.1 EAP 6: Updated New Project Dialog, Custom Naming Rules, and VCS Improvements
The latest installment in the Rider 2024.1 Early Access Program has just been released, and it’s jam-packed with updates. Before you download it, let’s take a look at the major changes. Updated New Project dialog To help reduce your cognitive load as you configure new projects, we have thor…
ReSharper 2024.1 EAP 6: The Most Feature-Rich Update Yet
The latest installment in the Early Access Program for ReSharper 2024.1 has just been released, and it's jam-packed with exciting updates. Let’s take a look at some of the highlights: Performance Faster Rename refactoring Renaming elements in your code is now faster and more efficient. T…