DEV Community

Discussion on: What is your hack for coming up with variable and function names?

Collapse
 
alinp25 profile image
Alin Pisica

I like to structure my tasks in small and quick ones. When I define my variables and functions I like to make a schema / work flow of how everything should happen and try to take the keywords of subjects and represent them as variables and the verbs to be the functions. If I take one out of the context and it doesn't make sense, I need to improve it by making it more explanatory. If at least 2 of them are simmiliar I get to the conclusion that something is wrong in the previous work flow and go back to the previous step. It's time consuming, but on a long run I found it being pretty useful.

Collapse
 
hussein_cheayto profile image
hussein cheayto

Can you give an example?

Collapse
 
devagul93 profile image
Devansh Gulhane

Wow Alin, that's very systematic, I am going to try this.