ryochiji's blog
Brought to you fresh from the depths of Ryo Chijiiwa
>Top
 About Me!
 Programming
 Writing
 Photo Album
 Photo Blog
 Schedule
 Resume
 Contact
 Links
GPG Key


 
Powered by IlohaBlog

Section: All | News & Politics | Geek Stuff | Devel | Non-existent Life | Random | Food! | Life |

Mon, August 29, 2005

PubCrawl: Arm Chair Sociology With Flickr

So Yitz and I were hanging out, trying to decide whether we should go to my apartment and code, or go to the pub. After a while, we somehow ended up wondering what day of week pubs were the busiest, and being the geeks that we are, we decided to look for an algorithmic solution. And where would you go to collect data on pub patronage by day of week? Why, Flickr, of course!

The premise of our theory was very simple. We guessed that people are bound to take pictures when they go to the pub, then upload and tag those photos on Flickr. Sure enough, there are over 14,000 images tagged "pub" on Flickr. We decided that would give us enough data points, to at least get some info.

Since we couldn't find API calls to extract the data we wanted, and we don't have API keys anyway, we decided to do it the quick and dirty way. Yitz hacked together a Perl script to extract all the photo IDs tagged "pub", then extract the date taken from the details page, and compile all the data into a single file (well, technically, we had up to 10 of these processes running in parallel). I then scratched together a PHP script to collate that data, and this is what we got:

Exhibit A: # of pictures tagged "pub," by day-of-week

Sun:1857 (13.38%)
Mon:1771 (12.76%)
Tue:1286 (9.26%)
Wed:1507 (10.85%)
Thu:1735 (12.50%)
Fri:2944 (21.21%)
Sat:2778 (20.02%)
The list shows the total number of pictures taken, by day of week, with percentages. As it turns out, Friday seems to be the busiest day at the pub. (We decided that for this experiment, we should define a day as starting and ending at 7am. It just intuitively seemed like a good time when a trip at the pub should end --more on this later).

Encouraged by these results, we decided to do the same with photos tagged "bar":

Exhibit B: # of pictures tagged "bar," by day of week

Sun: 2917 (11.14%) [896]
Mon: 2803 (10.70%) [795]
Tue: 2949 (11.26%) [780]
Wed: 2690 (10.27%) [840]
Thu: 4196 (16.02%) [941]
Fri: 5101 (19.47%) [1185]
Sat: 5540 (21.15%) [1301]

(Square brackets show number of unique users who posted images.)

Since no experiment can be considered legitimate without pretty graphs, we passed our data to GNUPlot:

Exhibit C: # of photos tagged "bar" and "pub" by hour

Here are some observations we made:

  • The "pub" and "bar" graphs are strikingly similar
  • Friday and Saturday around 11pm-midnight seem busiest
  • Everybody goes home at 7am (recall that we defined a day as starting and ending at 7am -the ticks are shown at 7am, which happen to also be the lowest points)
  • Have a case of the Mondays? Hit the pubs and bars like everybody else!
  • People don't seem to need extra booze to get over "hump days"
  • Tuesday might as well be called "Sober Day".

It was close to 2am when we got this far... but there was one more thing we wanted to know. How does all this correlate to when people are the most drunk? Well, check out what we found:

Exhibit D:Pub/bar-crawling vs drunkenness

There's a very clear phase shift... and as it turns out, drunkenness peaks at 7am, when they've all gone home from the pubs and bars!

Conclusions
It's past 3:20am, and I really should go to bed. Besides, everybody knows conclusions are complete BS anyway. So let's just skip it, and let me go to bed...

Also see: Yitz's LJ post



Tue, May 24, 2005

Stupid Riddle

At one of my interviews today, I was given a few of those notorious brain teasers. One of them, though, had a solution that is complete BS, so I'll blog about it with hopes that it'll be revised in the future...

So the problem as it was given to me goes like this:

You're at the pier where there's a destroyer, and a plane, say... an F-16, that was just offloaded. How would you find out how much this plane weighs?


One major problem with this particular version is that 1) destroyers don't carry planes, 2) F-16s are purely land-based fighters. But, I assume what they meant was that there was a carrier at the pier, and a plane (say, and F-14, which is a carrier-based fighter) was offloaded, and you're supposed to figure out how much it weighs.

The "solution" apparently is to put it back on the ship, mark the displacement, take it off, then put weights on the carrier until you reach the same displacement. The problem is, an F-14 weighs about 20 tons while an aircraft carrier has a displacement of 60,000 to 100,000 tons. There's no way you can mark the displacement accurately enough (mind you, waters are never that calm) to be able to measure changes to get even semi-reasonable results (or at least results that are more accurate than guessing). And if you're going to ask engineers such questions, you might as well make sure your solutions are realistic because that's what engineers do.

So, just in case anyone's listening, the problem should either be re-worded so the solution is feasible, or a solution that's feasible should be presented for this given problem (or just don't ask silly questions like these in the first place).



Tue, March 29, 2005

Intuitive vs Emperical

One of the classes I might take this quarter is called "Workings of the human brain", and for the first lecture, one of the past TAs for the class did a very brief lecture on the history of human perception of the brain. One thing that caught my attention is that, common beliefs on the nature of the brain was dominated for centuries by theories put forth by the likes of Aristotle and Gall. It wasn't until some 1700 years later that Da Vinci came up with the brilliant idea of actually cutting open a corpse to see what the hell was really going on in there.

Now, having been raised in the modern era of science and all, I think it's bloody obvious that if you don't know what's happening, you just find out. That is, if you don't know what's inside someone's head, the obvious way to find out is to cut it open and look inside.

Or so you'd think. But really, this emperical approach revolutionized society not because people before then were so dumb, but simply because it's an approach that actually is quite counter-intuitive. Working with beginning computer science students, I've seen something similar in the lab. A typical "tutor helps 1st year CS student" conversation goes like this:

Student: My program doesn't work
Tutor: What doesn't work?
Student: Well, my program does A, then B. Then it does stuff with A and B to produce results C.
Tutor: ...and?
Student: It doesn't produce the correct results for C.
Tutor: Does it do A and B?
Student: Well, it's supposed do...
Tutor: Well, does it?
Student: Hm... so I should check that?
From what I've seen, the problem is that students build up some intuitive model on how to solve the problem at hand, and get lost when their programs' behaviors deviate from the intuitive model. They seem to get caught up in how the program ought to work, and don't realize that the key is to see what the program is doing.

At the end, I think humans are lazy thinkers, rather than adventurous seekers of knowledge. The poster behind Fox Moulder's desk didn't say "we want to know". It said: we want to believe.



Wed, November 24, 2004

Snow!

Now this is what I call "First Snow":



Mon, August 30, 2004

Yay anvil!

I got me a proper lookin' anvil on eBay. Hopefully it'll get to my dad's before I get there (it's being shipped from Nebraska... I'm not even sure I know where Nebraska is). In any case, I think I'll be doing more blacksmithing.



Wed, August 25, 2004

LJ Meme

I posted a silly little meme on my LiveJournal.

Okay, I confess. I'm cheating on IlohaBlog and am having a casual relationship with LiveJournal. But I promise, it's just a short term fling...



Fri, July 23, 2004

POSOS

So this piece of shit OS (POSOS) they make me use at work crapped out on me. Guess what happened? Copy and paste broke. I was just trying to copy some XML from UltraEdit and paste it into a textarea in Mozilla. Simple as that.

But no... this is POSOS. It'll copy and paste within UltraEdit fine, and it'll copy and paste just fine within Mozilla. But it wouldn't fucking let me paste from UltraEdit to Mozilla. Too complicated, apparently.

I think I'm so fucking irritated because POSOS apparently hasn't figured out how to implement a 20 year old feature reliably. I mean, I'm not talking about some fancy new advanced technology here. It's copy and paste for fuck sake. It's like a car where the engineers forgot how that whole "wheel" thing worked and decided to wing it by sticking on a horse instead.

And to think most of the world uses this crap...

On the bright side, I must admit that things have progressed somewhat since the last time I had to use POSOS for a prolonged period of time. Windows XP is, I think, an improvement over Window 3.0 in that I at least don't get physically sick being exposed to it (I'm not kidding you, I used to feel nauseous when I used Windows for more than a few minutes).



Thu, July 22, 2004

O-Aide Shoes?

This was apparently sent to all O-Aides:

Dear Orientation Leaders,

Please respond to this e-mail with your shoe size. We will need this
crucial piece of info in preparation for important Orientation... stuff.
Also, make sure you include your full name in the e-mail. Thanks for your
cooperation.

No, this is not a joke.
I find it rather comical that they found it necessary to add that last line. In any case, this smells like something nefarious... like O-Aide shoes or something. Personally, I think they should give us those big fluffy slippers that look like you walked into a cotton candy machine. Yeah, you know what I'm talking about. Or maybe moccasins. Snow shoes might be useful too. Or even a new pair of Tevas... I've had this pair since '94 or '95.



Wed, July 21, 2004

Misc

Went to see I, Robot yesterday. It's definitely a fun summer movie, but not much more than that. Well, I still do have a couple of thoughts, of course. Firstly, I find it highly unlikely that people will have so much faith in robots as they do in the movie. My mom's even afraid of moving her iBook; homehow I doubt humans will ever be able to trust machines. Secondly, I found it interesting that they hadn't considered the legal status of robots, although that's probably because they became sentient rather suddenly... Thirdly, a note to massive (artifiically) intelligent glowing spheres that try to take over the world: stay away from a centralized model, use P2P or swarms (might make it a tab bit harder for Will Smith types to shut you down).

Yitz suggested that I add an RSS reader to IlohaMail. I don't really use RSS readers myself, but that's probably because I'm rather old fashioned, and seeing how it's not an established webmail feature, it might be a chance to get ahead of the curve. Only concern I have is scalability/performance. I'm guessing that fetching RSS feeds can be rather slow, so doing it in realtime is out of the question (real time as in user logs in, checks for feeds, go fetch feeds, and display). The other option is to use a background process, but then what happens if someone registers a bunch of feeds but never reads them? One possibility might be to use a delaying tactic, where requests are made to the background process when the user logs in, and hope that by the time the user finishes reading email and gets to the RSS feeds, they've already been fetched. MagPie RSS seems like a pretty good PHP-based RSS fetcher thinggy. Also, apparently RSS feed requests look like DoS attacks (via Slashdot).

I'm giving my presentation to people at work tomorrow. The PowerPoint is done, but it still needs some ironing out... and some practice. My main aim tomorrow it to see roughly how long the presentation lasts, and add/remove (likely the latter) as necessary. My main concern, though, is whether or not the material is good enough. I have this nagging fear that people are going to hear what I have to say and think I'm just an idiot. I think part of it is the fact that the optimization techniques I've come up with are rather unusual, and I'm not sure if it's because it's new and ingenious, or if it's because they're really dumb or ineffective. Well, not ineffective since it worked for IlohaMail, but perhaps impractical is more the word.



Wed, July 7, 2004

My New Idol

Meet Ghulam Sediq Wardak my new Afghan Idol.

My favorite quote from the article is:

As a youth, however, that curiosity led some to think he was either an idiot or mad. “Father and mother worried about me,” he says.
Oh the good ol' days of my youth when my parents thought I was "intellectually challenged". Their solution? Send me to art workshops on Saturdays so that I might be able to make a living when I dropped out of school. WTF? Who sends their kids to learn art as a source of income?

On the other hand, maybe they wouldn't expect me to graduate in a timely fashion from a school like the UofC if they still thought I was retarded...



Eh!

I sold my iBook today. The HD finally had gotten flakey enough that it was unusable, and since replacing the hard drive is expensive (and too much of a PITA to do it myself), I decided to sell it to someone willing to take it apart and put it back together. But hey, I got $300 so I'm not complaining...

And, I got a mini-fridge!! Yay for fridgehavingness! And being able to store food that would otherwise rot.

It was also my first day at NSIT WebServices. I showed up 10 minutes late because those buildings across the midway all loook the same, and I kept looking on the wrong block (and things aren't much better inside either). But it turned out that the computer they were going to make me use hadn't arrived until this morning, so I spent 2 hours on introduction/indoctrination and got to go home.

Random questionaire: Would you (or people you know, normal people, that is, not starving students like yourselves) be willing to pay $5/month for an email account with:

  • 1GB quota, maximum 25MB attachments
  • 5 to 10 aliases (i.e. different email ads that forward to the same account)
  • spam filtering
  • IMAP access
  • A wicked fast* and ad-free webmail interface with:
    • all the usual stuff (including multiple identities, spell check, filters, etc)
    • full featured scheduler, bookmarks, and contacts manager
    • PGP/GPG encryption and decryption
  • guaranteed low user-server ratio (say, 100 accounts per server).
(*-by wicked fast, I don't mean GMail fast, but fast as in an inbox with 300 messages will load in around 0.5 seconds on a fast internet connection)

I'm just curious. And no, nobody offers all that for free or for money. I checked.



Mon, July 5, 2004

Beef...

So, I found 40lb of beef today. Half of it is burger patties, and the other half is sausages (bratwursts, I think). I also have several dozen buns. And a bag of condiments.

I think this calls for a cookout.



Sun, June 20, 2004

Harry Potter

I saw Harry Potter and the Prisoner of Azkaban the other day, and I've decided that I didn't really like it. Or, to be more accurate, I didn't like it as much as the first two movies, and certainly not as much as the book.

Apparently some people are complaining about how much the movie left out. Personally, I think they should've cut out more, and concentrated on the whole story around Prof Lupin, Sirius Black, Peter whatever, and Harry's father, as well as Harry's confontation with the Dementors. The former because it's central to the plot of the series, and the latter because it exemplifies Harry's development and growth. The first 15 minutes or so of the movie certainly could've been cut since it wasn't tied to anything else later on. Quiddich certainly could've been cut out as well, since it was thrown in there and not tied to anything else (and no longer has the novelty effect it had before). The whole Harry vs Malfoy conflict also could've been cut out, since it wasn't as well developed as it was in the first two movies, and besides, it's kind of old news now anyway.

And even though it didn't bother me so much in the trailers, the new actor for Dumbledore simply doesn't cut it (*shakes fist at actors dying before they're done*). Oh well, I'm still looking forward to the next book, and I hope they'll redeem themselves in future movie adaptations (even though I have little faith in Hollywood's abilities to adapt 800-page books for film).



Mon, June 7, 2004

Finals!

So yeah, just a few more days of finals and stuff and the year's over. Holy shit. That's scary.

I'm supposed to be working on my warfare paper, which is to say, I've been reading about 16th-18th century Eruopean artillery and siegecraft all day. Very interesting stuff, and would be even better if I didn't have to write a 10 page paper in the next 15 hours.

For the most part, I'm looking forward to summer break, especially since I've got a couple of cool projects lined up. One of them is so cool I won't blog about it (yet), but the other one is basically my BA project. I was talking o Yitz the other day, and it occured to me that there will be a whole lot of idle processing power in the MacLab (i.e. over a dozen PowerMac G5s with 1.6GHz or dual 1.8GHz CPUs). So, what better time to generate some massive battle scenes? Also, it might help me find a BA advisor and get it approved if I already have something to show.

I'm also starting to think about my next totally awesome kick-ass movie project (and ignore the fact that a week ago I swore I'll never work on an insane movie project again). Gwen and I are tentatively thinking about making an action movie together, combining my DuckyMagic with some of her ideas (including her martial arts and dance skills). The problem is, you can't do stop motion with humans (damn animate objects!), and it's next to impossble to do digital effects that look any good when your source material is low res (i.e. DV quality = 720x480 pixels, for Ducky, we did effects at the original 1600x1200 resolution, then scaled down to DV at the end). I'm looking into shooting in 16mm, then telecine to high-res, but I'm not sure how feasible that is (most telecine shops will go to DV for an affordable price, but don't even mention the possibility of going to, say, HD).
Oh yeah, before I thought about film, I thought about creating my own high-res video camera by bundling a bunch of iSights together. The problem is, with a resolution of 1280x960 (i.e. 4 iSights), that comes out to 3.686MB/frame or 88MB/sec (=707Mbps @ 24fps), which is just below the transfer speed limit of even FireWire 800. No wonder George Lucas had to get a camera custom made to shoot Star Wars in digital (although to get quality equivalent to 35mm, apparently you need 4000 lines vertical).
On the other hand, maybe what I really need to do is figure out ways to do kick-ass stuff without special effects.



Wed, April 28, 2004

Living in the A-Level...

No, not me. Some guy at NYU started living in their A-Level and was evicted when his blog became insanely popular and the school found out about it. Good news is, he got free housing for the rest of the semester.

To recap:
1. Live in the library
2. Blog about it
3. Profit!



.:: Links ::.

ryochiji's blog
Archives
RSS 1.0
Contact