Quantcast
Channel: Open DBDiff
Viewing all articles
Browse latest Browse all 281

New Post: Proposal: Reduce code clutter to improve clarity

$
0
0
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.
  • Remove unnecessary using statements
  • Convert properties to auto-properties
  • Remove redundant 'this.' qualifier
  • Convert embedded sql statements to constants
  • Delete commented out code
Existing code formatting and naming conventions should be maintained where possible. However code clean up exercises such as this can affect many files.

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.

Viewing all articles
Browse latest Browse all 281

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>