DO
blocks that contain too many lines of code are difficult to read and understand.
Above a specific threshold, it is strongly advised to refactor the contents of the DO
block into multiple, well-named subroutines or
subfunctions, each of which focuses on a well-defined task. Those smaller subroutines will not only be easier to understand, but probably also easier
to test.