From: Harri <har...@tu...> - 2006-06-09 08:34:31
|
I have spotted some bugs or potential-to-be-bugs in BOSS because of introducing local variables with the exact same name as a member variable. In some occasion the member variables were not at all used, and instead local variables of the same name were used. If some code were later added to the class that used the member variables, it wouldn't work because they were not updated by the original code. In some cases no problems had yet to be experienced, but future changes to the code would make the code easy to break down. In all of the cases it made the code hard to read and understand. I have tried to fix some of the occurances in our development version at our university, but the problem will not go away completely unless some consistent variable name convention will be used in BOSS development. It is the only straight forward way to deal with this issue. In all, I think it would make BOSS code much easier to read if member variables had a naming convention that would make them clearly visible in code. That way the reader could easily see where the object itself is being modified and where the member variables are being referenced. [1] [2] Currently both variable names and member variable names are of form firstWordInLowerCase. I would suggest one of the following naming convention for member variable names: slaveServerName_ m_slaveServerName _slaveServerName Yours, Harri J=E4rvi References: [1] http://www.lrdev.com/lr/java/cdccglj.html [2] http://www.beust.com/naming/ |