Content pfp
Content
@
0 reply
0 recast
2 reactions

Connor McCormick ☀️ pfp
Connor McCormick ☀️
@nor
Long descriptive variable names or short concise names?
12 replies
1 recast
8 reactions

Goksu Toprak pfp
Goksu Toprak
@gt
Go style spec has this right imo: https://google.github.io/styleguide/go/decisions#variable-names
1 reply
0 recast
4 reactions

Sam Iglesias pfp
Sam Iglesias
@sam
short scope, shorter names. longer scope, longer names
1 reply
0 recast
4 reactions

Jeff Feiwell  pfp
Jeff Feiwell
@hyper
Your naming system for variables should be according to this best practice: Go through the alphabet, so let a, const b, etc. until you get to the end, then continue with adding a number, so a1, b1, etc until infinity This way you never run out
1 reply
0 recast
4 reactions

max ⚡ pfp
max ⚡
@maxp.eth
Lot of good answers, but my monkey brain won’t allow me to go longer than: - noun - nounNoun - verbNounNoun
0 reply
0 recast
1 reaction

Gabriel Ayuso pfp
Gabriel Ayuso
@gabrielayuso.eth
Depends on the language's best practices, how the variable is defined and its scope. Example: _START_DATE_YYYYMMDD = "20231020" d := GetFormatedDate("YYYYMMDD") bool IsUserBirthdate(std::string date) {} func set_birthdate(str_date) {}
0 reply
0 recast
0 reaction

dusan.framedl.eth pfp
dusan.framedl.eth
@ds8
depends on the scope (and context). i prefer short concise variants - imo if you have to go long and descriptive, there *might* be something wrong with the overall design.
0 reply
0 recast
0 reaction

Joe Blau 🎩 pfp
Joe Blau 🎩
@joeblau
Yes
0 reply
0 recast
0 reaction

alex pfp
alex
@alexgrover.eth
I worked with a guy a while back who was… very particular, and we got into this debate and he went and found some studies to back up his argument that shorter names are actually better I don’t have it offhand, I personally use longer names most of the time, but there is science out there if you go search lol
0 reply
0 recast
0 reaction

adrienne pfp
adrienne
@adrienne
Shortest name that someone else (yourself in 5 years included) will know the meaning
0 reply
0 recast
0 reaction

𝖍𝖚𝖆𝖓🥷🏽 pfp
𝖍𝖚𝖆𝖓🥷🏽
@jazzlisp.eth
I randomly generate short string as var names and provide with a description dictionary.
1 reply
0 recast
2 reactions

Branksy Pop  pfp
Branksy Pop
@branksypop
long bcs I don't have time to write them short
0 reply
0 recast
0 reaction

Gökhan Turhan pfp
Gökhan Turhan
@gokhan.eth
short concise.
0 reply
0 recast
0 reaction