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