Software metric which measure how maintainable is a program.
The maintainablity index is always in the range 0-100 and is ranked as follow:
- A MI in the range 0-9 maps to a code extremely difficult to maintain.
- A MI in the range 10-19 maps to a maintainable code.
- A MI in the range 20-100 maps to a code highly maintainable.
* bold denotes default value
This aspect does not have any sub aspects.
''' The maintainability index for the following piece of code is 100. ''' def preorder(node): if tree: print(node.key) preorder(node.left) preorder(node.right)
Complex codes are difficult to maintain.
How to fix this
This can be solved by writing simpler functions and methods.