Elliott C. Back: Internet & Technology

Plane on a Conveyor Belt Interview Question

Posted in Airplane, Science by Elliott Back on February 9th, 2008.

I saw this physics interview question pop up on the internet, and thought it might be worth discussing:

A plane is standing on a runway that can move (some sort of band conveyer). The plane moves in one direction, while the conveyer moves in the opposite direction. This conveyer has a control system that tracks the plane speed and tunes the speed of the conveyer to be exactly the same (but in the opposite direction). Can the plane take off?

plane.jpg

There are a number of forces here that apply: gravity, the force of the engines / airspeed / lift, and the drag of the wheels against the conveyor / the speed of conveyor. However, the wheels provide essentially a frictionless boundary between plane and ground; unlike car wheels, the wheels of an airplane spin freely in place. So, as the conveyor belt speeds up, the airplane stays in place, but its wheels spin at the same velocity. Furthermore, the lift of the airplane is relative to its airspeed, and its engines push against air. So, the airplane will accelerate forward and take off as normal.

The commenter “Max” has a nice summary as well: “A comparable example in my mind would be a car on a treadmill. If the car is being pulled along by a winch and the wheels are turning freely then the car is going to be pulled at an identical rate whether or not the treadmill is there or not (assuming as you did that the treadmill’s speed is inverse to that of the car).”

Smoking

Posted in Me by Elliott Back on February 4th, 2008.

So the tenant downstairs is smoking. The smoke wafts up a ventilation duct from his bathroom and into mine. Making my room smoking. Now, I love a good smoke like the next man, but when smoke comes uninvited, I get annoyed. So I went down to ask him to stop, knocked on the door, heard the tv and him get up, come to the door, and then … nothing. I kept knocking for a while, but you can’t fight passive aggressive, so I left. My game plan is to:

  • Come back randomly until I get ahold of them
  • Rat them out to the landlady
  • Get an anti smoking injunction

Fortunately, the “no smoking” thing is in my lease, so if they don’t stop / aren’t force to stop, I can just recover my deposit and leave, since my lease has been breached.

How many users does DIGG have?

Posted in Blogging, Quantitative, Scalability, Science, Web 2.0 by Elliott Back on February 3rd, 2008.

When John Graham-Cumming asked the question How Many Users Does Digg Have?, there were a few things he couldn’t tell you, since his data consisted of randomly self-sampled users. Well, with the power of two PHP scripts, we can pull large amounts of user data and form queries. Our first question is how has DIGG grown over time?

digg-users-over-time.png
A graph of 187,054 digg users, randomly plotted against when they joined

This doesn’t tell us much, though, about how many DIGG users there actually are, or how active they are, so I plotted a histogram of the number of times these 200k users’ profiles had been viewed; the answer, unsurprisingly, is not very often in most cases:

digg-profile-views-histogram.png
83% of users had less than 50 profile views

And what about users who are active? How many people are digging stories every day? The answer is very few. I took a sample of 29,225 users from the previous sample (randomly) and used the DIGG API to query for their last digg. It turns out 31% (9125) had never dugg anything! After I removed those, here is the histogram I got:

digg-last-dugg.png
About 15% of Digg users dugg a story in the last week

Concluding thoughts

Digg boasts an official tally of 2.2M users, but at most 20% of them can be considered real, active users. That would bring their user count down to 440,000, far far less than a popular web 2.0 boom child can boast about, and significantly hurting that $300M (or ~$700 a user) valuation that they keep trying to get.

Code Appendix

The {digg user, time joined, digg id, profile page views} information was gathered by the following script:

<?php
    error_reporting
(E_ALL);
    
ini_set(‘user_agent’‘My-Application/2.5′);
    
ini_set(“include_path”“.:/usr/share/pear”);
    require_once 
‘Services/Digg.php’;
    require_once 
‘Services/Digg/Response/php.php’;

    $base ‘http://services.digg.com/users/?appkey=http://example.com&type=php’;
    
$data unserialize(file_get_contents($base.‘&count=0′));
    
    
$total $data->total;
    echo 
“There are $total total users\n”;
    echo 
“ID,Number,Name,Date,Views\n”;

    for($i 0$i 1000$i++){
        
$offset rand(0$total 100);
        
$data unserialize(@file_get_contents($base.‘&count=100&offset=’.$offset));

        $j 0;
        foreach(
$data->users as $user){
            
$page = @file_get_contents(‘http://digg.com/users/’.$user->name.‘/’);

            if(!$page)
                continue;

            preg_match(‘/id=”userid” value=”(\d+)”/i’$page$matches);
            echo 
$matches[1] . “,”;
            echo (
$offset $j++) . “,”
            echo 
$user->name “,”;
            echo 
$user->registered “,”;
            echo 
$user->profileviews .“\n”;
        }
    }
?>

« Previous PageNext Page »