(warning: the following story is about matrices.)
Today in AP Computer Science my teacher was lecturing us about how when creating a matrix, for example Matrix[3][3], the first set of brackets is rows and the second is columns. While this is usually convention, it is not actually how a matrix will work as the way we draw arrays, like the one above:
[0,0][0,1][0,2]
[1,0][1,1][1,2]
[2,0][2,1][2,2]
Is just a way for us to visualize, and not how they are actually created in the computer, as my teacher so believes. That is why I could draw the above like this:
[0,0][1,0][2,0][0,1][1,1][2,1][0,2][1,2][2,2]
or even this:
[0,0][0,1][0,2]
/////////////////[1,0][1,1][1,2]
//////////////////////////////////[2,0][2,1][2,2]
or even if I so choose I could draw it like this:
[0,0][1,0][2,2]
[0,1][1,1][2,1]
[0,2][1,2][2,2]
After a heated debate with my teacher over whether or not a computer actually builds out an array in the ordered fashion like this:
[0,0][0,1][0,2]
[1,0][1,1][1,2]
[2,0][2,1][2,2]
We decided to just dropped it. But now to the point of the post. My Chief Engineer and I were discussing the above designs and how all of them will work because you’re drawing an imaginary things and it doesn’t matter if you draw the cells as gummi bears it will work when I turn to him and say **“People don’t care about convention so long as you comment it enough!” (-Lord Supreme Programmer Isaac and Chief Enginerr Robert, 2/25/15)
**So if there is a lesson to be learned it is comment your code, kids. Even though good code should speak for itself.