``` // utils/Const.kt const val DEFAULT_TIME_MILL...
# codingconventions
m
Copy code
// utils/Const.kt

const val DEFAULT_TIME_MILLIS = 3000L // for default timer in ms

const val DEFAULT_PAGER_SIZE = 3 // for viewpager ui const
Need an advice Does we should avoid building a single god class constant like this? Or what approach highly recommended to create a constant class?
t
Personally i keep the constants as close to and as constrained as the using class(es) allows. In your example there what does a global
DEFAULT_TIME
even refer to?
👆 3
m
to use in everywhere when I try to construct an object time with default value
DEFAULT_TIME_MILLIS
, is this overkill?
t
That suggests every default time is the same