Setting coding standards in a project

data: 10 marca, 2015
czas czytania: 2 min
autor: Marcin Drobik

Below, you will find a handful of my thoughts with regard to setting coding standards.

Stylistic conventions

My approach to them is the following: as far as they are, their content is of minor importance to me, however it is more comfortable to use standards that apply in a given environment. In example, in C#, brackets usually appear in the new line, contrary to JS/Java.

In my opinion, stylistic conventions should be practical, which means that they should be supported by tools that we use, such as VS, R#, StyleCop, jsHint etc. It is important not to stand up against the default IDE formatting, but in contrary, use it so that the automatic document formatting is compatible with the conventions.

Stylistic conventions don’t have to be in a form of a document as it is rather boring lecture. They may be simply the setting files for analysis tools.

A good test of the conventions is the code review, during which stylistic errors SHOULD NOT occur – people should concentrate on more interesting / challenging aspects of the code.

Design standards

…i.e. using libraries, creating methods, functions, classes, a scheme of solution and projects etc. In this case, I think that at the beginning you have to use the existing things mostly. There is a great number of ready-made design guidelines for various languages in the Internet. Browse, choose what you like and use it.

It is important for me that they are in a nice form, well-formatted, with examples etc. What is more, it is necessary they are comprehensive, i.e. include at least those things I mentioned above.

Retro-review-refactoring of conventions

Conventions, as every element of the development process, should live and develop together with the team. Therefore, if we have some standards, we can get on with reading the following books:

After this dose of inspiration, I’m sure we’ll want to make some changes to our conventions 馃檪

Newsletter

Zainteresowa艂y Ci臋 nasze tre艣ci?
Sprawd藕 co jeszcze przygotowali艣my.

Adres e-mail

Dzi臋kujemy! Na Tw贸j adres e-mail wys艂ali艣my pro艣b臋 o potwierdzenie zapisu do newslettera.

O nie! Co艣 posz艂o nie tak. Nie zapisa艂e艣 si臋.

Gdyby tylko da艂o si臋 zapisa膰 Twojego maila dwa razy :)

Niepoprawny mail. Spr贸buj jeszcze raz.

Cookies

W pracy serwujemy suchar dnia. Tutaj musimy Ci臋 pocz臋stowa膰 ciasteczkami. Dowiedz si臋 wi臋cej.