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

Steve Miller

Stephen Miller

I am a 3rd year Computational Media (CM) major. I love video games. My goal in life is to become a respected video game designer for a major company, my first preference being Konami. I particularly enjoy rythm games mainly because I enjoy music, arcade-style games, and skill-based games. Here are my recommended cases:

Mini Java-to-Squeak Tutorial
I found this useful because it gives a quick comparison between Java, which pretty much everyone in the class is used to, and Squeak, which everyone in the class is trying to learn. The direct code comparison is really good for people like me who understand things well through comparisons.

How to Record and Play Audio
I love doing sounds for programs, so this is a perfect case for me. The ability to record and playback sounds can be invaluable in the process of learning how to use sounds in every day programming.

Bears with Lightsabers
This is one team's understanding of how to get good grades in this class. It is written with a bit of humor, which always makes things worth reading. Despite the obvious intent to make you laugh, it definitely provides useful information and tips for making it through this class.

CS 2340 Spring 2001 - My JukeBox!
This is a large project from an earlier CS2340 class, and how this group pulled it off. Looking over this gave me a good idea of what the project in this course might be like. It also had a bit of humor in it, which is greatly appreciated!

Midterm Review

Tracing Code (1 point)
The following Smalltalk statements are written in a Squeak Workspace. In order from top to bottom, you execute each statement with Alt-p to print its result. Next to each statement, write the result.

1 + 2 3 - 4 factorial -15
"4 factorial is done first, then everything else is done left to right."

a := #(1 2 3 4 5) #(1 2 3 4 5)
This simply shows what a is set to.

a select: [:i | i odd] #(1 3 5)
"This shows what is selected from a, which is all the odd numbers in a."

b := a #(1 2 3 4 5)
"This shows what b is set to, which is a."

a := a reversed #(5 4 3 2 1)
"This shows what a is set to, which is a backwards."

b collect: [:i | i i] #(1 4 9 16 25)
"This shows all the elements of b squared"

a perform: #at: withArguments: #(4) 2
"This shows the same thing that a at: 4 would show, which is the 4th element of a."

Message Passing (1 point)
Smalltalk is built on a few uniform design principles. One of these is that computation happens through message passing: An object gets sent a message (perhaps with some arguments) and returns an object. Even traditional control structures (while loops, for loops, if/then/else) are implemented through message passing. For each of the control structures below, translate the Java code into Smalltalk. For each part, indicate what is the object, what is the message, and what are the arguments.

while loop

while (aBooleanTest)
// do stuff

[aBooleanTest] whileTrue: ["do stuff"].

for loop

for (i = 1; i = 10; i++)
// do stuff

1 to: 10 by: 1 do: [:x | "do stuff"].


if (aBooleanTest)
{ // do stuff
{ // do stuff

[aBooleanTest] ifTrue: ["do stuff"] ifFalse: ["do stuff"].

Final Review

HCI (1 point)

One of the tenets of human-computer interaction is that “you are not your user.” Explain what is meant by this maxim.

The person who is likely going to use your program will (most likely) be completely different from you. They will not have the same knowledge you have, especially about the system you are creating. This means that you should design with the target user in mind, not with yourself in mind.

What is the difference between a mistake and a slip when classifying user errors?

A mistake is when the user thinks clicking on something will do one thing, but it does another. A slip is when the user knows what button to press, but the click the wrong button on accident.

What is an example of a natural mapping in user interface design?

Natural mapping is when something in the interface "naturally maps" to something in real life, like the scroll bar with up and down arrows. It is natural for the up arrow to map to scrolling upwards, and the down arrow to map to scrolling downwards, both by symbol and by location. f the symbols or locations were swapped, it would no longer be a natural mapping.

Extreme Programming (1 point)

Describe in detail how pair programming is done. What is the role of pair programming in extreme programming?

In pair programming, one programmer sits at the computer and writes code while the other stands by and double checks everything the first programmer does. They switch back and forth every so often. It is used in extreme programming because programs written this way tend to have better code, better reusability, and fewer errors. Thus, all code in Extreme Programming is done in pair programming.

What is the role of unit testing in extreme programming?

Unit testing is done first, before any actual code is written. It is then used as a guideline for how much of the project has been completed, as well as simply when the project is done. If the unit tests pass, that part of the project is done.

Garbage Collection (1 point)

Reference counting was one of the first implementations of garbage collection. Ultimately, it proved problematic. Why?

If two objects had a reference to each other, but they both had no references to anything else, they would remain, taking up memory. You could never get to them again because there were no other references to them.

Name two advantages and one disadvantage to using garbage collection.

It frees memory so that the programmer doesn't have to worry about accounting for it. In modern systems, it can be a more effective way of freeing up memory than code that manually handles it written by expert programmers. It does take up extra cycles to search for objects that need to be deallocated, thus slowing down the system. On most modern systems, this disadvantage is negligable.

Link to this Page