






Hotspots: Admin Pages | Turn-in Site |
Current Links: Case Final Project Summer 2007
Vehbi Dragaj
CoWeb Assignment 3
1)Usability (2 Points)
Heuristic evaluation is a technique to evaluate the usability of an application. This evaluation is done in four steps:
- Gather inputs- in this first stage we find between three and five independent evaluators. These evaluators are experts in the field. We make sure that they are told all about the application, what it is and what it should do. Provide them with all the necessary paperwork to do the evaluation.
- Independent evaluation -in this face the evaluators, evaluate the application individually. They check the application against the usability principles such as Visibility of status, Match between system and the real world, and Error system prevention. They make notice for any problem, or potential problem that they see in the application.
- Debriefing/Collection – in this state the evaluators are debriefed. They report the bugs they found out during the evaluation.
- Severity rating – during this face the developers take into account all the bugs found out by the evaluators and go through them and chose the once that they think are the most important/crucial and make a suggestion how they can be fixed.
An advantage of heuristic evaluations is that they are done by experts and the application is tested against well know principles. However, at the same time it might be very expansive to get experts to evaluate the application for you. Heuristic evaluation would be good choice to evaluate an application that is supposed to be used by a variety of users.
Observing Users is an evaluation technique where the actual users interact with the application and the developer observes. The developer has to be able to both see the facial expression of the evaluator and see the screen, what is happening. So, usually a mirror is above, so it can capture both. This can be done either in a special lab for usability evaluation or at the user’s workspace.
Observing users technique has advantage in the sense that you have actual users interact with the application, in this way the developer can observe exactly what will happen with the application once it is deployed. A disadvantage is that the users sometimes are not comfortable to perform the evaluation in front of the developers. Therefore, sometimes the developers chose to video the users evaluate the application. Observing users is a good evaluation technique to evaluate products that are supposed to be used by a specific group of users, because in this way the developer knows exactly who will use the product and how.
2)Object-Oriented Language Design (2 Points)
Java, C++, and C# have primitive types. Eiffel, Ruby, and Smalltalk do not. What are the advantages and disadvantages of having primitive types?
The advantage of using primitive types is that operating on them is much faster than on operation on objects.
However, the disadvantage is that if we use primitive types then there is a uniform lack.
Most OO languages run on a virtual machine. Java and Smalltalk do. C++ does not. What are the advantages and disadvantages of using a virtual machine for OO programming?
There are three main advantages, portability, memory management, and increase in security, and one disadvantage, speed, to using virtual machines for object oriented languages.
- The most important feature of VM is that they are very portable. In other words we can have same code compiled in one plat form and run in multiplatforms. This is epically important for applications that run over the internet.
- The second advantage of VM is that they support automatic memory management mechanism. In other words we do not have to take car of memory allocation and de-allocation, the language has mechanisms build in to do that for you.
- Considering the fact that the application is not running directly on the machine, it is more secure. The programmer can not force the program incidentally or willingly to access memory that doesn’t belong to it.
- The main disadvantage is that the VM are much slower. They are slower because one extra step is need to compile the code to some thing the VM understands.
CoWeb Assignment 2
Squeak Debugger
When tying to run a squeak project if an error occurs it brings up a debugger window that looks something like this:

As we can see from the picture it gives us four options:
Proceed: if we click on proceed than it will continue running the application.
Abandon: if we click on abandon it will just cancel the action, in other works will remove the debugger window and will not do anything.
Create: if we click create it will give us the option to create a new method with the name that the object is not understanding, in this case setupcomponents and it will give us the option to chose the class where we want to create this new method.
Debug: if we click on the debug button then it will bring up the next window where we will be able to debug the code, just like the following window:

Here it is important to notice four parts of this picture which I named them 1, 2, 3, 4 respectively:
1. It shows what the problem is? In this case it doesn’t understand the method call. We know that it is a method call because of the ‘#’ in front of the name of the method.
2. It shows us in what class and in what method is the problem.
3. In number 3 we see the method where the problem is being generated and it highlights the portion of the line that is generating the error.
4. Part four of the debugger shows us all the variables and their values at the time right when the error occurs.
Even if there is no error in our project we can bring up the debugger and debug, check the values of the variables and make sure that it is doing what it is supposed to. We can bring the debugger up by calling halt on self. halt brings the debugger up and it is understood by every object. So that mean that you can call halt any time you want in anywhere. Here is another picture showing the debugger brought up by calling halt on self:

This is a short summer of the squeak's debugger, I hope it helps...
CoWeb Assignment 1
Q1)
The following code solves the rainfall problem, which you may have seen in previous CS classes. For each line, describe what the Smalltalk code does. Be as specific as possible. In particular, what is data at the various points in the code?
'| data onlyPositiveNumbers |' "this line declares two local veriables: data and onlyPositiveNumbers"
data := OrderedCollection withAll: #(1 2 3 -4 -5 'error' 6 -7 999 2). "here an ordered collection is being assigned to data"
onlyPositiveNumbers := [:i | (i isKindOf: Number) and: [i positive]]. "a block is being assigned to the onlyPositiveNumbers"
data := data select: onlyPositiveNumbers. "this line checks every element on data if it is a number and if so if it is positive and if both are true it puts it onto data"
data := data copyUpTo: 999. "this line copies all the numbers on the data that are smaller than 999"
Transcript show: data average "it prints to the transcript the average of all the numbers on data collection, so it prints the average of all the positive numbers that are smaller than 999 that were on the original list"
"on the other words the entire thing took in a collection of objects, looked whose values were positive integers, then out of those positive integers looked which ones where less than 999, and then it took the average and printed to the transcript"
Q2)
Implement a method in Squeak that will give you the nth Fibonacci number. For both 0 and 1, the Fibonacci number equals 1. From then on, the next in the series is simply the sum of the previous two in the series (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, etc.). Return an error when applicable. Your code should be based on good OO-style and be an efficient algorithm.
I added this method to the Number class which is on the Kernel-Numbers category. the question says return an error when applicable, i could think only two cases one when trying to take the fibonacci of floats and the other one trying to take the fibonacci of numbers smaller then 0, so i check for both of those at the bigining of my method and returned error messages if either one is true. then i check if the number is either 0 or 1 and if so i return a 1, other wise i do a recursive call asking for the fibonacci of the two consecutive smaller numbers and add them.
fibonacci
(self isInteger) "here i ask if it is integer"
ifFalse: [^'You are trying to take the fibonacci of a non integer value']. "if not i print out this error message"
(self 0) "here i check if it is smaller then 0"
ifTrue: [^'Fibonacci for numbers smaller than 0 does not exist']. "if it is smaller then 0, i retun an error message here"
((self = 0) | (self = 1)) "here i check if it is either o or 1"
ifTrue: [^1]. "if it is either 0 or 1 i return a 1"
^(((self - 1) fibonacci) + ((self - 2) fibonacci)) "this is my recursive call"
one last thing to say about fibonacci, to test it i opened a workspace and in there i called fibonacci on some number and then printed it. for example:
5 fibonacci ( highlighted it and prested alt p)
Hello,
gtg160s
aim: veb2d
Links to this Page