Mohit's bday was truly memorable!
Monday, April 23, 2007
Wednesday, March 21, 2007
Thursday, March 15, 2007
Tuesday, February 27, 2007
Why Am I here?
When I find I've got nothing to do, I ask myself "Why Am I here?" Well, the next few hours are peacefully spent thinking about various reasons I could've been sent onto earth for.
But seriously, if you think about it thats one of the most difficult questions to answer. We are born, go to school, make little friends, grow up to go different ways and finally end up getting married and leave the world with much less funfare than we actually came here with. Do the little moments of happiness and tears carry any meaning when we are gone? What happens when we are gone? Does someone remember us unless we are maybe an Elvis Presley or Marilyn Monroe? How significant is their contribution to society than that of people who've worked years to make things better. The scientists, the doctors, the engineers, architects who built or helped to build the world around us. No wonder that we remember that Shah Jahan built the Taj Mahal, but we conveniently forget the architect, Ustad Ahmad, who built it or the countless people who worked to make it happen.
So ask yourself "Why Am I here?" and lemme know your comments!
But seriously, if you think about it thats one of the most difficult questions to answer. We are born, go to school, make little friends, grow up to go different ways and finally end up getting married and leave the world with much less funfare than we actually came here with. Do the little moments of happiness and tears carry any meaning when we are gone? What happens when we are gone? Does someone remember us unless we are maybe an Elvis Presley or Marilyn Monroe? How significant is their contribution to society than that of people who've worked years to make things better. The scientists, the doctors, the engineers, architects who built or helped to build the world around us. No wonder that we remember that Shah Jahan built the Taj Mahal, but we conveniently forget the architect, Ustad Ahmad, who built it or the countless people who worked to make it happen.
So ask yourself "Why Am I here?" and lemme know your comments!
Thursday, September 28, 2006
Tee Vee
It was a couple of weeks ago that I decided it was time for me to go for a new TV - an LCD, HDTV - to change the way I look at life? Well, the next thing I know I was spending hours trying to figure out what to buy, where to buy it and how to make it an effective purchase. Before I delve into that, I will try to explain what types of TVs I looked at to make my choice -
Analog TV An Analog TV is a TV which can show only standard definition cable or satellite TV
Digital TV A digital TV is a TV which can air progressive-scan DVD and mostly HDTV too.
ED TV An Enhanced Definition TV is a TV which can air HDTV, but is not able to display them as it should be, mostly due to its resolution.
HD TV A High definition TV, as the name suggests, can display standard, progressive-scan as well as high definition programing at very high resolutions (upto 1080 lines of detail)
Once I had settled on the HDTV thing, I came across the next hurdle! What is the difference between HD-ready and HD integrated TVs? As I learnt, HDTVs with built in tuners had digital or ATSC tuners, which enabled receiving HD broadcasts over the air! External HDTV tuners, I found, cost about $150. ATSC or high-def tuners are different from NTSC or standard def tuners.
Some new HDTVs are also DCR (digital cable ready), which means that they can tune digital cable channels, including HDTV, without requiring an external cable box. To use a DCR television, you'll need to get a special access card from your cable provider, called a CableCard.
HDTV comes in three different resolutions - 1080i, 1080p and 720p. The 1080i has more lines and pixels, but 720p is a progressive-scan format that delivers a smoother image that stays sharper during motion. The 1080p tries to combine the superior resolution of the 1080i with the smoothness of 720p, although the high bandwidth needed is a serious deterrent! In simple words, 1080i refers to a 1080-by-1920-pixel image produced by interlaced scanning, while 720p denotes a 720-by-1280-pixel image produced by progressive scanning. As the name suggests, with progressive scanning, the scanner progressively creates a set of lines to air the display. In interlaced scanning, the scanner creates the odd numbered lines first followed by the even numbered ones. CBS and NBC broadcast at 1080i, whereas ABC and Fox at 720p. EDTV is broadcast at 480p.
Finally, coming to HDMI. The High Definition Multimedia Interface (HDMI) is an uncompressed, all-digital audio/video interface, which provides a single interface between any audio/video source, such as a set-top receiver or DVD player, with an audio and/or video monitor, such as a digital television (DTV). HDMI supports standard, enhanced, or high-definition video, plus multi-channel digital audio on a single cable! In other words, no wires hanging all around your TV set anymore. HDMI provides a superior, uncompressed digital video and audio quality, simple connectors, integrated remote control and a popular interface enabling the transmission of high-definition content.
Well now was the tough part - going through various websites and malls to figure out the best TV of them all, and make sure its affordable! Till date, after going through various reviews and comments on websites and people I met, the Samsung LNS3251D 32" Wide LCD HDTV with "Integrated ATSC Tuner" is something which looks like the most likely to make it into my home. All I'll have to figure out now is if the Integrated ATSC Tuner is a requirement or will be superceded by the dish receiever for HD programs. Once I figure that out, I am done!
Analog TV An Analog TV is a TV which can show only standard definition cable or satellite TV
Digital TV A digital TV is a TV which can air progressive-scan DVD and mostly HDTV too.
ED TV An Enhanced Definition TV is a TV which can air HDTV, but is not able to display them as it should be, mostly due to its resolution.
HD TV A High definition TV, as the name suggests, can display standard, progressive-scan as well as high definition programing at very high resolutions (upto 1080 lines of detail)
Once I had settled on the HDTV thing, I came across the next hurdle! What is the difference between HD-ready and HD integrated TVs? As I learnt, HDTVs with built in tuners had digital or ATSC tuners, which enabled receiving HD broadcasts over the air! External HDTV tuners, I found, cost about $150. ATSC or high-def tuners are different from NTSC or standard def tuners.
Some new HDTVs are also DCR (digital cable ready), which means that they can tune digital cable channels, including HDTV, without requiring an external cable box. To use a DCR television, you'll need to get a special access card from your cable provider, called a CableCard.
HDTV comes in three different resolutions - 1080i, 1080p and 720p. The 1080i has more lines and pixels, but 720p is a progressive-scan format that delivers a smoother image that stays sharper during motion. The 1080p tries to combine the superior resolution of the 1080i with the smoothness of 720p, although the high bandwidth needed is a serious deterrent! In simple words, 1080i refers to a 1080-by-1920-pixel image produced by interlaced scanning, while 720p denotes a 720-by-1280-pixel image produced by progressive scanning. As the name suggests, with progressive scanning, the scanner progressively creates a set of lines to air the display. In interlaced scanning, the scanner creates the odd numbered lines first followed by the even numbered ones. CBS and NBC broadcast at 1080i, whereas ABC and Fox at 720p. EDTV is broadcast at 480p.
Finally, coming to HDMI. The High Definition Multimedia Interface (HDMI) is an uncompressed, all-digital audio/video interface, which provides a single interface between any audio/video source, such as a set-top receiver or DVD player, with an audio and/or video monitor, such as a digital television (DTV). HDMI supports standard, enhanced, or high-definition video, plus multi-channel digital audio on a single cable! In other words, no wires hanging all around your TV set anymore. HDMI provides a superior, uncompressed digital video and audio quality, simple connectors, integrated remote control and a popular interface enabling the transmission of high-definition content.
Well now was the tough part - going through various websites and malls to figure out the best TV of them all, and make sure its affordable! Till date, after going through various reviews and comments on websites and people I met, the Samsung LNS3251D 32" Wide LCD HDTV with "Integrated ATSC Tuner" is something which looks like the most likely to make it into my home. All I'll have to figure out now is if the Integrated ATSC Tuner is a requirement or will be superceded by the dish receiever for HD programs. Once I figure that out, I am done!
Wednesday, July 19, 2006
Head to the Butt!!
Ok, Italy won the World Cup, and left fans of Brazil, Argentina, France and Germany very disappointed indeed! However the entire final was eclipsed by the one incident we are all talking about - yes, the head butt of Zidane. It was kinda like he was making a declaration to the rest of the world that he was not going to come back again, and to remind everyone what a great player he was! No, really, I am not being sarcastic. I think, before Ronaldinho came onto the World stage, Zizou was the exponent of the cute step-overs and over-the-shoulder chips. All we could exclaim before he messed up his last 10 minutes was - "Joga Bonito"!!
Sunday, July 02, 2006
Saturday, April 08, 2006
United in new deal!
Damn, everytime you buy a string of shirts for your favorite team, they redesign the color or texture of their shirts! Recently, I bought a blue (soccer) Manchester United shirt to add to my collection of red and black, and am really angry to find out that they changed the sponsors from Vodafone to AIG. The new logo, although it looks promotional before the new season begins, is ragged compared to the Vodafone logo, which added a different style and radiance to the ManU shirts.
There are a few weeks before the season draws to a close and I do hope they manage to edge as close to Chelsea as possible. Nothing better than edging Chelsea out for the title - just like United did it to Arsenal a few years ago!
There are a few weeks before the season draws to a close and I do hope they manage to edge as close to Chelsea as possible. Nothing better than edging Chelsea out for the title - just like United did it to Arsenal a few years ago!
Monday, January 30, 2006
Java Button Groups
I discovered an interesting fact about ButtongGroups in Java. If one groups a set of radio buttons using a ButtonGroup, there is no way programatically to clear all the radio buttons in the group! The workaround is to add an "invisible" radio button and select it programatically to create the desired effect.
Tuesday, January 10, 2006
Tuesday, December 27, 2005
Spamking of the Year
What do you hate more? Cleaning the toilet or cleaning up the spam in your mailbox? I was checking the fun facts on spam on yahoomail and it notes that more people prefer cleaning their own toilet! So do I!
The next time you see an ad screaming - "Free ipod nano is yours" - just close the browser window and take it as your hint to clean the toilet!
The next time you see an ad screaming - "Free ipod nano is yours" - just close the browser window and take it as your hint to clean the toilet!
Thursday, December 22, 2005
All Queued Up..
Don't you hate standing in queues? Just standing there waiting for your name to be called? What can you possibly do when you are standing there? You try to look around, but nah ... too self-conscious. You begin to wonder why that lady is staring at you. She's about 40 and couldn't possibly be interested in you. In all probability you are dressed up like Superman - know what I mean?! There's a very pretty lady at the other end of the room. Wonder what she is doing buried into her laptop. Oh no, she's caught you staring at her. There's no place to hide!
Coming to the next important question - where do you place your hands? If its in your pockets, its way too casual. Keeping it folded would mean you are closed to conversation. Well, behind your back would be a good idea, but that would hurt if the line stops moving! And what is that guy behind you laughing for? Have you worn your shirt backwards? Oh, not again!
Oh well, I just hate standing in a queue!
Coming to the next important question - where do you place your hands? If its in your pockets, its way too casual. Keeping it folded would mean you are closed to conversation. Well, behind your back would be a good idea, but that would hurt if the line stops moving! And what is that guy behind you laughing for? Have you worn your shirt backwards? Oh, not again!
Oh well, I just hate standing in a queue!
Thursday, October 27, 2005
Wednesday, September 28, 2005
Week of the year calculation in Oracle and Java
I was kinda surprised when I discovered that Oracle and Java calculated weeks of year differently - Java taking into account the day of week it is, whereas Oracle concerned only with the date.
For example, if the first day of the year is a Friday, Java will fetch Jan 1 to be week 1, Jan 2 too as weekday 1 and Jan 3 as weekday 2 (yeah it could also depend on what day you set as the start of a week). Oracle does not seem to care what day the first day of the year was. It just picks the first 7 days of the year as the first week of the year, next 7 days as the second week, and so on..
Now I know why they need a bridge to connect!
For example, if the first day of the year is a Friday, Java will fetch Jan 1 to be week 1, Jan 2 too as weekday 1 and Jan 3 as weekday 2 (yeah it could also depend on what day you set as the start of a week). Oracle does not seem to care what day the first day of the year was. It just picks the first 7 days of the year as the first week of the year, next 7 days as the second week, and so on..
Now I know why they need a bridge to connect!
Tuesday, September 13, 2005
The New ipod Nano...
I ordered my nano the day it was announced by Apple. I got it 4 days later despite there being a weekend in between. That was quick!
Feature-wise, there's nothing to talk about if you already own any ipod. But the appearance, feel and size makes it extra-ordinarily impressive. Further, being a flash-memory based device makes it a little "different" from the earlier ipods. I said "different" and not better. You can make you own decision here http://www.storagesearch.com/semico-art1.html
If you already own an ipod, I don't see any other reason why you would want to go for a nano once the excitement dies down, other than to present it as a gift or to use it while running or in the gym. Its small size makes it extremely efficient as a portable storage device - its as small in length and width as a business card cut into half, and probably few millimeters thicker. Appearance-wise its unbeatable; cost and feature-wise its almost the same as an ipod, without the benefit of large storage. The black nano, although the better looking, will show visible marks of your fingerprints when you hold it in your hands for a few minutes. Make sure you get the nano-tubes as well, although it would no longer render your nano black anymore!
Feature-wise, there's nothing to talk about if you already own any ipod. But the appearance, feel and size makes it extra-ordinarily impressive. Further, being a flash-memory based device makes it a little "different" from the earlier ipods. I said "different" and not better. You can make you own decision here http://www.storagesearch.com/semico-art1.html
If you already own an ipod, I don't see any other reason why you would want to go for a nano once the excitement dies down, other than to present it as a gift or to use it while running or in the gym. Its small size makes it extremely efficient as a portable storage device - its as small in length and width as a business card cut into half, and probably few millimeters thicker. Appearance-wise its unbeatable; cost and feature-wise its almost the same as an ipod, without the benefit of large storage. The black nano, although the better looking, will show visible marks of your fingerprints when you hold it in your hands for a few minutes. Make sure you get the nano-tubes as well, although it would no longer render your nano black anymore!
Tuesday, July 12, 2005
Writing to nothing in UNIX
Ever used this before -
$ grep hello hi 2>/dev/null
Probably you have - or something similar to the one above. We are writing errors to what constitues in Unix to "nothing" or "null". What are we doing that for?!
Before we answer the above question, lets assume you have a file hello.txt, which contains a few lines of text. Run this command at the command line -
$ grep "test" hello.*
The output would be something like -
This is a good day and I love testing my code.
How do I find out which filename this is in? With grep, if the filename pattern matches only one file. it never writes the filename to the output. So then, how do we get the filename?
Simple! Try running this at the command line -
$ grep "test" hello.* /dev/null
Howzatt?! You provide a filename here where you are sure nothing can be found, because anything cannot be found in nothing!
So, coming back to the earlier question, what use is it to redirect output to a null file? Sometimes, you need a program to just execute without bugging you with its results. There are other instances where you might not need any errors to be logged (as in the first command). /dev/null could also be used to prevent some logs from being written, when you do not have any access to the source code which is writing the logs. Just create a symbolic link to this file and make it point to /dev/nul -
$ ln -s /dev/null mylog
So, what is the /dev/zero file?
$ grep hello hi 2>/dev/null
Probably you have - or something similar to the one above. We are writing errors to what constitues in Unix to "nothing" or "null". What are we doing that for?!
Before we answer the above question, lets assume you have a file hello.txt, which contains a few lines of text. Run this command at the command line -
$ grep "test" hello.*
The output would be something like -
This is a good day and I love testing my code.
How do I find out which filename this is in? With grep, if the filename pattern matches only one file. it never writes the filename to the output. So then, how do we get the filename?
Simple! Try running this at the command line -
$ grep "test" hello.* /dev/null
Howzatt?! You provide a filename here where you are sure nothing can be found, because anything cannot be found in nothing!
So, coming back to the earlier question, what use is it to redirect output to a null file? Sometimes, you need a program to just execute without bugging you with its results. There are other instances where you might not need any errors to be logged (as in the first command). /dev/null could also be used to prevent some logs from being written, when you do not have any access to the source code which is writing the logs. Just create a symbolic link to this file and make it point to /dev/nul -
$ ln -s /dev/null mylog
So, what is the /dev/zero file?
Thursday, June 30, 2005
Java - Memory Leaks
Now that we are talking Java, why not continue the discussion a little further, and since we ended on pointers in Java, the next question would be - what are memory leaks in Java, and why does it occur if Java performs its own garbage collection?
This is how the garbage collector in java works - starting at the root class and parsing through all nodes being referenced, at the same time keeping track of which objects are actively being referenced. Any classes no longer being referenced are then eligible to be garbage collected. What is to be noted is that an object is only counted as being unused when it is no longer being actively referenced. One other thing to keep in mind is that, unlike other languages such as C++, allocated memory is returned to the operating system when the application is closed.
Some common causes of memory leaks -
* Register a class as a listener, without unregistering it when it is no longer needed
Until the application receives event notification, the JVM will not garbage collect the storage.
* Declare a huge collection to be static
Collections hold other reference objects, and making them static keeps them in memory throughout the lifetime of the application.
* Not closing database or network connections
It is very important that the database or network collection is released once the information exchange is completed.
* Including native code in a Java program
The storage for references created in native C or C++ coding environments is not handled or garbage collected by the JVM. Hence the JNI memory must be directly dereferenced by the native language it was written in.
Now I know why I keep forgetting things nowadays. Lots of static HashMaps and Vectors pervading my brain!
This is how the garbage collector in java works - starting at the root class and parsing through all nodes being referenced, at the same time keeping track of which objects are actively being referenced. Any classes no longer being referenced are then eligible to be garbage collected. What is to be noted is that an object is only counted as being unused when it is no longer being actively referenced. One other thing to keep in mind is that, unlike other languages such as C++, allocated memory is returned to the operating system when the application is closed.
Some common causes of memory leaks -
* Register a class as a listener, without unregistering it when it is no longer needed
Until the application receives event notification, the JVM will not garbage collect the storage.
* Declare a huge collection to be static
Collections hold other reference objects, and making them static keeps them in memory throughout the lifetime of the application.
* Not closing database or network connections
It is very important that the database or network collection is released once the information exchange is completed.
* Including native code in a Java program
The storage for references created in native C or C++ coding environments is not handled or garbage collected by the JVM. Hence the JNI memory must be directly dereferenced by the native language it was written in.
Now I know why I keep forgetting things nowadays. Lots of static HashMaps and Vectors pervading my brain!
Java - Unchecked Exceptions
There are two types of Exceptions in Java - The Checked and the Unchecked. Ever wondered why we have this classification? Any exception that can be thrown by a method is part of the method’s API and forms an integral part of that method’s declaration as are its parameters and return value. Just imagine the complexity of a method declaration if it would make all exceptions necessary to be declared! And worse, some of these exceptions would never occur in a program if the program was written carefully and diligently.
Unchecked exceptions, on the other hand, represent problems resulting from a programming problem, from which the application cannot recover or which cannot be handled in any way - for eg ArrayIndexOutOfBounds or NullPointerException.
Moral of the story - If the code can reasonably be expected to recover from an exception, make it a checked exception. If the code cannot do anything to recover from the exception, make it an unchecked exception.
Oh yes, on a related note - Are there pointers in Java? If your answer is NO, could you please explain why there are NullPointerExceptions everytime I run my code?!
Unchecked exceptions, on the other hand, represent problems resulting from a programming problem, from which the application cannot recover or which cannot be handled in any way - for eg ArrayIndexOutOfBounds or NullPointerException.
Moral of the story - If the code can reasonably be expected to recover from an exception, make it a checked exception. If the code cannot do anything to recover from the exception, make it an unchecked exception.
Oh yes, on a related note - Are there pointers in Java? If your answer is NO, could you please explain why there are NullPointerExceptions everytime I run my code?!
Saturday, June 04, 2005
More inspiration quotes..
We make a living by what we get, we make a life by what we give.
- Winston Churchill
Live as if your were to die tomorrow. Learn as if you were to live forever.
- Gandhi
Just as a candle cannot burn without fire, men cannot live without a spiritual life.
- The Buddha
Life is like riding a bicycle. You don't fall off unless you plan to stop peddling.
- Claude Pepper
It is not length of life, but depth of life.
- Ralph Waldo Emerson
Expecting life to treat you well because you are a good person is like expecting an angry bull not to charge because you are a vegetarian.
- Shari R. Barr
And in the end, it's not the years in your life that count. It's the life in your years.
- Abraham Lincoln
There are only two ways to live your life. One is as though nothing is a miracle. The other is as though everything is a miracle.
- Albert Einstein
Attack life, it's going to kill you anyway.
- Steven Coallier
- Winston Churchill
Live as if your were to die tomorrow. Learn as if you were to live forever.
- Gandhi
Just as a candle cannot burn without fire, men cannot live without a spiritual life.
- The Buddha
Life is like riding a bicycle. You don't fall off unless you plan to stop peddling.
- Claude Pepper
It is not length of life, but depth of life.
- Ralph Waldo Emerson
Expecting life to treat you well because you are a good person is like expecting an angry bull not to charge because you are a vegetarian.
- Shari R. Barr
And in the end, it's not the years in your life that count. It's the life in your years.
- Abraham Lincoln
There are only two ways to live your life. One is as though nothing is a miracle. The other is as though everything is a miracle.
- Albert Einstein
Attack life, it's going to kill you anyway.
- Steven Coallier
Friday, June 03, 2005
Cute little San Diego...
The memorial weekend was a welcome relief from the enormous work I was loaded with. So, my friends and I planned a quick trip to San Diego, situated in south of California. Had a look at Sea world and the zoo. There were a few scenic spots in the San Diego old town area. I also picked up a little stuff in the shops there.
The San Diego downtown is a great place to go to try out various types of cuisines - Chinese, Indian, Mexican, Thai, American, French ... the list if endless.
Missed out going to the Animal park and the Harbor there. Next time probably!
The San Diego downtown is a great place to go to try out various types of cuisines - Chinese, Indian, Mexican, Thai, American, French ... the list if endless.
Missed out going to the Animal park and the Harbor there. Next time probably!
Subscribe to:
Posts (Atom)
