I got myself reading a article regarding changing the existing bad code into a good one. For reference, this is the link to the article http://www.javaworld.com/jw-03-2001/jw-0323-badcode.html?page=1
It broadly talked about the following
Add comments
Re-Factoring Code
- Break large classes into smaller classes
- Break large functions into smaller functions
- Change code which is difficult to understand
- Use Layered architecture
Seems good. Any addons to this list which you all may have come across ?