Tuesday, December 26, 2006

pegs and holes

my family bought a new cabinet and we were placing the top on the cabinet. this was proving difficult as the cabinet makers had not properly aligned the holes on the cabinet with the holes on the top. this lead me to comment that it's like fitting a "round peg in a square hole." there was some dispute concerning this comment. see the video below:

now, obviously there exists round pegs which won't fit in square holes. certainly the main complaint is that the interfaces are not commensurate, and so problems will ensue. the question then becomes which fit is worse: the round peg in the square hole, or the square peg in the round hole?

take your time and think about it.



now, you could just work it out yourself, or you could pull a naive-google, or a thoughtful-google. now, a naive-google would use the result count to determine which statement is used more often, and then say that the statement used more often is likely the better analogy (why would people, since we are such smart beings, use poor analogies? ;) ). so here are the results:

"round peg in a square hole" : 41,700
"square peg in a round hole" : 91,900

so clearly square peg wins out.

now if we do a thoughtful-google and click on some results, we find this problem solving for kids site that after some simple geometry declares:
Hence the circle covers more of the square than the square does the circle. It’s therefore better to be a round peg in a square hole than a square peg in a round hole.
thus, since we want an analogy that describes something that is very difficult to do, we must conclude that i made a weak statement, and should've said it's like fitting a square peg in a round hole.

merry christmas.

UPDATE: someone recently commented that google is dumbing us down, because instead of just working out this simple geometric problem, we just ask google and get an answer that's already written up on the web. certainly there's some merit to this complaint (in this case, though, i worked it out myself because these little problems are fun. indeed, the circle in the square uses a larger percentage of area than the square in the circle). it's very tempting to be as curious as the answers google gives you. however, i also think we can now ask much deeper questions and build on all the knowledge that's easily available.

Friday, December 22, 2006

Blog Search and LDARank

(editor's warning: this is quite a technical post. don't freak out at me -- after all, this is my life and i need to share from time to time!)

this semester i took a machine learning class. the class has a project requirement, so i decided to tackle a problem that's quite near to my heart (and likely important to many people in the blogosphere as well): how can we make blog search results better?

if you've ever used technorati, or google blog search, you'll immediately agree with me when i say that their results are complete junk. in fact, i was using these poor search engines to get the lay of the blogland regarding the recent inflammatory and bigoted comments of congressman virgil goode concerning muslim immigration. needless to say the linear results didn't give a very good lay of the land, though my digging around did.

so my project aimed at improving this, and i came up with a simple mechanism called LDARank. i've posted the full writeup here (note that it isn't very formal as the class itself wasn't very formal, but you'll get the idea). the introduction is quoted below:

In recent years, blogs have been rapidly growing in popularity. The world of blogs, called the blogosphere, has been gaining many users because of the ease of publishing and the desire of users to have their own personal stage. However, the rise of blogs and blog postings has not seen a commensurate rise in the quality of the ranking of results from blog search engines. It is still very difficult to browse through blogs with a targeted search query.

In this paper we propose a new ranking algorithm for blog posts based on topic modeling, called LDARank. In the first section we describe some of the problems with blog search. In the second and third sections we propose our solution and a technology to implement the solution, LDARank. We then examine the results of using the LDARank algorithm with various blogs and queries. Finally, we assess the practicality of using LDARank in a production setting, and examine its limitations.

my friend nikhil made the good point that i should make the mechanism available on some website, so people can give it a whir. maybe i'll do that over the next week or two, as i have some time.

Sunday, December 17, 2006

making and remixing movies

the time is now for making video footage readily available for consumption by the public, for the public creation of movies from this footage.

oohohoh. that sounds grand.


i doubt many of you have seen the yahoo research berkeley's international remix site where they made clips from various san francisco film festival movies available for remixing. users can select parts of movies, put them into a little bin for later use, and piece together parts from their bin into a full length feature. a brilliant app, perhaps a few years ahead of its time. see the demo.

now here's the idea. movies, when shot, produce massive amounts of unused film. it's edited out. hours upon hours. why not make available online all the footage, along with a script and storyboard? give the public a tool like international remix, of course with more features to manage all that data, and let them piece together a film. short films. long films. funny films. spam films. any film. give prizes for the best films. provide user forums. make sure the system surfaces the most examined portions of footage. let people recreate via cutting and pasting video, as they do today with text. let them incorporate other clips. their own clips.

i feel very inspired by this. youtube should do this with all the clips on their websie. of course, those clips aren't coherent like the all the footage for one particular movie. but this is something users would love to fiddle with, and i assure you that excellent movies (along with crappy ones!) and interesting and new ideas would emerge from such a space.

some reflection

now, don't get me wrong. i think movie directors, editors, cinematographers, the whole bunch, they do an excellent job. certainly there's need for these highly skilled people. however, just because we have journalists and writers doesn't mean the blogosphere, which is largely a reframing of various texts, cut and pasted, is worthless. it adds a new kind of worth. what bloggers work with is largely text, with some images, audio and video thrown in. i think it's time to throw in a lot more video, and changeable video. the unit is not the film, it is the frame (and even the frame could be changed, but let's start with the frame). i want the possibility of video spam, just like there are video blogs. you know when the spammers come that something worthwhile has been created.

it might be worth pointing out that i give some credence to lanier's thoughts concerning digital maoism, i just think he's a bit too reactionary. the public, typically a bunch of non-experts, can add a lot of value.

the optimist, from the new yorker

the new yorker's shouts and murmurs section (ie the funny pages of the new yorker) has a dear abby-like column in this issue. instead, it's dear optimist, and there are some extremely funny letters and responses. here's one i really liked:

Dear Optimist:

When I go to the zoo, I feel so sad. All those imprisoned animals sitting in their own feces. What do you suggest?

Animal Lover

Pasadena, Calif.

Dear Animal:

What I suggest is, stop going to the zoo! But, should you find yourself tricked into going to a zoo, think about it as follows: All those animals, coated with their own poop, pacing dry grassless trenches in their “enclosures,” have natural predators, and might very well be dead if they were still in the wild! So ask yourself: Would I rather be dead, or coated in my own poop, repetitively pacing a dry grassless trench? I certainly know what my answer would be!

Monday, December 11, 2006

eyes of honesty

in this week's new york times magazine (the ideas issue) one of the year's noted ideas is titled eyes of honesty. it's quite insightful, especially with the implications concerning how our minds function in certain situations where free-riding is easy. i post the whole article here for your reading (should i quote this much? well, it's small). my comments and idea come afterwards.

In the psychology department at Newcastle University, there is a coffee station where people can help themselves, so long as they leave money in the tray — 50 pence (about $1) for a coffee and 30 for tea. It operates on an honor system.

Alas, not everyone is honorable. “The woman running the station was a little disappointed at the level of contributions,” says Gilbert Roberts, a professor in the department. Psychologists have long been aware of this dismal aspect of human behavior: people are more honest if they know they’re being observed — so when nobody’s watching, they feel they can get away with murder, or at least with a free cup of coffee.

This problem gave Roberts and two colleagues an idea for an experiment. For 10 weeks this spring, they alternately taped two posters over the coffee station. During one week, it was a picture of flowers; during the other, it was a pair of staring eyes. Then they sat back to watch what would happen.

A remarkable pattern emerged. During the weeks when the eyes poster stared down at the coffee station, coffee and tea drinkers contributed 2.76 times as much money as in the weeks when flowers graced the wall. Apparently, the mere feeling of being watched — even by eyes that were patently not real — was enough to encourage people to behave honestly. Roberts says he was stunned: “We kind of thought there might be a subtle effect. We weren’t expecting such a large impact.”

The paper prompted a British police department in Birmingham to slap posters of eyes around the city as part of a campaign called “We’ve Got Our Eyes on Criminals.” The researchers are studying the campaign to see if the posters have an effect on things like car crime and vandalism.

i took a class this past semester where we talked about social psychological selective incentives for improving people's contributions to public goods (in the idea above, the public good is the coffee setup, which everyone agrees to help pay for via their coffee purchases). this sounds like a mouthful, but essentially you selectively encourage people to contribute more by sending appreciative notes, thank yous, etc.. only if they contribute in the first place. hence it's a selective incentive.

the eyes of honesty idea sort of turns selective incentives around -- how do we impel people to contribute because that's what they should be doing? i wonder if there's a way to use less intrusive ideas (ie, not so big-brotherish with the eyes) to make people contribute more to, say, yelp. ie "you've looked at 50 yelp reviews lately, and you haven't written one new review, or rated any of the comments. shame on you! the eyes of yelp are watching." ;)

now i wish this kind of thing worked on cats: raja tends to scratch things he shouldn't scratch when no one's around. if only some random picture would deter him.

Monday, December 04, 2006

presentations, miscommunication and bias

recently i've been giving some presentations. giving a presentation is more difficult than one first thinks: you need to gauge the audience, determine what you want them to take away, meet time constraints, and in those few moments, convey the major ideas.

now i was giving a project presentation today and must have done this somewhat poorly in what little time i had because at the end a student asked, "and what did you do?" the implication being that i essentially just presented background work, when in fact i had actually connected ideas and done much thinking. the presentation was supposed to convey that. i guess it didn't -- i think there were a few chuckles in the audience that felt to me like people agreeing that i hadn't done anything.

sigh :(

first, i need to take most of the blame. it's my job as a presenter to make things clear, and i clearly didn't gauge a somewhat sizable portion of the audience. that being said, i think the question and the laughter betrayed something about what people think are the "proper" activities of a graduate student in a computer science class.

one of the problems is that engineering folks often think that a project is about a tangible output. indeed, in this class most of the projects had neat visualizations, or programs that did something. my project could have gone in that direction, but i decided to do something quite different: read much of the background theory in my area and try to construct a framework for reasoning about the design that i initially set out to build. if i had more time, i might have built something. but to me, the more interesting thing was rigorously reasoning about why what i conceived may or may not work, prior to digging in deeply and designing and building it. that can wait, in my opinion. you can disagree with that, and think my line of reasoning is unproductive, but acknowledge that there is work in my ways!

if it isn't obvious at this point, i'll come out and say it: i felt hurt when i was asked the "and what did you do?" question. it made me feel like an outsider, and it made me feel like my work isn't valued. but then again, i guess in the same way that most engineers don't think about their bridges as cultural artifacts that engage people (and how!), many computer scientists seem focused on doing things with computers (or computing automata, you theory folks), and not so interested in what others do with the things they create, beyond that it is functional/useful, if that's their goal. the creation comes first! though i suppose my creation came first as well, it just wasn't the tangible creation venerated by many people.

Saturday, December 02, 2006

the american citizenship ceremony

my friend became an american citizen on tuesday. feeling very happy for my friend, and interested in what happens at the ceremony, i decided to go.

in san francisco, the swearing in ceremony is done at an old freemason building. as i walked in, i marveled at how the building was designed so that the light hit the masonic eye and lit it up. it was actually a bit eerie.

but as for the ceremony.. well, there were over 1300 people receiving their citizenship that day, so i was initially freaked out that they would read every single person's name. thank god they didn't. instead, they read originating country names, and people from each country stood up. can you guess what the top 4 countires were?

there were oaths and anthems and singing and dancing.. well, no dancing, but people, understandably, were quite excited. the swearing in itself was actually quite moving. it was nice to see so many family and friends in the audience (and many, many babies. the crying was non-stop!)

a few things struck me as odd, and i wanted to record them here:
- the Department of Homeland Security laptop used for the presentation was running Windows 98
- certain parts of the oath might go against people's religions beliefs, and so certain parts can be stricken from the oath you agree to (it wasn't clear to me which parts could be stricken.. maybe just the god stuff? obviously you can't strike the defending nation parts). anyway, they only read one oath for everyone to repeat, so the moderator suggested that when they got to the part that the person could not swear to, they should put down their hand and not repeat the words. i thought that was interesting
- the citizenship certificate is really quite beautiful. very well designed
- now the keynote speech. this speech was weak, in my opinion. the speaker, a judge, used a trick you learn in grade 1. namely, take a word or set of words (in this case "US citizen") and use each letter in the words to anchor your thoughts. so in this case we had:

U - united
S - strength
C - community
I - initiative
T - trust
I - integrity
Z - zeal
E - education
N - new

i think readers will agree that there are some weak spots here. for "e," i would've expected something like "equality." on the other hand, it is a broad audience with differing education levels and english literacy levels
- finally, they played the song "proud to be an american." now, this is a very patriotic song, with what i think are some odd lyrics. this line "i'm proud to be an american where at least i know i'm free" gives me a lot of trouble. why the words "at least"? i suppose it's trying to suggest that the baseline is freedom, which cannot be said for many countries. however, it also suggests that all you might get is freedom, but what good is freedom if you can't enjoy it? but that takes us into a wholly different topic, which i won't broach here.