Archive Page
2024
- C# Tip: 2 ways to generate realistic data using Bogus (2024-12-03)
- Easy logging management with Seq and ILogger in ASP.NET (2024-11-19)
- Davide's Code and Architecture Notes - the Error Management Trio, and how it affects your software architecture (2024-11-05)
- C# Tip: IEnumerable vs ICollection, and why it matters (2024-10-15)
- How to use IHttpClientFactory and WireMock.NET together using Moq (2024-10-01)
- Davide's Code and Architecture Notes - Practical creation of C4 Model diagrams with Structurizr (2024-09-17)
- C# Tip: 2 ways to use custom equality rules in a HashSet (2024-08-27)
- Postman's pre-request scripts: how to perform HTTP POST requests (with JSON body) and how to set Cookie authentication. (2024-08-20)
- Davide's Code and Architecture Notes - Web APIs vs REST APIs vs pseudo-REST APIs (2024-07-30)
- C# Tip: Mark a class as Sealed to prevent subclasses creation (2024-07-16)
- Seeding in-memory Entity Framework with realistic data with Bogus (2024-07-09)
- Davide's Code and Architecture Notes - Arc42 Documentation, for a comprehensive description of your project (2024-07-02)
- C# Tip: Path.Combine and Path.Join are similar but way different. (2024-06-25)
- Getting started with Load testing with K6 on Windows 11 (2024-06-18)
- Davide's Code and Architecture Notes - Introducing SLI, SLO, and SLA (2024-03-19)
- Why reaching 100% Code Coverage must NOT be your testing goal (with examples in C#) (2024-03-12)
- C# Tip: IFormattable interface, to define different string formats for the same object (2024-02-27)
- [ENG] Improving Your Code Coverage | Microsoft Visual Studio YouTube channel (2024-02-16)
- Is Random.GetItems the best way to get random items in C# 12? (2024-02-13)
- Davide's Code and Architecture Notes - Cache Expiration vs Cache Eviction (and Eviction Policies) (2024-02-06)
- How to create custom snippets in Visual Studio 2022 (2024-01-30)
- C# Tip: ObservableCollection - a data type to intercept changes to the collection (2024-01-23)
- How to kill a process running on a local port in Windows (2024-01-16)
- Davide's Code and Architecture Notes - Tracking decision with Architecture Decision Records (ADRs) (2024-01-09)
- [ENG] MVPbuzzChat with Davide Bellone | Christian Buckley (2024-01-08)
2023
- Top 6 Performance Tips when dealing with strings in C# 12 and .NET 8 (2023-12-19)
- 4 ways to create Unit Tests without Interfaces in C# (2023-12-12)
- C# Tip: Use TestCase to run similar unit tests with NUnit (2023-11-28)
- [ENG] .NET 5, 6, 7, and 8 for busy developers | .NET Community Austria (2023-11-21)
- How to extract, create, and navigate Zip Files in C# (2023-11-14)
- Davide's Code and Architecture Notes - 4 algorithms to implement Rate Limiting, with comparison (2023-11-07)
- OhMyPosh and CascadiaCode not working on PowerShell? How to fix it in Windows 10 and Windows 11 Integrated Terminal (2023-10-31)
- C# Tip: How to create Unit Tests for Model Validation (2023-10-24)
- Pre-commit hooks with Husky.NET - build, format, and test your .NET application before a Git commit (2023-10-17)
- Davide's Code and Architecture Notes - Pros and Cons of API Gateways (with vendors comparison) (2023-10-10)
- How to integrate Feature Flags stored on Azure App Configuration in an ASP.NET Core Application (2023-10-03)
- C# Tip: Improve memory allocation by initializing collection size (2023-09-26)
- Feature Flags 101: A Guide for ASP.NET Core Developers (2023-09-19)
- Davide's Code and Architecture Notes - CAP Theorem: it's not just «Pick two» (2023-09-12)
- Advanced Integration Tests for .NET 7 API with WebApplicationFactory and NUnit (2023-08-01)
- C# Tip: 2 ways to define ASP.NET Core custom Middleware (2023-07-11)
- How to automatically refresh configurations with Azure App Configuration in ASP.NET Core (2023-07-04)
- Davide's Code and Architecture Notes - L4 vs L7 Load Balancer (2023-06-27)
- [ENG] .NET 5, 6, and 7 for busy developers | Dotnet Sheff (2023-06-21)
- Azure App Configuration and .NET API: a smart and secure way to manage configurations (2023-06-20)
- C# Tip: Use custom Equality comparers in Nunit tests (2023-06-13)
- How to add Dependency Injection, Configurations, and Logging in a .NET 7 Console Application (2023-06-06)
- Davide's Code and Architecture Notes - Testing Pyramid vs Testing Diamond (and how they affect Code Coverage) (2023-05-30)
- Understanding IOptions, IOptionsMonitor, and IOptionsSnapshot in .NET 7 (2023-05-23)
- C# Tip: Advanced Switch Expressions and Switch Statements using filters (2023-05-16)
- How to download an online file and store it on file system with C# (2023-05-09)
- C# Tip: Format Interpolated Strings (2023-05-02)
- Davide's Code and Architecture Notes - Postel's law for API Robustness (2023-04-18)
- C# Tip: Access items from the end of the array using the ^ operator (2023-04-11)
- Health Checks in .NET: 2 ways to check communication with MongoDB (2023-03-07)
- C# Tip: Initialize lists size to improve performance (2023-02-28)
- Davide's Code and Architecture Notes - Understanding Elasticity and Scalability with Pokémon Go and TikTok (2023-02-21)
- C# Tip: List Pattern to match an collection against a sequence of patterns (2023-02-14)
- How to customize Conventional Commits in a .NET application using GitHooks (2023-02-07)
- C# Tip: do NOT use nameof to give constants a value (2023-01-31)
- Davide's Code and Architecture Notes - Server-side caching strategies: how do they work? (2023-01-24)
- C# Tip: LINQ's Enumerable.Range to generate a sequence of consecutive numbers (2023-01-17)
- LINQ for beginners: pick the right methods! (2023-01-10)
2022
- How to customize Swagger UI with custom CSS in .NET 7 (2022-12-16)
- PriorityQueues on .NET 7 and C# 11 (2022-12-12)
- Book Review: C# 11 and .NET 7 - Modern Cross-Platform Development Fundamentals (2022-12-01)
- C# Tip: Raise synchronous events using Timer (and not a While loop) (2022-11-29)
- How to create an API Gateway using Azure API Management (2022-11-22)
- Clean Code Tip: Methods should have a coherent level of abstraction (2022-11-15)
- How to deploy .NET APIs on Azure using GitHub actions (2022-11-08)
- C# Tip: use the @ prefix when a name is reserved (2022-10-25)
- 3 (and more) ways to set configuration values in .NET (2022-10-18)
- Clean Code Tip: DRY or not DRY? (2022-10-11)
- The 2 secret endpoints I create in my .NET APIs (2022-10-04)
- Clean Code Tip: throw exceptions instead of returning null when there is no fallback (2022-09-27)
- How to log Correlation IDs in .NET APIs with Serilog (2022-09-20)
- C# Tip: use Miniprofiler instead of Stopwatch to profile code performance (2022-09-13)
- How to propagate HTTP Headers (and Correlation IDs) using HttpClients in C# (2022-08-02)
- Clean Code Tip: F.I.R.S.T. acronym for better unit tests (2022-07-26)
- 5 tricks every C# dev should know about LINQPad (2022-07-19)
- C# Tip: SelectMany in LINQ (2022-07-12)
- How to solve InvalidOperationException for constructors using HttpClientFactory in C# (2022-07-05)
- Clean Code Tip: Avoid subtle duplication of code and logic (2022-06-28)
- How to improve Serilog logging in .NET 6 by using Scopes (2022-06-21)
- C# Tip: use IHttpClientFactory to generate HttpClient instances (2022-06-07)
- 8 things about Records in C# you probably didn't know (2022-05-31)
- Clean Code Tip: Tests should be even more well-written than production code (2022-05-24)
- 3 ways to check the object passed to mocks with Moq in C# (2022-05-17)
- C# Tip: Convert ExpandoObjects to IDictionary (2022-05-10)
- From idea to publishing, and beyond: how I automated my blogging workflow with GitHub, PowerShell, and Azure (2022-05-03)
- Clean Code Tip: Avoid using too many Imports in your classes (2022-04-19)
- How to access the HttpContext in .NET API (2022-04-12)
- C# Tip: Use Debug-Assert to break the debugging flow if a condition fails (2022-04-05)
- How to perform CRUD operations with Entity Framework Core and PostgreSQL (2022-03-29)
- Clean Code Tip: Not all comments are bad (2022-03-22)
- Advanced parsing using Int.TryParse in C# (2022-03-15)
- C# Tip: How to temporarily change the CurrentCulture (2022-03-08)
- PostgreSQL CRUD operations with C# and Dapper (2022-03-01)
- Clean Code Tip: AAA pattern for tests: why is it important? (2022-02-22)
- Measuring maintainability metrics with NDepend (2022-02-15)
- C# Tip: Exception handling with WHEN clause (2022-02-08)
- CRUD operations on PostgreSQL using C# and Npgsql (2022-02-01)
- Clean Code Tip: Avoid mental mappings (2022-01-25)
- How to run PostgreSQL locally with Docker (2022-01-18)
2021
- Code opinion: should we trust Open Source after Log4J's issues? (2021-12-21)
- C# Tip: use yield return to return one item at the time (2021-12-14)
- Profiling .NET code with MiniProfiler (2021-12-07)
- Clean Code Tip: Keep the parameters in a consistent order (2021-11-30)
- How to parse JSON Lines (JSONL) with C# (2021-11-23)
- C# Tip: Use a SortedSet to avoid duplicates and sort items (2021-11-16)
- How to resolve dependencies in .NET APIs based on current HTTP Request (2021-11-09)
- Clean Code Tip: Don't use too many method arguments (2021-11-02)
- Moq vs NSubstitute: syntax cheat sheet (2021-10-26)
- C# Tip: use the Ping class instead of an HttpClient to ping an endpoint (2021-10-19)
- How to log to Console with .NET Core and Serilog (2021-10-12)
- Clean code tip: use the same name for the same concept (2021-10-05)
- How to test HttpClientFactory with Moq (2021-09-28)
- C# tip: define Using Aliases to avoid ambiguity (2021-09-21)
- How to customize fields generation in Visual Studio 2019 (2021-09-14)
- Clean code tip: small functions bring smarter exceptions (2021-08-17)
- How to add a caching layer in .NET 5 with Decorator pattern and Scrutor (2021-08-10)
- C# tip: create correct DateTimes with DateTimeKind (2021-08-07)
- Code opinion: performance or clean code? (2021-07-27)
- Clean code tip: Use pronounceable and searchable names (2021-07-20)
- Simplify debugging with DebuggerDisplay attribute dotNET (2021-07-13)
- C# tip: String.IsNullOrEmpty or String.IsNullOrWhiteSpace? (2021-07-06)
- Handling Azure Service Bus errors with .NET (2021-06-29)
- Clean code tip: Principle of Least Surprise (2021-06-22)
- Azure Service Bus: Queues vs Topics (2021-06-15)
- C# tip: how to get the index of an item in a foreach loop (2021-06-08)
- Azure Service Bus and C# - an introduction (2021-06-01)
- Clean code tip: How to choose meaningful names? (2021-05-25)
- How to expose .NET Assembly Version via API endpoint routing (2021-05-18)
- 13 tips for delivering better tech talks (2021-05-04)
- Getting resource location with CreatedAtAction and CreatedAtRoute action results (2021-04-20)
- [ITA] Azure DevOps: plan, build, and release projects | Global Azure Verona (2021-04-17)
- [ITA] Azure DevOps: build and release pipelines to deploy with confidence | Global Azure Torino (2021-04-15)
- Cobertura, YAML, and Code Coverage Protector: how to view Code Coverage report on Azure DevOps (2021-04-06)
- Clean code tips - Tests (2021-03-23)
- 14 to 2 seconds: how I improved the performance of an endpoint by 82% - part 2 (2021-03-09)
- 14 to 2 seconds: how I improved the performance of an endpoint by 82% - part 1 (2021-02-23)
- 10 underestimated tasks to do before your next virtual presentation (2021-02-09)
- How to open the same URL on different environments with PowerShell (2021-01-26)
- [ITA] Azure DevOps: build and release projects | .NET User Group Meetup Torino (2021-01-25)
- 3 ways to inject DateTime and test it (2021-01-12)
2020
- How to view code coverage with Coverlet and Visual Studio 2019 (2020-12-29)
- Clean code tips - Error handling (2020-12-15)
- How to use String.Format - and why you should care about it (2020-12-01)
- How to Ping an endpoint with C# (2020-11-17)
- How to integrate MongoDB with C# (2020-11-03)
- Clean code tips - Abstraction and objects (2020-10-20)
- How to generate code from OpenAPI definition with Visual Studio 2019 (2020-10-06)
- How to use HttpRepl to navigate API endpoints (2020-09-22)
- 10 things hiking can teach you as a junior developer (2020-09-08)
- Understanding Swagger integration in .NET Core (2020-08-25)
- Clean code tips - comments and formatting (2020-08-18)
- How to run integration tests for .NET API (2020-08-11)
- 5 things about DateTime time zones and formatting (2020-07-28)
- Clean code tips - names and functions (2020-07-21)
- How to mock dependencies with Manifest resources (2020-07-14)
- Enum.HasFlag performance with BenchmarkDotNet (2020-06-30)
- Cool validation with FluentValidation (2020-06-16)
- Testing internal members with InternalsVisibleTo (2020-06-02)
- Dependency Injection lifetimes in .NET - Scoped vs Transient vs Singleton (2020-05-26)
- 5 more things you should know about enums in C# (2020-05-19)
- First steps with Docker: download and run MongoDB locally (2020-05-12)
- 5 things you should know about enums in C# (2020-05-05)
- Logging with Serilog and Seq (2020-04-28)
- How to upgrade Azure Functions v2 to v3 (2020-04-21)
- How to add a Startup class to Azure Functions (2020-04-14)
- How to connect and authenticate to NPM feeds on Azure DevOps (2020-04-07)
- First steps with asynchronous programming in C# (2020-03-31)
- How to run Google Chrome without CORS (2020-03-24)
- How to get video details from YouTube with .NET Core 3 (2020-03-17)
- How to search for YouTube videos in a channel with .NET Core 3 (2020-03-02)
- How you can create extension methods in C# (2020-02-18)
- MSTest CollectionAssert class - an overview (2020-02-04)
- 5 things you didn't know about Guid in C# (2020-01-21)
- A few tips for performance optimization (2020-01-06)
2019
- How to ping from an Azure App service with TCPPING (2019-12-13)
- A recap of my 30ArticlesForNovember (2019-12-05)
- C# sorting - a subtle mistake (2019-11-15)
- Thoughts after my very first public speech (2019-10-20)
- [ITA] Azure DevOps: Consegna Spesso, Consegna Meglio | Azure Meetup Torino (2019-10-15)
- Type or namespace not found: how to fix Error CS0246 in .NET Core (2019-08-26)
- Retrieving your SQL LocalDB Instance Name: A How-To Guide (2019-05-21)
- API Gateways - an overview (2019-05-17)
- MSTest StringAssert class - an overview (2019-03-20)