Category Archives: midterm

Pictures vs. words

A word is also a picture of a word

Remember how on March 5th I was supposed to give a presentation in 1′, 2′, 10′, but it got bumped? And then the following week’s class was canceled, and then we had spring break. So it wasn’t until three weeks later, March 26, that I finally got to take my turn squirming at the front of the room. Three extra weeks! So, naturally, I used all that time working on my project, right?

Oh, no, that wouldn’t have been fair. I did revise my slides, but I left it until the last fucking minute, as usual, so as not to have an undue advantage over my classmates. Right. That’s totally why.

What I did do in the interim, however, was stumble across this fab webcast by Nancy Duarte about how to give better presentations:

After hearing her talk, I bought and started reading her book, Slide:ology, which is a more detailed presentation of the same suggestions.

(Here’s another Nancy Duarte webcast, which I haven’t watched yet: Creating Powerful Presentations.)

So between that and taking copious notes on my classmates’ midterm presentations, especially in Wearables, I got a lot of ideas about how I should redo my slides, as well as my overall presentation style. The result is a deck that does not make any sense unless I’m standing there with a remote, explaining it to you (PDF, 1.1 MB)—and using a remote is, I decided after watching a lot of in-class presentations, a good thing to do. I got my Mac remote to turn pages in Acrobat using a program called iRed Lite. I can’t really recommend it, since it stumped me for quite a while the first time I used it, and the next time I tried, a few weeks later, I positively could not figure out how I had ever made it work in the first place. There’s something about the UI that confuses the hell out of me. But it can, theoretically, do the job, and it’s free.

Some other things I learned from watching classmates’ presentations:

  • Proofread, proofread, proofread.
  • Stand while you present, even if you don’t have a remote. Think of someone you know who’s poised and relaxed speaking in front of a group, and then try to channel that person for five minutes. Breathe between sentences. Make eye contact.
  • I really don’t care about the technical side of your project. Don’t tell me what hardware and libraries and so forth are used in it; describe it to me as though I were a normal human being who doesn’t have four Arduini in her apartment right now. Just because I have them doesn’t mean I know how to use them.
  • Those very corporate-looking system diagrams showing how information will flow through your application? They’re completely unintelligible. Skip them.
  • You don’t have to make all your graphics all slick, in Illustrator or Photoshop. Hand-drawn diagrams or sketches can be much more engaging.
  • As early as possible in the presentation, show me some kind of image of what your project will be—or, better yet, the prototype you’re working on—so that I can hold that in my mind as you go into all the background and process and detail. If I don’t know what your project is yet, I probably won’t find the rest of that information interesting. This was true even though I knew perfectly well what my classmates’ projects were. When I watched their presentations, if they didn’t show and describe what they were making early on, I was unable to hold my attention on whatever else they were saying instead. Context.
  • Don’t put a lot of text on the screen. If you’re talking and there’s a whole paragraph on the screen behind you, my attention’s going to be split. And if it turns out that you’re just repeating what that paragraph says, almost word for word, I’ll feel exasperated. People should be listening to you for the words in your presentation, not reading them off the slides.
  • If you don’t have anything sexy to put on a slide for a given portion of your talk, it’s fine to
    1. repeat a previous slide, or
    2. show a slide that contains just one word representing that moment’s topic—“research,” for instance, or “inspiration.” Treat that text as a graphic element—make it big, pay attention to how it looks.
  • Typography!
  • If you have a relevant quotation to share, don’t bury it in a whole long paragraph; give it a slide by itself.
  • Don’t try to cover too much. It’s better to give people a thoughtful, measured thumbnail-presentation of the project and stop talking early enough that there’s time for people to ask questions about the parts that actually interest them than it is to brain-dump every piece of information you have, leaving time for only a few dazed comments from your audience at the end.
  • Videos of a thing working are helpful, but you have to explain what’s going on while it’s playing. This may be a good time to unload some of those boring technical details, while there’s a moving image to spice them up.
  • Proofread, proofread, proofread. If I had a dime for every typo I saw during midterm presentations . . . I offered my services as a proofreader in the Webgrrls-style need/give session we had in 1′ 2′ 10′, but nobody seemed to think they needed such a thing. They are wrong.
  • If you’re going to read some text that appears on a slide, do it slowly, with feeling; don’t just rush through it breathlessly, making it impossible for people to either read the text for themselves or follow what you’re saying. Make it clear that you’re reading what’s on the screen so people don’t have to struggle to figure it out. If you’re not able to introduce the text with something like “I’d just like to read you this quote, which really inspired me . . .” you probably shouldn’t be giving it a slide.

So, here again are the slides I ended up using (PDF, 1.1 MB) for my midterm presentation. I suppose some day maybe I’ll write captions more or less like what I said in front of the class, but in the meantime you can read the old slides if you want to know the gist.

Photo: A WORD IS ALSO A PICTURE OF A WORD by gwalton1; some rights reserved.


date merchant

As you may recall, for my midterm project, I got stumped on several seemingly simple tasks. One of those—the most important, since upon it depends my semester-long assignment for Mainstreaming Information—was figuring out a way to compare one list of words to another and pull out the words that were unique to one of those lists. In my head, I can see very easily how this would be done. Given my special way of haphazardly flailing through code, however, I just couldn’t get it to work.

Until today!

In fiddling with the Bayesian comparison code for this week’s homework, I finally pulled out a list of unique words. Of course, this is a completely perverse misuse of that code—like using a steamroller to kill a pillbug—but as long as it works, I don’t fucking care.

So, here’s what I did. In, I replaced the last two for loops with the following:

[java]for (String word: uniqueWords)
for (BayesCategory bcat: categories)
double wordProb = bcat.relevance(word, categories);
if (wordProb < 1) { println(word); } else {} } // end for bcat } // end for word for (BayesCategory bcat: categories) { double score = bcat.score(uniqueWords, categoryWordTotal); println("---The following words were not found in " + bcat.getName()); } // end for bcat[/java] And in I replaced the percentage and relevance blocks with [java] public double percentage(String word) { if (count.containsKey(word)) { return count.get(word); } // end if else { return 0.001; } // end else } // end percentage public double relevance(String word, ArrayList categories)
double percentageSum = 0;
for (BayesCategory bcat: categories)
percentageSum += bcat.percentage(word);
} // end for bcat
return percentage(word);
} // end relevance[/java]

So now, if I run the command

$ java BayesClassifier A2_unique.txt < B1_unique.txt | sort >results.txt

I get a list of words that are in B1_unique.txt (The Masada Scroll by Paul Block and Robert Vaughan, 2007) but not in A2_unique.txt (Zuleika Dobson or, An Oxford Love Story by Max Beerbohm, 1911). For example,

Akbar, Allah, Allahu, Apostolic, Ariminum, Arkadiane, Asmodeus, Astaroth, Barabbas, Beelzebub, Bellarmino, Blavatsky, Brandeis, Breviary, Byzantine, Caiaphas, Calpurnius, Catacombs, Charlemagne, Clambering, DNA, Diavolo, Franciscan, Freemasons, GPS, Gymnasium, Haddad, Hades, IDs, IRA, Jettisoning, Kathleen, Lefkovitz, MD, MRI, Masada, Masonic, Muhammad, Muhammadan, Nazarene, Nazareth, Olympics, Orthodoxy, Palatine, Palazzi, Palestine, Palestinian, Palestinians, Petrovna, Pleasant, Plenty, Plunge, Pocketing, Pontiff, Pontifical, Pontius, Praetorian, Prissy, Professors, Protestants, Rasulullaah, Ratsach, Revving, Rosicrucians, Satan, Scrolls, Seder, Shakespeare, Syracuse, Tacitus, Theosophical, Torah, Trastevere, Turkish, USB, Uzi, VAIO, VCR, Yeah, Yechida, Yeetgadal, Yiddish, adrenalin, agita, airliner, airport, ankh, awesome, bitch, bomb, bookstores, braked, breastplate, briefcase, broadsword, broiler, brotherhood, bulrushes, cellular, checkpoint, chuckling, chutzpah, combatant, computer, dashboard, database, departmental, desktop, divorce, dysentery, electricity, enabling, entrepreneurs, firearms, firestorm, fishtailed, flagon, forensics, goatskin, groggily, gunfire, gunman, gunshots, handbag, handball, handbrake, handgun, helicopter, helmets, highwaymen, hijinks, homeland, homeless, homespun, hometown, innkeeper, internship, journalist, kebob, kidnappers, kilometers, lab, laptop, lyre, mawkish, monitor, muezzin, nickname, nightfall, nonbeliever, northeaster, notebook, notepad, notepaper, numerology, paganism, password, pastries, phone, photo, photocopies, photocopy, photograph, photos, pig, pigeons, pistol, playback, police, quintessentially, recycles, redialed, roadblock, roadway, sandwich, screensaver, site, sites, submachine, superheating, synagogue, taped, taxi, terrorism, terrorist, terrorists, thousandfold, thrashing, toga, tortured, trigonometry, universe, unto, vegetables, vehicles, video, videotape, vinegar, violence, warehouses, waterfall, welfare, wholeheartedly, whoosh, whore, windshield, worker, workstation, worldwide, yardstick, yarmulkes, yeetkadash, zooming

And if I run the comparison in the opposite direction, I come up with words such as

Abernethy, Abiding, Abimelech, Abyssinian, Academically, Academy, Accidents, Achillem, Adam, Adieu, Admirably, Age, Agency, Agents, Alas, Albert, Alighting, America, Atlantic, Australia, Balliol, Baron, Baronet, Britannia, Broadway, Brobdingnagian, Colonials, Cossacks, Crimea, Devon, Dewlap, Duchess, Duke, Dukedom, Earl, Edwardian, Egyptians, Elizabethan, Englishmen, Englishwoman, Europe, Holbein, Ireland, Iscariot, Isis, Japanese, Kaiser, Liberals, London, Madrid, Meistersinger, Messrs, Monsieur, Napoleon, Novalis, Papist, Parnassus, President, Prince, Professor, Prussians, Romanoff, Segregate, Slavery, Socrates, Switzerland, Tzar, Victoria, Wagnerian, Waterloo, Whithersoever, Zeus, absinthes, acolyte, adventures, affrights, affront, afire, afoot, aforesaid, aggravated, album, analogy, anarchy, ankle, ape, aright, aristocracy, ataraxy, automatically, avalanche, avow, balustrade, bandboxes, bank, beastliest, beau, beauteous, billiards, biography, bodyguard, bosky, boyish, broadcast, bruited, bulldog, businesslike, bustle, calorific, casuistry, catkins, chaperons, chidden, cigarettes, clergyman, cloven, comet, compeers, coquetry, cricket, crinolines, custard, dandiacal, dapperest, decanter, devil, dialogue, diet, dipsomaniacal, disemboldened, disinfatuate, drunken, ebullitions, equipage, exigent, eyelashes, eyelids, farthingales, female, femininity, fishwife, fob, forefather, forerunners, freemasonry, furbelows, gallimaufry, goodlier, gooseberry, gorgeous, gypsy, haberdasher, halfpence, handicapped, handicraft, handiwork, handwriting, hearthrug, helpless, hip, hireling, honeymoon, housemaid, housework, hoyden, hussy, idiotic, impertinent, impudence, inasmuch, incognisant, insipid, insolence, insouciance, item, keyboard, landau, legerdemain, loathsome, luck, maid, maidens, manhood, manumission, matador, maunderers, model, mushroom, nasty, newspaper, noodle, nosegay, novel, oarsmen, omnisubjugant, ostler, otiose, parasol, pinafore, poetry, poltroonery, postprandially, prank, prestidigitators, propinquity, queer, romance, sackcloth, salad, sardonic, saucy, schoolmaster, seraglio, sex, skimpy, skirt, snuff, socialistic, streetsters, surcease, surcoat, swooned, teens, telegram, telegraphs, thistledown, thither, thou, threepenny, tomboyish, toys, tradesmen, treacle, ugly, uncouthly, unvexed, vassalage, waylay, welter, wigwam, witchery, withal, woe, woebegone, womanly, womenfolk, wonderfully, wonderingly, wretchedness, wrought, yacht, yesternight, zounds


A2Z midterm: Vocabu-lame

vocabulap, slide 7

Apparently, I have learned absolutely nothing all semester, because what seemed like a very straightforward project proved to be completely beyond my abilities.

The overarching goal is to generate data for the visualization I’m making for Lisa Strausfeld and Christian Marc Schmidt’s Mainstreaming Information class. The following are some slides explaining the gist of the project, provisionally called Vocabulap (vocabulary + overlap; not a handsome coinage):

My specific goals for the A2Z midterm were as follows (with subsequent comments in all caps):

For A2Z midterm
* Remove all blank lines
* Remove all extra spaces
* Break all lines – DONE
* Rename all to number consecutively: A01, A02, . . . A10 (for old books); B01, B02, . . . B10 (for new books)

Compare major sets
* Extract the text from between the body tags in each file. Dump it out as a new file with the extension body.txt in the folder ../body.
* Concatenate all the files in each set.
* Make a list of unique words in each concatenated set, with the number of times the word appears.
* Strip out all words beginning with numerals.
* Create the following lists:
– Words shared by both major sets, with frequency counts
– Words unique to set 1, with frequency counts
– words unique to set 2, with frequency counts

Find unique words in each book
For each book:
* Concatenate all the files in that major set *except* the file for that book.
* Make a list of the unique words, with frequency counts, in
– the current book
– the set of all books except the current one
* Make three lists:
– Words shared by all books in the major set, with frequency counts
– Words that appear only in the current book, with frequency counts
– Words that appear only outside the current book, with frequency counts

Return lines surrounding specific words
For each word in a given list:
* Get the line numbers on which it appears.
For each appearance,
* Print the line above
* Print the line with the word, replacing it with itself wrapped in span tags to apply color
* Print the line below

The most essential piece of code that I could not get working is the comparison doodad. It almost worked for, like, five seconds, but it was generating a huge file of every unique word times however many words were in the document, or something like that. When I tried to fix it, it completely stopped working. The offending code is as follows:

/* 1. Takes in a file name from the command line.
2. Makes a string array out of the hard-coded comparison file.
3. Imports the contents of the file whose name was passed in.
4. For each line of the input file (i.e., each word), changes it to
lowercase and checks to see if it’s contained in the comparison file.
5. If it’s not in the comparison file, checks to see if it’s in a hashset of
unique words.
6. If the word’s not in the hashset, add it.
7. Print the contents of the hashset.

import java.util.ArrayList;
import java.util.HashSet;
import com.decontextualize.a2z.TextFilter;

public class CompareUnique extends TextFilter
public static void main(String[] args)
new CompareUnique().run();
} // end main

private String filename = “body/unique/allB_uci.txt”;
private HashSet uniqueWords = new HashSet();
private HashSet lowercaseWords = new HashSet();

// make a String array out of the contents of the comparison file
String[] checkAgainst = new TextFilter().collectLines(fromFile(filename));

public void eachLine(String word)
String wordLower = word.toLowerCase();
for (int i = 0; i < checkAgainst.length; i++)
if (checkAgainst[i] != null && checkAgainst[i].contains(wordLower))
{} // end if
else if (checkAgainst != null)
if (lowercaseWords != null && lowercaseWords.contains(wordLower))
{ } // end if
else if (lowercaseWords != null)
} // end else
} // end else
} // end for
} // end eachLine

public void end()
for (String reallyunique: uniqueWords) {
} // end for
} // end end

} // end class

I know, it seems very simple, but you have no idea how long it took me to get this far.

So, basically, for the midterm I’ve got bupkis—just a big pile of text files, and a list of unique words for each.

MC Squared

MC Squared documentation thumbnails

Get it now! Detailed, full-color documentation of the famed MC Squared midterm project!

MC_Squared(fin).pdf (14.68 MB; sorry, it contains a couple of embedded videos)

We gave our presentation today, the thing mostly worked, and it wasn’t too embarrassing. And, unlike some people in the class, my group actually got two or three hours of precious, golden sleep the night—well, morning—before. (We closed down the floor at about 3:30 a.m., but a few of our classmates relocated to the library or some such place to keep working. Everybody seemed pretty crispy by 9:30 this morning.)

PhysComp midterm project, week 2: Rough prototype, sexed up

Our project is now all dressed up, NYC-style:

The black box: closed

Diego and/or Filippo cut all the squares out of black foamcore and set two of the infrared sensors into the sides. Then, when I rolled in after dinner, I taped the pieces together into a flat pattern and made velcro hinges to pull it together into a box:

The black box: interior

And then—my crowning achievement of the day—I devised a neat little latch for it.

The black box: closed latch

While Diego and Filippo were figuring out more deluxe ways to use Minim than what I had hashed together the day before, I set about making my breadboard setup a little more robust, so that it could stand being sloshed around a bit in the box. Because the wires that came with the IR sensors are multistranded and very fine, they’re difficult to poke into the holes in a breadboard, and then they don’t want to stay in once they’re there. So it seemed to me that they ought to be soldered to header pins, as shown in the soldering lab.

This is, of course, much more difficult than it looks—for me, at least. I present to you what I believe to be my ugliest soldering job yet:

Another bang-up soldering job

Hideous. Pathetic. Heartbreaking.

But soldered they were, and they were, in fact, slightly easier to plug into the breadboard. Once I, you know, straightened the pins out with pliers.

How are you supposed to do this? Is there some trick to soldering multistrand wire to a header pin? Was I just doing it all wrong, wrong, wrong? Is it a mess because (a) I can’t see in the shitty light of the lab, and (b) I can’t hold my hands steady? I hate this. Help!

PhysComp midterm project, week 2: Rough prototype

A semi-working prototype!

Part 2 in the saga that began last week.

After spending about an hour playing with the Minim library in Processing, I went into the lab to see if I could get it to work with actual input from our IR sensors. This was basically a repeat of this week’s homework, which I’d done, for once, before the morning it was due, so the wiring part was uncharacteristically easy. I need to get some header pins, though; the stranded wire on the IR sensors is a pain to plug into a breadboard.

So our project—which I realize I didn’t explain last week—is going to be a cubeoid musical (or, at least, noisy) instrument with an infrared sensor set into each side, mounted corner-up (as demonstrated by Diego) on a camera tripod. One or more players can then use their hands or other body parts or utensils or pets to trigger different sounds from each side. We were thinking that for Phase One, i.e., this week, we’d have the sounds be synthesized tones, and that for Phase Two, the final version, we’d make it play various different loops.

It turned out, however, that it’s far easier—for me, at least—to get Minim to play loops than to synthesize sounds. And there are a lot of free sound clips out there in the world. I got mine from This pre-prototype, therefore, has only two sensors, both of which trigger audio loops. It also has the beginnings of a lame-ass bouncing ball animation, but it doesn’t do what I want it to do, mostly because the signal’s changing too rapidly. Graphics were a tentative feature for Phase Two, so I’m not going to fuss with that part any more this week.

Here’s some crappy video of Filippo (left) and Diego (right) making the sensors generate noise. You can barely hear it, unfortunately—listen for the annoying rapid clicking sound, which I think is the hi-hat sound.

The beauty part? This doubles as my ICM homework.

Here’s the Arduino code:

/* Reads data from two analog sensors (IR sensors, in this specific example)
and outputs the values in a format that can be easily parsed in Processing.

int ledPin = 7;
int irSensor0 = 0;
int irSensor1 = 1;
int sensorValue = 0;

void setup()
// Flash the LED three times to announce the start of program.
pinMode( 7, OUTPUT );
digitalWrite( 7, LOW );
delay( 300 );
digitalWrite( 7, HIGH );
delay( 300 );
digitalWrite( 7, LOW );
delay( 300 );
digitalWrite( 7, HIGH );
delay( 300 );
digitalWrite( 7, LOW );
delay( 300 );
digitalWrite( 7, HIGH );
delay( 300 );
digitalWrite( 7, LOW );

// Start serial port at 9600 bps:
Serial.begin( 9600 );

void loop()
if (Serial.available() > 0)
// Read the first (0) sensor:
sensorValue = analogRead( irSensor1 );

// print the results:
Serial.print( sensorValue, DEC );
Serial.print( "\t" );

// read the second (1) sensor:
sensorValue = analogRead( irSensor0 );
// print the results:
Serial.println( sensorValue, DEC );

// Follow the last sensor value with a println() so that
// each set of four readings prints on a line by itself:
Serial.println( sensorValue, DEC );
// delay ( 100 );

And here’s the Processing code, where most of the excitement takes place.

Midterm project, week 1: Observation

First, Diego, Filippo, and I met to talk about what we thought our project was going to be, how we would actually implement the idea, and what materials and research we’d need to do to get there.

Diego checking out the vintage iPod box I brought in as a visual aid for the shape of our thing:

I’m not sure what else we might have observed that would be truly relevant in the development of a gadget that doesn’t serve any real purpose, but we observed whatever we could think of.

What I think is significant about the cat thing is that it’s proof that, really, anyone can play a theremin. You don’t have to be human, you don’t need opposable thumbs, you don’t have to know anything about electricity or traditional musical instrument interfaces (though there is evidence that animals know more about electromagnetic fields that humans do, in some ways).

Filippo showing the Jon Spencer video:

The Jon Spencer video shows us a similar thing, but also introduces theatricality to the mix. Anyone, even a nonhuman, can play a theremin or thereminic instrument, but if you are a human and you have a sense of whimsy, you can play that instrument in a much greater variety of ways. Spencer shows that you can play a theremin with any part of your body. Probably the only other instrument that can boast such versatility is the drum, but even that is mostly theoretical. Yes, sure, you can strike a drum with your nose, but it’s going to hurt, so most people probably don’t do it. Playing a theremin with your nose is harmless, however. There is no penalty for eccentricity, except that if you flail around too much, you might stray out of the sensors’ range.

The loopqoob is also versatile—you don’t have to have fingers, necessarily, but they certainly help. Ditto for eyes—the markings on the loopqoob help you tell the sides apart, but do they really hint at what revealing each side does? No. Those patterns on the side probably respresent something, but the metaphors are not obvious.

And then, we observed actual, live humans using the IR-sensing thingummy on Diego’s Groovebox. Here’s Diego setting it up:

and here are various people trying to make sense of it.

Mostly, we learned that people like playing with IR sensors. But I think it’d be more interesting to be able to play one of these things with someone else—to introduce some more variety to the mix.