Less Talk, More Do Christopher Finke is a software engineer at Mahalo. He is available for birthday parties and bar mitzvahs.

Strong Man of God

March 27th, 2009

I'm pleased to introduce the next-generation version of the project I announced back in August. His name is Gabriel Christopher Finke - 7 lbs, 13 oz; 22 inches long; born at 1:06 AM on Friday, March 27, 2009. He has his mother's eyes and his father's sense of irony.

Brand New Gabriel

Gabriel After Birth

Gabriel opening his eyes

Gabriel's First Bath

Gabriel's Tongue

TwitterBar updated with OAuth, shorter URLs

March 23rd, 2009

Everyone's favorite tool for posting to Twitter from your Firefox address bar (TwitterBar) has been updated to version 2.0. Changes in this version include:

  • URL shortening
    • Long URLs are now shortened by http://is.gd/ before being sent to Twitter. is.gd offers the shortest URLs around, so you have more room in your tweet for your words. (TwitterBar's character counter takes into account the fact that all of your URLs will only be 18 characters long when they're posted, so you always know exactly how much room you have left to tweet.)
  • Support for OAuth.
    • OAuth is basically a way to allow applications (like TwitterBar) to act on your behalf (update your status) without having to disclose your Twitter password to the application. So it’s safer for you, since you don’t have to worry about malicious programmers stealing your usernames and passwords, since you never gave them out. After you upgrade to this version of TwitterBar, you’ll have to authorize it once, but then you’ll never have to do it again.
  • Bug fixes and code cleanup
    • These are good!

You can download TwitterBar from Mozilla Add-ons (for free!), or you can wait for Firefox to automatically notify you of the update. (By the way, if you want to connect with me on Twitter, I'm @cfinke.)

Retweeting in Python

March 19th, 2009

My friend Eliot has been running a retweet bot named @SanMo for some time that is designed to serve Twitter users in the Santa Monica, California area by allowing them to broadcast tweets to other Santa Monica-area users without explicitly friending them. He wrote up the full details of the service and the script behind it on his blog, and after reading about it, I wanted to start a similar service for Twitterers in my immediate vicinity.

After grabbing a copy of the code running @SanMo, (it's the same Perl script created to power @lotd, available here), I quickly decided that I would rather write my own, for three reasons:

  • Strike 1: It was written in Perl.
  • Strike 2: It didn't implement a feature that links the retweet to the original tweet.
  • Strike 3: It required MySQL - a bit much for simple bot.
  • Bonus Strike 4: It was written in Perl.

I sought out to write a lightweight script that would accomplish the same end goal (republishing tweets directed at a given account), and I'm happy to say that it's finished: retweet.py has been running smoothly for the past few weeks behind the Twitter account SWMetro, a service for Twitter users in the southwest metro area of the Twin Cities.

It's 40 lines of Python (if you omit blank lines and comments), and you can grab a copy of it from here. It uses SQLite for storage (which you should already have installed if you have Python installed), and it utilizes the great python-twitter library from Dewitt Clinton of Google. (Make sure you get the latest version for trunk; you'll need simplejson as well, as python-twitter requires it.)

Just download the script and replace "username" and "password" at the top with your account credentials. (You can manage multiple accounts by adding another username/password pair to the ACCOUNTS variable.) Change the DB_PATH variable to point to the directory where you'll keep your SQLite databases, and then add this to your crontab:

*/2 * * * * python /full/path/to/retweet.py

The script will run every other minute, republishing any tweets that start with "@username", where "username" is the value you gave the USER variable. The only thing it stores in the SQLite database are the status id's of the tweets it republishes, and it links each retweet to the original message being republished. If the new message is longer than 140 characters, it chops words off of the end, replacing them with "..." until it's under the 140 character limit.

If you're using this script to replace an existing retweet bot, you can supply it with the status id of the last message it re-published so that you don't end up republishing a bunch of old tweets. To do that, just run it once like this:

$ python retweet.py 12345

where 12345 is the status id of the last message your existing bot published.

Feel free to download retweet.py and use it for your own purposes. All I ask is that if you make an improvement (or start up a new service with it), take a minute and mention it in the comments below.

Update: Some people have had to use the full path to Python (version 2.5 or greater) in their crontab to get retweet.py working properly.

Update: Retweet.py has been updated to ensure it keeps working as intended after Twitter started categorizing all tweets that contain a username as replies, not just ones that start with the username. Grab the updated version here.

TubeStop for Google Chrome

March 18th, 2009

When Google released a document today showing the design process for Google Chrome extensions, I thought it would be fitting to have one of the first third-party extensions for Chrome address a major shortcoming of one of Google's other products. With that thought, I give you:

TubeStop for Google Chrome

What is TubeStop? It's an add-on that stops YouTube videos from autoplaying, whether you're on YouTube.com or anywhere else on the Web. It was originally written as a Firefox add-on.

(In order to try it out, you need to be running the developer version of Chrome, and you may need to invoke it with the "--enable-extensions" flag.)

To install TubeStop, just download the tubestop.crx file linked above and drag it into Chrome. After Chrome finishes animating a download icon, TubeStop is installed. You don't even need to restart the browser; you are now free to browse the Web without the imminent threat of YouTube autoplay.


For more information on Google Chrome, check out Mahalo's Google Chrome topic page, embedded below:

New Web Host

March 15th, 2009

If you're reading this, then this site is up and running on a new host (WebFaction - no complaints yet). I think I got everything migrated over properly, but if you happen to notice anything broken or buggy, please let me know.

Feed Sidebar 3.2 Beta Update

March 14th, 2009

I've published an update to the beta of Feed Sidebar that I talked about here: Sort Your Feeds in Feed Sidebar. In this version (3.2pre2), I've made the following changes:

  • Enhanced the sorting mechanisms so that updates occur more seamlessly.
  • Added some accessibility fixes, courtesy of Marco Zehe.
  • Fixed some security holes related to JavaScript injection in the preview window
  • Added a little delay to Feed Sidebar's first feed update each browsing session to allow Firefox to start up a little more quickly.

I'd appreciate any and all feedback (send to cfinke@gmail.com) so that when I release this to the general Feed Sidebar public, I'm not inundated with e-mails saying "Why didn't you do it this way?" You can install the new version here.

Want to make some money?

March 12th, 2009

Can you write Facebook or iPhone Apps? Do you like money? If so, have I got a deal for you:

We're looking for some help building out our iPhone and Facebook applications for Mahalo Answers. If you know of any great developers who have done a really solid application for either platform (or who are looking to make a name for themselves doing one), please have them email me at jason@mahalo.com and cc mark@mahalo.com. -- Jason Calacanis, CEO Mahalo.com

Tell them Finke sent you; readers of this blog are known 'round the world to be persons of solid character and intellectual fortitude, so you should definitely identify yourself as such.

I invented Facebook

March 3rd, 2009

Ok, well not really. But I like to think that I *could* have.

The summer after my senior year of high school (that's 2002), I came up with an idea for a website while delivering pizzas, and I had this exact conversation with my then-girlfriend (now my wife):

Me: "Wouldn't it be cool if there was a website where you could connect with people from high school, and see what they're up to, since you won't be seeing them in person much anymore?"
Her: "That sounds kind of dumb."
Me: "But then later on, when we all have jobs, we would have this ready-made network of people we know who are in all different fields. Think of the potential!" (Obviously, I invented LinkedIn as well.)
Her: "Sure, whatever."

Well, maybe she didn't respond exactly like that, but she definitely wasn't as excited as I was about the concept of creating this social site where you could network with people from your school. I thought it was a neat idea though, so I started working on it.

About four months later, I had finished the first version of the site:

  • It had profiles that you could fill out.
  • You could upload a profile picture.
  • You could comment on other people's profiles.
  • It automatically showed you people from your class that had signed up already.
  • It even had a feature called the "Rumor Mill," where you could post information about classmates who hadn't yet signed up. (In retrospect, this feature was poorly named and probably encouraged libel. Live and learn.)
  • It had search functions: by name, year, city, state, etc.

(Are you seeing the similarities here to a much larger site that would be launched a few years later?)

Now I just needed users. I sent out mass IMs and e-mails to people from my class and the classes a few years ahead of and behind me announcing the site, and then I waited for the inevitable flood of users and praise. However, given my grassroots approach, usage was predictably low. Maybe a hundred people signed up before I abandoned it for more worthwhile pursuits. I had to personally e-mail my parents a second time to prod them to sign up. My idea was obviously just ahead of its time.

Looking back upon this project, I realize that I made two crucial mistakes: the site was specific to my high school, and all of the names of the alumni who could possibly sign up were hard-coded in the database. (I was able to convince the school secretary to send me a spreadsheet of all current and former students.)

If you didn't catch the implication there, here it is: I limited adoption of my site right off the bat to a single school, and I went through the trouble of manually creating user accounts for every possible user - a waste of time for a project with limited appeal. (Additionally, it prevented any students who attended the school after 2002 from signing up.)

The site is long gone now (except for a poorly styled copy of the front page courtesy of the Internet Archive), and the code that powered it has since been lost. But I learned a valuable lesson from the experience:

Think big.

When you're starting a project, don't just plan on your friends using it, plan on EVERY SINGLE PERSON IN THE WORLD wanting to try it out. If I had only planned for wider adoption, I could have created a Facebook-esque site 2 years before Zuckerberg got the idea from ConnectU. (Theoretically, of course. I'm not claiming that I was the first to write a social networking sites for classmates, but obviously, there was space in that niche for another competitor.)