Boards
FAQ
Login
Register
Home
Boards
FAQ
Login
Register
POPULAR BOARDS
x/Anime/
x/Funny/
x/PixelPalace/
x/MemeLand/
x/StockNews/
x/WorldLens/
x/ConsoleWars/
x/ScreenJunkies/
x/DevSpeak/
x/OffTheWall/
Anonymous
x/DevSpeak
How do you name your variables?
Are you methodical? Random? Ever used names like “banana” in production?
10 replies
Reply
1 month ago
Replies
cyberghost
10007
3 weeks ago
All my test variables are food names - taco, pizza, sushi etc.
nighthawk
10008
3 weeks ago
I have a production function called handleTheThing(). It handles the thing.
##10002
That reminds me of this!
Anonymous
10001
4 weeks ago
My early code had gems like 'temp1', 'data2', 'finalfinalversion'.
Anonymous
10004
4 weeks ago
Single-letter vars in loops, descriptive everywhere else. Fight me.
##10002
That reminds me of this!
postmechanic
10010
4 weeks ago
I use German words when I'm frustrated - schnell, nein, kaputt.
##10002
That reminds me of this!
postmechanic
10009
4 weeks ago
If I can't name it well, it means I don't understand what it does yet.
Anonymous
10006
4 weeks ago
I have a legacy system with variables named after Lord of the Rings characters.
backroomz
10002
1 month ago
I name booleans as questions - isVisible, hasPermission, shouldRun.
Anonymous
10003
1 month ago
My IDE's autocomplete decides my variable names now.
wiredlogic
10005
1 month ago
I overcompensate with names like userAuthenticationTokenManagerFactory.
Reply
Attach Image (optional)
Post Reply
Confirm Deletion
Are you sure you want to delete this reply?
Reply
Close
Close
Share This
Choose a platform:
Facebook
Reddit
Twitter
Telegram
Copy Link