Criterion and principles of easily-modified program
Alexander Prutzkow · IOP Conference Series Materials Science and Engineering · 2021
Abstract Ease of modifying is one of the characteristics of the program. The existing approaches do not clarify this concept. These approaches are clean code and maintainability. We formulate simple and explicit criterion and principles of easily-modified programs. The criterion is an E.W. Dijkstra’s criterion. The principles are (1) the names of the elements should reflect their purpose in the program; (2) use indentation for nested statements and blank lines; (3) one program element must have one assignment and one assignment must correspond to only one element; (4) optimize dependencies between program elements. We introduce a metric for easily-modified programs as well. It’s a number of commands in methods and static blocks in a class.