Using EditorConfig to use a common code style

In my previous blog post, I wrote about guarding your code style. Here I showed a number of areas where to look for when defining your teams common code style. Also a number of tools where briefly mentioned that could guard these styles. One of these tools is EditorConfig.

Read More…
Posted in Clean Code at March 31st, 2022. No Comments.

Guarding your coding style

When you read a certain magazine or newspaper, you don’t have the feeling that the articles are written by a number of persons each having their own personalities and characteristics. When reading the first article, you can’t decide when looking at another article by looking at the use of words if it is written by the same person or not. The same strategy we see back at clean written code: it will show consistency throughout the solution. If applied well, you can’t tell that some class is written by one developer and another class by another developer.

What is actually the benefit of having all code written down like it is written by the same person? Note that we spent more time reading back code than we spend time at writing the code. If this is the case, you want fellow programmers to quickly grasp the main important things you want to achieve by the code you’ve written. One thing that helps with this is having the same coding style all over the same code base.

Read More…
Posted in Clean Code at March 1st, 2022. No Comments.