Want cleaner code? Use the rule of six
Reminded me of &#x27;Object Calisthenics&#x27; by Jeff Bay. Basically an exercise for a toy project where you adhere to 9 rules:<p>1. Only One Level Of Indentation PerMethod<p>2. Don’t Use The ELSE Keyword<p>3. Wrap All Primitives And Strings<p>4. First Class Collections<p>5. One Dot Per Line<p>6. Don’t Abbreviate<p>7. Keep All Entities Small<p>8. No Classes With More Than Two InstanceVariables<p>9. No Getters&#x2F;Setters&#x2F;Properties<p><a href="https:&#x2F;&#x2F;williamdurand.fr&#x2F;2013&#x2F;06&#x2F;03&#x2F;object-calisthenics&#x2F;" rel="nofollow">https:&#x2F;&#x2F;williamdurand.fr&#x2F;2013&#x2F;06&#x2F;03&#x2F;object-calisthenics&#x2F;</a>