Principle of locality

From Tronche's wiki
Jump to: navigation, search

When reading some code, you shouldn't have to read another part to understand what's going on. The reason is if you gonna have to read yet another part, to understand the second part, you quickly get lost.

This is also an argument against technical objects: if your objects / functions, etc... mirror things in your problem space, most likely, you understand what's going and you have a common language with users. Technical objects tends to be specific to a particular program, and you have to learn how they work to understand the code you're reading.

Personal tools