![]() |
Quotes from the Chief Engineer and I
(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. |
Re: Quotes from the Chief Engineer and I
How members of an array are stored and accessed is a function of the programming language. It is not something one should worry or argue about since the language will reference and de-reference everything for you. "Row" and "Column" mean nothing to the compiler. Notation has nothing to do with the physical location since memory is laid out so one accesses word-sized elements in sequence. In C and C++ matrices and arrays are really done with pointer arithmetic - google it.
|
Re: Quotes from the Chief Engineer and I
Quote:
|
Re: Quotes from the Chief Engineer and I
Quote:
|
Re: Quotes from the Chief Engineer and I
Quote:
|
Re: Quotes from the Chief Engineer and I
I think you mean "Pascal". And C/C++ (counted together) is far and away the most popular programming language.
|
Re: Quotes from the Chief Engineer and I
Paskell sounds like an odd mix of Pascal and Haskell. That could be interesting...
|
Re: Quotes from the Chief Engineer and I
Quote:
|
Re: Quotes from the Chief Engineer and I
Quote:
|
Re: Quotes from the Chief Engineer and I
Quote:
I remember winning a 64mb drive in college for a CAD competition about 9 years ago. THAT was a big deal. |
Re: Quotes from the Chief Engineer and I
Quote:
1. He asks if they still make firesticks 2. I explain to the class what a firestick is 3. He asks if they would be useful or if we would prefer storing them in the "Lightning Cloud" 4. He says that we will buy 4mb firesticks from Circuit City. 5. He shows up with 4gb jumpdrives he bought for $25 a piece. 25 dollars. Where did he find them so expensive????? 6. We explain to my teacher how a gigabyte and megabyte are different. |
Re: Quotes from the Chief Engineer and I
Quote:
OP, it's crazy how quickly people can fall behind the times without even knowing it. Pick your battles in this kind of situation as some will never be won with either knowledge or wisdom. Might as well offer a coffee and talk about the weather instead. |
Re: Quotes from the Chief Engineer and I
Quote:
|
Re: Quotes from the Chief Engineer and I
Quote:
|
Re: Quotes from the Chief Engineer and I
Quote:
I believe you were looking at some form of serial or parallel port. Probably a many-pin one. VGA, if I'm not mistaken, is another form of serial port. You use serial ports on a near-daily basis if I'm not mistaken--on the Universal Serial Bus (USB). (Incidentally, I had to boot up a Windows 2000 computer last night. Why, you ask? Because it can run program X. Program X serves a key function in this application. Old technology? Yep. Does it JUST WORK? Yep, unless someone turns it off...) |
| All times are GMT -5. The time now is 01:41. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi