Sign in

Lead Software Engineer @ I share my experience in the form of articles about Software Engineering Best Practices, Design Patterns, Refactoring, C# and .NET.

Steps to be more confident when changing the source code.

It is pretty easy to fix one bug and break the large application in ten different places. Everyone understands that it is impossible to avoid such cases due to the high complexity of the software. However, you can minimize the chance of regression issues by using steps which I usually follow in my day-to-day development activities.

Before Fixing The Bug

In my opinion, the more time the software developer devotes to “Before” stage, the more experienced he or she is. Usually, junior developers start coding right after reading the bug description, when senior guys follow these steps:

Outgoing Dependencies Analysis

Almost all objects, except for simple or…


With the pros and cons of each

The maturity of a software engineer is determined by many factors such as knowledge of algorithms, analytical thinking, big-picture focus, debugging skills etc. In addition, the following two factors are important from my point of view:

  • A software engineer knows several approaches to solve the same problem.
  • A software engineer chooses an approach based on an analysis of its pros and cons.

To help you get a little more mature, I’ve put together 5 ways to clone an object in C# and have prepared the pros and cons of each.

We are going…


Slow code is optional.

Software development is about finding trade-offs:

  • CAP theorem — developers need to choose just 2 out of 3 guarantees for software systems.
  • Normalization vs denormalization of relational database schemas — developers find a balance between ease of data update and data retrieval time.
  • Development speed vs high-quality coding — developers strive for high quality, which is a time-consuming exercise, while the business needs to have features ready as soon as possible.

High-performance C# code isn’t free either. Developers can sacrifice the maintainability or security of the code to make the code run faster. …


Learn in practice.

Working on real commercial projects helps software developers become professionals by acquiring practical knowledge. Developers, in addition to reading many books about, say, design patterns, need to understand how these patterns can be used to solve various problems in the real world.

Even the largest projects that developers work on often do not implement all existing approaches, patterns, and software engineering techniques. To learn as much as possible, a developer needs to work on multiple projects at the same time or change projects quite often. …


In the previous article, 5 Ways to Improve the Performance of C# Code for Free, in one of the examples, I measured the time difference between allocating a list of classes and allocating a list of structs.

Let’s remember that example:

The ListOfClassesTest and ListOfStructsTest methods are almost identical. The first method allocates a million of PointClass instances and add them to the list, while the second allocates a million of PointStruct instances and adds them to the list as well. …


Estimation process is difficult, but not that difficult.

Software developers often find it difficult to accurately estimate their work. There are quite a few factors that can affect the actual time to complete the task, which are difficult to know in advance in order to end up with the actual time close to the estimated one.

Software developers should find a good balance between underestimating and overestimating their work. If work is underestimated, developers may have to work under clients or managers pressure, starting from the point when the estimated time has expired, but the developers need more time to complete the task. …


About a developer chasing trendy technology.

I prefer to change the project I’m working on when I get bored and feel like I can’t grow anymore. But it was not always so.

At the beginning of my career, I spent almost two and a half years working on a legacy project with an old technology stack (ASP.NET WebForms, WCF…), despite the era of SPA, .NET Core, Docker and cloud technologies. I fixed bugs about 80–90% of the time, and spent the rest of the time working on feature development.

I felt like I needed to change that project after the first half of a year working…


Not just strings.

String concatenation is a very simple operation that allows you to join multiple strings together. The usual way to do this is to use the ‘+’ operator:

string greeting = "Hello, " + "World!";

Additionally, there are several other ways to concatenate strings: using Join, Concat, Format methods of string class or using a StringBuilder class:

var sb = new StringBuilder();string greeting = sb.Append("Hello, ").Append("World!").ToString();

String concatenation is a simple thing, and every developer can write a compiled example without an IDE on a piece of paper.

But what about objects concatenation? Can this be done as elegantly as…


A couple of important questions to ask while reviewing the bug fix.

Each developer regularly performs code reviews of bug fixes as part of their day-to-day responsibilities. The process is simple and straightforward, but there are a few best practices that developers should remember and follow in order to develop a project with good code quality.

As a professional developer, do you ask yourself these questions when reviewing the bug fix of your teammate?

Is There a Change in the Unit Test?

Fixing the bug in the code should be accompanied by the addition or modification of the unit test.

A pull request that contains a code change to fix a bug but does not contain a change in unit…


The problem always has a solution. Even more than one.

Learning about multiple ways to accomplish the same task and comparing them, analyzing the pros and cons of each is an interesting exercise aimed at expanding the developer’s mindset.

The goal today is to explore multiple different ways to solve a common problem in software development — decorate an existing object with some cross-cutting behavior like measuring execution time, logging, throttling, caching etc.

Way 0: No Decorator Pattern

When there is a need to extend the behavior of an existing object, the decorator pattern or any other patterns or design principles are not needed at all. …

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store