Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
In this article, I will show you two simple tricks that help me understand the deployment status of my .NET APIs
-
In case of unmanageable error, should you return null or throw exceptions?
-
APIs often call other APIs to perform operations.
-
Miniprofiler is a nice tool to profile your code in a smart way.
-
Propagating HTTP Headers can be useful, especially when dealing with Correlation IDs.
-
Good unit tests have some properties in common: they are Fast, Independent, Repeatable, Self-validating, and Thorough.
-
LINQPad is one of the tools I use daily.
-
SelectMany is one of the LINQ methods I’ve used the least.
-
A suitable constructor for type ‘X’ could not be located.
-
Duplication is not only about lines of code, but also about data usage and meaning.
-
Logs are important.
-
Initializing HttpClient instances can expose you to Socket Exhaustion problems.
-
C# recently introduced Records, a new way of defining types.
-
Should you write your tests with the same care you write the production code?
-
In unit tests, sometimes you need to perform deep checks on the object passed to the mocked service.
-
How to get all the keys of an ExpandoObject?
-
After 100 articles, I’ve found some neat ways to automate my blogging workflow.
-
Having too many ‘using’s, or imports, is a good indicator that your class does too many things.
-
If your application is exposed on the Web, I guess that you get some values from the HTTP Requests, don’t you?
-
It would be great if we could break the debugging flow if a condition is (not) met.
-
With Entity Framework you can perform operations on relational databases without writing a single line of SQL.
-
Is it true that we should always avoid comments in our code?
-
We all need to parse strings as integers.
-
What can you do if you need to temporarily change the CurrentCulture in C#?
-
Mapping every SQL result to a data type can be a pain.
-
The most important trait of Tests?
-
Keeping an eye on maintainability is mandatory for every project which should live long.
-
Instead of using if-else or switch blocks to handle exceptions, you can do it gracefully using the ‘when’ keyword.
-
Once we have a Postgres instance running, we can perform operations on it.
-
Mental mappings are a good way to write shorter code that you, and only you, can understand.
-
PostgreSQL is a famous relational database.
-
With Log4J’s vulnerability, we’ve all been reminded that systems are vulnerable, and OSS are not immune too.
-
Yield is a keyword that allows you to return an item at the time instead of creating a full list and returning it as a whole.
-
Is your application slow?
-
Following a coherent standard, even for parameters order, helps developers when writing and, even more, reading code.
-
JSONL is JSON’s less famous sibling: it allows you to store JSON objects separating them with new line.
-
Using the right data structure is crucial to building robust and efficient applications.
-
Did you know that in .NET you can resolve specific dependencies using Factories?
-
When a function has too many parameters, it’s clear that something is wrong.
-
Moq and NSubstitute are two of the most used library to mock dependencies on your Unit Tests.
-
Sometimes you need to ping some endpoints.
-
Serilog is a famous logger for .NET projects.
-
Smaller functions help us write better code, but have also a nice side effect: they help us to understand where an exception was thrown.
-
Mocking IHttpClientFactory is hard, but luckily we can use some advanced features of Moq to write better tests.
-
Sometimes we need to use objects with the same name but from different namespaces.
-
Every time you ask Visual Studio to generate properties for you, it creates them with a simple, default format.
-
Smaller functions help us write better code, but have also a nice side effect: they help us to understand where an exception was thrown.
-
You should not add the caching logic in the same component used for retrieving data from external sources: you’d better use the Decorator Pattern.
-
Creating simple DateTimes creates issues when handling timezones.
-
In any application, writing code that is clean and performant is crucial.