For any highly complex area, standards must be established to facilitate the review and improvement process of these activities. In computer science, these standards define the area of ??software engineering, always seeking to make codes cleaner, more manageable and closer to the needs of the real world.

One of the most powerful tools used by companies around the world for this purpose are Naming Conventions. These conventions define how to name any variables, classes, and artifacts of programming languages ??in general. Some advantages of these conventions are:

These advantages are widely recognized by the industry, and it is a challenge for the reader to find a single company with a programming sector in the world that does not use naming conventions.

Despite all the advantages, the convention must be chosen very wisely, since the positive aspects will only be achieved if a convention is chosen that meets the needs of the language used, the company, the team and that is in line with market expectations. This task is not so complex nowadays, since almost all programming languages ??and large companies in the world are happy to publish their programming standards, since they know the value of having the code available on the market and in public repositories meet these expectations.

Naming standards are usually organized as in the following fantasy example:

 

Nomes de Objetos

Notação

Tamanho Máximo de Caracteres

Nomes de classes

snake_case

120

Nomes de métodos

PascalCase

50

Nomes de variáveis

camelCase

50

Nomes de campos privados

SCREAMING_SNAKE_CASE

50

This table defines the notation and maximum character length for writing various objects in a given programming language. In many cases, this information is not contained in tables, but rather in several web pages of text explaining the standards for each object and topic in the language.

Examples of notation usage:

Naming conventions also often define how prevalent abbreviations should be, which characters can be used, etc. Naming conventions are well-established in the market and are likely here to stay, so choose your own and your team's conventions now. A good team knows that the small extra effort to follow the chosen convention will pay off in the future, both for their colleagues and for the understanding of their own code! A good convention serves the needs of the team, and should also be updated according to everyone's agreement.

 

A fan of well-structured code and well-written anime, João Henz is a programmer at Izyplay Game Studio, working tirelessly for the success of the team and the smooth running of their games on any platform.