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 IT leaks

Dzielimy się inspiracjami i nowinkami z branży IT. Szanujemy Twój czas - obiecujemy nie spamować i wysyłać wiadomości raz na dwa miesiące.

Subscribe to our newsletter

Administratorem Twoich danych osobowych jest Future Processing S.A. z siedzibą w Gliwicach. Twoje dane będziemy przetwarzać w celu przesyłania cyklicznego newslettera dot. branży IT. W każdej chwili możesz się wypisać lub edytować swoje dane. Więcej informacji znajdziesz w naszej polityce prywatności.

Subscribe to our newsletter

Administratorem Twoich danych osobowych jest Future Processing S.A. z siedzibą w Gliwicach. Twoje dane będziemy przetwarzać w celu przesyłania cyklicznego newslettera dot. branży IT. W każdej chwili możesz się wypisać lub edytować swoje dane. Więcej informacji znajdziesz w naszej polityce prywatności.