Live data from Hacker News

Don't name your variables after types:you wouldn’t name your pets “dog” or “cat”

dave.cheney.net

21–30 of 33 posts

Re: Don't name your variables after types:you wouldn’t name your pets “dog” or “cat”

#21
>Don't name your variables after types: you wouldn’t name your pets “dog” or “cat”

I would if I could not tell just by looking at them what species they are (and thus what I can do with them, what to feed them, etc) among 200 other animals in my house.

Re: Don't name your variables after types:you wouldn’t name your pets “dog” or “cat”

#24
I completely agree--having inherited a few applications worth of .NET code in which the last (younger, right out of college) developer named all the variables for things from Norse Mythologies.

I also inherited a bunch of circa-2005 ColdFusion with aptly named variables in CamelCase which are much easier to understand.

varUsersTableID > pointer*Freya any day of the week.

Re: Don't name your variables after types:you wouldn’t name your pets “dog” or “cat”

#28

I completely agree--having inherited a few applications worth of .NET code in which the last (younger, right out of college) developer named all the variables for things from Norse Mythologies. I also inherited a bunch of circa-2005 ColdFusion with aptly named variables in CamelCase which are much easier to understand. varUsersTableID > pointer*Freya any day of the week.

> developer named all the variables for things from Norse Mythologies.

this is hilarious.

Re: Don't name your variables after types:you wouldn’t name your pets “dog” or “cat”

#29
post #2

I once had a cat named "dog".

Were I to get a cat (can't, my wife is afraid of them) I very well might name it "dog" or "doggy".

"Reward for doggy" with a picture of your cat would be a great missing pet flyer
Post reply on HN