Posts

Showing posts from 2014

A Quote about Best Practices

Obeying best practices blindly is not a best practice. From  this answer on stackoverflow

Tackling the Arrow head Anti-Pattern

Frequently you will see following type of code in your code base. ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 if (result != 1) {      if (someOtherResult == 101)      {          if (anotherValue == 500)          {              // do something          }      }      else      {          // do some other thing      } } return ; Here the code forms a shape of an arrow-head, as below: ? 1 2 3 4 5 6 7 8 9 if      if          if           ...