Category Archives: software

Restoring Send, Menu, Home keys on your HTC mytouch android phone

I had this frustrating experience before on my android phone (HTC MyTouch 3G). This usually happens after powering on the phone after some time, it does not respond to the physical keys like "Send", "back", "home", "menu". The keyboard lock pattern is gone and you just cannot seem to lock the phone and you need to use the dialer application to make a call! The last time this happened, the factory reset fixed it. But it's a pain trying to reinstall all of your apps and settings back on the phone. So this time I was determined to fix this somehow.

I called the customer service and convinced them to ship me a new phone. Which is nice, but I will still need to reinstall all the apps again. I just searched the forums to see if there is a solution and it seems there is! Unfortunately, many people still seem to have the issue, so this hopefully helps someone.

Basically you need to fool your phone to run the setup wizard that is automatically run when you get your phone. Somehow this kicks out the bug that disables these buttons! But there is no way you can find that wizard (maybe it is possible to launch it somehow from the filesystem, but I don't know how to do that). But this is a way to do that:

  • Go to android market and search for the application Anycut and install it. (This application allows you add a shortcut to any activity on the home screen, so it is good to have it anyway.) (Or scan this QR code: Anycut Android Application
  • On the home screen, long press and add  "Shortcuts" to add to home screen. Choose Anycut from the list.
  • Choose Activity and scroll through the long list of activities.
  • Select "Setup Wizard". I had three of them in the list, third one worked for me. (Thanks Mr. Murphy). You might want to try all of them. (First one is for enabling Google Location, second for "Backing up settings to google account and third for Initial Setup)
  • It will prompt you to edit the name of the shortcut, you can just accept the default and select it from the home screen and complete through all the screens (use the same google account as you are using).
  • Your keys should now be magically working!

The problem might be happening because of some hardware issues (bad internal flash?), but its good to know that it's possible to fix it without factory reset.

Friendconnect recommendations module

I have been thinking about adding more "social" features to my song lyrics website. Have been looking at google friendconnect for some time and had added their initial friend-wall module. But that did not quite integrate well into the website.  There is an appeal to having people using whatever identity they have (google, yahoo, aol, openID), and use it to collaborate on other websites. The recommendations module works great on such listing websites. However I did not want to club all the recommendations into a single pool, instead I wanted to keep the recommendations for songs, movies and people separate from each other. The example code does not make this clear. This post just clarifies how to do that.

Step1: Go to Friendconnect and create the recommendations widget.

Step 2: In the generated code, change the view-params parameter for the google.friendconnect.container.renderOpenSocialGadget function to use a unique docId for each of your container. Use the same string in the aggregation gadget code and the recommendation button code.

You can see this in action on the pages where I have three different recommendations containers for songs, people and movies.

First impressions on Google Wave

I was really looking forward to get a chance to play with Google Wave. If you have not heard about this, Google is experimenting with a new means of communication and collaboration (to destroy any remains of your unused time!). Watch the video of the demo from Google IO conference to get a feel for the technology.

The catch line is - How would email be if it is designed today ?

Being Google, they are fairly open about the entire technology.Google Wave is a collection of several components which work in concert to bring us this amazing way to collaborate and communicate. There is the wave server (which hosts the waves. Google provides an implementation and others are free to implement it in their own control), federation protocol (which is open specifications protocol and allows the servers to talk to each other), the client (typically your web browser which you use to interact with the wave server, but there is a sample text client and emacs based client in development as well!), the gadgets (small pieces of code that are embedded in documents and provide rich look and feel and additional functionality to the wave) and the robots (robot participants in the wave which can do cool things like correct spelling as you type, syntax highlight code while it is being pasted in the wave, translate language etc.)

I have spent some time in developing a robot called Nokar (meaning assistant or servant in Marathi/Hindi) which can do several things when invited to a conversation - Insert images based on specified keywords, translate text between a set of 20 languages among some other geeky functions. The intention was to learn about the robot protocol. I also created some pages which use the embed API. This allows any web page to embed a wave conversation (or a subset of it). I am also going to experiment with the Gadgets in the next few weeks. I will try to document my process in next few posts.

Simple way to share files on intranet.

If you want to download files from machine A to machine B and have python installed on machine A, here is a very simple way to do it:

On machine A, open a command window and change directory to where the files are and run this command:

python -m SimpleHTTPServer

This command starts a web server serving files from that directory.

On machine B, just open a browser and type the ip address of machine A and port 8000 and you can see all the files. When the transfer is done, simply press control-C in the command window. A simple way to temporarily share your files across the network!

opml to csv converter

This is a first step in being able to make all  my  planets    configurable from anywhere. The following ruby script parses the opml file specified on the command line and generates a comma separated file with XML feed URL and feed title. In case of nested outline elements, it just picks the elements which actually have xmlUrl attribute (this will flatten the opml hierarchy which is used by google reader - for implementing labels and bloglines - for implementing folders)

require 'csv'
require "rexml/document"
include REXML
if ARGV.length >=1
fname = ARGV[0]
fname = "opml.xml"
doc ='csvfile.csv', 'w') do |writer|
doc.elements.each("//outline[@type='rss']") {|element|
writer < <  [element.attribute("xmlUrl").value, element.attribute("text").value]

Password protect GNU screen sessions

Or, How do i get a crypted password for .screenrc ?

Here is a quick tip, hopefully it helps someone, I struggled with this for some time...

I have been using GNU screen program since a long time. This program is like a window manager for terminals and is especially useful for ISP and home shell accounts. You can have multiple shells running under the same session and can easily detach the sessions and reattach them from a different computer later etc.

I usually password protect my sessions by using the password command (ctrl A :password). But I had a hard time figuring out how to set that password in .screenrc file. The file obviously does not store it in plaintext and uses a crypted version of password. To get the crypted password, simply set your password in the screen session (ctrl A :password and then enter the password twice), then the crypted version gets automatically saved to screen's copy buffer! All you need to do is have a line in your .screenrc which looks like this
password DTWxS2voQWkgI

After this all your new screen sessions will be automatically password protected (meaning you will need the password to reattach a session.)

Quick tip – how to extract audio from youtube videos

Here is a quick tip for extracting audio from youtube videos. I assume you have a reasonably recent linux distribution. (Things might work on other operating systems as well as all the applications that I mention below are ported to other operating systems)

Step 1: Download the flash video file from youtube. Either use greasemonkey script or a python script to extract it. (I use the python script way BTW) You can also use the online site to show you the download link.
Step 2: Use ffmpeg or mplayer to extract audio from the flv file that you just downloaded:
ffmpeg -i f7v9NhmF3SY.flv johny.mp3
mplayer -dumpaudio f7v9NhmF3SY.flv -dumpfile johny.mp3


Some excel functions

I keep forgetting some of the functions in excel and it is embarrassing to search for the same things every time.

PERMUT(n, r) = nPr = n! / (n - r)!
COMBIN(n, r) = nCr = n!/((n-r)!r!)
FACT(n) = n! = 1*2*3*...*n
BINOMDIST(s, n, p, cumul) Probability that there will be exactly s successes in n trials, each trial having a success probability of p (cumul = FALSE). If cumul is true it returns the probability that there will be at most s successes in n trials.

Dear Lazyweb

I am looking for a flash media player which can play audio/video content in browser. I am currently using's playtagger for now, but it is limited to mp3 only (I had to change the code a little bit to prevent it from adding multiple inclusions - my changed code is here) and it does not allow rewind/forward.

I also looked at this post which suggests using google video player, which would be nice as it could then also play video files, but it consumes a lot of real estate on the pages. There is also this website mentioned which is nicer but that player is bigger than I want too... And it is probably not a fair use as it is undocumented use...

I also checked out the odeo player, which is nice but you need to host the files on odeo, which is a no-no.

Here are my requirements for this with a scorecard for Playtagger and Google:

  • Easy to use. No need to add tag soup for each file. ( + Google -)
  • Small size on the page (need to collapse the buttons until user clicks on play button) ( + Google -)
  • Ability to rewind/fast forward ( - Google +)
  • Play different media formats (mp3/wav/ogg/avi/mpeg video, possibly realmedia) ( - Google +)

Any suggestions ?


Search the web for devanagari words.

I created a small form using which you can search the web for unicode devanagari words. It is very cumbersome to actually enter unicode devanagari characters using qwert keyboards, so I have adopted the phonetic transliteration scheme from Manogat website. Do give it a try: (Link now removed, please see update below)

Start typing devanagari words phonetically and you will see unicode characters in the input area. When you hit enter, the phrase will be submitted to google.

Update: (2009-07-14) I have taken down my link now, as there are many more effective alternatives to do this. Check out the following pages from google:
Google Indic Transliteration (Marathi, Hindi)
Bookmarklets to transliterate any text element on any webpage.
A simple form for transliterating any text.

More about Phishtank API

Here is what will be good-to-have from API:

  • Good documentation about each interface e.g. how is callback_url used by auth.frob.request API ?
  • Description of all possible fields in return response (all possible XML elements and their possible values)
  • Some test URL's and emails which will return known responses (i.e. phishy URL, good URL, not in the database etc.)
  • Developer mailing list/wiki
  • Response should always honor the responseformat parameter if specified and valid

Phish Tank is a new service which aims to help weed out phishing URLs and email addresses using wisdom of the crowds. Users can submit emails/URLs which they suspect of fraud and others can vote if they really are fraudulent or not. I think it is a great concept. There is a REST API using which applications can embed this webservice within them. So for example, there could be a outlook plugin which will display "phishy" email addresses in a special way in order to alert the user immediately. Same for web browsers which can render phishing websites in a special stylesheet. The applications can also add interface for the user to submit suspect pages and email easily without using web browsers.

I checked out the API and it does not feel like it is fully baked! There are interfaces for authorization and checking email/url status and submitting new emails/urls. Some things that stand out immediately are:

  • Exclusive use of SSL for the API access.
  • Parameter authentication (i.e. including cryptographic digest of all the parameters to ensure that parameters are not changed using man-in-the-middle attack)
  • Choice of xml or php output.

The api calling sequence works like this:

  1. User registers on the web for API access and gets api key and shared secret
  2. Using the API, application gets a frob (what is behind the name ?) and authorization url using auth.frob.request
  3. User has to authorize the frob using the authorization url specified in the response. (optionally you can specify callback url which the server will call for authorization, I will need to check this from home when I have access to a server -- the docs are very thin about the mechanism)
  4. Once authorized, app uses the frob and gets a token for short time API access (30 minutes in my tests) (auth.token.request)
  5. App can check token status which tells remaining time on token.(auth.token.status)
  6. App can revoke the token when it is done using it. (auth.token.revoke)
  7. The APIs for check.url,, submit.url, then use the token.

I did not understand why there is a need for FROB in this, why can't you just get the token from api key and shared secret ? What problem are they solving by this indirection ?

Anyway, here is the ruby script that I used for testing this... I am planning to turn this into a module, but providing it here for early access...

P.S. the check_url interface is not working, I am getting invalid token error. and the same token can be revoked successfully.
P.P.S. The API uses SSL (no cleartext api available) and ruby's open-uri library insists on checking the server SSL certificate which always fails (probably because signer needs to be trusted by openssl), I had to change it locally to ignore ssl verification in order to proceed.

Update (Oct/12/06): the check.url interface is finally working. For this API, the signature needs to be calculated before escaping the url. I refactored the ruby script a bit to remove redundant code and moved the configuration to a seperate file. I still need to work with the response parser and make it general for all types of responses. XML parsing gets so ugly so fast, it's amazing!

Budding Entrepreneurship

Ross Mayfield's Weblog: Budding Entrepreneurship


If you were about to graduate from college and had an interest in becoming an entrepreneur, what would you do?

That's the gist of an I received in an email from Taylor Brooks, an entrepreneurship major pondering the big questions and asking for advice. With permission, I am answering this openly and hopefully drawing in better experts than myself.

Change your major. I am kidding, but seriously, the best undergraduate studies can give you are critical thinking and communication skills. Entrepreneurship can give you exposure to concepts of risk so you might take the right ones. But surveying different disciplines from politics to art to science gives you different ways to look at the world, helps you understand different people and makes life more enjoyable. Innovations and business opportunities happen where disciplines collide.

Start a business. Lots of people will give you advice to just get out there and start doing it. The smallest of ventures will teach you big things.

Connect with the Net. Your business doesn't have to be in Tech, in fact, most things are not. But dorm room ventures that leverage the Net can produce, market and distribute with a minimal investment. You don't have to be Michael Dell to do this. Even a simple service with a web front-end can get you going. And in absence of code, elbow grease will get you a long way.

Take responsibility beyond your years. I have never had a job I have been qualified for. Strive to put yourself in difficult situations. Go work with a non-profit, where they treat and trust interns as full-time employees out of necessity.

Go abroad. Not only is the world a very big place and has much to teach us, but expatriates are given greater responsibility because who you are is of greater difference. Go teach and practice entrepreneurship in a developing country.

Experiment at the margin. This is what Al Osborne at Anderson, my professor of entrepreneurship, says entrepreneurs do. Start with what you know and can do, then extend it a little bit. Right now you at least know the market of students and their parent's money. Tweak the idea, implement, take stock and tweak again. Iterate.

Have fun with failure. Make mistakes and make them often. Make them early, because the only consequence decisions have early in life is what you learn from them. Persist.

Take time for strategy. When you are in the midst of blocking and tackling, its hard to step back and gain perspective. Understanding trends and focusing your mission can not only save you time, but even save your business.

Pay yourself. Its so easy to forget to pay yourself when you are driven by passion, but don't forget that is why you are working.

Service the desire. When I was a kid I bought a book, "how to make money with your Apple II+," written by some other kid. None of the business ideas made sense to me. Except publishing that book.

Do different. No matter what you do, do your own thing. Differentiation is perhaps the most important attribute of a successful venture. Not just for standing out in a crowded marketplace, but doing the little things inside the company in a way that is better than your competition. And if you can't invent a great positioning or process, you can always excel at personal service.

Work with good people. Life is too short for anything else, and good people do good things.

Stick to ethics. Money isn't worth getting into trouble or ill repute. And you will soon find out how small the world really is and how it iterates upon you.

Be a businessperson. In his last years, my grandfather told me: the difference between an entrepreneur and a businessman is that while an entreprenuer is in it for the fast buck, a businessman makes a lasting contribution to his community. Times and terminology have changed, but the difference between a social entrepreneur and a self-interested entrepreneur has not.

Start a weblog. Had to say it, see below, follow the links, you get the idea. Have a learning journey with other people. I would recommend a bunch of books, but get to them in context.

Now by some measures, I'm not an expert, just a guy passing on a few learnings of my own. I'm hoping that some of the Entrepreneurs and VCs in blogspace can chip in their own.

February 29, 2004 | Permalink

TrackBack URL for this entry:

Listed below are links to weblogs that reference Budding Entrepreneurship:

� Interesting tips from one entreprenuer to another from Erik Benson's Morale-O-Meter [Read More]

Tracked on March 1, 2004 12:24 AM

� Open Letter about Doing It Yourself from seanbonner
Go read this letter that Ross Mayfield just posted in response to being asked about graduating from college and becoming... [Read More]

Tracked on March 1, 2004 09:21 AM

� Open Letter about Doing It Yourself from seanbonner
Go read this letter that Ross Mayfield just posted in response to being asked about graduating from college and becoming... [Read More]

Tracked on March 1, 2004 09:23 AM

� great tips for budding entrepreneurs from anil dash's daily links [Read More]

Tracked on March 1, 2004 10:50 AM

Great advice to *all* undergraduates. It seems that there are few jobs out there (at least interesting ones) that don't require a degree of entrepreneurship, if not a degree *in* entrepreneurship. I've just printed it out and hung it on my door in the hopes that someone will read it and be inspired!

Posted by: Alex Halavais at March 1, 2004 05:45 AM

Students and new grads have a bit more flexibility on the "pay yourself" clause than 40-year-olds with kids and a mortgage. This offers the opportunity to do more with less money...

Posted by: Bill Seitz at March 1, 2004 08:59 AM

Great letter! It's funny because I dropped out of college to start my own company and when faced with the decision to either go to grad school or start her own company, my wife opted for giving it a shot rather than more schooling. Years later that was obviously the best choice, you learn things no one could ever teach you.

Posted by: sean bonner at March 1, 2004 09:23 AM

i'm nowhere near being an undergraduate anymore, but i find the advice helpful, or at least affirming.

Posted by: denise at March 1, 2004 12:22 PM