====== Mental Inlining ====== ===== Meaning 1 ===== ==== Alternative Terms ==== /*i.e. alternative names meaning the same thing*/ ==== Definition ==== **Mental inlining** is an activity which is sometimes needed in order to understand code. You do it when you mentally take some piece of code (typically a method body) and put it somewhere else (typically a method invocation). ==== Description ==== If some code is only understandable in the context where it is invoked, the activity which is necessary in order to understand this code is to virtually take it and put it at the place of its invocation. It is essentially the same operation as inlining a variable or a method but without actually doing so. Having to do mental inlining is a sign that there is a problem with the code. Either the variable or method carries a wrong, misleading or otherwise not understandable name. Or the whole concept the variable or method represents is wrong and should be revised. ==== Examples ==== ==== Alternative Definitions ==== /*i.e. slightly different definitions for basically the same thing*/ ==== See Also ==== * [[Mental grouping]] is the opposite activity * [[principles:Principle of Separate Understandability]] is about avoiding mental inlining ==== Further Reading ==== ---- ===== Other Meanings ===== /*i.e. the same term referring to something different; put short mentions here or better add more detailed descriptions as additional sections */ ---- ===== Discussion ===== Discuss this wiki article and the term on the corresponding [[talk:glossary:Mental Inlining|talk page]].