Productivity reduces over time as adding code to tangled system becomes more complex. Reducing clutter, complexity and cleverness can clarify code and improve a developer's confidence in working on it. Automated code cleaning is an effective approach to reducing clutter. Tools such as Resharper and CodeRush can carry out automated code cleaning.
The following are proposed areas of code cleaning that can be easily addressed. Such areas have no impact other than clarifying code for the developer's benefit.
To make it easier for people to understand the changes and comment, I propose that a single example file be checked in for a single type of code clean up. Once that file is accepted, all the remaining files of single type of code clean up can be checked in. For example, first check in a single file where unnecessary using statements have been removed, and once that has been accepted, check in all other files where unnecessary using statements have been removed.
This proposal is for only this initial, very simple code clean up. Further and more complex code clean up issues should be addressed later.
The following are proposed areas of code cleaning that can be easily addressed. Such areas have no impact other than clarifying code for the developer's benefit.
- Remove unnecessary using statements
- Convert properties to auto-properties
- Remove redundant 'this.' qualifier
- Convert embedded sql statements to constants
-
Delete commented out code
To make it easier for people to understand the changes and comment, I propose that a single example file be checked in for a single type of code clean up. Once that file is accepted, all the remaining files of single type of code clean up can be checked in. For example, first check in a single file where unnecessary using statements have been removed, and once that has been accepted, check in all other files where unnecessary using statements have been removed.
This proposal is for only this initial, very simple code clean up. Further and more complex code clean up issues should be addressed later.