ICS 10 • David G. Kay • UC Irvine

Seventh Homework

As usual, you'll do parts of this assignment with a partner, preferably someone you haven't worked with on a prevoius assignment. Be sure to use the Partner App so your partnership is recorded.

Part (a)

Read the following short articles, each on an aspect of human-computer interaction or information visualization:

Optionally, read the article Absolute Powerpoint by Ian Parker, which talks about the limitations of PowerPoint as a medium of expression.

Part (b)

Part I of the Deus X homework was a machine language program that identified the largest in a group of numbers. It used register A to store the largest number the program had encountered so far—we started it at 0, then checked each number against register A and, if it was larger, we moved it into register A to replace the previously-largest value. After checking all the numbers, register A contained the largest in the group.

(b.1) Implement the same thing in Snap. You just need one sprite with one script that starts when the green flag is clicked. The script should proceed in the same way the Deus X version proceeded, as described above. But since the Snap environment (with sprites and the stage and so on) is different from the Deus X's (with text input and output), let's specify some tips for the new environment:

Export this project into a Snap file named in the usual way: hw7b1-ann17-sara20.

(b.2) Now, what if you wanted to sort the numbers (display them in order, lowest to highest)? You can't do that just by reading each number and discarding it; you'd need to store the whole list in Snap's memory (and then run a sorting algorithm on it). Sorting is just one task that requires us to store a whole collection of values, rather than just a single value at a time; there are lots of computational tasks that require us to store a collection of values at once. In Snap, we call these collections lists; we can create a list in the Variables tab and process it as in the following example, like the one we saw in class:

Scratch block for prompting user for list of names

Create and run this Snap script to see how it works; you can download a copy of this script and the following one (right-click to download the file).

We can traverse the list (process each item in turn) using a script like the one below. We use a variable to point to each item in the list, one by one; we start it at 1 and increase it by 1 each time, until we've visitied every item.

Scratch script to traverse a list (process every item)

In the downloaded Snap file, click on the clam to see this in operation.

We're not going to ask you to code up a sorting algorithm in Snap. Instead, modify this Snap project so that it reads a sequence of numbers (instead of names) into a list and then displays the average of all the numbers entered instead of listing all the items. (For the first step in computing the average, start a variable called "sum" at zero and traverse the list, adding each item to the variable.)

[Side note: It's actually possible to compute the average (mean) of a sequence of numbers without storing all the numbers in a list. But to compute other things, such as the midpoint (median) or a graph showing the distribution of the numbers, you would need to store all the numbers at once. Even though we're not asking you to compute these other things, use a list in this part of the assignment.]

When you're done, save the project in a file named in the usual form: hw7b2-ann17-sara20.ypr and submit both projects ((b.1) and (b.2)) via Checkmate. Just one partner should submit both projects; the file names and your Email message will let us give both partners credit.

Part (c)

(c.1) (Each partner can do this individually) Write down the five activities you do most often on your computer. You don't have to worry about precisely which one is #2 and which is #3; just list five things you do pretty frequently (e.g., read Email, shop for music, play World of Warcraft, look at Facebook, …).

(c.2) (Each partner can do this individually, too) If you've never used an iPad before, go to the UCI Computer Store (or anywhere else where there are iPads you can use) and spend at least 15 minutes trying it out.

(c.3) Discuss with your partner which of your common activites (your five and your partner's five) would be easier or more convenient to do on an iPad and which would be harder. For each activity (you may not have ten, if you and your partner have some in common), write down whether you think it would be easier or harder on an iPad, and (in just a few words) what it is about the iPad that leads you to that opinion. (If you and your partner don't agree, that's fine; just give each person's reasoning.)

Save the document containing your responses to part (c) into one document, naming it in the usual form: hw7c-amyq-janet3. Submit this document via Checkmate. Just one partner should submit one copy and the same partner should submit both parts (b) and (c).


David G. Kay, kay@uci.edu
Friday, April 6, 2018 9:52 AM