Posts

Showing posts from January, 2015

Eliminate dead codes to avoid extra code maintenance

Image
Dead/unreachable codes and member variables: While working with large projects, silly mistakes are common and those may cause memory or performance issues. Developers used to write method and later some methods either they change or comment. This generally happens in case of frequent requirement change. If you have commented the method and function call then there is –“no comment”. But in case you have commented method call and you haven’t commented method definition, or method defined but never used, or variables declared but never used, what about the memory occupied by instance of such class? These codes called as dead codes or in general unreachable codes. Generally, Visual Studio does provide blue under line for unused variables but they have no such facility to unused methods. The problem with these are- more about that you have to care and maintain extra code that is not in use. Also typically when you are about to delete an unused code elements, this might provoke ask