I know the answer (it's 42)

A blog on coding, .NET, .NET Compact Framework and life in general....

May, 2007

Posts
  • I know the answer (it's 42)

    Microsoft Surface

    • 0 Comments

    I'm sure you have heard about this a 1000 times by now. But this time you get to hear about Microsoft Surface from someone who has used it.

    In case you have not heard about it, Microsoft Surface (this takes ever to load so you can try another video here)  is a radical new device which lets you interact with it using Minority Report style gestures. I had used this in an internal User Experience exhibition in the Redmond campus about 2 years back when it was called the PlayTable. Some of the things that totally blew me away are

    1. The gesture based multi-touch user input. It was no next gen. I could hold images by its edges and drag to enlarge it, I could throw (or rather slide) it to the user on the other side of the table.
    2. There were these special glass chips which you could place of the table and video would come through them, when the chips are moved the video followes through it. When the chip is replaced after getting inverted the video inverts itself as well!!!
    3. I loved the simple things of dipping the finger in the favorite marker and touching the images on the table to mark them. It seemed so magical.

    We had a blast playing with it and joked with one of the developers standing by it that by 2020 we'd have this in every home :). I never guessed it go into production so soon.

  • I know the answer (it's 42)

    Pop-fly rocks

    • 0 Comments

    Pop-fly is one of the most amazing piece of coolness that Microsoft shipped. From the domain name to the interface it's cool all the way. See my rotating image sphere here. Not: that this'll install Silver Light (which is less than a mb).

    It took me about 15 mins to get this done. I just dropped a Flickr block and a PhotoSphere block and connected them. Voila!! I have a rotating sphere with the images I put on Flickr swarming on it. This runs on SilverLight so my friends running Safari on a Mac can see it!!

     

  • I know the answer (it's 42)

    Remember me on this computer.

    • 2 Comments

    That is what a popular site said when I visited it's login page. But hey, I was using a cell phone :). I know I'm nitpicking but more and more users are getting onto cell phones for browsing and the sites need to be careful. Yahoo for example is and says "Keep me signed in" without reference to the device.

    This site and others do render cell-phone friendly web-pages (via different css files) based on the browser's request header but I've noticed they do not change the page content that easily.

  • I know the answer (it's 42)

    What is work

    • 1 Comments

    "What is work? Work is of two kinds: first, altering the position of matter at or near the earth's surface relatively to other such matter; second, telling other people to do so." ~ Bertrand Russell's 1932.

    Found this via BoingBoing. My version is as follows

    "What is work? Work is of two kinds: first, write lots of code to create some bugs; second, fix those bugs".

  • I know the answer (it's 42)

    Bring your child to work

    • 1 Comments

    Today a gang of kids raided Microsoft India as we celebrated "Bring your child to work" day. The kids were given realistic looking blue badges, they played around with Xboxes, tablet PCs and had a blast.

    Kids at work DSCF1696 DSCF1726 DSCF1706
  • I know the answer (it's 42)

    C# out parameter assignment trivia

    • 3 Comments

    I have the following code

            static void foo(out int i)
            {
                try {
                    /*...*/
                    i = 5;
                }
                catch (Exception) {
                    /*...*/
                }
                finally {
                    /*...*/
                }
            }

    this fails to compile with the message "The out parameter 'i' must be assigned to before control leaves the current method". I have assigned I thought. But a bit more thought helped me in seeing through this and when I removed the catch part it worked (and so it did when I moved the i assignment out of the try.

            static void foo(out int i)
            {
                try {
                    /*...*/
                    i = 5;
                }
                finally {
                    /*...*/
                }
            }
    

    I'd guess that the compiler uses a variant of Definite Assignment to figure out that a variable is definitely assigned before it leaves the function. Since there is a catch in foo in the first case, it might happen that the code before i assignment might throw an exception and the catch block catches and ignores it. In that case the i will reach the caller of foo un-assigned.

    If you put an empty throw in the catch block signalling that you'll be rethrowing the exception then the compilation goes through. I found this to be very cool.

  • I know the answer (it's 42)

    What are the different algorithms in Java? Can someone list me each and its uses?

    • 0 Comments
    That is the question someone posted on the Java forum http://forum.java.sun.com/thread.jspa?tstart=0&forumID=426&threadID=547969&trange=30. You got to read the responses to believe what geeks with free time can take this question to.
Page 1 of 1 (7 items)