Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Make two functions
checkAuth and checkSession
And two variable
userIsAuthenticated and sessionIsValid -
Don't you think your local variable is in a method which is already named properly?????
In this world you are i and no other world will know about you. Also, in the context of this world , your name "i" fits perfectly. In some other world , some one else will be i -
TobyAsE28446ySingle responsibility principle.
Your function is obviously doing more than one thing. The name has an 'and' in it...
Split the function so each part does exactly one thing. Then your variable names should come naturally. And name your variables on what is in them not for what they're used for (leave the _RequiredForSessionValidation part alone). -
@jAsE I need a desktop...with 1 meter display now...if after giving such long names also the purpose of the variable is not defined๐
-
@JackToolsNet thanks for help...but this was just for fun...there is no real function with such name. I just gave this name to convey the struggle we face while naming variable and methods or classnames
-
@TobyAsE this was just for fun post bro. Anyways thanks for the advice, will definitely remember that.
Related Rants
Unsure , if I should name my variable name as 'info' or 'infoFromDbAboutUser_RequiredForSessionValidation' for a method named 'functionToValidateUserAndCheckSessionIdOrAssignSessionIdIfNotAssigned'
Please help, I am unable to decide. :/
joke/meme
variable names
rant
development
vscode <3
code