Friday, October 03, 2008

Mathematical Recreations - Tetris

So, I was doodling while watching an episode of The Wire, and I came across this curiousity. Let's look at Tetris pieces, from the popular video game Tetris. Another way to define these is the set of arrangements of four squares where you can travel from one square to any other given square by shared sides. Go ahead and try to think of any that are in that set that aren't in the above picture, except by changes in rotation.

Now, since we're doodling, lets see if you can draw all of the Tetris pieces without taking your pen off the paper, and without crossing over or drawing on top of an existing line. Try it. Well, it works for some, and it doesn't for others.


Now why?! It's a little baffling. But, like any mathematical curiousity, it is made simple by breaking things down into constituent parts. The parts of the pieces where the rules are applied directly is at the joints/crossroads, so let's try to categorize them:


[Below here there are spoilers, beware]

Going from left to right:

One: In all of the pieces, there is no joint with only one line coming in, since this wouldn't be able to make a square.

Two: There are many joints with two lines attached to them, but they have to be at corners, not like I've drawn it above. When you're drawing the continuous line, you come in one way and go out another.

Three: If there are three lines attached to a joint, it must mean that it is an endpoint. See what I mean? Since you can't come in to an intersection more than you go out, and vice versa, then that means you need to stop in the intersection. This will be made clearer when we look at four.

Four: Since there is an even number of lines, you can go in twice and go out twice.

Now, let's number the joints in our Tetris shapes:


See? Only the top two shapes (I wish I had names for them) have exactly two endpoints, the points labeled with a 3. All the other pieces have more than two, and if we're trying to draw a continuous line you can't really stop or start more than twice, can you?

Wednesday, October 01, 2008

Implicitly Explicit

For the last 15 years or so, the state of the art in Human-Computer Interaction, and Computer Science as a whole, has been riding the line between the explicit and the implicit. I am trying very hard to understand this.


When we meet a new Thing, we apply very powerful algorithms subconsciously to figure out its behaviour until, finally, it becomes part of Our Understanding. We are highly unaware of how we do this, even if we are told to think it through. The most exciting applications in this area improve the ease of adoption of a new Thing. We give up quickly on Things that fail early, so making sure the first few dates between Us and Them go smoothly is very important. Long term success, termed "expert use" is harder to describe.

How do we define something Good?
Time is an important quantity to Us. Let us use Time to as a metric to evaluate the Good-ness of a Thing.

For what Goals shall we measure the Time?
A Goal should be something easy to measure, that can be done with both the old Thing and the new Thing. Let us compare them to determine the optimal Thing.

This process frustrates Me. 

Jump back up a level.

When a Thing fails for Us a few times in a new way, our interaction paradigm switches from the Implicit to the Explicit. We construct rules and try to inference them. Sometimes this is good, and sometimes this is bad. Most of the time, Explicit reasoning should not be necessary. I am a fan of thinking that when a Thing is able to take over a part of our normal life, it frees more of us up to do more better and interesting activities. However, sometimes switching to Explicit reasoning is important. Feynman made a point, when speaking to physics students, that quantum mechanics is like nothing they have ever thought of before, not particles, not waves, not dice. It is entirely axiomatic.

Explicit understanding takes a very long time, but it helps build Implicit understanding (for some reason I am able to think of multi-dimensional vector spaces). It becomes a part of Us. 

I have started taking classes with Toronto's Impatient Theatre Company, a improvisation group focused on the Harold, a type of longform improvisation comedy. The thesis here is (using unusual words) to organically discover the Pattern of Behaviour present in the suggestion given and the improvisors on stage. Organically, Implicit, means not imposed, Explicit. Why is this only restricted to comedy? 

The best Things do not dissapear, they are consumed by Us. When we discover a Pattern of Behaviour, it quickly becomes interesting cool accepted normal required obligatory and we have moved on. Then, the Pattern of Behaviour may be extended and explored to more Patterns of Behaviour. Abusing a definition here, it is like there is a fractal structure to behaviour.

Is there a non-grey difference between "lots of Implicitness" and "Explicitness"?

How can one consciously empower oneself to use Implicit and Explicit modes? Can a Thing be designed to tell one how?

Can a Thing that

animates
draws
files
schedules
makes other programs

learn your Pattern of Behaviour and continue it for You?

Thursday, September 25, 2008

boodly boodly boodly Boodly (the sound of a power up)

So I've moved to Toronto and started my Master's in Computer Science. I'm living in a basement bachelor apartment only 15 minutes walk from school, surrounded by a variety of multi-cultural restaurants. In my building, The Bahen Centre for Information Technology, I have an office (cubicle, really) in the Dynamic Graphics Project on the fifth floor. I'm starting to scatter my workspace with post-its. Next to my monitor is a picture of the Vitruvian Man. Thanks to having to write a grant proposal, I even have a topic for my Master's research, "Developing Methods for Teaching Computer Interface Gestures by Mimicry"

Grad school looks to be busy, but awesome. I am surrounded by people almost always willing to discuss any topic in immense detail, irrelevant or not. There are a wealth of resources that I can learn from, to the point that you could spend years here without actually accomplishing anything (research). Your Research is really the main point. Everything else (courses, teaching, seminars) are really just a distraction - you're here to contribute to Knowledge. This semester, I'm taking three courses: Ubiquitous Computing, Computational Biology and Machine Learning. I initially didn't want to take Comp. Bio. because it is outside my field, but due to annoying "breadth requirements" for my degree, I have to. However the course looks fascinating.


Classes here don't carry the same format they did in undergrad. The template for every class is to take turns pre-reading some research paper, and then presenting it. By the ending of my classes, I should be an expert at:

1) Reading
2) Understanding
3) Presenting

The above list actually looks pretty important. It does leave room for computational and programming competency, but I think Machine Learning will be enough for that; I wish I had taken more statistics in my undergrad. However, having an applied math background gives me a jump ahead in some other areas.

When not at my desk, I've been out exploring places to eat and drink in Toronto (but not too much). For the first two weeks, I was able to drink a new beer I had never had before, and I was out almost every other night. When not out, I've been chilling in my bachelor pad. Having a bread machine and a BBQ and an oven (didn't have one last year) is awesome. I've also been seeing lots of improv: Impatient and PROJECTproject so far, but there's much more to come.

Monday, September 15, 2008

Crazy Dream

So I'm in Toronto now, yada yada yada all is great and shiny and mucho-fantastic. But that's another post. For now, let's discuss a dream I had last night. I'm lucky to have pretty vivid dreams regularily, but this one was too odd to let go. I tried to send it in to my twitter, which I use much more often than this blog, but I couldn't make it concise enough. Here it is, in a sort of half-grammar:


Dream: Was sentenced to hang for mistakenly kicking and killing someone in soccer. Goodbyes to family and friends; neck-strengthening exercises. Dad said I could borrow car to flee to States. Realized this was ridiculous; became lucid; woke up.

Thursday, August 28, 2008

Blood-Powered Multi-touch Sensing

My summer research at the Human Media Lab involves large investigations into multitouch sensing. For large interfaces, this involves the user touching the surface under some sort of illumination while a video camera captures the entire surface, and then filtering is applied to determine the touch points of the finger. There are often issues with large amounts of noise. The particular technique I'm working with is Frustrated Total Internal Reflection, but there are many other ways to do it; Microsoft uses Diffused Illumination as well. For these surfaces, it is also convenient if you can tell the difference between a human body part touching the sensor, or if someone put a mug down on top of it.

Someone brought a Plasma Ball in last week, and it looks like it makes a great multi-touch sensor too:


If you've ever played with a Plasma Ball, you'll know that the strings of energy (I have absolutely no idea what the proper name is) dissipate out from the central sphere evenly, until one touches the edge of the outer glass sphere with a finger or other body part. Then, the point of contact glows bright pink and a much brighter strand attaches that point and the central sphere. This effect only works with objects that are properly grounded, such as a human body, which is even better.

Finally, I was playing with our acrylic surface, and noticed another technique that could work even better, and would also only work body parts: blood! Look at the pair of images below:


The point of contact between my fingers and the plexiglass goes from healthy red to pale white as the pressure makes the blood gush away! With colour filtering, this effect would actually be incredibly easy to pick up, given ideal skin and light conditions. I was not even applying that much pressure. The rings of frosting around my fingers in the second picture are from condensation.

3 Days left in Kingston...

Tuesday, July 29, 2008

Scientific Results

An excellent quote from a paper I'm reading:

"A final thought before moving on. Science has one methodology, art and design have another. Are we surprised that art and design are remarkable for their creativity and innovation? While we pride our rigorous stance, we also bemoan the lack of design and innovation. Could there be a correlation between methodology and results?"

Greenberg, S. and Buxton, B. 2008. Usability evaluation considered harmful (some of the time). In Proceeding of the Twenty-Sixth Annual SIGCHI Conference on Human Factors in Computing Systems (Florence, Italy, April 05 - 10, 2008). CHI '08.

Wednesday, July 16, 2008

Wizard of Oz in South Park

In Human-Computer Interaction studies, we often simulate new interfaces in experimental trials before actually putting the effort into making them. Sometimes this simulation is interactive, like Human Media Lab's Display Objects, and sometimes it's a crappy non-interactive piece of styrofoam (like the first prototype for the iPod). Although the device is non-interactive, we can pretend it IS interactive, by either the user imagining that it is, or the designer standing next to the user making various noises or even grabbing the device intermittently and drawing it. When this happens, this is called a Wizard of Oz experiment, from the Wizard of Oz where a men pretends to be the powerful wizard by amplifying his voice and other effects. It has fooled everyone in The Land of Oz for a very long time, until Toto the dog (presumably not as easily fooled by the pyrotechnics) simply pulls aside a curtain.



The point is that simulation works, as long as we do not look behind the curtain. This is a very useful concept, and it is also pretty funny. This came up in a recent episode of South Park, Over-logging, where the internet goes down and panic breaks out. In one particularly hilarious scene, one of the characters, looking for online porn, finds someone that can perform a Wizard of Oz for him. However, it turns out to be disappointing.



The best part is that he automatically says click for the person drawing to hear him.

Thursday, July 03, 2008

A conversation with the Google Earth API


Dustin: Oh hey there, Google Earth, it looks like you have an API so that we can actually talk to each other.
GE: Yeah, hello! It's really useful.
Dustin: Well, we'll see about that. So, I've turned you on. Can you tell me what layers you have?
GE: Of course! I've got the Geographic Web, Roads, 3D Buildings, Street View.. [goes on a long list]
Dustin: Oh that's great. So, can you tell me what is in each layer?
GE: ...
Dustin: Hello?
GE: ...
Dustin: Oh. I see. Well if I zoom in, I can see that panoramas from Street View are now rendered as spheres floating in space where the picture was taken. That's really cool! But, I guess you can't tell me where they are. I'm looking at a few now. Which ones are they?
GE: ...
Dustin: Okay. What about this one? 482 Avenue of the Americas in NY, NY.
GE: Oh yes. I've memorized that one now.
Dustin: Okay. What do you see now?
GE: 482 Avenue of the Americas in NY, NY. That's all.
Dustin: Oh. Well, can you memorize that street view locations for 478, 486, 490 too?
GE: Yep! Done.
Dustin: Okay, what do you see?
GE: 478, 482, 486, 490 Avenue of the Americas in NY, NY.
Dustin: So you'll only tell me you see something if I specifically tell you to look for it?
GE: Yes.
Dustin: Well what about that panorama over there? 94 W 12th Street?
GE: Sorry I don't know what you're talking about.
Dustin: Really. Memorize 94 W 12th Street.
GE: Ah, yes. So now I see 478, 482, 486, 490 Avenue of the Americas and 94 W 12th Street in NY, NY.
Dustin: Okay fine, you're young so it's okay. Now, can you tell me in latitude and longitude where 482 Avenue of the Americas is?
GE: ...
Dustin: No? But its right there on the screen. I can click on it to make you fly to it!
GE: Oh, I can fly there!
Dustin: Where is 482 Avenue of the Americas?
GE: ...
Dustin: I said where is 482 Avenue of the Americas?
GE: ...
Dustin: Please fly to 482 Avenue of the Americas.
GE: Done.
Dustin: Okay, where are you now?
GE: [gives a series of latitude and longitude coordinates of where it's looking]
Dustin: I see. So, you can't tell me where 482 Avenue of the Americas is, but I can ask you to fly right to it and then you'll tell me where you are. It seems like you're trying to make my life difficult.
GE: [shrug]
Dustin: Okay, now that I'm sitting at 482 Avenue of the Americas and looking towards the horizon like I'm driving. Cool! So, let's turn to the left to look over there.
GE: [turns slightly to the left]
Dustin: Wait, hold on, I'm not in the sphere anymore. I've moved over to the right of the road somehow.
GE: Yes, I turned you around the Focus point!
Dustin: What? What is that?
GE: It's where you're looking at.
Dustin: I thought I was looking at the panorama at 482 Avenue of the Americas.
GE: Actually, that's what you told me to do, but I decided to fake it by making you look at a point 60 meters to the north at a really shallow angle. You weren't actually looking at the panorama at all.
Dustin: Can I look directly at the panorama at all?
GE: ...
Dustin: ...
GE: When I look at something, its defined by the point on the earth itself, and then the compass angle, vertical tilt, and distance I am from it. The panorama is just floating above the Earth, so you can never truly look at it.
Dustin: But there's little controls I have on you that let me move you around whatever way I want. However, when I actually want to talk to you I can only tell you to move in certain ways.
GE: Yes.
Dustin: Well okay. Let me think. I know! How about, instead of looking at a point 60 meters to the north of the panorama, I tell you to look at a point 60 meters to the northwest, and then make the compass angle so that the panorama is in the center of your view.
GE: Like this?
Dustin: Wow! It's like I rotated 45 degrees around the panorama.
GE: No it isn't. Not exactly. That's not what I did.
Dustin: Shut up, it looks like I did, and that's all that matters.
GE: Okay.
Dustin: So, in order to rotate around a panorama as if I'm viewing it, I need to exactly tell you the panorama I want (I can't ask which panoramas are available). Then, I have to tell you to fly to it. Then, I have to ask you where I am, and the answer you give back to me is some point 60 meters away from the panorama. Then, I have to do some clever trigonometry to figure out where on earth the actual panorama is. Then, in order to rotate around the panorama to look at it from different angles I have to make up different points on the Earth in latitude and longitude which are on the opposite side of the panorama I want to look at. Then I can tell you to fly to those points, which don't explicitly look at the panorama but panorama happens to exactly be in the way of the point on the ground I told you to look at.
GE: ...
Dustin: Right, you're not much help here are you?

Friday, June 13, 2008

Wierd times on the internet

Keywords: advertising, user-generated content.

So I just got an email from youtube about a music video I made a long time ago. Here it is below:

--------------------------------------------------------------------------------------------

YouTube | Broadcast Yourself™

Dear YouTube Member:

UMG has claimed some or all audio content in your video Golden Videotape (part 1). This claim was made as part of the YouTube Content Identification program.

Your video is still live because UMG has authorized the use of this content on YouTube. As long as UMG has a claim on your video, they will receive public statistics about your video, such as number of views. Viewers may also see advertising on your video's page.

Claim Details:

Copyright owner: UMG
Content claimed: Some or all of the audio content
Policy: Allow this content to remain on YouTube.

  • Place advertisements on this video's watch page.

Applies to these locations:
Everywhere

UMG claimed this content as a part of the YouTube Content Identification program. YouTube allows partners to review YouTube videos for content to which they own the rights. Partners may use our automated video / audio matching system to identify their content, or they may manually review videos.

If you believe that this claim was made in error, or that you are otherwise authorized to use the content at issue, you can dispute this claim with UMG and view other options in the Video ID Matches section of your YouTube account. Please note that YouTube does not mediate copyright disputes between YouTube owners. Learn more about video identification disputes.

Sincerely,
The YouTube Content Identification Team

--------------------------------------------------------------------------------------------

Anyway, way back in high school I made this weird impromptu video with two close friends of mine, and we happened to stick a bunch of Blink 182 tracks over it. I'm way too lazy to look up the proper legal way of ensuring fair use, but we gave credit at the end of the video (part 2). Now it seems that Universal Media Group (UMG) has discovered this. When I first saw this email I got freaked out because I thought I was getting sued, or my account was going to be banned. However, it seems that UMG just asserts the right to "advertise" and, sure enough, I've now got a little advertisement box next to my youtube video's page. This is actually really smart. I don't get sued (which is a waste of their time anyway) and they get to profit of me and my friend's remix of their owned works. I'm not sure what the long-term implications this are, but I think it's a pretty sweet deal for all concerned.

Tuesday, June 10, 2008

Meta-blogging

My friend and fellow improvisor Monica Heisey interviewed me about blogging for the Queen's Unversity Journal (student-run paper). Link!