How to write code so that it grows in height, not in width
November 10, 2020 #java #cleancode #refactoring

Every time we add a new if or for to code, we have to increase the indent of the condition body or loop. The more nested loops and conditions, the broader your code becomes, and the more difficult it becomes to read. In this short article, I’ll show a few techniques by which you can avoid increasing indentation. Your code will be clearer, and you’ll never see horizontal scrolling.

preview

more