Some possible reasons:
- Some web codes are simply not very large or complex, and it really does not matter in maintainability, whether it should follow best practices or not, and it works just as it is.
- The code is often written by inexperienced programmers, even on large, popular sites, and never improves because it works just as it is.
- Best practices change from time to time, and they are considered wasteful to spend time reusing code just to stick to the very latest when it works just fine as it is.
- Adding new features is considered more important than clearing the old code, especially when the old code works fine as it is.
Here you can experience a recurring theme. Rarely do programmers feel the need to fix something that is not broken.
Edit: if I wrote this now, more than two years later, I would change my mind about this last sentence to say: "Rarely does a management feel the need to fix something that is not broken." Most programmers like to update inelegant things, to the extent that they sometimes need to be limited to management in order to ship the product. I would also like to mention the concept of technical debt .
kindall
source share