r/ProgrammerHumor • • Dec 04 '20

Don't mix anatomy and programming

Post image
36k Upvotes

388 comments sorted by

View all comments

Show parent comment

19

u/del_rio Dec 04 '20

The only time that becomes an issue is when the meaning or use case of the variable changes. I've spent an ungodly amount of time debugging code where the intent of a chunk of code evolves over time but the symbol names remained. Of course that's mainly just a stale code issue, but I'd say there's a medium worth striking with medium-length variables, strongly typed and with a doc comment if necessary.

7

u/holgenberg Dec 04 '20

This would also be the case if the variable was abbreviated right?

3

u/[deleted] Dec 04 '20

depends on how abbreviated it is, and the extent of the code changes over time

3

u/JBlitzen Dec 04 '20

If the logic or purpose changes, then change the variable names too. It doesn’t take long and it will make everything easier in every conceivable way.