Friday, August 10, 2007

Build a Quick 'Google Maps' Mashup with Google Mashup Editor

Google Mashup Editor (GME) is an online 'mashup' building tool by Google, just like Yahoo! Pipes & Microsoft Popfly, but quite different per se. Right now, it's use is only on an invitational basis so those reading this but do not have an account can register at GME's site for an invitation.

This is a quick walkthrough of my first mashup using GME - BlogUSphere Moods! GME mainly works on the premise that user has access to an RSS feed of the data he wants to do a mashup of - and it's premise is not far-fetched if you know about Yahoo! Pipes and services like dapper. Even the GME FAQ claims Pipes and GME are friends not foe. So, let's explore it, but before that I must add, GME is best suited for Google Maps Mashups [just because it makes them so ridiculously easy to build].

OK, heard of 'We Feel Fine'? These guys search the blogosphere for posts containing 'feelings' [keywords like: happy, sad, fine etc.] and index them [with hordes of information]. They have made this information available freely through an API. I decided to make a quick mashup based on it - to show recent moods of bloggers on google maps. Earlier my plan was to include blogger emotions from around the world but for some cryptic reason [& I being very impatient to sort that out] I wasn't able to obtain entries from other countries on my first try but only the US. Thus, my mashup name has - blogUSphere - in it. Actually, it was a problem with the URL but yawwwnnn...

Moving on. It's a REST API [Go here for the docs]. So obtaining results was easy, through Pipes. See my pipes code. For first time users, I can only say that explore it, it's too easy - just take a look at some Perl's RegEx tutorial. It'd come handy. Also, note how I 'renamed' the tags to title, link, description [standard RSS] & geo:lat, geo:long [needed to enable Google Maps to fetch lat-long data in GME]. Now, save your pipes app, and obtain RSS feed of it.

Open GME - goto Feed browser - select 'Remote Feed' - paste your feed URL and see the results. This was just to ensure that every tag is in place. Now, if you are not a stickler for looks 'n all then all you need to do is: open Sample projects in the editor, browse to the Maps mashup sample app and replace the feed url written in it's code [look closely, it's written somewhere] with your pipes RSS feed url. Run it in Sandbox. It'll work! [adjust pagesize]. Howzzaat?

It took me 73 minutes - and you being a smart-ass would't take more than 7+3=10 mins. Go build your own mashAPP!

P.S. You can add JS code in GME - so the first things that came into my mind was 'Adsense' ;) ...and it works in it! [For some reason [given in gme groups] it wouldn't work inside tables]
P.S. 2: Also, the RSS feed is cached in GME and the crawler goes out to 'crawl' in a 30-60 mins. interval time - so, don't panic if you don't see your feeds updating - it's a limitation with GME right now.


Post to

Monday, August 06, 2007

Next Generation iPod

The next generation Apple's iPod might resemble this. Drool!

The specs may include:
- Auto Landscape view
- No Keys or Clickwheel, Touch Sensitive
- Bluetooth


Post to

Technorati API Wiki spammed beyond recognition, help to rebuild!

The Tehcnorati API wiki has been spammed badly and I think, needs the help of the active developer community to put it back into shape.

This page [link] shows all kinds of spam keywords. The wiki says it was last editted on 3rd August. Also, the link to technorati api from programmable web [link] takes to a page spammed with this note:

"Please Spam this page
Something not useful should be here


Not a pretty sign for a popular site's wiki. Let's put it back into action.


Post to

Sunday, August 05, 2007

diggTraitor - Identify Fans NOT Digging You!

Based on the Digg API, diggTraitor is windows-based desktop tool to 'Identify the unDiggly Fans'. It's a fun tool developed by me, to just explore the digg API and look at a funny side of it. Sort out fans who do not Digg your 'most vaunted' stories! It's version is 0.5. I am planning for version 1.0 to have some 'Traitor Ping' functionality to directly let them know that the user isn't happy about not digging a 'diggable' story.

Talking more about diggTraitor [sounds like 'dictator'] - I have developed it in C# on .NET framework 2.0 so, one would need .NET framework 2.0 to run this application.

Write in for comments, bugs or help. If someone needs to take a look at the source-code, feel free to drop a comment or an e-mail [my e-mail address:]

You can download diggTraitor from: [mihd link] [rapidshare link] 24.5 KB
If you are not able to download, please inform me.
Some screenshots of diggTraitor v0.5:

Happy Digging!


Post to

Friday, August 03, 2007

.NET Library for Digg API - Making it work!

While looking for a .NET library for Digg API, I found two (the reader may suggest more, if any, in the comments). One goes by the name 'Baileysoft.Rss.DiggAPI' which has recently been added at codeproject by thund3rstruck and comes with a good tutorial and the api code - all of it to be found here. Nothing much to say about it as the tutorial is well-written and the author promises to add more functionality soon [not all Digg API calls have been implemented].

The other that I found is here which is fairly old and in all probability, it's development has been discontinued. It goes by the name 'DiggTools'. It's development was part of 'Google Code' and the web-page hasn't been updated since quite a while both at the original site and the Google page of the project. The download page [for an Aug. 9th 2006 release] says, "This version implements roughly 90% of the known API. It is considered beta quality with newer versions expected shortly."

Since it's old, 'DiggTools' doesn't use an appkey that's required now. That wouldn't have been a problem if the download had the source code, but there was only a DiggTools.dll at the download location. Since, it implements quite a few API calls, I decided to bring it into running condition again. There is an API's google group which proved to be of some help and also, thund3rstruck's DiggAPI. In addition, DiggTools library is licensed under LGPL, so I am not making available the modified code - instead, here are the instructions to make it run for those who want to use it.

  • First, we only have the dll file so, download Reflector to decompile DiggApi.dll to C# code. It does it fairly efficiently and we get all the code files.

  • Now, open DiggTools solution in VS (assuming), open StoryFactor.cs - right click on references & add System.dll in it.

  • Add, using System.Net; at the top.

  • Add "+ &" to end of following four lines:

    • string str = "" + filter + this.parseSearchOptions(theOptions);

    • string filename = "" + Convert.ToString(storyID) + "/activity?period=" + time;

    • string filename = "" + Convert.ToString(storyID);

    • string filename = "";

  • As you know you can add any unique app key. Also, one may define a global variable for the appkey to avoid this tedious task.

  • Now, find this method: GetStories(string filter, SearchOptions theOptions) and inside the body of the first try{} statement inside the method, replace everything with the following code:

HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(str);
webRequest.UserAgent = ".NET Framework digg Test Client";
webRequest.Credentials = System.Net.CredentialCache.DefaultCredentials;
webRequest.Accept = "text/xml"; HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
System.IO.Stream responseStream = webResponse.GetResponseStream();

  • Also, search for "min_date" & "max_date" and replace it with "min_submit_date" & "max_submit_date" in the same file.

  • Now, you are good to go. Build -> Goto 'bin' folder -> Fetch 'DiggTools.dll' -> Use it in your app!
Happy Coding!

P.S. Write in for comments, suggestions, brickbats!


Post to

Thursday, August 02, 2007

Suggest a site name, Win an iPod!

Ed Lau and Michael Kwan need your help in naming their new hockey blog! You might know Michael from his freelance writing and Ed from his personal blog. If you come up with the best name, you could win an 8GB iPod Nano totally free!

There is a second prize too, a blue 4GB iPod Nano whose winner will be decided on the basis of a lucky draw. Tune in.

More details are available here...


Post to

Did YOU contract HIV during your last ***? Odds are greater than YOU reading this Post!

Looking at a news article on the odds of something good, bad or surprising happening to someone, I wondered what are the odds that a particular but random blog post would be read today by you or me i.e. someone in particular.

Delving deeper into the matter, I thought I should make certain assumptions about this problem before it starts to get beyond my mathematical/analytical abilities. So, the problem ended-up being a simple one to analyze, owing to the assumptions! Although, I would love to see comments deriding my analysis. And yeah, the HIV part comes in the end ;)

First, I would need a rough estimate of 'number of blog-posts made in a day' . It turned out to be easy. I found it in Technorati's quarterly State of the Blogosphere (April'07) report. In the article's summary it says, "...1.5 million posts per day."

Now, how many posts does 'that somebody, you or me' read in a day? The report says nothing about that. 5? 10? 20? Let me assume 21 posts, with no statistical backing.

So, is it 21/1.5 million? I'd not like to make matters complex but let's add another detail. If I start reading those 21 posts of mine - what 21 posts would I read? Most probably that link to each other. I assume probability of reaching a post randomly is 0. Thus, the 'Post in Question' that is to be read may or may not lie in my linked path or may lie too far ahead in my linked path and I may not reach that in those 21 posts I read.

I have 3 situations:
1. Post can not be reached as it is not in my path
2. Post can be reached as it is in my path but would not fall in 21 posts I read today
3. Post is reached

Matters can get more complicated, by taking into account that popular blogs are more linked and hence a post in them would be easier to stumble into. But, in all fairness to my intellectual abilities (excuse 1: c'mon man there is no statistical data?, excuse 2: the odds of this post being read are too low to take the pain :D), I assume that all 3 situations have equal chance of happening.

So, the proability is 1/3 * (21/1.5 million) or, 1/(1.5 million/7) .

Thus, the odds of 'You' reading 'This' post are 1 in 214,286. This link tells me that Odds of a person contracting HIV by having unprotected sex with someone who 'may or may not' have HIV are 1 in 200,000.

You have already read this post. Is it time for you to run to your doctor? Btw, you may like to take a look at coincidences when talking of large numbers here.

P.S. Please link back to the article if you want to reproduce it on your own site.

Disclaimer. The author is not claiming anything regarding process or probability of contraction of HIV/AIDS. Thus, reader is advised to take this article as a piece of humour and not medical advice.


Post to

Wednesday, August 01, 2007

Microsoft's Signifi(g)ant Mistake in Silverlight with .NET Keynote!

While viewing the videos of Silverlight with .NET here, I came across a 'Signifi(g)ant' mistake in a slide of Jamie Cool's presentation on 'Building Silverlight Applications using .NET - a spelling mistake - Signifigant! See the screenshot.

Insignificant? Yeah, in all probability but with all kinds of new tools & technology coming out lately from M$'s stable including Silverlight, Expression Studio etc. based on their much hyped WPFE, one would expect their powerpoint's spelling checker to live upto the hype of it's fellow tools ;) Or, is it that Mr. Cool wasn't much cool about the outcome of the keynote and the new tools, and hence the mistake? Well, time will tell if it was a 'Significant' mistake!


Post to