Skip to main content

Posts

Showing posts from 2008

A neat quote

"We are all subjects to the fates. But we must all act as if we are not," said the witch, "or die of despair".                                                                  -- An excellent snip from the book "Northern Lights" by Philip Pullman

Algo for getting the number of days in a month

I can’t speak about what I do in office. (ok, not yet). But I need to write something. So here goes:     A “small” algo to retrieve number of days in a month. Don’t ask me it s efficiency (modulus is never fast , an alternative would be something similar to isInt function ):     /// January = 1, February = 2 and so on. /// year will be used only if month = 2 function daysInTheMonth(var monthNumber, var yearNumber) {                 // if February, and year is divisible by 4 but not divisible by 100, return 28. Else return 28.                 // since years which are divisible by 100 should not be leap years                 if(monthNumber == 2)  { return (yearNumber%4 ==0 && yearNumber%100>0)? 29 : 28  }                 return (monthNumber > 7) ?  ((monthNumber%2 ==0) ? 30 : 31) : ((monthNumber%2 ==0) ? 31: 30);   // another option // if(monthNumber > 7) monthNumber++; // return ((monthNumber%2 ==0) ? 30 : 31)     }    

A different side of Warren Buffet - An article

There are some articles which I usually skim thru, and read only the interesting parts.   But here is an article which is not only well written, but also indicates that there are things other than money to think about.   Do read this: http://www.time.com/time/business/article/0,8599,1843839,00.html   Waiting to read the book,  

Here s an old one

Some years back we found a flash video known as EPIC 2014. After a real long time I again decided to watch that all over.   In case you have not seen, see : http://epic.makingithappen.co.uk/   Also they have a sequel with some corrections, called as EPIC 2015.     Enjoy maadi!!!!  

AI - My Thoughts - 2

So one of the points I pointed in the previous post was “We need a single point of entry for all the data which is flowing from you to the outside world”.   Consider Google, which provides the following -           they have a Orkut, social networking site, thru which they have a list of your close friends (It would be pretty simple to ask you how you know that person), so they understand what kind of relationship you have with your friends. -           they provide you a mail service, so they know whom you contact most/least often. -           They have your chat (talk), so they know whom you communicate instantly with. (this + the social networking site’s scrap feature) -           The OpenSocial was initiated which allowed sharing friends info (of course it could not be replicated) across members of the OpenSocial forum. -           They have provided an RSS reader, so they know what you read. (some kind of replacement for newspapers) -           They know what you

AI - My High ;) thoughts - 1

A few of us regularly have these arguments (which of course ends up with physical damage to various human bodies), about artificial intelligence. As to whether any computer will ever beat the “ Turing test ”. Or will that be an insatiable dream.   My friends feel that the computer will never be able to decipher patterns which it has never previously seen. ( What I mean here is if a computer is given a sequence, and is expected to predict the next item in the sequence, if the computer has never seen the pattern it will fail.)   But here I insist that humans also work on a similar pattern recognition algo. So if you see a pattern which you have not seen, you will ask your friend and learn. And this learning is what I feel is the actual problem. A kid for example, does not understand anything when it is born. Then the parents/surroundings teach it. It falls, learns from the mistake and the next time it comes across the same scenario it takes a different course of action.   D

Google Chrome - Wow!!!!

Tried out Google chrome…. And my only response is, I am addicted!!!!   I had started off expecting that I won’t stick to it for long, considering that I am pretty happy with FF3. But after using Google Chrome, I realized the advantages of having a separate process for each tab. Yes it does not have the add ins, but I am sure those will follow.   Even IE8 beta 2 takes a couple of seconds to open a new tab (with no content displayed, except their usual about:tabs). Chrome opens up a tab, and also displays an intelligent page, in less than a second :O.   These guys know how to build a browser!!!   Things I love to do with this browser. -           I enjoy draggin a tab out of the window…. The dragging UI is pretty cool -           The rendering engine is pretty fast.   The only problem I seem to be facing is, I am not able to open google s applications such as Google reader. (When I try to open google.com/reader, it directs me to the login page but does not show

Time to buy the Nokia 3G phone :)

I still have not yet succumbed to Apple products (I still have an iRiver payer as against buying an iPod). Anyway, i was searching for a Nokia N82, and found it to be costly, even now…. Had expected the prices to come down when iPhone is launching. Guess I have to wait for some more time. I am pretty sure the Nokia will pretty soon floodthe market with 3G + Symbian phones. And then I ll buy one J . But first, should start development!!!!

Neat wallpaper

best_firefox_wallpaper Originally uploaded by prashantvictory Found this neat wallpaper. Wonder whether it is a genuine firefox wallpaper

The legend that it was.... the RD350

An excerpt: “The RD350 by Yamaha was the premier sport lightweight of the early 1970s. Ahead of its time, it featured an air-cooled, two-cylinder, six-speed, 350cc two-stroke engine. The bike made about 32 to 35 rear-wheel horsepower, very fast for when it was made.”   From: http://www.hinduonnet.com/thehindu/mp/2006/11/22/stories/2006112200840100.htm   I remember (i.e. I am not going to forget) the one time that I managed to ride it… What an awesome bike!!!!!     Dreaming, Sachin  

Information Overload - A parallel

So many feeds, so many blogs, so many web sites. And what do I face???? … an information overload!!!!   Trying to find out how to clean up the clutter, I came up with many suggested solutions. (Eg. Meme s, follow/track using twitter, Yahoo! Pipes, lifestreams, etc.)… and again I messed up. I realized that the problem I faced is of “missing out something important”. i.e. I keep getting the feeling that if I don’t follow a particular topic/person using one or many of the above technologies, I may miss out something.   Pondering for some time made me realize that there is another similar scenario where information overload has occurred.   Consider journalists. They have been collecting decades, if not centuries of news items, information pieces which may or may not have been published. But kept with the hope that they may be useful at a future point of time. So they have gigabytes (or petabytes?) of information. This information is sometimes back tracked, images previously

And what is it that i miss in India

F22 - Raptor Front Shot Originally uploaded by P.Sachin.Nayak This bird is known as the F22, also nick named Raptor. It is one among the most stealthiest, and during it s time has been considered as the (whew!!!) plane... of course they are getting out the F34 now..... I had seen this and many other planes in action.. and i guess these are the real things which i do miss about the United States!!!! But in India the one plane which i feel would make my heart skip a beat would be the Tejas (prev known as LCA). This was one indian plane whose poster i roamed around with when i was a kid. ( Tejas (LCA) . I heard started last year. Neat!!!! Maybe i ll get a chance to se it in the next air show (which i feel should be done on a more regularly)

Quits!!!!

Guys, I have finally decided to quit Infy... Instead I have decided to do something really worthwile such as maybe stealing money from some financial union. And what made me take this drastic decision? This video: http://www.youtube.com/watch?v=WgNEon7vG4k Man… This R15 sounds realllly good. And I don't have enough money to buy this beast… even if I manage to buy it I wont be able to pay it's maintenance and the police guys (who will be bugging me at every signal… am pretty sure) So do drop me a comment, in case there is a 50% discount sale going around somewhere.... Tags: Yamaha R15

Kerala - Chilkot lake - A photo

Chilkot lake Originally uploaded by P.Sachin.Nayak This place reminded me of a fairy tale kind of land. You know... those which are shown in movies, to bring out the beauty of nature... Actually, the remaining part of this lake was pretty crowded with people. And you can see some other boats in the distance, but otherwise is nt this a nice calm, peaceful place.

Movies common for 2 actors/actresses

One question: Which all movies did both George Clooney and Brad Pitt act in? Am sure you would be going to google. And what do you do after that? See all the links, and check each and every page, trying to find the common movies. Now why could the computer not do this? Why are you spending 5 minutes trying to find this out, when you should be able to request the computer to do this..... Enter Semantic search, a mechanism where you can query data for relationships which the human mind understands, and secondly the computer understands. There are many places where they are trying to build this semantic search. I build a small application which uses freebase . And built an application where you can provide the names of 2 actors/actresses and find the movies both worked on. Check the page http://www.nlighten.in/CommonMovies.html . Details about freebase: Freebase uses the databases provided by Wikipedia and multiple other providers, and provide all the data in OOP

Relational DataStores - How good?

An interesting updated by the twitter team about the scalability probs they are facing : http://dev.twitter.com/2008/05/twittering-about-architecture.html .   They say that twitter was not exactly architected as a messaging system but for a content management system. But users started using it to a messaging system. Another example of an application used differently from what it was initially designed. Previously there were social networking sites, which were intended initially to help people to connect, but then started being used to convey full blown information.   Anyway back to the topic. The twitter blog does mention some points worth considering. The queries they ran seem to be executing for too long. Ya, I know what they r talking about. The example they cite “consider 1000 persons following a user”, and the user updates her status multiple times. Whew…. Must be quite a challenge for the team at twitter.   So one thing I picked up is “stay away from relational data

Am moving on - http://sachin.nlighten.in

Yup, had been planning on moving over to a domain of my own. And now I finally decided to get some my own domain. Am still hosting the blog with blogspot. So the blog does not eat my bandwidth J . Thank you advertisers on blogger!!!!! New blog at http://sachin.nlighten.in     Signing out permanently, Sachin  

An old one

What if MS designs the iPod package: I was just checking some old links i had and also attended a session from Jesse James Garrett, which reminded me of this youtube video.

What an empty src translates to!!!!

Yesternight, while trying to debug a bug logged against our ASP.NET code, we crashed into a wierd problem. The scenario of the problem was: - We had an ASP.NET page. When opened in IE, the page seemed to be executing fine. But loading this in FireFox (both versions 2 and 3b2), resulted in the ASP.NET Page lifecycle (OnInit,etc.etc.) being called twice. We then used tcptrace (a tool similar to Fiddler . We were unable to get Fiddler working for FireFox, even after using the Pac file). We found that every postback resulted in the page being requested twice. One was a POST request (PostBack). The other was a GET request. Our immediate assumption was that ajaxcontroltoolkit must be trying to do some GET request only for FireFox browsers. Further analsysis cancelled this out, 'cos we realized that even IE was sending a request. But there was a difference: - IE was sending the request to the directory hosting the page - FireFox was sending the request to the page to which the PostBack h