News for hackers. Stuff that matters.
Re:How to name things in programming by peter_hilton on Thursday May 28, 2015 @04:48AM (#9616821)
> An important rule is missing here: variables should be named with their scope in mind

True, but I have plenty of slides in my presentation without adding more :)

The 'small scope rule' is more of a situation when you can get away with names that are less good, because of the small scope. When I get into discussions about that, everyone agrees with each other, and it distracts from the issue of coming up with good names when the scope isn't tiny.

Also, 'i' for a loop control variable is a trick example: why aren't you using a language that loops over collections without using a loop index?

Re:How to name things in programming by ezy on Saturday May 30, 2015 @02:34PM (#9631223)
If you buy into the prose/code relationship, this is silly. It is like complaining about an author using prepositions.