Pretty much almost all frameworks I use in programming uses the height and width when identifying a flat dimension (without Z axis), but when in math, a 2 axis object is always measured by length and width. What is the history behind this naming convention?
Why is it common for naming 2 axis dimensions as width and height instead of length and width?
9Real world paper often lays flat, while computer displays are often mounted vertically.– whatsisnameSep 22, 2017 at 2:23
@whatsisname I get that. But in math, when only 2 axis is involved, only length and width is used, and the computer is invented to solve mathematical problems.– John Isaiah CarmonaSep 22, 2017 at 2:28
1I don't know about width/height vs length/width but certainly width/height lends itself easier to understand which is which. X/Y/Z axes have been interchanged so often between applications that it is no longer a guarantee that Y "points up" anymore.– NeilSep 22, 2017 at 6:57
3@JohnIsaiahCarmona: computers were originally invented for making computations, not mathematics. Please don't intermix mathematics with bookkeeping. And I guess the frameworks you are using today are probably not from the old ages when computers were invented.– Doc BrownSep 22, 2017 at 8:14
voting to close, this is one of those "how long is a piece of string" questions ;)– EwanSep 22, 2017 at 9:51
I guess the majority of frameworks used in programming today (and maybe every framework you tried) use the terms "height" and "width" for positioning of images or shapes on a computer display. And as @whatisname already mentioned in a comment, computer displays are often mounted vertically, so these terms fit well.
The 99% use case for these frameworks are graphical user interfaces. Pure mathematical use cases are relatively rare today, and frameworks which are designed for mathematical 2D or 3D applications use typically X,Y (or X,Y,Z) for the axes.
Due to my personal education, I think "width" and "height" map quite unambigously to the maximum range of "X" and "Y" in a 2D system, whilst without a separate documentation, I would be unsure how to map "width, length" to "X, Y", it could be "Y,X" as well. But YMMV.
The history is that things like paper are labeled with height and width, so programmers use those labels.
1I've updated my question since I've noticed I used a wrong example. Sorry I didn't research first before giving real world examples, I changed my comparison to math. Sep 22, 2017 at 2:36
1@JohnIsaiahCarmona - doesn't matter. Any time you're working with something where the human perceives one axis as "up" rather than "forward", that axis' measurement will be
height.– TelastynSep 22, 2017 at 14:10
Length usually refers to a shape's size along its greatest ("longest") axis, that is, in its own coordinate system.
Height usually refers to a shape's size along the vertical axis of the "world" coordinate system.
Width is ambiguous.
Perhaps because height is strictly a spatial dimension, but length could refer to something else. Length is already commonly used do describe the size of an array, and "How long should I wait" uses length to refer to time.