There is a metric called cyclomatic complexity that measures the amount of branching logic that a program has. The greater the cyclomatic complexity, the more difficult a program is to comprehend. So yes, nesting and branching should be minimized as much as feasible.