Unveiling beauty of statistics

Google just released Statistics for a changing world: Google Public Data Explorer in Labs. Its pretty cool. Reminds me of Hans Rosling and His similar tool GapMinder (Unveiling the beauty of statistics for a fact based world view.)

I loved Google Domestic trends (Though US data only). It was quite interesting to relate them to actual data/market.  You can check out Google Data explore’s  interesting statistics here. Pretty cool and informative.  huh !

You can also have a look at  information aesthetics : (Where form follows data) (great blog if you are fan of interesting charts.) and Flowing Data. Also do share if you know any similar/interesting data/statistics visualization blog.

PS: post after long time, Actually since google reader, Buzz, twitter came into picture I can directly share stuff I like with friends there only. So quite a few things to post here.

Zune Bug explained

On new year eve, All Microsoft Zune players freezed, becoming totally unresponsive and practically useless.

“In what appears to be the biggest worldwide device failure in consumer electronics history, tens of thousands of owners of Microsoft’s Zune turned on the music player Wednesday morning only to discover it was the day the music died. By early afternoon, Microsoft released a statement saying the problem, which affected the original 30-gigabyte model of the Zune that first went on sale in September 2006, was solved. The issue: a bug in the way the gadget’s internal clock handles a leap year.”

The problem was in a small part of code in Zune’s clock driver which resulted in Zune looping forever.

Zune Failing :
http://gizmodo.com/5121311/reports-30gb-zunes-failing-everywhere-all-at-once
http://www.mercurynews.com/ci_11345379

Cause : (Zune bug explained here )
Bug in code ( Not taking leap year into account properly, seems simple ?)

Part of a function :

————————————————————–


while (days > 365)
{
    if (IsLeapYear(year))
    {
        if (days > 366)
        {
            days -= 366;
            year += 1;
        }
    }
    else
    {
        days -= 365;
        year += 1;
    }
}

————————————————————–

Bugs:

1) It should be days==366 or days>=366
2) No else condition mentioned for nested if. (Should have been there specially when if is inside a while loop )

Now Zune will keep looping forever. Zune bug explained here

Microsoft response : http://www.zune.net/en-us/support/zune30.htm
This is big reputational risk for Microsoft’s Zune, when it trying hard to stand against Apple’s Ipod.

Google treasure hunt (Second puzzle)

Its about time (936266827 seconds before Y2K38) i.e 19may2008 17:07:58 (UTC) and the second puzzle is live (Check it out). You can still try the first question here. Second puzzle from google treasure hunt is to calculate

Sum of line n for all files with path or name containing pattern and ending in particular extension. Similarly Sum of line m for all files with some pattern.
Hint: If the requested line does not exist, do not increment the sum.
Multiply all the above sums together and enter the product below.

for a given set of files contained in a zip archive. I have already submitted my answer :) , but this time I will have to wait for 24hrs to check the status of my answer :( . I thinks its a good puzzle to test your quick shell script abilities. (Can also be done easily in perl/python).

For the solution part, I wont give the actual solution (As dont want it to spoil for others who are actually trying) but you can use shell commands [grep, find ,sed and pipe (|)] to get to solution. You can get all the required numbers in 2 lines on shell.

Related Post:
Google Treasure Hunt
Orio’s Riddle Completed
Twisty Puzzles

Google treaure hunt

The Google Engineering team is launching its first ever Treasure Hunt, a contest designed to challenge your problem-solving skills.

Find more details at Google Australia blog here
They will be releasing first four puzzles in the next consecutive four weeks, one is alread released.
To get the URL of the contest you have to decode:

aHR0cDovL3RyZWFzdXJlaHVudC5hcHBzcG90LmNvbS8=

And yeah, :) I was able to that do that. I’ll tell you the answer its http://treasurehunt.appspot.com/, as its already on Google Blog
Actually its the base64 decode of the given code.

You can find the first puzzle here.

A robot is located at the top-left corner of a 34 x 49 grid.
The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid. How many possible unique paths are there?

I have solved this one. Give it a try, its not that difficult. Any way I’m there to help :)
Here is the solution to the problem :
The number of paths for n x m grid (n-1 down blocks and m-1 right blocks) is equal to number of ways of arranging n-1 D’s (Down move) and m-1 R’s (Right move). So it’s

(n-1+m-1)! / ((n-1)! * (m-1)!)

You can calculate it using calculator in Windows/Linux.
I’m waiting for the next to come.

The second puzzle will be appearing soon — to be exact, 936266827 seconds before Y2K38,

Update:

Unix internal time is commonly stored in a data structure using a long int containing the number of seconds since 1970. This time is used in all time-related processes such as scheduling, file timestamps, etc. In a 32-bit machine, this value is sufficient to store time up to 18-jan-2038. After this date, 32-bit clocks will overflow and return erroneous values such as 32-dec-1969 or 13-dec-1901. Read More about Y2K38.

According to wikipedia The latest time that can be represented in this format, following the POSIX standard, is 03:14:07 UTC on Tuesday, January 19, 2038. So when you calculate specified 936266827 seconds before that next puzzle should come around 19may2008 17:07:58 (The puzzle is alread there)(UTC) .

I have removed exact timing for you to get it on your own.(or is it still there ..haha ). And still if you need it, you can request in comments.
I calculated it using stata. You can easily calculate this in two lines in python:

>>> import time
>>> print time.ctime(2**31 – 1 – 936266827)

Related Post:
Orio’s Riddle Completed
Twisty Puzzles

Inovation in India/IITs

I read this interesting article by Bernard on State of Inovation in India. I agree with him that lot have changed (improved) but still we have yet to see Google/Microsoft from here(IITs). As he mentioned one of the main reason is playing things safe.

The fundamental issue in India is the risk/reward equation. It is simply too easy for a young developer in India to get paid a lot by an outsourcing firm; then enjoy being headhunted every year for more money.

One more issue is difference between IITs and Stanford providing inovation to world. Important difference in giving good startups is because lack of implementation of ideas here in IITs. In IITs atleast some good projects (Mtech & Btech projects) are worth transforming into good business opportunities but they die as you pass out from there or after its being graded. I will agreed with comment made by Amit that

There are many socio economic reasons why young people in India hesitate to implement an innovative idea. Current trend of high paying jobs in MNCs will make entrepreneurship ever lesser attractive… especially in software.

Career in Computer Science.

A funky futuristic video, exploring the possibilities in a career in Computer Science.


Video: Career in Computer Science – MS Research

Microsoft Research has put together a promotional video – Career in Computer Science. It features mediocre skateboarding, but a cute all-purpose personal robot.

Source :Career in computer science – javascript robots

GPRS on Mobile

Yesterday I activated GPRS on my mobile (nokia 6030) …its quite cheap( 10paise/10kb)
So I tried different pages which works for mobile

Some more websites which works on mobile can be found here : Mobile Compatibe Wesites

So I thougth i should have a mobile webpage too.. so i searched for it and found this great tutorial on w3schools: WAP/WML tutorial. It has also got a demo page which works with explorer only but it contains simple and good examples explaining basic features of wml along with preview on how it looks on mobile.

The WAP (Wireless Application Protocol) protocol is the leading standard for information services on wireless terminals like digital mobile phones. WML stands for Wireless Markup Language. It is a mark-up language inherited from HTML, but WML is based on XML, so it is much stricter than HTML.

Tutorial was pretty easy..so i create my own pae which works on mobile. You can access it at:
http://www.aburad.com/m.wml, though it contain my pic, blog address and some content only(I will add some more content). WML supports wbmp(which is black & white) image format,( you can convert image to wbmp using http://www.online-utility.org/. It als o supports jpg format. One more thing while designing your pages for mobile, you can opera to see how it looks as it supports wml files. Or check it at online wap emulator: WapTiger
Some more links : Wap Tutorials(haven’t tried yet).

Related Post :Things You Never Knew Your Cell Phone Could Do

Creative Commons, India launched on 26th Jan at IIT Bombay

The project celebrated its official launch today at the Indian Institute of Technology (IIT) in Bombay. The launch is part of Asia’s largest technology festival held in Mumbai – Techfest. Now in its tenth year, the two day festival offers a smattering of workshops, exhibitions and lectures to students to explore advances and opportunities in modern science and technology.


Speakers at the launch event:

Mr. Joichi Ito [Chairman, Creative Commons]
Dr. Catharina Maracke [Creative Commons, Global Coordinator]
Mr. Nandu Pradhan [President and Managing Director, Red Hat, India]
Mr. Shuddhabrata Sengupta [Sarai-CSDS]
Prof. Deepak Phatak [KReSIT, IIT Bombay]

Mr. Ito will speak about the importance of Creative Commons for a growing global digital culture in light of the launch of the Indian creative commons jurisdiction on January 26th. The intimate interaction between technology, law and culture in digital products is creating new challenges for enterprises, individuals and other organizations. How is the digital landscape getting altered with the emergence of licenses such as creative commons?

For more information about this project and its launch, visit CC-India’s website. To learn more about this year’s Techfest, click here.
Read More :
CC Licenses Launch Today in India
Creative Commons Launch
Creative Commons India
Creative Commons @ techfest
Joi Ito’s Web: India[Chairman, Creative Commons]

Google : The Literacy Project

A resource for teachers, literacy organisations and anyone interested in reading and education, created in collaboration with LitCam, Google, and UNESCO’s Institute for Lifelong Learning. Some of the resources available on the site include:
Books, Video, Blogs, Academic texts, Groups, Maps.
Literacy
Links : Google Blog
Google Launches Literacy Project

Living with web-based software

Lifehacker explains how new web-based aplications are becoming more part of day-to-day life..

More and more web applications offer the features and functionality of desktop software every day. Over the past several months, I’ve been moving my work to Web-based software applications as much as possible. My favorites include Google Calendar, Writely, Bloglines, Blinksale, Delicious, Ta-Da Lists and Flickr. While many users may balk at leaving their familiar world of desktop software, the benefits of secure storage, sharing files and accessibility make managing your data with hosted web apps a smart move for a lot of people.

writely.jpg

read more >>

Next Page →