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

Ray Marceau


My AIM s/n is PunkRockFoo

I am a coop student at GTRI in the signatures technology lab. My job title is Java Developer. My interests are Web-Design and Information Security.
I specialize in User Interfaces and Database Applications.

I play rugby for the Georgia Tech Rugby Football Club (GTRFC). let me know if your interested in playing, the team is always looking for new talent.

CoWeb Assignment 1.

  1. If your a CS major at tech then you definitely know JAVA. I have the language drilled so far into my head that i find myself using JAVA syntax when im writing notes in my classes or when thinking of problems. I Found this one site helpful because it shows you the basic syntax of java and then how its done in squeak. Also in case you DONT check out the site and only read this summery, just know that Squeak collections start counting at 1 (ONE), not 0 (ZERO)!!!. That might save you some time debugging/Cursing later.
    Mini Java-to-Squeak Tutorial
  2. I found this site useful mainly because it gives you some pointers on how to manage your project. I am definitely going to check out change sets and im going to set up a CVS for my project. Theres nothing i hate more than to have to rewrite code because somebody changed a file i was working on and it overwrote my changes.
  3. Here is a good page to consider when designing the UI. This page will get you thinking about how to make the interface work for everyone, not just you. It also gives you some ways of testing prototypes of the UI to make it Easy to use and probable.
    The Basics of User Interface Design
  4. Back to the fact that if your reading this then you probably know JAVA, here is a page that compares and contrasts the java VM hotspot and the squeak VM. It explains what is going on when processing and executing code and the advantages and disadvantages of the different VM's.
    VMs and Bytecodes

CoWeb Assignment 2.



  • Refactoring is the process whereby the developer is changing the internal structure of code in order to make it easier to maintain, reduces duplicate/redundant code, and increases readability by other humans (prevents software entropy). It does not effect the observable outcome of software.
  • Examples of code needing refactoring
    1. Variable names are unrelated to their functions. (ex. i, aNumber, aStr).
    2. methods that have a high complexity value or are of very long length.
    3. duplicate code.
  • Unit testing provides a means of making sure that during the refactoring process, the developer doesnt break methods by changing the code. The developer can run the unit tests after changes are made to make sure that the methods still have the same functionality as they did before the changes.


  • All instance variables in squeak are private variables to that object. If the programmer wanted another function to have access to those instance variables, they could create a method that would retrieve the value of the variable and then return it as a message to the calling object. They could also create a method that allows another object to change or set the value of an instance variable.
  • All instance methods in squeak are public. If a method is created for a class, then there is no way to restrict access to that method, meaning any object can call any of the methods in another objet
  • Some advantages to the squeak model over the java model:
    1. In java, instances respond to class methods whereas in smalltalk, the class responds to messages with class methods and instances respond to a messages with instance methods. This advantage of squeak over java provides a better object-oriented programming style. A class and its instances are not the same object and thus should be seperated and use different methods.
  • Disadvantages:
    1. Having all methods of a class public can lead to errors. In the case that a method is really meant to be private, and another object trys to access that method. Eventhough this characteristic of squeak can cause errors, squeak handles errors very well.

CoWeb Assignment 3

Design Patterns

The bridge pattern is used when multiple implementations for a single system is required. The bridge pattern works by defining an abstraction which has refinements implement it. The pattern "officially" contains 5 parts as follows:

As an example of the bridge pattern, consider a car. Every car has an engine, tires, a body, a color etc. Therefore the car is the abstraction. Then consider a Maserati and BMW. These are both cars, they just implement how it works differently. The BMW and Maserati are the abstraction refinements to car because they define how the tires and engine work and the specs for them.

Uploaded Image: Bridge_classdia.png


Most object oriented languages use single dispatch to handle how arguments are called. when you invoke a method one of its arguments is treated specially and used to determine which of the methods of that name is to be applied. When multiple methods have the potential to be called, then its called overloading and the compiler makes a list of alternative methods that can occur.

In this examle of code from c++, it demonstrates how a SingleDispatch language will handle the collision of multiple objects. The asteroid and spaceship have their own methods for what happens when i collides with an object and when they collide, it calls the method of the corresponding object.
void Asteroid::collide_with(Thing * other) {
    Asteroid * other_asteroid = dynamic_cast<Asteroid*>(other);
    if (other_asteroid) {
        // deal with asteroid hitting asteroid
    Spaceship * other_spaceship = dynamic_cast<Spaceship*>(other);
    if (other_spaceship) {
        // deal with asteroid hitting spaceship
void Spaceship::collide_with(Thing * other) {
    Asteroid * other_asteroid = dynamic_cast<Asteroid*>(other);
    if (other_asteroid) {
        // deal with spaceship hitting asteroid
    Spaceship * other_spaceship = dynamic_cast<Spaceship*>(other);
    if (other_spaceship) {
        // deal with spaceship hitting spaceship

in multiple dispatch, all the arguments in a function call are treated symmetrically in the selection of which method to call. During run-time, matching recognizes first, second, third, etc. position within the call syntax to identify which function to call. In multiple dispatch language no one argument owns the function/method carried out in a particular call.

Some example code from lisp is given in the following using the same problem described for single dispatch languages.
(defmethod collide-with ((x Asteroid) (y Asteroid)))
  ;; deal with asteroid hitting asteroid
(defmethod collide-with ((x Asteroid) (y Spaceship)))
  ;; deal with asteroid hitting spaceship
(defmethod collide-with ((x Spaceship) (y Asteroid)))
  ;; deal with spaceship hitting asteroid
(defmethod collide-with ((x Spaceship) (y Spaceship)))
  ;; deal with spaceship hitting spaceship

Garbage Collection

Reference counting was the first automatic garbage collection algorithm created. It was great for low memory systems because it would deallocate memory AS SOON AS the object was not referenced anymore. However, there are 2 main downfalls to this algorithm.

1) Reference counting requires frequent updates which creates a source of inefficency. Everytime an object has no more references, it needs to update and deallocate memory whereras tracing algorithms sweep less frequently and are less taxing on the CPU. Reference counting also requires every object to reserve space for a reference count.

2) Reference counting also cant handle reference cycles, which is when an object refers directly or indirectly to itself. reference counts will never consider cyclic chains of objects for deletion, since their reference count is guaranteed to stay nonzero. These self-referencing objects will therefore never be deallocated and memory will be consumed rapidly.

Two advantages to Garbage collection is it relieves the burden of programmers to keep track of memory allocations and fixing memory leaks. Its one more thing that a programmer doesnt have to worry about when building applications. Another advantage is it detects unused objects and relieves memory space. This is useful for applications that are constantly reallocating memory and then tossing it.

A disadvantage to GC is the inefficiency in scanning for unused objects. It can become very taxing on the CPU when sweeping for unused objects frequently.

Links to this Page