You should always write code that is slightly less tricky than you are willing to read, but only slightly.

William H. Press et al., Numerical Recipes: The Art of Scientific Computing