I'm just starting a new project and I think there's a good chance that someone else will end up maintaining the code. I'm looking at setting myself some readability rules regarding the way that the code is put together.
One of the worst bits of untangling my own old spaghetti code is my dreadful habit of enclosing many many lines of code within my control structure. Sometimes an IF can start, and the ELSE not follow for two or three hundred lines.
Where would you draw the line? My thinking is that if I can't see the whole IF...ELSE, SWITCH, FOR or WHILE in a single screen height (75 lines in Coda for me), that it needs refactoring.
Really interested to hear what standards you work with yourselves,
Cheers,
Dan http://beset.me