Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
My name is Brien Applegate and I am a 4th year Computational Media student at Georgia Tech. My concentration within Computational Media is currently film, though I also have interest in HCI. Outside of school I enjoy mountain biking, the outdoors, movies, and photography. Music has always been one of my passions as well. Recently I began to bring my interests together by doing visual media development for bands and musicians, including photography and graphic design.
CoWeb Assignment 1
Class-Based Inheritance (1 point)
What is a class? What is an instance? How do the two relate? In Smalltalk, what is the difference between class variables and instance variables? In Smalltalk, what is the difference between class and instance methods.
The most common analogy to describe classes, instances, and the relationship between them is that a class is like a blueprint for a house, while instances are all of the houses that created or derived from that blueprint. Generally, in object oriented programming classes are relatively self-contained, and their essential goal is to provide for reuse. Classes group together the definitions of data and behavior that characterize each type of object. Object oriented programming also allows for the inheritance of attributes and behaviors from one class to another to supplement functionality. Back to the analogy, a class or “blueprint” will create objects, or new instances of themselves, based on their own attributes and behaviors. Instances then, are the runtime manifestations of classes and instances each have their own set of data stored in memory.
In Smalltalk, the difference between class and instance variables is that instance variables are unique to each individual instance, while class variables exist for all instances of a class. Similarly, instance methods only affect particular instances while class methods do not have to affect a specific instance, but are related to the class in general.
Squeak is perhaps the least well documented programming language you will ever use; however, Smalltalk and the Morphic GUI compensate for this by being pokable (easy to explore). There are many language features and tools for exploring Squeak. For four of these, name them, describe how you use them, and explain why they are useful.
Four important features that enhance the “pokability” of Squeak are the browser, the debugger, the method finder, and the message name finder. These four features are briefly described below:
The system browser allows you to see all of the classes in a Squeak image, their contents, instance variables, and hierarchy. From the browser you can view or manipulate the contents of the classes, view or add comments, and create sample instances. You can even open up another browser from the browser to look at different parts of the code simultaneously. This is especially helpful when you need to work on code in two different places at once. Another useful feature of the browser is the capacity of version retrieval. The browser also makes it easy to structure your code in accordance with good object oriented programming practices and understand hierarchy.
The Squeak debugger can be a powerful tool for finding problems in your code. It helps identify errors and allows you to go through and analyze the code line by line. Furthermore, it enables you to save and change and save code from the debugger, but it is easy to quit without saving the changes if you are not sure what it means. It also allows you to view other parts of the code.
There are several different ways that the method finder can be used, and the instructions are clearly explained in the method finder itself when you open it. To summarize, you begin by either typing in fragments of a selector, or use examples to find a method and more information about what it does. The method finder window includes a list of selectors that contain the input fragment and another window in which they can be viewed in more detail. Clicking on this window will also bring up a system browser with the selected contents. The method finder is extremely useful for finding out what selectors and methods do or for searching for what you might need.
Message Names Finder
The message names finder is similar to the method finder, but allows you to type in a fragment of a message name and returns all of the message names that contain that fragment. This tool allows you to browse messages as well as the code that they contain. You can also use the message name finder to open a new browser. It is useful when looking for a particular message and when you need to be certain about what a given message does.
Brien Applegate: CoWeb Assignment 2
Brien Applegate: CoWeb Assignment 3
Link to this Page