It's always a matter of heuristics, for sure. When you need to modify code in a way that's less than readable/obvious, then you start dropping in comments to compensate. Your first pass should be understandable and obvious and readable, with comments typically restricted to documenting functions and interfaces.
Re:Thoughts on being a programmer
by LiveTheDream on Tuesday August 14, 2012 @04:24PM
(#4382904)
Effective use of macros or inlining could solve that problem.
There is sometimes more to code than readability, unfortunately. I have worked with functions thousands of lines long that can't be broken up without losing a few percentage points of speed - but these functions are called millions of times.