Exposing private state to enable unit testing

Last time, we talked about making private methods public in order to enable unit testing. It’s not the only way people expose implementation details to the outside world for unit testing purposes, though. Today, we’ll look at a similar anti-pattern: exposing private state.

Unit testing private methods

I’m starting a new series about unit testing anti-patterns. This post is the first article in that series.

When it comes to unit testing, one of the most commonly asked questions is: how to test a private method?

Domain events: simple and reliable solution

Today, I’d like to write about a simple and reliable way to implement domain events.

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.

Value Object: a better implementation

This post is about a better implementation of Value Object.

Short-term vs long-term perspective in software development

In this post, I’d like to talk about what I think is one of the most damaging attitudes a company or a person can have in the field of software development: short-sighted perspective.

Always valid vs not always valid domain model

I’m back to the regular posting schedule. No more game development, at least for now.

How I tried to get into game development and failed, part 3

Final part of my story about game development. First part, second part. Client side load balancing In the previous post, I wrote about performance optimizations. We figured that a single 1 CPU server in Azure could handle up to 600 simultaneous users spread across 3 game scenes (also known as game arenas; each scene takes one OS process). Now we needed a mechanism for distributing the players across multiple servers and game scenes in those servers.

How I tried to get into game development and failed, Part 2

Part 2 of my story. You can read the first part here. Working on the tank design I wrapped up the previous post by saying that we decided to change the game idea from robots to tanks. We refined our vision of the game. There were going to be multiple tank levels to introduce a sense of progression. When starting up, you’d have a tank with the least amount of health (hit point, HP) and fire power, and proceed to a tank of the highest level.

How I tried to get into game development and failed

If you read this blog regularly, you know that I usually write about DDD, functional programming, and enterprise software development best practices in general. These are the techniques I enjoy talking about, as well as applying them in my own projects. However, there was another field I always wanted to try myself in. That is game development. The ability to write my own games was the reason why I started learning to program in the first place. And I believe many programmers had this motivation behind their careers as well.

But let’s start from the beginning.