(from: from-new.js @ fb19155, lines 218 ‒ 247)

Often, when I can get away with it (that is, when it makes enough sense in the context), certain parts of my source code follow a particularly useful pattern: declarations and set-up, environment/sanity testing, then purposeful actions / generation of results. I tend to separate the sections of this pattern with whitespace and attempt to make them look as similar to the selfsame section from previous functions (or otherwise-apportioned sections of code), to set up such a pattern in the reader’s subconscious.

(This particular screenshot is not actually an *excellent* example of that; I couldn’t find a better one at short notice amongst my published codebases. I may replace this upload with another shot demonstrating the same effect at a later date.)

View all tags
Posted on Apr 30, 2011


View profile