Ubiquitous Language and Naming

In this post, I’d like to talk about naming and Ubiquitous Language.

Code review: Fabric class

This is the second code review session where I showcase a real-world code example. If you want to learn more about this new format, check out this post. You can also request a review yourself. To do that, use the form on this page. Code review: Fabric class The full source code of this one is rather large for a single blog post, so I decided to pick the most interesting portions of it - those I think could be improved.

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.

Code review: User Controller and error handling

This is the first code review where I showcase some real-world code example and nitpick suggest improvements in it. If you want to learn more about this new format, check out this post. You can also request a review yourself. To do that, use the form on this page. Code review: User Controller and error handling The code in question is a UserController class with this Create method: publicIActionResult Create([FromBody] UserCreateModeluser)

Call for code review

When I started this blog, I had one idea in mind: create some sort of repository of programming principles and practices so that I myself and other people would have an easier time navigating around them. That’s a nice goal to aim for but I noticed that when it comes to the actual process of writing code, having such a repository is often not enough.

Temporal coupling and Immutability

This topic is partly covered in my Applying Functional Principles in C# Pluralsight course, Module 2. Here, I’d like to elaborate on how temporal coupling and immutability are related to each other. Temporal coupling Temporal coupling is coupling that occurs when there are two or more members of a class that need to be invoked in a particular order. A common example is the following: var calculator = new PriceCalculator(); calculator.

What is an exceptional situation in code?

This is a continuation of the topic of error handling. We’ll discuss what an exceptional situation in code actually is and see some examples of it.

Error handling: Exception or Result?

In this post, we’ll look at some practical examples of error handling. We will see whether it is better to use exceptions or the Result class to deal with errors.

Interfaces for repositories: do or don't?

Today’s topic is about interfaces for repositories. Should you introduce them? Or maybe it’s better to use repositories as is? Let’s see.