Posts tagged cleancode

Code, Nerdyness, and Nonsense...: Code Cleanup With The Ternary Operator

Every time I write a simple function to return a value, I almost always write the same code. It is usually along the lines of this:

 if(indexPath.section == 0) return 45; return 65;

And immediately after writing it, I scratch my head and go “What the heck am I thinking?”. That’s when I remember…

See more
This post has 13 notes
Tagged with cleancode, code,
Posted at 2:37 AM 23 July 2010