Tag Best Practices

Storing information in its highest form

There’s an interesting guideline I’ve been meaning to write about for a long time. I call it Storing information in its highest form.

Which collection interface to use?

Let’s talk about when to use which collection type and why.

Generic types are for arguments, specific types are for return values

Today, we’ll discuss the following guideline: you should use the most generic types possible for arguments and the most specific types possible for return values.

Non-determinism in tests

This is the final post in my series about unit testing anti-patterns. This one is about non-determinism in tests.

Overriding methods in classes-dependencies

I’m continuing my unit testing anti-patterns article series. Today, we will talk about overriding methods in classes-dependencies.

Optimistic locking and automatic retry

In this post, I’m answering a reader’s question about how to combine an optimistic locking and automatic retry.

How to request information from multiple microservices?

This post is about how to work with information that is spread across multiple microservices.

IEnumerable vs IReadOnlyList

I apologize to everyone who’s waiting for my response to their code review requests. I was busy dealing with some personal stuff the last couple of weeks. Moving forward, I’m going to maintain a one post a week schedule where "regular" articles would take turns with code reviews. This article is a regular one, so the one next week would be a code review.

Today, I’d like to talk about IEnumerable and IReadOnlyList collection interfaces. We’ll discuss which of them is preferable and in what circumstance.

The best way to implement a Main Something property

In this post, we will explore a common design problem: implementing a Main Something property. There’s an equally common solution to this problem which is sub-optimal in most cases.

How long should a single method be?

This topic might seem trivial, especially if you look at all other articles that have beaten it to death already. But I would still like to make a couple of important points here. So, how long should a single method be?