11/24/04
A student writes:
Professor Patt, First off, i just want to say, I am NOT asking the following to be difficult, on the contrary, i am trying to make things easier for myself(and possibly other students). Okay, so turns out I just read through the 5th program, and thought it would be easy, and I am correct. However, the subroutines and methods that the TA's have provided us as "starter code" make the program (to me) more difficult than it should be. I have found, in my own experience, that when you use object modules (or in this case, subroutines) that you did not write, the program does not work as well. So, my question is this, the program says we must use the starter code. Thats all fine and dandy, but would it be allowed for me to just jump over the entire starter code, and use my own? The reason I ask, is again, I want to save myself time and headaches and simply write the entire program myself, from scratch. Thanks, and have a nice thanksgiving, << name withheld to protect the subverter of the learning experience >>
At first blush, sounds reasonable, right?
Actually, wrong. For two reasons: the general reason and the specific
reason.
The general reason:
It is important to get used to using object modules written by other people
because that is the way the world works. You are going to find downstream
that you will be forced to write code that adds to existing modules because
either (a) they are there, robust, debugged, and your boss insists, or
(b) the problem is so big that you can't possibly do it from scratch by
yourself. Yes, I realize that if I choose (a), I am being a mean old
Professor, and clearly (b) does not apply. However, school is about
preparation for after commencement, and that means being able to function
as part of a team, learning how to read, understand, use, etc someone
else's code. So that is reason enough.
The specific reason:
There are several specific things we want to be sure you learn from this
assignment, and if we let you run free, it is not clear you will learn them.
Specifically, we want you to expose you to a common implementation of an
array, which is an example of a useful data structure. By organizing the
game board as we did, we are trying to get across a conventional approach to
storing a two-dimensional array in memory and how you would go about accessing
different parts of it with appropriate offsets.
So, while we may be making this assignment a little tougher for some of you
than might be the case if we let you run free, there really is a method behind
our madness.
Good luck. And, you also have a great Thanksgiving Day holiday.
Yale Patt