Last post Sep 10, 2017 12:16 PM by PatriceSc
Sep 09, 2017 11:58 PM|farooqspecials|LINK
maintainability index is useful metric to measure the code maintainability however there are several criticisms on that. and not recommended to use. what are the reasons of not using maintainability index to measure the maintainability.
Sep 10, 2017 12:16 PM|PatriceSc|LINK
IMO a problem is to follow "best practices" for themselves rather than to take advantage of the benefit they bring. Here if you over emphasize this metric you could likely end up with writing code that will just minimize this metric rather than really improving
Not sure where you have seen criticism apparently without giving any reason. Use this as a guide ie do something that makes sense from a complexity point of view to enhance maintainability and eventually use this metric to see if you are on the right path.
Don't take an action whose sole purpose is to minimize this metric even if it doesn't make sense from a coding/architectural point of view.
Edit: t might help if you point us to where you have seen this criticism.
Edit 2: same for complexity. It happens to see a small code snippet that would have likely a good complexity score (compared with REALLY complex code) but that could be still written in a much simpler way. The big issue IMO is that it doesn't tell anything
about how far you are from what you could reach.