View this PageEdit this Page (locked)Attachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Jay Reinebold

Coweb Assignment 1:

Class-based Inheritance (1 point)
A class can be thought of as a common template for an object. An instance can be thought of as a specific creation of this template. Classes variables are available for all instances of the class, as well as for use in specific class defined methods. Class defined methods are generally used for methods which do not require a specific instance to compute, but should be handled by that class of objects anyway. An example of a typical class method is when new instances are created. Conversely, instance variables are state which is contained by a specific instance of a class. Likewise, instance methods can be thought of as operations which occur on or with a specific instance. Generally speaking, class methods and variables can be thought of as static methods and variables of a class in Java.

Writing Code (1 point)
The following code would be found in the class Integer as a method:
"Returns the nth Fibonacci sequence number."
self < 0 ifTrue: [^self error: 'Negative Fibonacci numbers are not defined.'].
self = 0 ifTrue: [^1].
self = 1 ifTrue: [^1].
self > 1 ifTrue: [^((self - 1) fibonacci + (self - 2) fibonacci)].

CoWeb Assignment 2:

Tool Description - Squeak Debugger

(By the way, the image files in this tutorial are rather large. But I think the size helps you see what is going on better.)

Try as we may to avoid them, programmers always produce code with at least a few bugs. Sometimes these are bugs that are errors with the design,
while other times it is simply a typo which can have catastrophic results. The Squeak Debugger allows the programmer to view a full stack trace of the
program execution and thereby find the exact cause of the problem.

To demonstrate its use, I will produce a common error in the workspace. Ideally, we would like this code to print out the number 1 divided by some
other number. Oops! I forgot math and had Squeak try to show the result of 1 divided by 0. Since this is an undefined value, Squeak raises a ZeroDivide
error. Upon any error such as this, Squeak's reaction is to open up a Deugger so that you can try to figure out what is wrong.

The first thing you will notice about the debugger after clicking "Debug" is that at the top of the morph the Debugger lists the execution stack.
The first function it finds actually shows how SmallIntegers in Squeak perform the / method. Nothing looks wrong in there. As the screenshot shows,
the next item on the list shows what the DoIt method of the Workspace is performing. It highlights the area where the error went wrong. At this point,
the programmer will likely see the mistake as it had been singled out. In this simple example it wasn't that hard to find on our own without the Debugger,
but if the code had been running in a very complex object with hundreds of lines of code, we could have spent hours trying to find it.

Uploaded Image: squeak1.JPG

Once you find the error in the debugger, you can simply edit the code on the fly to make the changes. So I am going to change the 0 to a 1. This
now prints out a 1 to the Transcript, which is presumably what we want to do. Combined with other tools, the Debugger can make your programming life much
easier and help you to avoid long nights of debugging with print statements!

Uploaded Image: squeak2.JPG

CoWeb Assignment 3:

History of Object Oriented Programming (1 point)

Ivan Sutherland - developed "Sketchpad", the first object-oriented drawing program. This program allowed both master and instance drawings.

Alan Kay - saw "objects" as the future of computer science. Viewed all software as simulating the real world, as since the real world is made up of nouns, then
so should the computing world be as well. Also used biology as the model for objects, in ways such such as how cells perform a few tasks and are combined to make a more complex
structure. Helped to form Squeak.

Collection Classes (1 point)

1. An OrderedCollection can have duplicates items in it, while a set can have no duplicate items.
2. An OrderedCollection has expandable size, while an Array does not. Array would be more useful when a more efficient data structure is necessary, while an
OrderedCollection is more useful when the size of the elements to be held in a collection is not known.
3. A Dictionary in Squeak is similar to a Hashtable in other languages. "Keys" are supplied to the dictionary which index into Objects stored by the Dictionary according
to some hashing function. Collisions of the hashing function are handled by having additional Dictionaries to store collided values into. Accessing a Dictionary is fast
because you really are just accessing the index of the stored values by using the hashing function.

Usability (2 points)

Heuristic Evaluation:
Strengths - Trained experts will find alot of official bugs, and will most likely be thorough in their reporting. The evaluation team can easily be either be an internal
team or easily contracted out. Weaknesses - Heuristics evaluaters are experts in the field of human computer evaluation. Therefore, they may or may not know how to
approach your product as a "true" end-user would.

Observing Users:
Strengths - Feedback given can generally be thought to be genuine, as those testing your product will be actual end users, not testers. This may give an approach to
your product in ways not imagined by the design team or an internal test team.
Weaknesses - Users who are being observed may change their true opinion based on the fact that they are being observed. Finding users to observe can be
expensive and time consuming.

Heuristic Evaluation should only be used when a group of trained experts in human computer interaction is available. It is appropriate to use this method when getting a large
subset of users to observe is not feasible.

Conversely, observation of users should be used when it is feasible to have a subset of users to test your product is feasible. It should be used when enough time can be used
testing your software with actual end users.

I would use heuristics evaluation if the time untill release of the product was very small, or if I did not want to spend the resources acquiring actual end users to test the product.
However, if time and resources were avaiable, I would use observation because it generally gives bugs more in line with what the actual market for the product would notice.


Links to this Page