Saturday, December 29, 2007

Google maps

Google maps has 2 very nice features for people [say foreigners ] who don't like to drive much:

1. Take public transit
2. avoid highways

It is very nice! And in a way it shows they are caring for environment! I really applaud them for these features.

Thursday, December 27, 2007

Google analytics!


It is very nice! It gives all the statistics about a website!
And it is very simple - just go and signup and add a bit of javascript to your site and you are done!

Soap vs REST

Nice comparison of REST vs SOAP for Web services:
http://www.iks.inf.ethz.ch/education/ss07/ws_soa/slides/SOAPvsREST_ETH.pdf

My take is REST is really simple and nice to build query dominating type of webservices like google or amazon. [More like automating opening an URI in a browser]

But for real enterprise type business processes SOAP is the way to go although it takes more time to build on it. It is too much of complexity for simple services.

Saturday, December 22, 2007

straight line!

Ever wondered what is a straight line?

[try to define it without the notion of a distance! - what mathematicians call topological space - not necessarily metric space]

Here is a definition:
straight line is a line which lies evenly with the points on itself.

plucking your hair trying to parse the sentence?
BTW, it is by none other than great Euclid!

Newton's sin list!!


What a great man! He is to me the greatest of all men ever lived!
Humanity would have lost the most, if he was not born among anyone ever lived!

Nice to learn he is so innocent!

[I know, I know, he was not at all friendly type - too serious for fun!]

He is after all a man and why can't he have his own set of flaws and "sins"


Some "sins":
1. Punching my sister
2. Peevishness with my mother.
3. With my sister.
4. Fearing man above Thee!

If only every one were sinful like this!
I love this man!

length and time are discrete (granular)?

I think space and time [which is one and the same thing because you can convert one to another by just going fast! and light speed connnects the length and time - in fact that's how unit of length is defined nowadays] ultimately has to be discrete.

Think about this:
How do we measure time?
By some periodic process like sunrise or motion of pendulam or nowadays oscillations of quartz crystals etc.
Notice that we are gradually improving the smallest unit ["quantum"] of time we can measure.

In fact time is nowadays defined as:

The second is the duration of 9 192 631 770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the cesium 133 atom.

So currently it is smallest unit of time we can measure roughly 10^-10 of a second.
Breathtaking by human standards but think about it:
it is only mere 10 positions after decimal point. To goto continous time we need millions and millons of digits!

But any physical periodic process will have an ultimate period. Pick the smallest of such a process. That has to be the smallest unit of time with any meaning. what does it mean to say 1/2 of that time? 1/10 of it? how do you measure, "feel" it? what about √2 part of it?
To me period of that process is the ultimate quantum of time.

In fact in my view, real numbers themselves are huge mathematical abstraction living in plato's world. It is no better [in fact worse] than complex numbers!

Now since time is discrete, space has to be too.

Thursday, December 20, 2007

IE7 search providers

IE 7 has the nice feature to add different search providers in its search bar.

For example to add google maps search:
1)search for something in Google say 'furniture'
2) and get the link for search all results like the one below:
http://maps.google.com/maps?f=l&hl=en&geocode=&time=&date=&ttype=&q=furniture&near=1111+NE+140th+St,+Redmond,+WA+98052&sll=47.646074,-122.129383&sspn=0.012403,0.033624&ie=UTF8&filter=0&oi=lwp_thresh&sa=X

3) and goto find more providers and in "create your own" box add the link by replacing 'furniture' with TEST and give the name "google maps"

Now you can directly search from IE7 into google maps.
Nice!

Saturday, December 8, 2007

Good introduction to Topology!


Very nicely written.

I enjoyed reading ephsilon -delta notation after long time!

Dr David Wilkins is really doing a service by putting it on the web!

Tuesday, December 4, 2007

Auto hotkey!

I found this very useful.
I was looking for a software which would allow me to map increase/decrease volume to some keyboard keys. This does the job very nicely!
[I have mapped +/- volume to win + up/down arrow keys!]

This has a very simple and intuitive scripting language and auto record function!

http://www.autohotkey.com/download/

Sunday, December 2, 2007

Nice multilingual dictionary

Here is a nice dictionary:
http://www.websters-online-dictionary.org/

You can type words in any language in English. It gives the meaning of these words [in English.]

Saturday, November 24, 2007

Remote desktop and domain change

If you recently changed the domain of your machine,
RDP to the machine might stop working if you don't give fully qualified name [mymachine.mydomain.com].

I wasted sometime today trying to figure out why it is not working.

Berkeley webcasts

There are nice video lectures on UCB site.

For example here is the Biology one:

http://webcast.berkeley.edu/course_details.php?seriesid=1906978456

I really enjoyed lectures on Photosynthesis - I have a renewed respect for Photosynthesis now!

Friday, November 23, 2007

Darfur

Today there was a program about Darfur and china's selfish behaviour on PBS. It was very sad to see Darfur people in totally helpless situation.

http://www.pbs.org/wgbh/pages/frontline/darfur/

We blame US all the time for behaving selfishly in Iraq. What about China's continued support of Sudan's genocidal regime?
[I am not saying that justifies US - just that China is behaving in very similar ways for oil]

Of course, no prizes for guessing who is the joker in every drama - UN

Sunday, November 18, 2007

what's wrong with absolute time?

Ever wondered about this? It is [relatively] easy to see there is no absolute space [and easy to digest]!
What's wrong with assuming an absolute time ticking away in the background? Read this:

http://www.phy.syr.edu/courses/modules/LIGHTCONE/minkowski.html

In one line - Concept of simultaneouty is not absolute!

Wednesday, November 14, 2007

മിധുനം

മിധുനം - നല്ല മലയാള സിനിമകളില് ഒണ്ണാന്

Sunday, November 11, 2007

Why IQ tests are not predicter of success!

Feynman had an IQ of 123 and the guy with highest IQ is virtually unknown.

While I think IQ is broadly indicative, as an absolute number it is useless.

Someone with an IQ of around 70 is certainly deficient and people with above average IQ are in general intelligent etc.

Use of IQ as indicator of success in inverse way by people especially concering africans [and african americans] is completely racist and baseless.

Saturday, November 10, 2007

Richard feynman lectures on QED

Very nice lecutures on Quantum electro dynamics given in his unique [funny] style.
Explains normal phenomena such as reflection or refraction and feynman diagrams very intuitively.
http://vega.org.uk/video/subseries/8

Wednesday, November 7, 2007

Robo cars with speeds of 15 miles an hour!

http://www.pcworld.com/article/id,139277-c,artificialintelligence/article.html

Carnegie Mellon's Robocar Wins DARPA Challenge
A robot racing team from Carnegie Mellon University beat out Stanford University to win DARPA's Urban Challenge, a 60-mile race involving self-guided vehicles.

Tuesday, November 6, 2007

Daylight saving time!

As if we didn't have enough of complexity in telling time already!

Look at this:

1 year - 365 or 366 days!
1 day - 24 hours
1 hour - 60 minute
1 minute - 60 seconds
1 second - 1000 milli seconds

No doubt all the children go nuts, when taught this! what is the relation between 365, 366, 24,60,60,10.

In US, also dates are in Month/day/year order! what kind of arrangement is this? To me day -> month-> year is logical.

Now to add more fun we have daylight saving time!
I hope now they don't decrease time between 12 to 1 from 60 to 30 minutes [lunch time] to boost economy!

Tuesday, October 30, 2007

Man with highest IQ?

Supposedly
http://en.wikipedia.org/wiki/William_James_Sidis

don't know what to make of these guys [or girls]!!

Tuesday, October 23, 2007

Saturday, October 20, 2007

Hats off to Jews!

As a group they should have been the most persecuted in recent times. It is the resilience of humanity they survived to tell their story to grand children.

Nazi Genocide Timeline

Genocides of Rwanda, Bosnia or Gujarat riots pale in comparison [That is not to say they were not significant].

Wednesday, October 17, 2007

Sunday, October 7, 2007

Uploading photos to web!

If you are searching a place for uploading photos to web,

http://picasaweb.google.com/

Is a nice one! Allows 1 GB free.

Also associated Picasa software is nice too. Makes uploading a breeze!

BTW, Vista has very nice image importing and organizing built in - Liked it!

Friday, September 28, 2007

Nice puzzle from an Olympiad!

if a,b are integers,

q = (a^2+b^2) / (ab+1)

prove if q is an integer, q is perfect square.

Has a beautiful solution!

Tuesday, September 25, 2007

BBC Documentary archive

BBC has an archive of all the nice documentaries broadcast in BBC world service.
There are some very good ones:
http://news.bbc.co.uk/2/hi/programmes/documentary_archive/

Tuesday, August 21, 2007

LDAP and AD

The worst system I have worked on!

If you get an error no way to find out what is the problem. Try doing random things till something works out.
You get beautiful errors like "unspecified error", "server is unwilling to process the request".

This should be taught to all computer engg. students to teach them how not to design a system.

This system was designed and implemented by brainless morons who decided that we kings will only implement features, error handling is for normal programmers.

Friday, August 17, 2007

C# lambda expressions

It is a welcome new addition!
Mainstream languages are asymptotically approaching functional languages?
But I didn't like that I can't apply it directly without assigning to a delegate:
That is I can't do

(i => i * i)(12)

Wednesday, August 15, 2007

Arcane C++ and ->


Think about this - how arcane C++ looks [may be because of its C roots].

The most common operation in C++ is accessing a field through a pointer. And for that you have to type 2 characters - and >.

Such a huge waste of time for so many people who coded in C++. It may not look much, but consider over the life so many programmers.

Atleast many programmers would have saved an year of their life!

Mr.Bean!

One of my favourites!

Mr.Bean in swimming pool!

http://video.google.com/videoplay?docid=7748204207352485720&q=mr.+bean+swimming+pool&total=66&start=0&num=10&so=0&type=search&plindex=0

Monday, August 6, 2007

Cost of constant speed of light

Cost of constant speed of light [irrespective of speed of the person measuring] is there is no absolute time! Isn't it amazing.

Time is very specific to each observer having a specific velocity. This arises only because of constant speed of light.

absolute space by the way, is just meaningless concept when we think about it, though it looks commonsense.

Friday, August 3, 2007

Reliance and calling india

For indians living outside,
to call india this is the best quality and cheapest way I found so far.
www.relianceindiacall.com

Tuesday, July 31, 2007

Bill Gates!

Such an amazing person!

I didn't know, He published a paper with an University of california professor

www.cs.berkeley.edu/~christos/papers/Bounds%20For%20Sorting%20By%20Prefix%20Reversal.pdf

He is such an awe-inspiring combination of nerd and exceptional enterpreneur!

And to top it all, he is really humane! I have heard so many stories of his effort lighting so many people's lives!

May be I should add a link to his article in wikipedia in case you are lazy!

http://en.wikipedia.org/wiki/Bill_gates

Wednesday, July 25, 2007

Resharper

If you program in C# this is a must have add-in for Visual studio.

It has intelligent intellisense and 'goto a class', 'code generation' and saves a lot of time. It has nice refactoring as well as unit testing integration.
You never get a compile error and gives you so many suggestions which are small but add up, like 'make a field read only', 'delegate doesn't require parameters' etc.

ReSharper:: The Most Intelligent Add-In To Visual Studio

Tuesday, July 24, 2007

public restrooms in San francisco

Well, this topic might sound funny ...
...till you actually end up in the "dreaded" situation [of hurriedly hunting for one!]

It happened to me in San Francisco yesterday night!

I had to really really search for it and couldn't find one! I had some luck left to not be publicly embarassed till I reached the home from Market st to Greenwich st!

So this link should help you now:

http://www.thebathroomdiaries.com/usa/california/san+francisco.html

Friday, July 20, 2007

Locked out of bathroom!

Today at 2 am, I was locked out of bathroom!

Of all things, I looked in the net for help! Sure enough it was there!

In standard bathroom locks in US, there is a hole in the lock. You insert a small hard object like a nail into the hole and the door opens.

Of course I searched for a nail or nail like object. I found ear buds. I cut off the front part and used it to open the lock! voila! It opened!

This is the link I followed:
Locksmithing: Locked out of bathroom

XML diff and applying delta

There is a nice XML diff and applying diffgram to original doc. tool at:
http://download.microsoft.com/download/xml/patch/1.0/wxp/en-us/xmldiffpatch.exe

You can read more about this tool at:
http://msdn2.microsoft.com/en-us/library/aa302294.aspx

Sunday, July 15, 2007

looking inside library (.lib) file

If you want to see what functions are exported by a library use:
dumpbin.exe which comes with visual studio.
e.g.
dumpbin /symbols /exports kernel32.lib

it is particularly useful when you get link errors. I made the mistake of calling a stdcall function with cdecl convention and got linker error for unknown symbol. When I looked inside the library, I realized the error.

Wednesday, July 11, 2007

seconds in decade!

Google search as well as live search has a nice feature where you can enter
equations like 72*34 or e ^ -2 which will return the answer.

In fact Google goes one step further. It even handles queries like "seconds in decade", 70 farenheit" [which I need all the time, because I don't have any feeling for farenheit!]. Seconds in decade didn't work in live search.

Monday, July 9, 2007

2 questions to ask high school kids

1. Does earth rotate clockwise or counter clockwise seen from North pole to south?
2. Does earth orbits around the sun clockwise or counter clockwise seen from North pole to south?

I found it very useful to think about these questions. It helps them appreciate about experimental physics too.
Advanced: It made me realise that I can't measure my own velocity [or direction of spin or orbit] just by looking at me. Velocity has no absolute meaning [special relativity]

Wednesday, July 4, 2007

C runtime source

If you installed visual studio, C runtime source [code for strcmp etc. - most of the interview questions can be answered with this!] is available at:

C:\Program Files\Microsoft Visual Studio 8\VC\crt\src

Thursday, June 28, 2007

Java source

In case you didn't know, Java source is available for public download.
You can see how each of the classes like String etc. are implemented as well as learn about many data structures like Red black tree.
http://download.java.net/jdk6/

Tuesday, June 26, 2007

Coit tower

If you want to see a full view SF and Bay this is one of the places to go.
You can see both Golden gate and bay bridge and the bay in between.
Also you can see plenty of SF high rises. The view is very gorgeous at night!

P.S: SF Museum of modern art totally went over my head! I didn't understand anything!

Wednesday, March 28, 2007

RFID tag design!

Nice paper explaining RFID tag [non-digital] part design:
http://ieeexplore.ieee.org/iel5/4/27645/01233741.pdf

Tuesday, March 27, 2007

Monday, March 26, 2007

Are you colour blind?

Check whether you are colour blind at:
www.geocities.com/Heartland/8833/coloreye.html

Only males are generally colour blind, that too generally for Red-Green. See
Videos of Professor Koch on neural science! for details.

Sunday, March 25, 2007

Videos of Professor Koch on neural science!

Informative ones. You have to pay a lot of attention though as it gets boring sometimes and you have to overcome it.
http://www.klab.caltech.edu/cns120/videos.php

Tuesday, March 6, 2007

Go ask Alice!

Very good site about your nagging doubts which you couldn't ask anyone!
You can ask questions too!
http://www.goaskalice.columbia.edu

Wednesday, February 28, 2007

example code for BMP image display!

something I tried out for 256 colour bmp, with no attempt at cleanup [It is not hard after all!]:
Algorithm is here: The .bmp file format


#include "stdafx.h"
#include "ImageDisplay.h"
#include <fstream>
#include <map>
#include <CommDlg.h>
using namespace std;

....
ifstream image(fileName);
...
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
// TODO: Add any drawing code here...
int dummy;
long dummyLong;
//read header
image.read((char*)&dummy, 2);
long size;
//read file size
image.read((char*)&size, 4);
long bitmapOffset;
image.read((char*)&dummyLong, 4);
image.read((char*)&bitmapOffset, 4);
long bitMapHeaderSize;
image.read((char*)&bitMapHeaderSize, 4);
long width;
image.read((char*)&width, 4);
long height;
image.read((char*)&height, 4);
image.read((char*)&dummy, 2);
int bitsPerPixel;
image.read((char*)&bitsPerPixel, 2);
bitsPerPixel = *((char*)&bitsPerPixel);
int test;
image.read((char*)&test, 2);
int paletteOffset;
int paletteSize;
paletteSize = 4* (1 << bitsPerPixel);
paletteOffset = bitmapOffset - paletteSize;
currentPalette = new unsigned char[paletteSize];
image.seekg(paletteOffset);
int l;
for(l = 0; l < paletteSize;++l) {
image.read((char*)&(currentPalette[l]), 1);
}
image.seekg(bitmapOffset);
for(i = 0; i < height; ++i) {
for(j = 0; j < width; ++j) {
unsigned char charVal = 0;
image.read((char*)&charVal, 1);
if(0 == charVal) {
continue;
}
int val = charVal* 4;
SetPixel(hdc, j, height-i,/*RGB(r, g, b)*/RGB(currentPalette[val+2], currentPalette[val+1], currentPalette[val]));
}
}
EndPaint(hWnd, &ps);
...

Monday, February 26, 2007

Sunday, February 25, 2007

cool talk about image processing

Nice one!
Recent Advances in Digital Processing of Images and Audio by Microsoft Distinguished Engineer Malvar!
http://mitworld.mit.edu/stream/404/

Friday, February 23, 2007

solution to Interesting puzzle about baby girls!

Scheme solution to Interesting puzzle about baby girls!
;Written by Fakrudeen Ali Ahmed
;Date January 12, 2007
(define (try n tries)
(define (populate girls boys people tries)
(if (or (= tries 0) (= people 0)) (list girls boys)
(let ((moregirls (countgirls people))) (begin ;(display moregirls)(newline)
(populate (+ girls moregirls) (+ boys (- people moregirls)) (- people moregirls) (- tries 1))))
)
)
(populate 0 0 n tries)
)

(define (countgirls n)
(define (loop k count)
(if (> k n) count
(loop (+ k 1) (+ count (random 2)))
)
)
(loop 1 0)
)

(define (run file n limit repeat)(with-output-to-file file (lambda()(loop (lambda()(begin (display (try n limit))(newline))) repeat))))

Wednesday, February 21, 2007

Fastest way to fibonacci number!

;Written by Fakrudeen Ali Ahmed
;December 30, 2006

(define matrix-upperleft (lambda(x)(car x)) )
(define matrix-upperright (lambda(x)(cadr x)))
(define matrix-lowerleft (lambda(x)(caddr x)))
(define matrix-lowerright (lambda(x)(cadddr x)))

(define (mmul matrix1 matrix2)
(list
; upperLeft*right.upperLeft + upperRight*right.lowerLeft,
(+ (* (matrix-upperleft matrix1) (matrix-upperleft matrix2))
(* (matrix-upperright matrix1) (matrix-upperright matrix2)))
; upperLeft*right.upperRight + upperRight*right.lowerRight,
(+ (* (matrix-upperleft matrix1) (matrix-upperright matrix2))
(* (matrix-upperright matrix1) (matrix-lowerright matrix2)))
; lowerLeft*right.upperLeft + lowerRight*right.lowerLeft,
(+ (* (matrix-lowerleft matrix1) (matrix-upperleft matrix2))
(* (matrix-lowerright matrix1) (matrix-lowerleft matrix2)))
; lowerLeft*right.upperRight + lowerRight*right.lowerRight);
(+ (* (matrix-lowerleft matrix1) (matrix-upperright matrix2))
(* (matrix-lowerright matrix1) (matrix-lowerright matrix2)))
))
(define b '(1 1 1 0))
(define i '(1 0 0 1))

(define (power-res n power value residue)
(list
(mmul value value)
(if (= 0 (fix:and n power)) residue (mmul residue value))
))

(define (loop n power list)
(if (< (/ n 2) power) (mmul (car list) (cadr list)) (loop n (fix:lsh power 1) (power-res n power (car list) (cadr list))) )) (define (fib n) (cadr (loop n 1 (list b i))))

Sunday, February 11, 2007

Amazing equations!

When I was a school student these were the equations I was totally confused and amazed about:

c = 1 /√(μϵ) ---------- 1

I was confused what does speed of "normal" visible light has to do with current or magnet!

E = mc^2 ------------ 2

I was amazed this time, what the heck speed of light has to do with Energy! I didn't believe this 'c' is the same as speed of light the first time!

Amazing!

Saturday, February 10, 2007

MIT world: distributed intelligence

http://mitworld.mit.edu/ - Great talks about varied topics. Science, Economics, poverty etc. Very good to spend time meaningfully!
I just now taking a talk about:
The World Turned Upside Down: The Impact of the Return of India and China to their Historical Global Weight

Friday, January 12, 2007

Alan Turing!

Father of computer science - Real enigma! I felt sad reading his story: http://en.wikipedia.org/wiki/Alan_Turing http://plato.stanford.edu/entries/turing/
Is the society "right" in doing what it thinks "right"? I am confused.

Thursday, January 11, 2007

Interesting puzzle about baby girls!

If every couple wants a baby girl, and keeps having children till they get a girl what will happen to the fraction of the girls?

Wednesday, January 10, 2007

keyboard in your language!

You can create custom keyboard in different languages using Microsoft keyboard layout creator. It maps unicode characters to keyboard keys.
http://www.microsoft.com/globaldev/tools/msklc.mspx

Monday, January 1, 2007

Professor Walter Lewin - Great teacher!

Happy new year!
If you want to learn classical Physics he is the best teacher I have come across. I simply love the way he teaches.
http://ocw.mit.edu/OcwWeb/Physics/8-01Physics-IFall1999/VideoLectures/index.htm