Two of the operations you often do with your code is to discuss it, or perform a search over it. So using good names will help in both situations.
Debugging our .NET applications can be cumbersome. With the DebuggerDisplay attribute we can simplify it by displaying custom messages.
Is your string really empty, or has it hidden characters? With String.IsNullOrEmpty and String.IsNullOrWhiteSpace you can find it
Senders and Receivers handle errors on Azure Service Bus differently. We'll see how to catch them, what they mean and how to fix them. We'll also introduce Dead Letters.
The Principle of Least Surprise is a simple principle that helps you writing clear, obvious code: this helps other developers foresee what a component does without worrying of unexpected behaviors.
Queues or Topics? How are they similar and how they are different? We'll see how to use those capabilities in Azure Service Bus with .NET and C#
Do you need the index of the current item in a foreach loop with C#? Here you'll see two approaches.
Azure Service bus is a message broker generally used for sharing messages between applications. In this article, we're gonna see an introduction to Azure Service Bus, and how to work with it with .NET and C#
Choosing meaningful names takes time! Time spent finding good names is time saved trying to figure out what you meant.
Knowing the Assembly Version of the API you've deployed on an environment may be helpful for many reasons. We're gonna see why, how to retrieve it, and how to expose it with Endpoint Routing (bye-bye Controllers and Actions!)
Doing a tech talk is easy. Doing a *good* talk is harder. We're going to see some tips to improve the delivery of your conferences.
It's not a good practice to return the ID of a newly created item in the HTTP Response Body. What to do? You can return it in the HTTP Response Headers, with CreatedAtAction and CreatedAtRoute.
Code coverage is a good indicator of the health of your projects. We'll see how to show Cobertura reports associated to your builds on Azure DevOps and how to display the progress on Dashboard.
Tests are as important as production code. Well, they are even more important! So writing them well brings lots of benefits to your projects.
Language details may impact application performance. In this article we'll see some of the C# tips that brought me to improve my application. Singleton creation, StringBuilder and more!
Having fast API response is crucial for your applications. In this article you'll see how I managed to improve an API application that took 14 secs each call.
When performing a talk, the audience experience is as important as the content. They must be focused on what you say, and not get distracted by external outputs. So, here's 10 tips to rock your next virtual talk.
Revise PowerShell basics with a simple script that opens a browser for each specified URL. We're gonna cover how to declare variables, define arrays, concatenate strings and run CMD commands.
DateTime, Guid, and Random values are not under your direct control. You should abstract them to write better code and testing. We'll see 3 ways to inject and test them in .NET Core projects.
Code coverage is an indicator of the quality of your code. With Coverlet and VS2019 you can have a human readable report to see where to improve your code.
The way you handle errors on your code can have a huge impact on the maintainability of your projects. Don't underestimate the power of clean error handling.
Is string.Format obsolete? Not at all, it still has cards to play! Let's see how we can customize format and create custom formatters.
How to effectively ping an endpoint in C#? Don't use the HttpClient, when .NET provides a Ping class to perform all these operations.
MongoDB is a database based on JSON-like documents, but it can be queried using C#. We'll see how to perform CRUD operations and we'll create some advanced queries.
Are Getters and Setters the correct way to think of abstraction? What are pro and cons of OOP and Procedural programming? And, in the OOP world, how can you define objects?
Wouldn't it be nice if Visual Studio could autogenerate clients for external API? It is actually possible, if they expose an OpenAPI file. Let's see how!
With HttpRepl you can perform HTTP operations as they were local folders, using the CLI. Let's see how to configure it and run GET and POST operations.
During this holiday I hiked for the first time. I found some lessons that hiking can teach junior devs
Swagger is a tool that exposes the documentation of your APIs and helps collaborating with other teams. We'll see how to integrate it with .NET Core 3, how to add XML comments and status codes.
Are all comments bad? When they are necessary? Why formatting is so important? Writing clean code does not only refer to the executed code, but also to everything around.
Integration tests are useful to check if multiple components fit together well. How can you test your APIs? And how can you mock dependencies?
You're using DateTime.Now, aren't you? Be careful, because it may bring some troubles to your application. Here I'll explain why and I'll talk about time zones and formatting in C# DateTime.
I don't have to tell you why you need to write clean code. Here you'll see some tips about how to name things and how to structure functions
Sometimes on your tests you need to access test files, for example for mocking external data. With manifest resources you can easily reference files for your tests.
BenchmarkDotNet allows you to test the performance on .NET methods. So let's answer a question: is the Enum.HasFlag method really that slow?
Validating inputs is crucial for every application. If you want an easy and versatile way, you can try FluentValidation.
Internal members can be accessed only within the same assembly. And for different assemblies? Here's for you the InternalsVisibleTo attribute!
Singleton, Scoped and Transient: these are the possible lifetimes for DI with .NET Core. How do they change the way objects are constructed?
We've already seen some of the things you should know about enums in C#. Here we'll dive into Flagged enumerations, serialization and so on.
Docker is a project that allows you to create and run applications in an isolated environment. Let's try it to run MongoDB on your machine!
Enums are often used with C#. Boring, right? Maybe there is something you didn't know: casting, parsing and flagged enums.
Having a robust logging system is crucial for any application. There are many tools, and one of these is Serilog. Here you'll learn how to use it in a .NET application and how to integrate it with Seq.
Do you have an Azure Function that you want to upgrade from v2 to v3? Don't panic, it's just a matter of few steps!
Azure Functions are one of the best examples of serverless applications. By default you can't use Dependency injection: here's how you can configure it by adding the Startup class.
Azure DevOps, among its capabilities, allows you to store NPM packages in their system. Here we'll see how to connect to an NPM feed and how to solve the 401-unauthorized error.
Asynchronous programming is often seen as something cumbersome, so many developers avoid it. What, why and how to use it? Here are the first steps you can take to approach async programming.
You may need to run Google Chrome with CORS checks disabled. Here's how you can do it on Windows 10.
We have already seen how to search for videos in a YouTube channel. Now it's time to get details for a single video.
YouTube provides some APIs for getting info about a channel videos. But they also provide .NET libraries to achieve the same result with C#. Let's have a try!
Extension methods in C# are really useful, but there are few rules to follow...
The CollectionAssert class if fine for basic tests on collections in C#. We will have a look at the methods exposed by this class.
I'm pretty sure that you've already used Guids in C#, but have you ever stopped to think what they are under the hood?an 3 seconds to load. Here you'll learn few trick to improve your site performance.
More than 50% of mobile users abandon a website if it takes more than 3 seconds to load. Here you'll learn few trick to improve your site performance.
Maybe you are used to ping a service to check whether it responds or not. It works well using a local console, but within the Azure portal you must use another command: tcpping.
On November I shared on Twitter an article each day. They were about C#, general programming and advanced topics. For celebrating the conclusion of this challenge, I wrote a poem about that.
Is it true that the inverse of a negative number is always a positive number? If you think it's true, you might get a subtle error while implementing comparison.
Having a public speech seems easy. In some ways, it really is. But the first time can be hard. Here's my thought after my first experience in public speaking.
Error CS0246 - Type or namespace could not be found. What does it mean? Why does it happen? How can you solve it?
Sometimes, when I open SQL Server Management Studio, I forget about my Local DB instance name. Here's how to retrieve it.
API Gateways can help you create microservices and micro frontends, and expose rich APIs to your customers while keeping things simple on your company.
The StringAssert class is a hidden feature of the MSStest framework. Not so many methods, but they can help you with basic tests with strings.
The Assert class is the first step you'll probably take into unit testing. But do you know that there's more than the IsTrue() method?
Are you ready to create a brand new Angular project? The CLI can help you with common settings.
Some of the things I learned at .NET Conf Italia: interfaces and abstract classes, Blazor, C# default interfaces and .NET Core on Samsung TV
There's a lot of confusion around the terms Angular, NPM, and NodeJS. What are they? And how do they interact with each other?
Is a string empty? What if it contains only white spaces? You shouldn't reinvent the wheel, since .NET exposes methods exactly for these cases: String.IsNullOrEmpty and String.IsNullOrWhiteSpace.