Holding a model of the code in your head

This is something I've been thinking about recently - most of the bugs and problems I see caused by junior developers at my workplace are a simple result of not having a model of the software in their heads.

via Shaper_pmp comments on The history of UTF-8 as told by Rob Pike.

Not being able to hold my code in my head is one of the most frustrating parts of my work life. It's how I like to work but it also causes problems when the model becomes so huge that it gets unwieldy and ugly.