I’ve been looking for some generally accepted way to name class member variables. This article might go bit technical, but I try to keep it as understandable as possible.
It’s quite amazing how many different ways people can define variables. Basically there are people who stick “a” to parameter prefix. There are people who use “m_speed” or “_speed” or “speed_” or “mSpeed” to define speed of some object in the game. There are also people who stick letters for constants, pointers (and various other stuff) in the prefix – but I won’t go there.
My attempt to find some “generally accepted” way (in c++/object oriented programming) was bit like jumping from a flying airplane without a parachute. In both cases it will lead to one big mess.
I have some pretty good naming systems (practical and revealing names playing key roles), but I wanted to ask you readers. What kind of naming conventions are you using (to define member variables and other) in your team?