Naming conventions for constants and their units

Should the names of my constants include the units that it represents, or is this better handled by a brief comment? Permanent names can sometimes become long. For example, I can choose between:

// Seconds spent displaying logo
public static final float LOGO_DISPLAY_TIMER = 1.5f;

and

public static final float LOGO_DISPLAY_TIMER_IN_SECONDS = 1.5f;

I read Clean Code , which focuses on exact naming conventions, but I was not sure about this particular case.

+4
source share
2 answers

- - sth. , , , . , .

+2

, , , . , , :)

, , , , .

0

Source: https://habr.com/ru/post/1530978/


All Articles