https://kotlinlang.org logo
#naming
Title
# naming
t

Tower Guidev2

03/28/2023, 8:17 AM
I would like some suggestions for how to name the states associated with a statemachine that controls my user interface my prefered solution would be to have a set of names that describe most screen states a user interface can take on during interaction with a user. in addition i would like the names to be one word (if possible) and singular (i do not like plural names) some screen states that are easy to identify are EMPTY, BUSY, SUCCESS, & ERROR, which would make sense for any UI, however I am struggling for names that describe the first screen presented, e.g. when a user navigates to a screen and has not actually interacted with it yet, maybe INITIAL, OPENING, BEGINING, INTRODUCTION. also theres the issue that some of these states (names) overlap, for example SUCCESS and whatever you want to name the first screen state the user sees are one and the same. if i use SUCCESS for both scenarios it feels "odd" as the user hasnt interacted with the screen when navigating to it for the first time yet they are in the state of SUCCESS. am i over thinking it?
g

George

03/28/2023, 1:06 PM
Maybe rename success -> rendered. As it seems to me, it is closer to what it represents. Likewise, busy-> rendering. Also imo, I would not force singular names, because in some cases, concatenated words describe much better the case. For example, for interacting states : • not interacted • Interacting • Interacted
t

Tower Guidev2

03/28/2023, 1:21 PM
@George thanks for your excellent suggestions, i do like where names are related, such as your examples of Rendered, Rendering and interacting and interacted
g

George

03/28/2023, 3:56 PM
You are welcome :)
6 Views