Reasons for code bloat
Code bloat is something that we all have to deal with every day. To reduce or remove code bloat, we have to understand why it happens. From my personal experience and observation here are 3 reasons:
The time constraints is a major factor. A lot of things can go wrong during development. Perhaps not enough time is allocated. A key developer resigns in the middle of the project. All of them makes the project missed the deadline. And, as deadline approaches, shortcuts are made making the code less than optimal.
Application development takes time. So, during the development phase, new features are added midway. The reason can be due to competitor having that extra feature or the nature of the business requires such feature.
Business rules changes due to the rapid nature of business. So, the specifications may change during development time. Sometime it involves a pivot which takes the application on a very different heading.
Now, what do you think is the reason for code bloat ?