Book-as-Blog: Encouraging Reading by Posting a Chapter at a Time

17
Dec
2008

I realized I haven’t picked up a book in weeks, (non-academic book, that is), but I’ve read more than my fair share of blogs in that same time. I wonder if part of the reason is the longer time commitment required by a book. This prevents it from being read quickly and keeps it forever on my wish list. If so, then how about a service that breaks down books into blog-post-sized chunks and publishes them every few days?

The idea is inspired by, — nay, stolen from — Kevin Kelly, who is reissuing his 10-yr old book as a blog (hat-tip to Seth Godin’s post on the topic). His reasons are different, though. The book is out-of-print, and is already available as a downloadable PDF from his web site. Making it available as a blog is just another way of spreading his ideas wider, which is a great idea.

But apart from that, I like the idea of chopping up a book into chapter-sized chunks and making them available to readers one at a time. Not for any economic reasons, but because attentional resources are so scarce these days. A few times during the day, I have some free time which I use to read a few blog posts. If I ever thought about picking up a book during these breaks, I wouldn’t do it, simply because of the (arguably artificial) time commitment issues it raises in my mind. But talk about a chapter-sized, or even smaller blog post, and I’d read it.

Of course, not all book content has an affordance for this kind of splicing and dicing. If it takes several minutes for a reader to re-establish context from the last blog post, the purpose is lost. Some authors would consider their books a work of art too precious(ssss) to split it up into anything smaller. That’s also the reason why bands are often reluctant to sell singles instead of entire albums (apart from the record labels preferring to sell you 9 lame tracks bundled with 1 great track for $10 instead of $1, thank you very much.) But several non-fiction books could verily adapt to such a format.

The book-as-blog need not be free (as in no charge.) Sure, charge me for it. Implementation would be easy, charge me a micropayment and give me a secret watermarked feed URL. With so much new content licensed under a Creative Commons attribution license, it’s also possible to develop a web service that does this for liberally-licensed and public domain works. This is compatible with Creative Commons Attribution (BY), Attribution-ShareAlike (BY-SA), Attribution-Noncommercial (BY-NC), and Attribution Non-commercial Share-Alike (BY-NC-SA) licenses (but I’m not a lawyer, this is not legal advice, blah blah.)

Maybe something like this will finally get me back to the several-books-a-month club I used to be a member of, until I discovered this newfangled shiny thing called the Internet.

Evolving Similes

Permanent Link | Filed under: Sightings
7
Dec
2008

A buggy is like a car, but drawn by a horse.

Radio is like TV, but with no picture, only sound.

A letter is like email, but written on paper and delivered in days or weeks.

The Encyclopedia Britannica is like Wikipedia, but printed in 26 volumes, and occupies half a room.

A telegram is like SMS, but you need to send it from the telegraph office.

A newspaper is like Google News, but is only updated once a day.

TV is like YouTube, but you can only watch what’s playing right now.

A Victrola is like an iPod, but with fewer songs and lower fidelity.

Software and the Democratization of Production

Permanent Link | Filed under: Thoughts
16
Nov
2008

The availability of consumer software in this century has democratized the production of … well, everything. Parts of the current creative landscape seem no different than Marxist philosophies of workers owning the means of production, with one exception: the workers aren’t doing it for money, they’re doing it for fun.

I recently watched Be Kind, Rewind, that’s what has inspired this post — at least the spark behind it. In the movie, two video store employees recreate popular movies using a video camera when the original tapes get erased by a mysterious magnetic force. Their videos were, of course, of very low production quality, but the general idea was still valid: that amateur-grade equipment is approaching professional grade equipment.

That made me realize how easy (or at least, possible) it is to create movies with affordable software on consumer hardware. When things were still in the analog domain, you would need specialized hardware to be able to shoot on film, capture audio on expensive multi-track recording equipment, and edit it all by splicing film together. Now, all you need is a digital video camera and a general-purpose high-end computer (which, incidentally, can also be used for other tasks, so is cheap.) The barrier to entry for amateur film-makers has almost been removed.

Ditto with music production — it is possible for a musician to set up a studio in his/her basement with cheap equipment that doesn’t cost an arm and a leg. The quality of recordings made with these tools is comparable to what the studios churn out.

Publishing is no longer the domain of the publishing house — Gutenberg’s printing press now inhabits every single computer that has a printer attached to it. High quality design tools and cheap reproduction has made publishers out of everyone: flyers, posters, announcements, articles, books — all of them required professional assistance in the past. Newer genres such as wiki articles, blog posts and Usenet postings have been made possible by the Internet.

An entire “prosumer” grade of still cameras has made its way into the hands of millions of photographers. Shooting digitally has minimized the variable costs associated with photography, thus unshackling the amateur from budgetary constraints that professionals never had to bother about. That brings them one step closer to competing with professionals, e.g. by selling their shots as stock photos online.

As the economy turns digital, distribution is also taken care of democratically. Earlier, it would take a promoter, someone who could invest the initial millions, to take a creation to market. Today, it’s as easy as uploading it to YouTube or selling it on iTunes or printing a book on Lulu or making a shirt at CafePress. If it’s good, it will go viral. Simple as that.

Nowhere is this change more apparent than in the recently-concluded Presidential Election in the United States. Barack Obama is spoken of by many as the first YouTube president. Indeed, the numerous amateur videos posted by his fans to YouTube and Twitter and on their blogs played a major part in spreading the word about his ideas — in a way that pre-Internet generations could never have.

If I were an anthropologist circa 3000 AD, the last three decades would show up as a significant inflection point in a graph of human achievement and creativity.

Here’s to software!

Email should have Expiration Dates

2
Nov
2008

The entire idea behind this blog post has been summed up in the title, so all I need to do now is to explain why I think email should have expiration dates, and how that would make personal information management better.

Email, as we all know, started off as a way of sending short messages to colleagues within a department. It has since evolved into a monster of a tool that does everything it was never designed to do. The paradox is that it is exactly the kinds of messages that email was designed to handle that cause me the most trouble these days.

  1. I often receive email from my friends about meeting up for lunch. This is important, but only for that particular day (and that too, if I receive it before lunch time).
  2. My research collaborators send me email when a paper submission deadline is near, with the draft attached to it. Those emails are not nearly as important after the deadline.
  3. My friends and I exchange travel plans over email, but is it as useful after the trip is done?

These are the kinds of messages I’m talking about: important but time-sensitive. Then there are others which are not really important, but simply one-time notifications that I can take action on and then forget (“bill is due in 2 days”, “X added you as a friend”, “your order was received”, “your package has shipped”, “free donuts in break room”, “we are not meeting today”, etc.)

Why do they linger on in my mailbox for years? They become indistinguishable from the really important email that I need to save for years, such as some very interesting and intelligent discussions I have had with others. Note that I’m not including spam in this discussion, because in my opinion, there are adequate spam-filtering tools circa 2008 that perform well enough for most users for the most part with an acceptable false positive rate. Not perfect, but acceptable.

The Keeping Problem

Email is no longer ephemeral — people hold on to their email for years. This is what results in the Keeping Problem in Personal Information Management: there is so much of information coming at us that we don’t want to spend the time to decide what to keep and what to trash, so we end up keeping all of it. We hope we never have to do spring cleaning, and instead rely on search to find what we want.

Filing is not the answer

Many people file and tag their email, but the question is, is the cost of doing so (time as well as attention) worth the payoff at the end? Consider the two alternatives: spending 10 minutes each day filing your email, versus spending an hour a month looking for that one email. Pretty soon, the second alternative starts looking better while swimming in a sea of email with no signs of abating.

Same needle, bigger haystack

The bigger the haystack grows, the harder it is to find the needle. The solution is to reduce the size of the haystack. Automatically. Most other solutions empower the user to filter, sort, file, tag and do other sorts of things to their email that do not scale very well. That’s where Email Expiration Dates come into play. For it to work, they need to be (1) defined and (2) honored.

Defining an Email Expiration Tag

Email expiration tags can be defined in several ways by several entities that handle the email message at some point of time in transit.

  1. By the sender of that email who cares about the recipients;
  2. By the email client (MUA) used by the sender, automatically inferring from certain common-sense words; e.g. subject contains lunch and body is less than 100 bytes;
  3. By the email server software that intelligently tags email based on common patterns seen across multiple users;
  4. By the recipient’s email client, based on heuristics;
  5. By the recipient’s email client, based on a user-defined rule set;
  6. Or explicitly by the recipient in a spring cleaning session.

Honoring an Email Expiration Tag : Fully standards-compliant

RFC 822 allows custom tags (Sec. 4.7.5). These are commonly referred to as X- headers, since the specification requires that all such tags be prefixed with “X-”. Many applications built on email make use of such tags: mailing lists use the X-List-* headers to specify the list name, subscribe URL and unsubscribe URL in a mail message. Spam filtering software such as SpamAssassin assigns a score to each email, saved as an X- header. Mail clients are free to interpret these tags as they see fit.

An expired email will not be automatically deleted if the user does not want it to be. This is important for archival purposes and to satisfy the stringent reporting requirements of the Sarbanes-Oxley Act. But now the user can make a one-button choice about whether or not expired emails be deleted, archived, moved away or kept around.

With help from legitimate bulk email senders (not spammers)

Bulk mail such as Facebook notifications could have expiration dates set to “one week after receipt”. Bill reminders could set the expiration date to be “2 days past deadline” (and then send another notification if payment is not received by then.) Donut announcements could expire at the end of the day. Talk announcements could expire at the end of the talk.

Fixing the post-vacation blues

Returning from a vacation is no longer refreshing, as we are thinking about the sheer volume of email we need to process once we get home. If I was on vacation when the donuts were on the table, I should not be bothered about it when I return. Go away! If it’s an invitation to a talk that happened while I was away, I don’t need to hear about it now.

What will it take for adoption?

Defining a standard is no use if it isn’t used. The best way for such a solution to be adopted is for a major email provider implement it themselves, perhaps in a limited beta? On the interface side, this requires two additions: one for sending, one for processing received messages. The widget at the sender’s end is simply a calendar picker, or a drop-down with relative dates (“tomorrow”, “next week”, etc.) At the receiving end, it’s a three-way radio button that lets users “Delete”, “Archive” or “Leave alone” expired messages.

Till then, it’s back to manual spring cleaning. Oh well.

Acknowledgments: I have had several stimulating discussions with my advisor, Manuel Pérez-Quiñones, and my colleague, Pardha Pyla, about our respective email filing strategies, (that mostly began as venting sessions). This idea no doubt borrows from my analysis and conclusions based on some of those conversations.

Why I love working here!

27
Aug
2008

When most professors have closed-door policies and need weeks of lead time before being able to schedule a meeting, here’s why I love working here!

Who's Online?

HOWTO Obtain metadata for a book given its ISBN using Amazon Web Services in PHP

Permanent Link | Filed under: HOWTO,Release
17
Jul
2008

This is a quick snippet I put together for an academic project. To be able to write this, I had to go through several documentation resources, for what is essentially a single web service method call. I figured it would help if I shared my PHP code.

<?php
/**
 * Query Amazon about a particular book by ISBN and obtain metadata.
 * The author disclaims all copyright and places this in the public domain.
 *
 * Amazon's Terms of Use for this service require you to:
 * - Send no more than 1 request every second
 * - Direct traffic to them in some way. You can use the URL provided in the
 *   resulting metadata to achieve this.
 */
class ISBN {
  function getMetadataFromIsbn($isbn) {
    // Get your own accesskey at http://aws.amazon.com/
    $awsAccessKeyID = 'YOUR_ACCESS_KEY_ID_HERE';
    $awsSecretKey = 'YOUR_SECRET_KEY_HERE';
    $awsAssociateTag = 'YOUR_ASSOCIATE_TAG_HERE';

    $host = 'ecs.amazonaws.com';
    $path = '/onca/xml';

    $args = array(
      'AssociateTag' => $awsAssociateTag,
      'AWSAccessKeyId' => $awsAccessKeyID,
      'IdType' => 'ISBN',
      'ItemId' => $isbn,
      'Operation' => 'ItemLookup',
      'ResponseGroup' => 'Medium',
      'SearchIndex' => 'Books',
      'Service' => 'AWSECommerceService',
      'Timestamp' => gmdate('Y-m-d\TH:i:s\Z'),
      'Version'=> '2009-01-06'
    );

    ksort($args);
    $parts = array();
    foreach(array_keys($args) as $key) {
      $parts[] = $key . "=" . $args[$key];
    }

    // Construct the string to sign
    $stringToSign = "GET\n" . $host . "\n" . $path . "\n" . implode("&", $parts);
    $stringToSign = str_replace('+', '%20', $stringToSign);
    $stringToSign = str_replace(':', '%3A', $stringToSign);
    $stringToSign = str_replace(';', urlencode(';'), $stringToSign);

    // Sign the request
    $signature = hash_hmac("sha256", $stringToSign, $awsSecretKey, TRUE);

    // Base64 encode the signature and make it URL safe
    $signature = base64_encode($signature);
    $signature = str_replace('+', '%2B', $signature);
    $signature = str_replace('=', '%3D', $signature);

    // Construct the URL
    $url = 'http://' . $host . $path . '?' . implode("&", $parts) . "&Signature=" . $signature;
    $rawData = file_get_contents($url);

    $metadata = simplexml_load_string($rawData);
    if (isset($metadata->Items->Request->Errors)) {
      return $metadata->Items->Request->Errors;
    } else {
      return $metadata->Items->Item;
    }
  }
}
?>

HOWTO Setup WebDAV on Mac OS X Leopard for syncing OmniFocus to iPhone

Permanent Link | Filed under: Apple,HOWTO
10
Jul
2008

OmniFocus and WebDAV

OmniFocus is a GTD app for Mac OS X and iPhone. Obviously, the iPhone version would be pretty much useless if the two did not sync. The good folks at Omni have made this possible, but it requires either a little money or a little time. I have more of the latter than the former, so I chose to use my own WebDAV server (which I can run for free on my desktop Mac) instead of a paid subscription to Apple’s .Mac or Mobile Me service.

Setting up WebDAV on Leopard

The good news is that all the bits and pieces of software that you need to run a WebDAV server on Mac OS X 10.5 Leopard are already installed. You only need to configure them correctly and turn them on. Some experience with Terminal is preferred, and you should be familiar with executing UNIX commands. Let’s start!

  1. Start Apache. (If you haven’t already) You will need to enable Web Sharing, since the WebDAV service will be provided by Apache, the web server on Mac OS X. You do not necessarily need to have a web site running, but you will need to activate and run Apache. Go to System Preferences > Sharing, and turn on the box labeled Web Sharing.
    Mac OS X Preferences Screenshot -- Enabling Web Sharing
  2. Enable WebDAV support in Apache. Edit the file /etc/apache2/httpd.conf, (remember to use sudo to edit it) and locate this line:
    LoadModule dav_module libexec/apache2/mod_dav.so

    Make sure it is not commented (there should be no "#" at the beginning of the line.) Then locate this line (towards the bottom of the file):

    Include /private/etc/apache2/extra/httpd-dav.conf

    Again, make sure it is not commented out. It is disabled by default, so you need to remove the "#" from this line.

  3. Configure WebDAV. Next, edit the file /etc/apache2/extra/httpd-dav.conf. Add a section in it to create our new WebDAV share. Here’s what the new section should look like. As a security precaution, you should also go ahead and delete the /usr/uploads share that is set by default.
    Alias /webdav "/Library/WebServer/WebDAV"
    
    <Directory "/Library/WebServer/WebDAV">
      Dav On
    
      Order Allow,Deny
      Allow from all
    
      AuthType Basic
      AuthName WebDAV-Realm
      AuthUserFile "/usr/webdav.passwd"
    
      <LimitExcept GET OPTIONS>
        require user YourUserName
      </LimitExcept>
    </Directory>
    

    On line 1, the name following the Alias keyword is the URL you’d like for your new WebDAV share. If you want the share to be located at http://your-server-name/your-fancy-webdav-share, then line 1 should read:

    Alias /your-fancy-webdav-share "/Library/WebServer/WebDAV"

    On line 9, we specify the authentication scheme as Basic, not Digest. The security conscious will note that this sends unencrypted passwords over plain text. In my tests, OmniFocus was not able to communicate with the server with the Digest authentication scheme. Remember not to use a particularly important password for this account.

    On line 14, substitute the username you would like to use for your WebDAV account. Note this down, because you will need this again in the next step.

  4. Create user accounts and passwords. Use the htpasswd tool to create your password file.
    sudo htpasswd -c /usr/webdav.passwd "YourUserName"
    New password:
    Re-type new password:
    Adding password for user YourUserName
  5. Create the necessary directories.
    sudo mkdir -p /Library/WebServer/WebDAV
    sudo mkdir -p /usr/var
  6. Setup permissions correctly.
    sudo chown -R www:www /Library/WebServer/WebDAV
    sudo chown -R www:www /usr/var
    sudo chgrp www /usr/webdav.passwd
  7. Restart Apache gracefully.
    sudo apachectl graceful
  8. Test your server. Optionally, you can test your WebDAV configuration using litmus, a WebDAV server test tool. It is distributed as source code with no binaries, so you will need to compile it first, for which you will need Apple’s Developer Tools. You can test your server manually by using a graphical client such as Goliath. Try uploading a file and see if you can access it again.

That’s it, you can now point OmniFocus to http://your-server-name/webdav and provide the credentials you created earlier. With this setup, you will immediately be able to access your WebDAV server over your local network. If your machine has a static public IP address, you will also be able to sync from outside your local network.

If, on the other hand, your machine is behind a router, you will need to configure port forwarding on your router. If you do not have a static IP, you will need to set a dynamic hostname via services like DynDNS.

Omnifocus Sync Settings

OmniFocus WebDAV Authentication

Possible Error Messages

This is by no means a zero error configuration, and sometimes things might go wrong. Here are some of the common error messages and how to fix the relevant errors:

  • The locks could not be queried for verification against a possible "If:" header.
    No such file or directory: Could not open property database
    The web server is not able to access the password file. In our example, you need to ensure that /usr/webdav.passwd can be read by the Apache user, www. To do that, run the following chmod command.

    sudo chgrp www /usr/webdav.passwd
  • Client used wrong authentication scheme: /webdav/
    You probably set the Authentication scheme to Digest instead of Basic. Try changing to Basic. Also note that you need to regenerate the password file using htpasswd instead of htdigest.

A hat tip to Vivek for helping test these instructions on a clean Leopard installation.

Free as in freedom, not as in beer

1
Jul
2008

I received a request today in the mail about one of my projects that is available under a free software license. It’s a web template system that I wrote to scratch a personal itch. Its hallmark feature is that it has no features, at least none that contribute to the bloat that’s rampant in Drupal and Joomla and their ilk.

His email was very well-written, asking about some of the specifics of the license, and how he could undertake projects for his clients building upon my framework. After I wrote a detailed reply to him, it seemed like a good idea to post it to my blog, for there are many who’re not particularly clear on how free software licensing works.

I want to use your templating system to build static websites for personal and commercial projects. I don’t have lots of money so I can’t promise much now but later if I will be able to make any money I will happily donate for this project.
[...]
I like open source projects because it is fun to learn how magic happens. I don’t want to use your code without permission because I just personally don’t think it is right thing to do. I have no problem giving you credit for this system but I need your permission to use it for commercial use?

Sincerely,
[redacted]

And my reply:

Hi [redacted],

I’m glad you found the site and my projects interesting and useful, and thanks so much for writing back to let me know!

I think free software is a great way to learn and understand other people’s code, that’s why almost all of my projects are open-source with the license to tinker and play. All I ask in return (via the Creative Commons license) is attribution back to me if you use it in a project. I’ve licensed this as an Attribution-ShareAlike-Noncommercial license, so you’re free to use it as you wish in any personal project as long as it is non-commercial: e.g. for an organization you belong to, or an academic department or program.

Things get a little more interesting when money enters the picture. While I’m not doing this (releasing my software) for the express purpose of making money from it, it does not seem right to me that someone else benefit financially from my work with no benefit to me. So, I politely ask that if you’re planning to use this commercially, you should contact me for a separate license (the code will then be dual-licensed, and you can pick either the paid commercial license, or the default un-paid non-commercial one.)

You don’t have to pay anything right away, and can play with the code as much as you want. But when you bag a client who wants to use a system based on my code, we can talk about royalties. That way, you retain the freedom to examine and modify my code as well as get a paying client, and I do not feel that someone has taken undue advantage of my generosity. This is how the open-source model was intended to work, and the free really refers to freedom, not free as in no-charge.

I’m glad you contacted me to check for permission first, and I got the opportunity to clarify. Often it’s quite tricky, and lots of people have lots of misunderstandings about how free software licenses work.

Regards,
Manas.

SSH Port Forwarding on Mac OS X

Permanent Link | Filed under: Apple,HOWTO
30
May
2008

After spending about an hour configuring what should, in theory, be a simple matter, I figured I’d write a blog post that might one day save another soul an hour or so from his or her life. So, for good karma, basically. In the past, I have set up port forwarding on Linux, Mac OS X and Windows, so I was a little worried that it took me about an hour trying to appease the SSH deities (and daemons).

The command itself is just a single line; the devil is in the parameters. I’m splitting the command over several lines and adding line numbers to illustrate the details and separate the parts of the long-ish command for easier explanation. Feel free to type it all on a single line (after removing the line numbers and the line-break markers ("\") of course!)

1.     ssh \
2.       -L local_port:service_host:service_port \
3.       -p ssh_server_port \
4.       -l ssh_server_username \
5.       -N \
6.       ssh_server_host

Parameters

Now for the various parameters used in the command above. Some of them may be omitted if the defaults are used, but I have included all of them in the example above to cover the most general case.

local_port

The port on your local machine that your local program expects to be able to connect to. If this is one of the reserved ports (i.e., under 1023), you will have to run your ssh tunnel command as root (using sudo). Ports above 1024 are freely available for any user to listen on.

service_host

The fully-qualified domain name or the IP address of the server that is hosting the service that you wish to connect to. For example, if this is a web site, it could be google.com or yahoo.com. It does not have to be under your control, nor does it have to be the machine that you’re SSHing into. It is just any host on the Internet that you can access from ssh_server_host. Often this is a server you are not allowed to access from your own machine, e.g. a chat server or IRC server. Or you may wish to hide the fact from the administrator of your local network that you are connecting to this server (e.g. when you’re out at a coffee shop on a sniffable insecure wireless network, or in a country with laws forbidding access to free information.)

Important: If you’re trying to access a service running on the same machine as ssh_server_host, remember to use 127.0.0.1, not localhost. What’s the difference, you say? Well, since IPv6 is here to stay, localhost can map to either 127.0.0.1 (IPv4) or ::1/128 (IPv6). If your applications aren’t all IPv6-compliant, this can cause some headache. Hopefully, we will all be on IPv6 in the near future, but till then, this is a way to make things work. If you’re trying to use IPv6, you need to use local_port/service_host/service_port (slashes instead of colons.)

service_port

The port number on which the desired service is running. Here are some common port numbers:

Service Port
Web: HTTP 80
Web over SSL: HTTPS 443
Outgoing email: SMTP 25
Incoming email: POP3 110
Incoming email: IMAP 143
VNC 5900
iTunes Music Sharing 3689

ssh_server_host

The machine that you’re SSHing into. This is the one that is running sshd, the SSH daemon.

ssh_server_port

The port number on which the SSH daemon is listening on ssh_server_host. This is most likely 22; you should only use a different value if your sysadmin has told you that the SSH server is running on another port (or if you’re a sysadmin yourself and you set up your SSH server to run on a non-standard port for security through obscurity.)

ssh_server_username

The username you would use to connect to ssh_server_host in a regular SSH session. This may or may not be the same as the username you currently use on your local machine.

The Entire Command, Line by Line

  1. Line 1 simply calls the ssh program;
  2. Line 2 sets up the port forwarding. The -L parameter specifies that this is a remote-to-local tunnel. If you wanted to create a local-to-remote tunnel, you’d have used -R instead of -L. The next three parameters are from our list above, separated by colons. (Use slashes instead of colons for IPv6.) If you want to set up multiple tunnels from the same host, simply repeat line 2 as many times as you’d like, once for each set of local_port:service_host:service_port.
  3. Line 3 selects a port on the ssh_server_host to connect to. Omit this line if you’re connecting to the default port 22.
  4. Line 4 specifies the username to use on the ssh_server_host. It is also possible to use the ssh_server_username@ssh_server_host syntax instead of the -l parameter.
  5. Line 5 indicates to ssh that no commands be run on the remote system. Since you’re using this SSH connection simply for tunneling, this is a useful option to set.
  6. Line 6 contains the most basic parameter of this entire process. Please don’t get this wrong.

Common Errors and Solutions

Problem Solution
Error message: channel 3: open failed: connect failed: Connection refused Change localhost to 127.0.0.1 in the ssh -L parameter.
Cannot listen on port X on local machine because of network policies. Try to use another port locally. Ports such as 3306 (MySQL) may have been left open. These are good to use for SSH tunneling if you aren’t already running MySQL.
Error message: Privileged ports can only be forwarded by root. Use a port above 1024, or try to set up the SSH tunnel as root.
Error message: bind: Address already in use
channel_setup_fwd_listener: cannot listen to port: xxxx
Could not request local forwarding.
Some local server process is already listening on the local port you’re trying to forward to. Pick a different local port and configure your program to connect to th at port instead. If your program cannot be configured to listen to a different port, try to find what server process is occupying that port (netstat -a on Linux or lsof -i -P on Mac OS X) and stop it. Retry setting up the tunnel.
I want other hosts on my network to be able to use the tunnel I established. (By default, only local clients can connect to SSH tunnels established this way.) Use the -g option when setting up the tunnel. Realize that this is insecure, but it may make sense in certain scenarios.
I don’t know what local port is available for me to use. Linux: netstat -a | grep LISTEN
Mac OS X: lsof -i -P | grep LISTEN
will show you the ports that are in use. Generally, you can pick any that’s not already taken. To make sure you’re not breaking some other unknown protocol, check the IANA Well-known Port Numbers list and pick one that’s not taken.

If you’ve not been able to debug this so far, try passing the -v parameter to ssh to see verbose output. Add another -v for more verbose output.

If you’re reading this, and come across any specific source of trouble, please let me know so I can add it to this mini HOWTO.

A Bad Mother’s Day for Mother Nature

Permanent Link | Filed under: Life,Thoughts
12
May
2008

Let’s see:

  1. Cyclone in Irrawaddy Delta, Myanmar

    Myanmar Cyclone
  2. Volcano in Chaiten, Chile

    Chaiten Volcano
  3. Earthquake in Sichuan, China

    Sichuan Earthquake
  4. Tornadoes in Central United States

    US Tornadoes
  5. Wildfires in Central Florida, United States

    Florida Wildfires

May the souls of all the victims of all these disasters rest in peace. May the survivors find the courage to get back to their lives, even as they grieve their loved ones.

And yes, we can help them in their efforts.

Readymade luggage kits for baggage-less air travelers

7
Apr
2008

Now there’s a business opportunity that today’s airline industry and airports have created: why not sell pre-packaged suitcases at airports to scalp travel-weary passengers whose luggage has landed in Murmansk?

Here’s how it would work: I’d walk up to the Lost and Found desk of the airline, usually fortified behind several layers of arrows pointing upward, downward, or in all other sorts of directions in which I cannot walk; barriers laid down with those flexible tapes that you can simply unhook and pass through; or behind a scruffy-looking bouncer. They would then cheerfully inform me that my luggage has, indeed, failed to follow me around in my travails around the world, and make me fill out a 3-page form describing my “small black bag” in as many words. After a state of shock, worry, desperation, and finally, anger, I would quit discussing this with the airline folks and move on, resigned to my fate.

That’s when I would notice the conveniently located “Missing Luggage Mart”. I’d turn to the enterprising store-owner and tell him/her my size, and the duration of my trip. He/she would whip out a readymade suitcase of shirts, t-shirts, trousers, undergarments, socks, shorts, a belt, a cellphone charger, a toothbrush, a toothpaste, a tiny bottle of shaving cream, a tiny bottle of shampoo, etc., and I would be on my own merry way.

And a towel, of course. Nobody should ever be without their towel.

Google all the way … in a scary way!

1
Apr
2008

Google recruiters use Google to search for recruits for Google. And how do I know? I found out because of another Google product. The irony is that I’ve been at Google, and I will be at Google, so I’m not exactly who they’re looking for. So, all this, and the search was a failure, then?

Here’s what happened: I’m in the habit of checking my web server logs every once in a while to see which pages are popular, where my users are coming from, what keywords they type into search engines to find me, and sometimes just to stalk my stalkers. ;) For this, I use two great tools, StatCounter and Google Analytics. (StatCounter is the better of the two, by the way, but they have a last-500-visitor limit, so I need to check my stats at least daily.)

Today, the following entries appeared in my logs:
(inurl:resume or intitle:resume or inurl:cv or intitle:cv) (c or c++ or java) “computer science” “software engineer” (415 or 650 or 925 or 510 or 408 or 369 or 669 or 707 or 831 or 916 or 530) -jobs -job

The IP addresses show that the request came from Google’s Mountain View headquarters. The query shows exactly who they’re looking for. Interestingly, they seem to be hiring locally (the numbers in parentheses are all telephone area prefixes in the San Francisco Bay Area.)

There’s so much Google involved in this story, it’s scary.

TGIF (apparently) Works!

27
Feb
2008

It’s no secret that Google hosts an employee-only event every Friday where we get to talk to Larry, Sergey and Eric directly (though the contents of each TGIF session are confidential.) In June, I walked up to the mic and asked them why Google wasn’t the default search engine in Opera Mini, the #1 mobile browser. It used to be #1 at that time; today, perhaps Mobile Safari has taken over that spot.

Today, I heard that this has happened. Seems like a good thing that they actually take feedback from interns seriously, and/or maybe I’m taking too much credit. :) In any case, I’m happy, because the older Opera Mini didn’t even let you customize the home screen to pick a search engine. I hope that has changed too (user choice is good.)

(Note: Both snippets mentioned here are public news; nothing confidential was released in the making of this post.)

Separating Phone Numbers from Phones

17
Jan
2008

Last night, I left my cell phone in my car. As with most of my follies, I realized it a few oh-no-seconds after I got home, but only after I’d taken off my jacket, gloves, cap, shoes and socks. It was an unnecessary walk in below-zero temperatures, but it got me thinking about phones, identities, what’s wrong about it all, and how it could be made better.

The problem is this: phones and phone numbers are tightly coupled together [1]. No wonder people keep their phones close to their heart — their personal identity is locked in it. If I don’t carry my phone, there’s no way to answer calls that I receive at that phone number. I can perhaps check voicemail from another phone, but still cannot make and receive phone calls under my own phone number.

Now compare this to email: if you go on a vacation without your own laptop computer, it is still possible to “borrow” someone’s random computer and check your messages. The messages you send will have your ID (your email address) attached to them, and the people you interact with will have no idea what machine you used (and there is no need for them to know.)

Why can’t we have a phone identity (our phone number) separate from the device (our phone) that is used to access it? If I forget my phone in the car overnight, I should be able to just add my phone identity to the home phone. That way, all calls that would have been received by my handset in the car will now be received at my home phone, and callers/callees will not know a thing. The next morning, I would re-establish my identity on my cell phone, and things will be back to usual.

I’m not a big fan of call redirects: that puts a temporary bandage on the problem instead of actually solving it. I don’t want my identity routed to another identity: I want to be able to use my own identity wherever.

This would also open up the market for multiple-identity phones. A couple can add both their identities to a single home phone in the evening, while they carry individual cell phones during the day. Forgot your cell phone at home? No problem, just borrow a loaner phone from the office receptionist and use it all day long (just as you would borrow a loaner security badge if you forgot yours). It would also make it easy for a group of people to be able to respond to a single phone call, e.g. despatch services for emergencies. A group of doctors could share a single phone number. Whoever is on emergency call duty would add the group phone number to his/her cell phone, and remove it after the duty ends.

Historically, a phone number has been tied to a phone, mostly because of technical constraints, beginning with the days of the human-operated telephone exchange. Email has shown that identities (email addresses) can be independent of devices (computers), that many identities can share a device, and many devices can be used by a single identity.

It’s an easy conceptual step forward to move to the many-to-many model instead of the current one-to-one. But there is a tremendous amount of change required of the infrastructure, and it won’t be cheap. But since I don’t happen to be in the business of implementing it (at least not yet!), so I’ll just write about this idea and hope that someone picks it up. Maybe someone will listen, and like it, and implement it.

Then I won’t have to walk out in the $#@*%$#^ snow to fetch a %$#%#$* cell phone.

[1] The more pedantic among us will point out that GSM phones keep the user’s identity on a SIM card, and CDMA phones maintain a single ID tied to the IMEI number of a phone. Although possible, that does not make swapping identities across phones easy: in the first case, you must have your current phone handy, which does not help solve my problem of having left the phone in the car overnight, and the second one requires a long phone call to the carrier to make the change. Neither is as quick or handy as the method I envision.

Bookmark and share using ...

Delicious Facebook Digg Google Friendfeed Stumbleupon Twitter Linked In