Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programming Terminology

Tags:

terminology

A long time ago, my college professor defined a term which meant the number of source lines between a variable definition and its usage.

The lesson basically argued that the closer the two values are, the easier it will be to maintain over the long run.

My Google-Fu has been weak.

What is the term that describes this relationship?

like image 628
EvilTeach Avatar asked Feb 21 '10 23:02

EvilTeach


People also ask

What are the 4 types of programming?

Functional Programming Language. Scripting Programming Language. Logic Programming Language. Object-Oriented Programming Language.

What are special words in programming?

Words that are reserved by a programming language or a program as they have special meaning are known as keywords.


2 Answers

Found on this page http://www.ppig.org/papers/11th-douce.pdf , on page 6 of the document it talks about Object Relation Measure, or ORM, and gives the definition and way to calculate it. I think this is what you might be looking for.


is it Code spatial complexity ?

like image 65
John Boker Avatar answered Nov 08 '22 07:11

John Boker


I came across this concept for the first time whilst reading Code Complete 2.

I think the term you're looking for is 'span' in that book, which is explicitly the number of lines between references to a variable. In my interpretation, a variable declared and used on consecutive lines would have a span of 0.

The concept is reusable for other references to the variable too to give a wider measure of maintainability - the span between declaration and first use may be 0, but if the variable is then used again 100 lines later that's still pretty nasty.

like image 31
brabster Avatar answered Nov 08 '22 06:11

brabster