Usually it&#x27;s about keeping it granular enough that various sub-activities can be tested in isolation. If you have one function with 10000 LOCs, that&#x27;s not really testable beyond &quot;something doesn&#x27;t work&quot;.<p>Then of course you need some way to automatically run these tests, but that&#x27;s usually provided by IDEs or standard libraries these days.<p>Edit: most curious downvote ever...