Why code bloat matters ?

code-bloatCode bloat as I have discussed previously are excess baggage inside an application. Now, why does it matter ?

Well, there are a couple of reasons:

Reduced Performance

Code bloat means the performance of the application is not optimum. Why ? Because the application have a lot of excess code that are not performing anything. And yet, it have to be compiled into executables. Or, for interpreter language, it still have to be parsed and interpreted. Which means wasted CPU cycle and memory.

Difficult to Maintain

By not knowing what the code is doing, any team member will not be able to do their tasks effectively. The code bloat may be a variable inside a class. I am sure no one will dare to remove the variable, especially new developer. Even existing developer will not remove it because they forgot why it was there in the first place.

This makes maintenance a nightmare because nobody is sure how the code works. When we do not understand, we cannot perform any productive activity.

So, next time you build an application, keep your code clean, even under pressure of time and changing business rules. At the very least, comment your code explaining the logic and reason behind the code. It will help a lot.