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

Adam Allred

Edit Adam Allred here.

Sure, I'll edit Adam Allred here. OK, let's get something straight right here:

I HATE SQUEAK. Now why is that? Let us begin:

1. Memory Leaks
2. Broken Code. I mean BROKEN. It says it does something and doesn't. Just wait for networking, you'll see.
3. The bastardized interface. "But it's its own API!!!" Ummmm...no it isn't. It cannot in any way comapre to the Java API.
4. That damn mouse. Trash that mouse. Put the trash in another trash, then another, and then one more. Then set the trash on fire. Then delete it. ROXORD!!!!

I FRICKIN LOVE SQUEAK. Now why is that? Let us begin:

1. It's a multimedia hoss! I'm sorry, cool easy graphics in Java is like [insert corny simile here]. In Squeak...tis possible.
2. MVC is an extremely easy implementation. Java just can't do it like squeak can.
3. Animation is a breeze. step and steptime functions....oh wait...messages, that's all that needs to be said.

I'm in 2200 right now, as well as 3 other classes, work 20 hours a week, and have a girlfriend. That makes life busy. I shouldn't even be making this page. But who cares...I'm bored.

In 2335, we entertained ourselves by reading bash.org and Chuck Norris quotes. This semester, we haven't worked together yet. When we do, it'll be awesome.

We made the first successful 3-D project in 2335 last semester. We made more extra credit points than required points. In Bob Waters's words, we "made a purple dump truck instead of a red cadillac, like they asked for. Who cares, it was 3-D, badass, and we made well over 100 points. Arrogant bastard? Me?

Over the past semesters here, I have learned a few things:

1. There is nothing more important than the people you care about. You get in the way of my friends, and I will end you(where is that line from???).
2. Work hard, or fail.
3. Ask for help. Check the CS2200 newsgroups. The Adam Allred posts are mine...alot of them are mine...


Enough banter. CoWeb assignment 1, to me!!!

1. Writing Code (cause real programmers write code...)

fibonacci: anInt "bust out a fibonacci function that takes in an int that's hopefully positive"
    (anInt < 0) ifTrue:[self error:['must be positive, idiot!!!']]. "if it's not positive, pimp slap"
    (anInt = 0 or:[anInt = 1])ifTrue:[^1]. "recursive terminating statement"
    ^((self fibonacci:(anInt -1)) + (self fibonacci:(anInt - 2))) "recurive call"

ROXOR THAT CODE!!!

2. Swing as MVC

OK, I personally think that Swing is a terrible implementation of MVC. It doesn't adhere to the requirements strictly enough. In any case, for Swing, you find that everything in it is very lightweight. Swing is only concerned with putting data on the screen. That's your View. It consists of all of the JFrames, and JPanels, etc. The Model is the code that you produce that the JObjects display. For example, If you have a class that keeps track of all of the users currently connected to a server, even though there may be alot of "user" objects there, the only thing you may be concerned about is diplaying thier names to other users. So, you iterate through a list of users, adding their name variable to a JList. The Users and their organizer are the model, and the JList is the view. In order to allow for dependencies, you go ahead and embed a view in a model, or a model in a view. In the previous setup, the JFrame would be within the user handler class, or the user handler class within the JFrame. In Java, I feel that it is unclear as to which is better, or proper, and tends to obscure MVC. For the controller, you have Listeners. Within the View class, you have listeners that report data back to the model when certain actions occur, and then the model can change the View appropriately.



CoWeb Assignment 2

Proper setup and use of Monticello(using squeaksource)

For those of you wondering how to do a repository managed project, Monticello is the man with the plan.

PART 1: WHAT THE DEUCE IS MONTICELLO, AND WHERE THE FUDGE IS IT?!

Monticello is a repositroy program for Squeak. While Monticello is NOT a repository itself, it's alot like CVS. You tell it where to put data, and it'll organize, keep track of, and import any and all work your team works on. To open Monticello, you can normal-click anywhere in the world, choose
open...
and choose
Monticello Browser
IF you don't see it in the list, you can add it in using the
Universe Browser


PART 2: FINE, I KNOW WHERE IT IS, BUT HOW DO I USE IT?!

This is the tricky part. It isn't very much like CVS or anything used in previous CS classes(this is Squeak...it likes to be different), but it is fairly intuitive. The first thing you need to do for monticello is set up a repositroy for it to use. Monticello offers lots of different types of repositories, including ftp, http, and straight up disk locations as potential spots for a repository. One thing that is not there is SSH/SCP, which Eclipse, CVS, and all the nice 2335 programs used. So...we gotta try something new. Since you want to be able to get to your work no matter where you are, and the internet hasn't broken yet, we'll do an http repository. Luckily, someone out there knows CS majors at Tech need this, so they made one for us! Head over to http://www.squeaksouce.com and take a look at the home page.

What you need to do is register yourself, make a new project, add you and your members as administrators. Once that's done, squeaksouce will give you a few lines of code it says to copy into your monticello browser. So copy it, and head back to Squeak.

In squeak, open the monticello browser and choose
+Repository
Choose
HTTP
and paste the lines you copied into the pop-up.

EXTREMELY IMPORTANT!!! You MUST put the initials and password you registered into SqueakSource in this pop-up or monticello will not work!

When that's done, you should see squeaksource's web addresss on the right hand window in the monticello browser.

PART 3: HOW DO I UPLOAD AND DOWNLOAD?!

So now you need to add into monticello the project you're working on. To do that, click
+package
in the monticello browser, and type in the name of the package you are wanting to commit to a repository. Now all you do whenever you want to commit changes is click the package on the left hand pane, the repository on the right hand pane, and click
Save
A pop-up asking for a comment will appear. Fill it in and click
Accept
and that's it!

To get a newer version, you can choose a repository, and click
Open
to look at all the versions in the repository. You can choose one, and either
Load
which will replace all of your code, or do
Merge
which will let you view all the changes that will be made, and allow you to select/deselect as you like. Inside
Merge
usually
All Newer
is the best, but always check and make sure ;)


COWEB ASSIGNMENT 3

History of Object-Oriented Programming (1 point):

Ward Cunningham: Developer of CRC cards, XP programming, and many other design patterns, he didn't contibute "code" pre se, but he contibuted something just as important, the method by which we can plan, design, implement, test, and maintain object-orented code. Also invented the wiki.

Ivan Sutherland: Developer of Sketchpad, the first GUI. The whole of computer science was flipped upside down by the GUI, and in many ways, led to the need for object-oriented design. As systems became interacive, simple procedural code was no longer feasable. There needed to be a way to represent items, as well as their functions and interactions. Ivan figured it out.

Collection Classes (1 point):

1. How do OrderedCollection and a Set differ?

OrderedCollection contains elements in a specific order, with repeats, which can be referenced by their index, or location in the collection. A Set contains elements in no particular order, without repeats.

2. How do OrderedCollection and Array differ? Why would you use one over the other?

An OrderedCollection grows and shrinks based on how many elements are added or removed. An array has a fixed length. There is a small speed advantage when needing to grow or shrink an OrderedCollection. Also, an array, being of a fixed size, can have operations performed on it's elements with a relative idea of how log it would take.

3. How do you use a Dictionary? Why is it so fast?

Unlike a collection, you provide both the data and a "key", or a specific identifier for the element you are adding. The dictionary them "keeps track" of the location of the element to be added by using the key as a "pointer" to it. This way, you can come back later, provide the key for your element, and the Dictionary knows exacly where to find it, because the key "points" to it. While this isn't really any faster then an index number, imagine having to search a HUGE list of data for only one thing. Instead of looking at everything, you just ask the dictionary "Do I have data at this key?" and the dictionary can look directly, and completely avoid traversing or iterating, or any of the slowness of an array or Collection.

OO Language Design

1. What are the advantages and disadvantages of using a Virtual Machine?

Advantages: VM can be made to run code on any platform. Better error handling and exception recovery. Halting and inspecting of currently executing code in the VM.

Disadvantages: slower than native code. VMs needed for many platforms, more emeory requirements.

2. What are advantages and disadvantages of primitive types?

Advantages: generally faster in terms of execution. Simpler to work with for novices. building blocks for larger, more complex datatypes. easily manipulated.

Diadvantages: functionality cannot be increased. generally are not objects, and therefore can make OO based coding harder to perform.

Links to this Page