Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Jons submission page
Jon Kean's submission page
I am a Senior CS student, specializing in Networks and Software Engineering.
With my free time I enjoy eating, sleeping, programming, modifying/tinkering with desktop PC's, playing video games, and drinking coffee.
While looking through the cases, I found that most of them didn't make much sense (but they probably will make perfect sense before this class is over).
My 3-5 cases I found that were immediately helpful were:
Mini Java-to-Squeak Tutorial
I found this very helpful to me. Since I've used Java, this is useful to see what some java code would look like in Sqeak. I can already tell that old habits will die hard, especially with using the syntax that is similiar (such as the == and = operators)
General useful Squeak stuff
Similar to the link above. The page shows the syntax of some Squeak operations, that are common in OO languages.
Proper CRC Card Creation
Useful, because it appears we are going to do CRC cards in this class, and lots of the cases posted used these. From what I can see, CRC cards appear to be similar to UML use case diagrams, only are more more specific to which object will accomplish what task (rather than just defining the tasks them self, like in case diagrams)
Living in an OO world
This is not really new information, but it's something to keep in mind since Squeak takes the concept of object oriented to a new level of extreme (math operators as objects? wow....)
Coweb assignment 2
Refactoring (1 point)
- Refactoring is improving the quality of existing code, while typically not changing the overall functionality. Code should be refactored when it is unreadable or difficult to maintain.
- unit testing is helpful for refactoring, by ensuring that the changes made while refactoring do not break any functionality. This can help minimize introducing logical errors from the process of refactoring.
User Interfaces (1 point)
- the separation of model, view, and controller allows more flexibility and re-use with the code. Since the view and controller and completely separate code, the same model could be used for different views. Such as making a view using a text based terminal, and another with 3d acceleration, but both share the same underlying model. A view component could potentially be designed to work with multiple models. Changes can also be made to just a specific component (model/view/controller), minimizing the changes needed (if any at all) to the other components.
- the dependencies are kept to a minimum by making the view responsible for only knowing how to display the model. It doesn't care how the model accomplishes it job, and is only concerned with its own roll. The model can be completely independent of the view, in that it doesn't require a view component at all, and could function entirely on its own.
Coweb Assignment 3
Factory acts as a coordinator of creating objects. It manages the creation of specific objects instances (and sometimes also manages destroying or removing the object). The UML diagram shown is for a network connection, which would be an ideal candidate for this (as the Factory object can handle setting up and destroying the connection, so other classes need not be concerned with those details). Another reason to use Factories is it allows object reuse, and caching of the underlying resources (by allowing multiple instances share internal data structures).
Reference counting proved to be problematic, because it cannot detect and remove objects that are referencing itself or other objects referencing itself (cyclic references). Reference counting also has a performance penalty, because everytime references are made or changed, its reference count needs to be updated as well. (other algorithms dont require this)
Garbage collecting is beneficial, in that it simplifies a programmers responsibilities since they dont need to allocate or free underlying system resources.
Garbage collection can also lead to lower program memory requirements, as garbage collecting is more efficient on its memory usage than typical programs that rely on the programmer to allocate/free resources.
Garbage collection has a performance penalty, because the task of freeing resources is now handled by runtime software.
The message should be under the String object, as an instance method.
(self size >= 8) ifTrue: [
^ (self first: 4), '...', (self last: 4).
] ifFalse: [
^ (self first: ((self size) / 2) floor), '...', (self last: ((self size) / 2) ceiling).
Links to this Page