tag:blogger.com,1999:blog-77961427762197281432024-03-21T22:08:35.453-07:00Need to find a titleUnknownnoreply@blogger.comBlogger38125tag:blogger.com,1999:blog-7796142776219728143.post-77291815805029791572011-01-06T11:03:00.000-08:002011-01-06T11:08:02.303-08:00Couldn't find a title, So moving on.I am leaving the comforts of the blogger platform and moving to a very stripped down, custom and home grown platform.<div><br /></div><div>See you there <a href="http://kunalmodi.com/blog">http://kunalmodi.com/blog</a></div><div><br /></div><div>Adios Blogger! </div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7796142776219728143.post-25832331097091439142009-12-10T12:20:00.001-08:002010-07-07T05:43:39.373-07:00Couple of Cups of Coffee<div style="text-align: center;"><span style=";font-family:Arial;font-size:100%;" >I got this very thought provoking email today, wanted to share.</span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;color:black;" ><span style="color:black;">When things in your life seem</span></span><span style=";font-family:verdana;font-size:100%;" >, <span style="color:black;"><span style="color:black;">almost too much to handle,</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">When 24 Hours in a day is not enough,</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">Remember the mayonnaise jar and 2 cups of coffee.</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">A professor stood before his philosophy class</span></span> </span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;"> and had some items in front of him.</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">When the class began, wordlessly,</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">He picked up a very large and empty mayonnaise jar</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">And proceeded to fill it with golf balls.</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">He then asked the students, if the jar was full.</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">They agreed that it was.</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">The professor then picked up a box of pebbles and poured</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">them into the jar. He shook the jar lightly.</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">The pebbles rolled into the open Areas between the golf balls.</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">He then asked the students again if the jar was full. They agreed it was.</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">The professor next picked up a box of sand and poured it into the jar.</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;"> Of course, the sand filled up everything else.</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">He asked once more if the jar was full. The students responded with a unanimous 'yes.'</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">The professor then produced two cups of coffee from under the table and poured the entire contents into the jar, effectively</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">filling the empty space between the sand. The students laughed.</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">'Now,' said the professor, as the laughter subsided,</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">'I want you to recognize that this jar represents your life.</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">The golf balls are the important things - family,</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">children, health, Friends, and Favorite passions –</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">Things that if everything else was lost and only they remained, Your life would still be full.</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">The pebbles are the other things that matter like your job, house, and car.</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">The sand is everything else --The small stuff.</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">'If you put the sand into the jar first,' He continued,</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">there is no room for the pebbles or the golf balls.</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">The same goes for life.</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">If you spend all your time and energy on the small stuff,</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">You will never have room for the things that are important to you.</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">So...</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">Pay attention to the things that are critical to your happiness.</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">Play With your children.</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">Take time to get medical checkups.</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">Take your partner out to dinner.</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">There will always be time to clean the house and fix the disposal.</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">'Take care of the golf balls first --</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">The things that really matter.</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">Set your priorities. The rest is just sand.'</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">One of the students raised her hand and inquired what the coffee represented.</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">The professor smiled.</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">'I'm glad you asked'.</span></span></span><span style="font-size:100%;"><br /><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">It just goes to show you that no matter how full your life may seem,</span></span></span><span style="font-size:100%;"><br /></span><span style=";font-family:verdana;font-size:100%;" ><span style="color:black;"><span style="color:black;">there's always room for a couple of cups of coffee with a friend.'</span></span></span></div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-7796142776219728143.post-6121264537239382912009-11-06T14:14:00.000-08:002009-11-17T18:00:34.030-08:00Are my facebook photos really private?I wanted to show a facebook friend's photograph to another facebook friend. I sent him the link in the browser. But he got an error "No Content Found". This is a general facebook message when someone tries to access a resource which does not exists or you don't have the permissions to view the resource. In this case the content was there, but permissions were missing.<br /><br />I right clicked on the photo(browser : firefox) and copied the image location. And pasted it to my friend. And voila, he could access it. Now that is scary. Even your photographs with the highest privacy levels are on some facebook caching server somewhere on the Internet. The only thing you don't know is the address. I could access the cached copy without any authentication.<br /><br /><span style="font-weight: bold;">My next question : Can a crawler(automated web program) find these photographs?</span><br /><br />Well, this is what I tried. Following is the image link of a photograph which has the highest privacy level ('Only Me') and you can see this photograph too.<br /><br /><a target="_blank" href="http://photos-g.ak.fbcdn.net/hphotos-ak-snc3/hs005.snc3/11269_100176256674713_100000470162575_1960_2224458_n.jpg">http://photos-g.ak.fbcdn.net/hphotos-ak-snc3/hs005.snc3/11269_100176256674713_100000470162575_1960_2224458_n.jpg</a><br /><br />Let us break this up.<br /><ul><li>http://photos-g.ak.fbcdn.net/ --> domain owned by facebook</li><li>hphotos-ak-snc3/hs005.snc3 --> seems to be their caching directories (keeps on changing for different cached photos.)</li><li>11269_100176256674713_100000470162575_1960_2224458_n.jpg --> your photograph, obviously renamed but we can break it down too.</li><li>Of these,<br />100000470162575 --> is your profile Id.<br />1960 --> is your photo id.<br />n --> type of photograph (other values could be 'a' or 's'or 't' where s could stand for 'small' and t for 'thumbnail', n for 'normal')<br /><br />But for the other 3 params (11269, 100176256674713, 2224458) I am still figuring out (look at the facebook API might help).</li></ul>If the crawler tries generating these params (using the same logic as Facebook or some derived intelligent alogrithm other than Brute Force). Any such attempt will definitely make Facebook aware.<br /><br />It is only a matter of time for some outsider to understand this logic.<br /><br /><span style="font-weight: bold;">So back to the question : Are my facebook photos really private?</span><br /><br />Yes they are, as long as no one knows where they are. The analogy for this is, Imagine the Internet as the world where all places are indentified by a unique address. As long as your home address is unknown to intruder, the intruder cannot harm you. But if the address becomes known, there is not a single lock at your home to protect your assets.<br /><br />P.S. : These are my personal views and conclusions and may/may not be accurate/correct.Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-7796142776219728143.post-90372711834323330092009-11-04T12:02:00.000-08:002009-11-17T18:01:42.500-08:00Google Search taking more than 3 sec.<a target="_blank" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYeJCX8rGuEycOyL7w7sZbazGDrwZ1klY5C7uRuX91oFm-3S4sCIMqiFDAq5LL5DkbtpA66i19JP1njGYwp7YTyCAZgSstcafihblJSej9vRc4C3qSocah8_iMV1G9NI8uutsMGIn5dfw1/s1600-h/google_search_more_than_3_second.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 281px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYeJCX8rGuEycOyL7w7sZbazGDrwZ1klY5C7uRuX91oFm-3S4sCIMqiFDAq5LL5DkbtpA66i19JP1njGYwp7YTyCAZgSstcafihblJSej9vRc4C3qSocah8_iMV1G9NI8uutsMGIn5dfw1/s400/google_search_more_than_3_second.PNG" alt="" id="BLOGGER_PHOTO_ID_5400343621814086578" border="0" /></a><br /><br />Not many times you get to see a google search taking more than 3 seconds for a query. Check it out here. However, google caches this information (expected) and the next time it gave the results in 0.15s.Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-7796142776219728143.post-28195453394179434012009-10-07T12:32:00.001-07:002009-10-07T12:44:54.137-07:00Slow Firefox! Tip 1Tip 1: If your browser history grows larger and larger (you never delete like me ), It would be a good sacrifice to delete your browsing history once in a while after having everything you need bookmarked. This speeds up firefox many times, especially when you start typing in the address bar.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7796142776219728143.post-19812644473417907842009-09-22T19:38:00.001-07:002009-09-22T19:40:57.875-07:00Google Ad for Bing.com<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqkU7bIgqjo_OGYSG2UK_tRCGFv-7Ufd3fSNzl98v93ZzAtM8vuqQuS0zhRLS4wdbECiQqvCO4miG-HjBbN3mSXgc0iYEg-7uSLfhNUANg_0KIZJrvt-cXk8pAqrRhwWVx-RhyZtYdXJ3_/s1600-h/bing.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 292px; height: 400px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqkU7bIgqjo_OGYSG2UK_tRCGFv-7Ufd3fSNzl98v93ZzAtM8vuqQuS0zhRLS4wdbECiQqvCO4miG-HjBbN3mSXgc0iYEg-7uSLfhNUANg_0KIZJrvt-cXk8pAqrRhwWVx-RhyZtYdXJ3_/s400/bing.PNG" alt="" id="BLOGGER_PHOTO_ID_5384486876964893586" border="0" /></a>Height of professionalism. Did anyone say Antitrust?Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7796142776219728143.post-85101233298773603552009-09-18T19:07:00.000-07:002009-09-18T19:08:36.034-07:00My app got rejected<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB9qVdf9PdCrinpuxhy_LqHhl6ZZ2kg1HKbqHucX_zMVkw1vjErhRBl9PS2CgiNG8r0dctf_YOMQqTxbpy_rK__zWWAGb4mXG-K0CwJTli9d3kDbjXHo5DjkiDtnGb-FMeUh244a2Cu-FV/s1600-h/google_voice.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB9qVdf9PdCrinpuxhy_LqHhl6ZZ2kg1HKbqHucX_zMVkw1vjErhRBl9PS2CgiNG8r0dctf_YOMQqTxbpy_rK__zWWAGb4mXG-K0CwJTli9d3kDbjXHo5DjkiDtnGb-FMeUh244a2Cu-FV/s400/google_voice.jpg" alt="" id="BLOGGER_PHOTO_ID_5382994619947687458" border="0" /></a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7796142776219728143.post-23986143997952152882009-03-30T19:11:00.000-07:002009-12-22T11:14:36.534-08:00Firefox - Blinking CursorI am annoyed for the past one week due to the blinking cursor on firefox. I was about to uninstall firefox until I googled for this post.<br /><br /><br />To disable this annoying caret, just Press "<span style="font-weight: bold;">F7</span>" and press "No".<br /><br />It was a Caret browsing feature which I somehow enabled and then thought it was a firefox bug.<br /><br />More information:<br /><br /><a href="http://beyondteck.blogspot.com/2006/05/firefox-blinking-cursor-problem.html">http://beyondteck.blogspot.com/2006/05/firefox-blinking-cursor-problem.html<br /></a><br /><br /><br />Hope this helps someone.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7796142776219728143.post-89611813559353563062009-03-25T20:38:00.000-07:002009-03-25T20:46:31.122-07:00When you say nothing at all"When you say nothing at all" has been one of my favorite song of all time. But today I discovered that it has been sung by 3 three different singers in a span of 10 years. And each one brings his/her own charm into the song.<br />Interesting, So check all three out here.<br />Keith Whitley - 1988<br />Alison Krauss - 1995<br />Ronan Keating - 1999<br /><br />Keith Whitley<br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/2El6y-9qMoU&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/2El6y-9qMoU&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br /><br />Alison Krauss<br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/gVW3Yege2-I&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/gVW3Yege2-I&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br /><br />Ronan Keating<br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/AuJrEBtmM1Q&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/AuJrEBtmM1Q&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br /><br />Enjoy!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7796142776219728143.post-47404883863685057812009-01-12T17:57:00.000-08:002009-01-12T18:42:45.490-08:00The Indian UnderdogIt was quite a usually morning today until I heard some interesting conversation. As soon as I boarded the jam packed E subway to 7th Avenue, I unwilling started hearing a conversation between a man and a woman. I tried my best not to hear it, but still couldn't help courtesy the packed train and the way I was positioned.<br />Enough of excuses, let me get to the talk now! Initially they bored me, talking about a person who was now deep into drugs and almost ruined his life. (Not a good thing to hear early in the morning though). As soon as the train left the 50th Street Station, the words Slumdog Millionaire fell onto my ears. The initially boring conversation now attracted my attention. "Slumdog won 4 awards(Golden Globe), seems to be a good film" and I whispered in my mind "wow!" I am here in the middle of a overcrowded, early-morning subway and two Americans talking about Slumdog Millionaire. What a start!<br />Before I could to continue overhearing their conversation, I had to get off at 7th Avenue. I couldn't wait to google up for this update as I reached work. Indeed I was happy as I had seen this movie just a day before and had loved it. Excellently directed film with a great script and music, truly deserved recognization. Worth a watch!<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoOdBQP1zF3umno2fR1XjZPukj_eARyBdzJfqevEs-Yd8xjLa2dW-eSFjSqJrG_xAqmf0GbDAlQpWiODsZ4uKmGxbuT9iq8xj-89Wp3jbtk4yfJS_SsuJu1LAsCOpz7svoeSQFjy2XWa38/s1600-h/2693979.0.jpg"><img style="cursor: pointer; width: 189px; height: 400px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoOdBQP1zF3umno2fR1XjZPukj_eARyBdzJfqevEs-Yd8xjLa2dW-eSFjSqJrG_xAqmf0GbDAlQpWiODsZ4uKmGxbuT9iq8xj-89Wp3jbtk4yfJS_SsuJu1LAsCOpz7svoeSQFjy2XWa38/s400/2693979.0.jpg" alt="" id="BLOGGER_PHOTO_ID_5290602794474432706" border="0" /></a>Unknownnoreply@blogger.com5tag:blogger.com,1999:blog-7796142776219728143.post-41576497180569590342008-12-20T13:40:00.000-08:002008-12-20T14:49:04.486-08:00My first Pav BhajiA have been cooking regularly now. It is a great feeling to cook and more than that cook good food. Fortunately, i can cook good food. That may be because my mom is a good cook and I love food.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXPcufJr-CMfJyNApMGNUqNUWWsgzlurWrBL_nk7dhYiVxJl6hdwPc643gI_OVeLfE0rcyp2DT44_UKVhtgS-7BwcJZ96I6Ca0dK9vMzS7f3iP7sBTayOQp53QV4k1Y4MlKMuLBIrjlF-A/s1600-h/1206081656-01.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXPcufJr-CMfJyNApMGNUqNUWWsgzlurWrBL_nk7dhYiVxJl6hdwPc643gI_OVeLfE0rcyp2DT44_UKVhtgS-7BwcJZ96I6Ca0dK9vMzS7f3iP7sBTayOQp53QV4k1Y4MlKMuLBIrjlF-A/s400/1206081656-01.jpg" alt="" id="BLOGGER_PHOTO_ID_5282007558943868546" border="0" /></a>Unknownnoreply@blogger.com5tag:blogger.com,1999:blog-7796142776219728143.post-3307925779191942522008-12-17T07:37:00.000-08:002008-12-20T15:46:28.674-08:00A December Snowy MorningIts December and it has started snowing. The train is passing through the snow covered tracks. Small shrubs trying to peep out through the snow covered blanket. Its the first snow this winter and the first snow I have ever experienced. I am familiar with heavy rains and always wondered how it would feel being under a snowfall. It is a vast difference. Snow is so soft that you hardly realize that its falling. So light to feel. (There may be hailstorms and blizzards too, but I don't want to spoil my party so soon :P). And when it covers all the ground, it looks very pure and quiet. That can be attributed to the color white as a symbol of peace and purity.<br />I am gazing outside window as soft white cotton flakes fall from the invisible clouds. Such a serene feeling. But as soon as they touch my window they disappear and instead small droplets of water trickle through the window glass. I can see cars covered with snow rushing past traffic lights. People under their umbrella and snow coats walking pass the rail station. It is such a calm environment and you would want to bury yourself deep into thoughts admiring this beautiful phenomenon of nature.<br />The train continues to speed on. Soon I will reach New York City to start another exciting day at work and will have to leave behind my admiration for this heavenly phenomenon for some other time.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBygg-j-uFs3KLzGqE0GBISQ5NgnhG6oD2se-y1oyKi3a0wPlzv_0_FhQEmmK8zCxq9MxCqd2dXErgsj6Z32isVt7S6WX4iVSNr603655niadl-Qet_kj4ReMzX7T4F3ex_GKODigULDPt/s1600-h/1220081249-00.jpg"><img style="cursor: pointer; width: 400px; height: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBygg-j-uFs3KLzGqE0GBISQ5NgnhG6oD2se-y1oyKi3a0wPlzv_0_FhQEmmK8zCxq9MxCqd2dXErgsj6Z32isVt7S6WX4iVSNr603655niadl-Qet_kj4ReMzX7T4F3ex_GKODigULDPt/s400/1220081249-00.jpg" alt="" id="BLOGGER_PHOTO_ID_5282022736115450066" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2zHjWxB81yMt4R-vZ_1wRFvIxf-6NgX2JS6rs5dH754mI410tkncSfgds9RwNGh9CKxYLEp9BXyuq-dY-G93iuh08GsRkdxZg51evUxiXktrd4w9Ipb29M2wSeau6fOEE96lH0b_MlARw/s1600-h/1219081346-00.jpg"><img style="cursor: pointer; width: 400px; height: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2zHjWxB81yMt4R-vZ_1wRFvIxf-6NgX2JS6rs5dH754mI410tkncSfgds9RwNGh9CKxYLEp9BXyuq-dY-G93iuh08GsRkdxZg51evUxiXktrd4w9Ipb29M2wSeau6fOEE96lH0b_MlARw/s400/1219081346-00.jpg" alt="" id="BLOGGER_PHOTO_ID_5282017565025127378" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIUkF4-y25nKNT_ol66zbsRnhpgADYK5r31Pz6CAYCy9wde-Ze8cXUMiPfcjRPJEYc4l9G913_Hq3QAdDbUkIWtAymjhiAZKqxZJ9xuIoqJMiZLoFa-pDxGq95ZA60ALpw0H5LKNVWNUmg/s1600-h/1219081338-00.jpg"><img style="cursor: pointer; width: 400px; height: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIUkF4-y25nKNT_ol66zbsRnhpgADYK5r31Pz6CAYCy9wde-Ze8cXUMiPfcjRPJEYc4l9G913_Hq3QAdDbUkIWtAymjhiAZKqxZJ9xuIoqJMiZLoFa-pDxGq95ZA60ALpw0H5LKNVWNUmg/s400/1219081338-00.jpg" alt="" id="BLOGGER_PHOTO_ID_5282016743273470802" border="0" /></a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7796142776219728143.post-41683544424878740192008-09-04T21:08:00.000-07:002008-09-04T22:26:30.347-07:00Google Chrome: The Bigger Picture<div style="text-align: center;">I am back to blogging and what better to restart with other than Google's new Web Browser, <a href="http://google.com/chrome">Google Chrome</a> . Touted as a competitor to IE 8 and firefox, but its more than that. You can obtain a first hand information about why this browser was built from <a href="http://code.google.com/chromium/">these videos</a> posted by the Google Engineers themselves. An Open Source product with a new dedicated JavaScript engine called V8, chrome is potrayed as a browser for "running the application" and not for displaying pages. Google developers are correct when they say that Internet and related web apps have come a long way but there hasn't been a significant change in the browser. <br /></div><div><br /></div><div><br /></div><div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaX3M-uycdqV7ImpD8Pd3hiLzJwxMz3aMwEJCepd0u1KAsgU5fYGRrbVN2KMzVcqsceNqsfnyLGxI8I1zAmxHc9TPkGHidXxjaSe4lI5BMksV7pFH4lAvTooM0kAo_PN7j-cTHi7CjE7VY/s1600-h/Chrome.JPG"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaX3M-uycdqV7ImpD8Pd3hiLzJwxMz3aMwEJCepd0u1KAsgU5fYGRrbVN2KMzVcqsceNqsfnyLGxI8I1zAmxHc9TPkGHidXxjaSe4lI5BMksV7pFH4lAvTooM0kAo_PN7j-cTHi7CjE7VY/s400/Chrome.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5242399299512557394" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; " /></a><div><br /></div><div>And be careful when Google says "browser for applications". It throws open a new realm of discussion. So now Google has a browser, web based apps for <a href="http://spreadsheets.google.com/">Spread sheets</a>, Powerpoint Viewer(an option for <a href="http://mail.google.com/">Gmail</a> users) and <a href="http://docs.google.com/">Google docs</a> are already there. <a href="http://picasaweb.google.com/">Picasaweb</a> is a hit with its recently released new features. <a href="http://blogger.com/">Blogger</a>, <a href="http://maps.google.com/">Google Maps</a>, <a href="http://notebook.google.com/">Google Notebook</a>, <a href="http://reader.google.com/">Google Reader</a> are a few more popular products not forgetting the search engine itself. Also an array of google products are available at <a href="http://google.com/labs">Google Labs</a>. </div><div><br /></div><div>So what does all these signify. Did Google want to get into the browser race as it didn't have one? I think no. It has a bigger vision. With data speeds <a href="http://hem.com.np/2007/04/27/experts-break-internet-speed/">speculated to cross across</a> 7.67 Gb/s in near future, Google may be aiming for a complete web based environment for computers. Imagine your computer just running the "web browser"(I guess there will be a better term for that soon) and all your applications inside it. Something similar to Sun's caption, the Network is the Computer. Will you need the Operating System anymore? Hmm, a tough one. But may be Google is looking forward in that direction. How am I able to reach such conclusions? Yes, there is more than specualation. </div><div>1.) If you carefully hear the engineers explaining the design of Chrome, you will learn that each tab has its own sand box and doesn't interfere with the other. So if one tab fails other will continue. They are thinking applications.</div><div>2.) Google Chrome is built on a completely new JavaScript engine V8. May be this could be the foundation for a another platform on which the browser may run.</div><div>3.) Who would give a Task Manager in a browser with all the statistics that a nerd would need?(Check this option by pressing Shift + Esc)</div><div>4.) Mozilla, whose major income is from Google, its equations would definitely change if Google touts this as a browser.</div><div>5.) Google Chrome doesn't exceed the expectations of a Google product. A Google product has always been different. Chrome as a browser doesn't do that. Now change your perspective and see Chrome as a "Browser for Applications". It will exceed your expectations.</div><div> </div><div>Having said all these, only time can verify it. If Google is able to achieve the "browser for apps" sometime soon, its going to change the perspectives in the way computers will be looked at.</div><div><br /></div><div>Here are the list of features I liked about the Chrome</div><div><br /></div><div>Hits</div><div>* Relatively less memory usage & seems light weight.</div><div>* in built java script inspector.</div><div>* no useless wastage of spaces.</div><div><br /></div><div>Misses</div><div>* Bad Pop-Up blocker management.</div><div>* Cntrl + F search <span class="Apple-style-span" style="font-style: italic;">may</span> sometimes skip the embedded Text Area (not in cases of gmail and blogger, Happens with the proprietry platform I work on)</div><div>* Need Microsoft Visual Studio 2005 to build for the latest windows version(Linux/Mac versions soon).</div><div><br /></div><div>But there are no Misses if you see it as a "Browser for apps". Its an ideal stepping stone. And since Chrome is built on an open source project called <a href="http://code.google.com/chromium">Chromium</a> , it could be an innovative and visionary development team who could do it before Google does it.</div><div><br /></div><div>What next? Get Microsoft Visual Studio 2005 and start exploring Google Chrome.</div><div>Related posts soon. Keep watching</div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7796142776219728143.post-30672425694997322622008-09-03T17:56:00.000-07:002008-09-04T21:07:25.784-07:00The journey has been...I now stay in US. Its nearly 8 weeks since I left Mumbai and more 2 months since I wrote my last blog(that too a movie review :D). Finally, a computer science graduate from the Mumbai University and now a Software Developer at Arvato Systems in New York City. Last 8 weeks have transformed my life. They say here Life comes at you Fast. And I am feeling the pace. From the fast paced crowd of Mumbai, to the more sophisticated and fashionable but equally paced crowd of New York. From the bumpy streets of Mumbai to the wider and more cleaner Streets of New York(Although people here do not condsider New York clean, but they haven't seen Mumbai ;)) From the Mumbai trains to the New York Subways, the transformation has been fast. Have quickly adapted to the cooler Summers of New York from the Hot & Humid weather of Mumbai. Such transformation use cases are plenty and I can go on and go. <br /><br />But its the same Kunal, its the same Java, its the same NetBeans(now Eclipse too), the same Windows/Linux/Mac, the same Google,Microsoft,Sun. I still talk with System.out.println and constructors. I still look for more and new IDE keyboard shortcuts. For and While loops still form the basic indegrients of my code. Windows is still hated by developers and I still use it. I work with a passionate and a diverse(read people from different cultures and linguistic background) team of developers but we speak the same language which the computer understands. Debugging is still bugging and coding is still exciting. Caffinee(Coffee) is the favorite drink though addictive. Technology still makes breaking news everyday and we have Google Chrome. <br /><br />In spite of such a crazy transformation of personal and social life, some things cease to change. And they are those things which command the change. And the world has really gone flat. <br /><br />So, The journey has been...(I can't find a suitable word)Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-7796142776219728143.post-23089669983539777802008-07-04T10:44:00.000-07:002008-07-04T11:07:08.459-07:00Jaane Tu.. Ya Jaane Na - Movie ReviewWell the film had something in it. First the music took me to the cinema hall to watch the film on the first day itself. A youthful film full of energy and freshness. <br /><br />Imran Khan (Jai) and Genelia (Aditi) are the best of buddies but fail to realize that they were meant for each other. After clearing this 'misunderstanding' with the parents and friends they look for their soul mates. Aditi helps Jai find his mate while she starts seeing a family friend's son. After a bunch of events they start realizing that they are meant for each other and end up together. Nothing new in this story. But having said that the film is executed superbly. Even if you could predict whats next, you would wonder how it will be executed. And each time the expectations rose more.The climax was fun filled. I could sense the audience enjoying themselves and left the cinema hall satisfied.<br /><br />Each character had its own importance and the faces looked fresh. No stereotyped character! A clean entertaining film and with an excellent music.<br /><br />Worth a Watch.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7796142776219728143.post-42443753659920930852008-06-15T20:29:00.001-07:002008-06-15T20:50:22.662-07:00On my way to BarodaI am on my way to Baroda(I wish, I could link it to google maps right now), my other hometown. I was born here. Though i visit Baroda (A 7 hour train journey from Mumbai) atleast biannually, the journey this time is making me have mixed feelings. I am experiencing the typical indian train journey. Clattering of the tea vendors, passengers around me chatting, eating... its fun travelling in a second class compartment. The view outside the window is equally exciting. The long spans of country side farms and on concrete structure in sight. So whats new this time? You may ask me all this may be routine for me. Yes this is not the first time i am experiencing this. But I am experiencing it from a different dimension. I am leaving for the US in a three weeks time. I dont know when I'll be back to take such a journey to Baroda again. I am going to get lost in my quest to realise my dreams. In my opinion there comes a time in everyone's life where one chooses a path which will act as a catalyst to achieve one's ambition. I don't know how it will execute, but I am sure things will surely work out well.<br />The train is breezing through the fields. Within few hours it will reach the destination.<br />And if your thinking that second class coaches of Indian Railways have Internet connection, wait a minute. I am using my cell phone to post this blog. Indian Railways have a long way to go :-).Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7796142776219728143.post-36972082737498011222008-06-06T07:38:00.000-07:002008-06-06T07:45:02.970-07:00NetBeans Community Docs Spotight - Kunal ModiNetBeans Community Docs Coordinator has put a Spotlight on my Contributions.<br />Check out <a href="http://nb-community-docs.blogspot.com/2008/06/netbeans-community-docs-spotight-kunal.html">http://nb-community-docs.blogspot.com/2008/06/netbeans-community-docs-spotight-kunal.htm</a>lUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-7796142776219728143.post-5946785636029701282008-05-24T22:10:00.000-07:002008-05-24T23:08:58.554-07:00Search trends for NetBeans IDE crosses Eclipse IDE at Google Trends.The popularity of NetBeans has increased many fold since the release of NetBeans6.0.<br />Today at google trends I discovered the same. I compared the results for "NetBeans IDE" and "Eclipse IDE" at <a href="http://trends.google.com/">google trends</a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieto3HnqXqfbvLdTQ2FtPfInZUqg9dWR27BtoPvwtB6a7yD1FxBYv7dTw5stDRUDhqMaksv-XcOxw9cksqnzkEK2ssnsxn36FjlkwcXi4_We2vXuaE8slP24wRDZ4fzBpBEXHzDlUsi4HR/s1600-h/trends.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieto3HnqXqfbvLdTQ2FtPfInZUqg9dWR27BtoPvwtB6a7yD1FxBYv7dTw5stDRUDhqMaksv-XcOxw9cksqnzkEK2ssnsxn36FjlkwcXi4_We2vXuaE8slP24wRDZ4fzBpBEXHzDlUsi4HR/s400/trends.JPG" alt="" id="BLOGGER_PHOTO_ID_5204191408442376850" border="0" /></a><br />(You can view the results <a href="http://www.google.com/trends?q=NetBeans+IDE%2C+Eclipse+IDE">here</a> , to know more about google trends click <a href="http://www.google.com/intl/en/trends/about.html">here</a>).<br />I wasn't surprised to see that "NetBeans IDE" was more searched than "Eclipse IDE" over the recent months. The trends truly reflect the hard work put by the NetBeans team, Sun Microsystems and an active and growing NetBeans Community. NetBeans has now become developers favorite choice for development. I am sure that this trend will continue to grow in coming months.<br /><br />Note: I have purposely included the word IDE for trend results because google trends is not able to distinguish between the natural phenomenon "eclipse" and the Java IDE "Eclipse". Including "IDE" in both the keywords makes it more or less a fair comparison.<br />Also, this is an unadulterated interpretation of a NetBeans user and a student.<br /><br />Happy NetBeaning!Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-7796142776219728143.post-85063645604750594072008-05-20T07:35:00.000-07:002008-05-20T07:45:59.763-07:00Steve Jobs Stanford Commencement Speech 2005This is one of my favourite videos.. truly inspiring... worth a watch<br /><object height="355" width="425"><param name="movie" value="http://www.youtube.com/v/D1R-jKKp3NA"><param name="wmode" value="transparent"><embed src="http://www.youtube.com/v/D1R-jKKp3NA" type="application/x-shockwave-flash" wmode="transparent" height="355" width="425"></embed></object><br /><br />The whole speech in text is as follows:-<br />You've got to find what you love,' Jobs says<br /><br />This is the text of the Commencement address by Steve Jobs, CEO of Apple Computer and of Pixar Animation Studios, delivered on June 12, 2005.<br /><br /><br />I am honored to be with you today at your commencement from one of the finest universities in the world. I never graduated from college. Truth be told, this is the closest I've ever gotten to a college graduation. Today I want to tell you three stories from my life. That's it. No big deal. Just three stories.<br /><br />The first story is about connecting the dots.<br /><br />I dropped out of Reed College after the first 6 months, but then stayed around as a drop-in for another 18 months or so before I really quit. So why did I drop out?<br /><br />It started before I was born. My biological mother was a young, unwed college graduate student, and she decided to put me up for adoption. She felt very strongly that I should be adopted by college graduates, so everything was all set for me to be adopted at birth by a lawyer and his wife. Except that when I popped out they decided at the last minute that they really wanted a girl. So my parents, who were on a waiting list, got a call in the middle of the night asking: "We have an unexpected baby boy; do you want him?" They said: "Of course." My biological mother later found out that my mother had never graduated from college and that my father had never graduated from high school. She refused to sign the final adoption papers. She only relented a few months later when my parents promised that I would someday go to college.<br /><br />And 17 years later I did go to college. But I naively chose a college that was almost as expensive as Stanford, and all of my working-class parents' savings were being spent on my college tuition. After six months, I couldn't see the value in it. I had no idea what I wanted to do with my life and no idea how college was going to help me figure it out. And here I was spending all of the money my parents had saved their entire life. So I decided to drop out and trust that it would all work out OK. It was pretty scary at the time, but looking back it was one of the best decisions I ever made. The minute I dropped out I could stop taking the required classes that didn't interest me, and begin dropping in on the ones that looked interesting.<br /><br />It wasn't all romantic. I didn't have a dorm room, so I slept on the floor in friends' rooms, I returned coke bottles for the 5¢ deposits to buy food with, and I would walk the 7 miles across town every Sunday night to get one good meal a week at the Hare Krishna temple. I loved it. And much of what I stumbled into by following my curiosity and intuition turned out to be priceless later on. Let me give you one example:<br /><br />Reed College at that time offered perhaps the best calligraphy instruction in the country. Throughout the campus every poster, every label on every drawer, was beautifully hand calligraphed. Because I had dropped out and didn't have to take the normal classes, I decided to take a calligraphy class to learn how to do this. I learned about serif and san serif typefaces, about varying the amount of space between different letter combinations, about what makes great typography great. It was beautiful, historical, artistically subtle in a way that science can't capture, and I found it fascinating.<br /><br />None of this had even a hope of any practical application in my life. But ten years later, when we were designing the first Macintosh computer, it all came back to me. And we designed it all into the Mac. It was the first computer with beautiful typography. If I had never dropped in on that single course in college, the Mac would have never had multiple typefaces or proportionally spaced fonts. And since Windows just copied the Mac, its likely that no personal computer would have them. If I had never dropped out, I would have never dropped in on this calligraphy class, and personal computers might not have the wonderful typography that they do. Of course it was impossible to connect the dots looking forward when I was in college. But it was very, very clear looking backwards ten years later.<br /><br />Again, you can't connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something — your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life.<br /><br />My second story is about love and loss.<br /><br />I was lucky — I found what I loved to do early in life. Woz and I started Apple in my parents garage when I was 20. We worked hard, and in 10 years Apple had grown from just the two of us in a garage into a $2 billion company with over 4000 employees. We had just released our finest creation — the Macintosh — a year earlier, and I had just turned 30. And then I got fired. How can you get fired from a company you started? Well, as Apple grew we hired someone who I thought was very talented to run the company with me, and for the first year or so things went well. But then our visions of the future began to diverge and eventually we had a falling out. When we did, our Board of Directors sided with him. So at 30 I was out. And very publicly out. What had been the focus of my entire adult life was gone, and it was devastating.<br /><br />I really didn't know what to do for a few months. I felt that I had let the previous generation of entrepreneurs down - that I had dropped the baton as it was being passed to me. I met with David Packard and Bob Noyce and tried to apologize for screwing up so badly. I was a very public failure, and I even thought about running away from the valley. But something slowly began to dawn on me — I still loved what I did. The turn of events at Apple had not changed that one bit. I had been rejected, but I was still in love. And so I decided to start over.<br /><br />I didn't see it then, but it turned out that getting fired from Apple was the best thing that could have ever happened to me. The heaviness of being successful was replaced by the lightness of being a beginner again, less sure about everything. It freed me to enter one of the most creative periods of my life.<br /><br />During the next five years, I started a company named NeXT, another company named Pixar, and fell in love with an amazing woman who would become my wife. Pixar went on to create the worlds first computer animated feature film, Toy Story, and is now the most successful animation studio in the world. In a remarkable turn of events, Apple bought NeXT, I returned to Apple, and the technology we developed at NeXT is at the heart of Apple's current renaissance. And Laurene and I have a wonderful family together.<br /><br />I'm pretty sure none of this would have happened if I hadn't been fired from Apple. It was awful tasting medicine, but I guess the patient needed it. Sometimes life hits you in the head with a brick. Don't lose faith. I'm convinced that the only thing that kept me going was that I loved what I did. You've got to find what you love. And that is as true for your work as it is for your lovers. Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.<br /><br />My third story is about death.<br /><br />When I was 17, I read a quote that went something like: "If you live each day as if it was your last, someday you'll most certainly be right." It made an impression on me, and since then, for the past 33 years, I have looked in the mirror every morning and asked myself: "If today were the last day of my life, would I want to do what I am about to do today?" And whenever the answer has been "No" for too many days in a row, I know I need to change something.<br /><br />Remembering that I'll be dead soon is the most important tool I've ever encountered to help me make the big choices in life. Because almost everything — all external expectations, all pride, all fear of embarrassment or failure - these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.<br /><br />About a year ago I was diagnosed with cancer. I had a scan at 7:30 in the morning, and it clearly showed a tumor on my pancreas. I didn't even know what a pancreas was. The doctors told me this was almost certainly a type of cancer that is incurable, and that I should expect to live no longer than three to six months. My doctor advised me to go home and get my affairs in order, which is doctor's code for prepare to die. It means to try to tell your kids everything you thought you'd have the next 10 years to tell them in just a few months. It means to make sure everything is buttoned up so that it will be as easy as possible for your family. It means to say your goodbyes.<br /><br />I lived with that diagnosis all day. Later that evening I had a biopsy, where they stuck an endoscope down my throat, through my stomach and into my intestines, put a needle into my pancreas and got a few cells from the tumor. I was sedated, but my wife, who was there, told me that when they viewed the cells under a microscope the doctors started crying because it turned out to be a very rare form of pancreatic cancer that is curable with surgery. I had the surgery and I'm fine now.<br /><br />This was the closest I've been to facing death, and I hope its the closest I get for a few more decades. Having lived through it, I can now say this to you with a bit more certainty than when death was a useful but purely intellectual concept:<br /><br />No one wants to die. Even people who want to go to heaven don't want to die to get there. And yet death is the destination we all share. No one has ever escaped it. And that is as it should be, because Death is very likely the single best invention of Life. It is Life's change agent. It clears out the old to make way for the new. Right now the new is you, but someday not too long from now, you will gradually become the old and be cleared away. Sorry to be so dramatic, but it is quite true.<br /><br />Your time is limited, so don't waste it living someone else's life. Don't be trapped by dogma — which is living with the results of other people's thinking. Don't let the noise of others' opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.<br /><br />When I was young, there was an amazing publication called The Whole Earth Catalog, which was one of the bibles of my generation. It was created by a fellow named Stewart Brand not far from here in Menlo Park, and he brought it to life with his poetic touch. This was in the late 1960's, before personal computers and desktop publishing, so it was all made with typewriters, scissors, and polaroid cameras. It was sort of like Google in paperback form, 35 years before Google came along: it was idealistic, and overflowing with neat tools and great notions.<br /><br />Stewart and his team put out several issues of The Whole Earth Catalog, and then when it had run its course, they put out a final issue. It was the mid-1970s, and I was your age. On the back cover of their final issue was a photograph of an early morning country road, the kind you might find yourself hitchhiking on if you were so adventurous. Beneath it were the words: "Stay Hungry. Stay Foolish." It was their farewell message as they signed off. Stay Hungry. Stay Foolish. And I have always wished that for myself. And now, as you graduate to begin anew, I wish that for you.<br /><br />Stay Hungry. Stay Foolish.<br /><br />Thank you all very much.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7796142776219728143.post-4956724374898500872008-05-11T10:51:00.000-07:002008-05-11T13:38:58.903-07:00NetBeans6.1 ReviewEach time a new <a href="http://netbeans.org">NetBeans</a> Release is out, it exceeds your expectations. NetBeans6.1 has only reaffirmed that. The NetBeans Java Editor is the most loved feature. The ease with which the NetBeans editor allows you to program not only increases your productivity but helps you know more about the Java programming language. The hints that appear aside the line auto generates the code for importing classes, defining fields and variables and also auto generates the for and while loops for you and I can go and on.<br /><br />The NetBeans6.1 editor enhancements too have been significant. The Bean Information for a class now gets generated at a click of the button.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYHRNykuTAooKZuyVBpwlcALWHQKgqTfJhdO8OLFH_tohg3Q58vQH_1b2NVRqSyKRhSEOX5lESmtdHfxjD7Qi-Kjjgk_ar_RkU4sFaN0lSpFrzJ70mlXKKGRQEEQjvlG1-HTjSTR82D687/s1600-h/scr11.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYHRNykuTAooKZuyVBpwlcALWHQKgqTfJhdO8OLFH_tohg3Q58vQH_1b2NVRqSyKRhSEOX5lESmtdHfxjD7Qi-Kjjgk_ar_RkU4sFaN0lSpFrzJ70mlXKKGRQEEQjvlG1-HTjSTR82D687/s400/scr11.JPG" alt="" id="BLOGGER_PHOTO_ID_5199215026267244034" border="0" /></a><br /><br />It not only gives the auto generated code but also gives the designer view to edit the beans info.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQOK5rCLGFi9l3FJ9NTdFHewDxcwkS8sVUsMQH0hqkkeGPJJf5bEWaHZ42U2HTKFcF9Qp1LmjsqPnMRK_jvkgoMtzeW3qvYkxK2JaRlAMrmYyS4sBXRTrcifoEpKAO97cxluaunUpzq3jc/s1600-h/scr12.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQOK5rCLGFi9l3FJ9NTdFHewDxcwkS8sVUsMQH0hqkkeGPJJf5bEWaHZ42U2HTKFcF9Qp1LmjsqPnMRK_jvkgoMtzeW3qvYkxK2JaRlAMrmYyS4sBXRTrcifoEpKAO97cxluaunUpzq3jc/s400/scr12.JPG" alt="" id="BLOGGER_PHOTO_ID_5199215034857178642" border="0" /></a><br /><br />But one cool feature I would like to talk is about the screen shot of the <a href="http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/TopComponent.html">Top-Component</a>(Windows seen inside NetBeans are called Top-Components) on Drag. Whenever a Top-Component is dragged a screen shot gets attached to it automatically.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpBFINhyphenhyphenndoIkk2-ftRspjyxIYl1IjadEFYJo4y3oHphzE6El03RY6VwVgC221tmRF2GM_LruImhyphenhyphenLRDHwuOLoOUBJT9V8AZBVCm6UW87G9R3L5z0Th-qCX8qR3zHGY5tphOnBxlfa94eb/s1600-h/blog-screen-cast.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpBFINhyphenhyphenndoIkk2-ftRspjyxIYl1IjadEFYJo4y3oHphzE6El03RY6VwVgC221tmRF2GM_LruImhyphenhyphenLRDHwuOLoOUBJT9V8AZBVCm6UW87G9R3L5z0Th-qCX8qR3zHGY5tphOnBxlfa94eb/s400/blog-screen-cast.JPG" alt="" id="BLOGGER_PHOTO_ID_5184669265869503106" border="0" /></a><br />This is cool because NetBeans is able to generate a compressed image of the Top-Component,. This can be leveraged to take a screen shot of the editor content while writing a tutorial.<br /><br />Not to forget the <a href="http://bits.netbeans.org/dev/javadoc">Documentation</a> support that NetBeans provides. The documentation has aided better understanding of existing modules as well as helped in writing new modules for NetBeans.<br /><br />In accordance with this I present below a short tutorial on how add custom action to the NetBeans Java Editor.<br /><br /><ul><li>Introduction: It happens many a times that you get stuck in your small code and you try debugging using the System.out.println() statements. Though NetBeans provides an excellent debugging support and a profiler, you would be discouraged to use that if the magnitude of your code is not that large. As students, we tend to use System.out.println() as our first choice. This tutorial will help you create a custom action for the Java Editor which will insert the System.out.println() statement for the selected variable automatically.</li><li>Lets Start</li><ul><li>Pre-Requirements:- Familiarity with NetBeans IDE</li><li>Creating a New Module</li><ol><li>Create a module called "InsertPrintln" and keep the code name base as "org.modules.sack.insertprinltn". A detailed explaination on how to create a new module can be found on my <a href="http://kgmodi.blogspot.com/2007/12/creating-simple-picturesexplorer-for.html">previous</a> posts.</li></ol><li>Create the Action</li><ol><li>Right click the package node and choose New and select Action from the pop-up menu.</li><li>Select Conditionally Enabled Action. Select EditorCookie from the drop down menu. Click Next.</li><li><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDKMr2_2QBe69gDHl5I0ieqBFov7hkTP1EUH-oX-UnPnkG0JCGzVyOjouaKs_rnrYVHUtPYq9DTngTGMLzwA5kOaUWMRqJgUokyNyFJ-5B-OSPwYuofyB-LBVU_p-4G4DzdtsqnBoM4-Qs/s1600-h/scr13.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDKMr2_2QBe69gDHl5I0ieqBFov7hkTP1EUH-oX-UnPnkG0JCGzVyOjouaKs_rnrYVHUtPYq9DTngTGMLzwA5kOaUWMRqJgUokyNyFJ-5B-OSPwYuofyB-LBVU_p-4G4DzdtsqnBoM4-Qs/s400/scr13.JPG" alt="" id="BLOGGER_PHOTO_ID_5199215039152145954" border="0" /></a></li><li>Select the category as Other. Check only Editor Context Menu Item box and select "text/x-java". Select the position after the "generate-code-HERE-" option. Click Next.</li><li>Enter "InsertPrintln" as the class name and Insert "System.out.println" as the Display name. Keep other settings as default and click finish. The "InsertPrinln" class gets created.</li><li><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv3hlQCwFoqL4s-VEBrzBlx3faeZZygLyTMBVyRBzR4AL3IDR5utndG-8Uzh4aLgOguY8xgndfszeIQD63LR5lXok0QDec0zeoH1RN0mrf0ONMqyOiOmSkzC9O0MSSJgvcLQkGbjFIMrRc/s1600-h/scr14.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv3hlQCwFoqL4s-VEBrzBlx3faeZZygLyTMBVyRBzR4AL3IDR5utndG-8Uzh4aLgOguY8xgndfszeIQD63LR5lXok0QDec0zeoH1RN0mrf0ONMqyOiOmSkzC9O0MSSJgvcLQkGbjFIMrRc/s400/scr14.JPG" alt="" id="BLOGGER_PHOTO_ID_5199215047742080562" border="0" /></a></li></ol><li>Code Content<br /></li><ol><li>All we need to do now is to add the logic for our action in the performAction(Node[] activatedNodes) function of the "InsertPrintln" class.</li><li>First of all add the following module dependencies to your module.</li><ol><li>Editor Library</li><li>Editor Library 2</li><li>Editor Indentation</li></ol><li>To add the dependencies, right click the Libraries node of the project. Select "add module dependency" and add the above dependencies. Once you have added all verify it. To verify roght click the project node, select properties and then select libraries. You should find the list similar to the list shown below.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqPQQSDqbjEiFfiTOI7u_6QT5UiyVMD_Kir61AAbhWKEf1gr2lskXagK712snvZaHAycwl3DdjzkgHu5ea2mI5OmBP9p3o_5HPtizPawmw45ECSztn24LRQ_vK8ZXBuebl2-NfpSgTaYDp/s1600-h/scr15.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqPQQSDqbjEiFfiTOI7u_6QT5UiyVMD_Kir61AAbhWKEf1gr2lskXagK712snvZaHAycwl3DdjzkgHu5ea2mI5OmBP9p3o_5HPtizPawmw45ECSztn24LRQ_vK8ZXBuebl2-NfpSgTaYDp/s400/scr15.JPG" alt="" id="BLOGGER_PHOTO_ID_5199215052037047874" border="0" /></a></li><li>Now add the following code to the performAction(Node[] activatedNodes) function in "InsertPrintln" class. Your performAction(Node[] activatedNodes) should look as follows:protected <span style="font-size:85%;"><span style="font-style: italic;font-family:courier new;" >void performAction(Node[] activatedNodes) {</span> <span style="font-style: italic;font-family:courier new;" > EditorCookie editorCookie = activatedNodes[0].getLookup().lookup(EditorCookie.class);</span> <span style="font-style: italic;font-family:courier new;" ><br /> editor = EditorRegistry.lastFocusedComponent();</span> <span style="font-style: italic;font-family:courier new;" ><br />selectedText = editor.getSelectedText();</span><br /><span style="font-style: italic;font-family:courier new;" ><br /></span> <span style="font-style: italic;font-family:courier new;" ><br />document = (StyledDocument)editor.getDocument();</span><br /><span style="font-style: italic;font-family:courier new;" > int currentLine;</span><br /><span style="font-style: italic;font-family:courier new;" > int nextLineOffset;</span><br /><span style="font-style: italic;font-family:courier new;" > if(selectedText!=null){</span><br /><span style="font-style: italic;font-family:courier new;" ><br />try {</span><br /><span style="font-style: italic;font-family:courier new;" > stringToBeInserted = "System.out.println(\""+selectedText+" =\"+" +selectedText + ");\n";</span><br /><span style="font-style: italic;font-family:courier new;" > currentLine = NbDocument.findLineNumber(document, editor.getCaretPosition());</span><br /><span style="font-style: italic;font-family:courier new;" > nextLineOffset = NbDocument.findLineOffset(document, currentLine + 1);</span><br /><span style="font-style: italic;font-family:courier new;" > document.insertString(nextLineOffset, stringToBeInserted, null);</span><br /><span style="font-style: italic;font-family:courier new;" > BaseDocument bd = (BaseDocument) editor.getDocument();</span><br /><span style="font-style: italic;font-family:courier new;" > <br />Reformat.get(bd).lock();</span> <span style="font-style: italic;font-family:courier new;" > bd.getFormatter().reformat(bd, 0, bd.getLength()-1);</span><br /><span style="font-style: italic;font-family:courier new;" ><br /> Reformat.get(bd).unlock();</span><br /><span style="font-style: italic;font-family:courier new;" > } catch (BadLocationException ex) {</span><br /><span style="font-style: italic;font-family:courier new;" > Exceptions.printStackTrace(ex);</span><br /><span style="font-style: italic;font-family:courier new;" > }</span><br /><span style="font-style: italic;font-family:courier new;" > }</span><br /><span style="font-style: italic;font-family:courier new;" > }</span></span></li><li>Resolve the import references and make the following fields: <span style="font-style: italic;">private</span> <span style="font-size:85%;"><span style="font-family: courier new; font-style: italic;">JTextComponent editor;</span><br /><span style="font-family: courier new; font-style: italic;">private StyledDocument document;</span><br /><span style="font-family: courier new; font-style: italic;">private String selectedText;</span><br /><span style="font-family: courier new; font-style: italic;">private String stringToBeInserted;</span></span></li><li>Your module is ready to run.</li><li>To run, right click the project node and select "Run".</li><li>The target platform opens up. Open any Java file in the Editor.</li><li>Select a variable you wish to print using System.out.println. Right click and choose "Insert System.out.println".<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1m5IuQhXrgUKju6zSgWLNhpL2-yjLXr9AC_xQDgWM_sElA5Nby9yYycuDdYYY1w2uJYs5KZVPXJEgNeDEpPCQjOVghrq0njD8obSNiRyHPEcBnDKmdCz6k9_npJKIntLOzAYbhMRwPwC_/s1600-h/scr16.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1m5IuQhXrgUKju6zSgWLNhpL2-yjLXr9AC_xQDgWM_sElA5Nby9yYycuDdYYY1w2uJYs5KZVPXJEgNeDEpPCQjOVghrq0njD8obSNiRyHPEcBnDKmdCz6k9_npJKIntLOzAYbhMRwPwC_/s400/scr16.JPG" alt="" id="BLOGGER_PHOTO_ID_5199216044174493266" border="0" /></a></li><li>The statement automatically gets inserted on the next line.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnNpBI_Hms9mBf8gsV1rOiQOUBa2-9gb0cXdDj8iIeT1BROgkJvq2PVD9APfArCRVh-R1N7KXQx2w24rUOUzhSjeM8kX2zcAoTCFHlc4YuTgrV38mB7mKqZCQqB6dUnCxdk2NZ2IklJ1o4/s1600-h/scr17.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnNpBI_Hms9mBf8gsV1rOiQOUBa2-9gb0cXdDj8iIeT1BROgkJvq2PVD9APfArCRVh-R1N7KXQx2w24rUOUzhSjeM8kX2zcAoTCFHlc4YuTgrV38mB7mKqZCQqB6dUnCxdk2NZ2IklJ1o4/s400/scr17.JPG" alt="" id="BLOGGER_PHOTO_ID_5199219849515517554" border="0" /></a></li></ol><li>Code Explaination</li><ol><li>The code is straight forward. At first, using the Editor Registry we derive the last focused component(which returns the editor component we want to work with).</li><li>After obtaining the document from the editor and the selected text, we frame the string to be inserted. NbDocument helps us to find the appropriate line number and also helps us to derive the offset for the next line. Using the document.insertString() function we insert our line of code in the document.</li><li>Finally we Reformat the document to maintain the indentation.</li></ol><li>Use this as a plugin?</li><ol><li>You can use this as a plugin. Just right click on the project node and select "Create NBM". A .nbm file get created and the link is displayed in the output window.</li><li>To install this plugin, go to Tools-> Plugins</li><li>Go to downloaded plugins tab and browse for your .nbm file.</li><li>Click install and complete the installation procedure.</li><li>Your plugin is now ready to use.</li></ol></ul></ul>Any suggestions/corrections/clarifications/comments are welcome.<br />Happy NetBeaning!Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-7796142776219728143.post-62108849472018597892008-05-07T00:22:00.000-07:002008-05-07T03:18:12.568-07:00Open projects programmatically in NetBeansRecently I was working on a NetBeans IDE module and had to open a NetBeans project programmatically. I looked up in the Projects API to find out. The exploring of the API was a fruitful one and I would like to share it with you.<br /><br />There are two API which are related to the NetBeans Projects.<br />1.) <a href="http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/overview-summary.html">Project API</a><br />2.) <a href="http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectuiapi/overview-summary.html">Project UI API</a><br /><br />We will start with the Project API first because it was here where I found my answer. In order to understand well let up simulate the "Open Projects" Action in NetBeans IDE. At the end of this tutorial we should be able to have a Global button in the toolbar to open project(similar to the Open Project(cntrl + shift + O) Action). The process will help us understand how NetBeans Projects are Opened in the Window.<br /><br /><ul><li>We will create a new Module called "OpenProject".</li><ul><li>To create a module refer to my <a href="http://kgmodi.blogspot.com/2007/12/creating-simple-picturesexplorer-for.html">previous post</a> where I have explained in detail on how to create a new Module.</li></ul><li>In order to simulate the "Open Project" button, let us now create an Action.</li><ul><li>Right click the project node and select Action.</li><li>We will make an "Alwaya Enabled" action. So click next.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkdTMbMtfuXJMInGuOmzhqxbDzs-MU4aPnk1SFXG6i7QTLwqWL_IY2XER7MF1bkYOdjesQJ9ikWeW25pKH22Qm73HE5zav-cbfDqccdiYDdfipoyy0O8RIbWja7KL59YUjG7QHmNJYdJfw/s1600-h/scr1.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkdTMbMtfuXJMInGuOmzhqxbDzs-MU4aPnk1SFXG6i7QTLwqWL_IY2XER7MF1bkYOdjesQJ9ikWeW25pKH22Qm73HE5zav-cbfDqccdiYDdfipoyy0O8RIbWja7KL59YUjG7QHmNJYdJfw/s400/scr1.JPG" alt="" id="BLOGGER_PHOTO_ID_5197562742588548450" border="0" /></a></li><li>Keep the category as "File". We will just have a button in the Globar Toolbar. So check Global Toolbar Button and keep the category as Edit(Edit because we don't want to create a misunderstanding by keeping it in File category as there already exists the Open Project button in the File toolbar). Click Next.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx7TYyWU8SVp3sfh4GqdC9br8eAFeWmIGmBrYClu3LMHyCmo1AWGmn9eohRr4aplAR2OpCMY9hMWXTVkh1vgk3H1ulTesKXqTq-wepsYgY-47OJdxYVRSi8mMwFJ12OYDg74WvHM1wmvth/s1600-h/scr2.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx7TYyWU8SVp3sfh4GqdC9br8eAFeWmIGmBrYClu3LMHyCmo1AWGmn9eohRr4aplAR2OpCMY9hMWXTVkh1vgk3H1ulTesKXqTq-wepsYgY-47OJdxYVRSi8mMwFJ12OYDg74WvHM1wmvth/s400/scr2.JPG" alt="" id="BLOGGER_PHOTO_ID_5197563232214820210" border="0" /></a></li><li>Give class name as "MyOpenProject", action name as "MyOpenProject" and a url to a 16X16 gif/png icon file.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-x3usO6V6zqIudNxiTm5NZTU4quOCzQpWjQyWit4TjGk7hBRofV5WvO5f9YetlYQNC3wxxW0nIqCJ9bRNXhlq6-1ab2Q9nkNK0OUeU4FBr0_fE2gJtnsfAzVxrW7Fjgss22UWaRua1u5S/s1600-h/open.gif"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-x3usO6V6zqIudNxiTm5NZTU4quOCzQpWjQyWit4TjGk7hBRofV5WvO5f9YetlYQNC3wxxW0nIqCJ9bRNXhlq6-1ab2Q9nkNK0OUeU4FBr0_fE2gJtnsfAzVxrW7Fjgss22UWaRua1u5S/s400/open.gif" alt="" id="BLOGGER_PHOTO_ID_5197565585856898514" border="0" /></a> Click Finish.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg553tM9egMr5xRAmtNOTuANQVJJqeGpmcwc687yKSZbOd2y4MPl7aTX_aC5Q2ZRo3x4ZuXG4305QclH0eJNvnzGxbHUxTX88brRceAJt8YbGgBLA5uow5ab_Sou5fPAI8rnG9Khmlw8y0Y/s1600-h/scr3.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg553tM9egMr5xRAmtNOTuANQVJJqeGpmcwc687yKSZbOd2y4MPl7aTX_aC5Q2ZRo3x4ZuXG4305QclH0eJNvnzGxbHUxTX88brRceAJt8YbGgBLA5uow5ab_Sou5fPAI8rnG9Khmlw8y0Y/s400/scr3.JPG" alt="" id="BLOGGER_PHOTO_ID_5197563232214820226" border="0" /></a></li></ul><li>A class called "MyOpenAction" will be automatically generated and the action will be registered in the XML layer.</li><li>Since we will be using the Project API dependency, we need to add it to the module dependency library. To do so</li><ul><li>Right Click the project node.</li><li>Go to properties</li><li>Go to Libraries</li><li>Select Add. One after the other add the following dependencies</li><ul><li>Project API</li><li>Project UI API</li><li>File System API</li></ul><li>The dependencies should look as follows.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCMWbo9SqMbXY4Dy_zdAKIgnU28vh28R_Vy_ayk-BHOyR6cj5M6f46YV32S3MGadfaKF5G7qi1O0wJMa-xC1tISdmCx09RdT1Qc7XVLEiQba6fHyMOwZ0IQzkUB7-ZlkypKsok7vLfxg1D/s1600-h/scr4.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCMWbo9SqMbXY4Dy_zdAKIgnU28vh28R_Vy_ayk-BHOyR6cj5M6f46YV32S3MGadfaKF5G7qi1O0wJMa-xC1tISdmCx09RdT1Qc7XVLEiQba6fHyMOwZ0IQzkUB7-ZlkypKsok7vLfxg1D/s400/scr4.JPG" alt="" id="BLOGGER_PHOTO_ID_5197563236509787538" border="0" /></a></li></ul><li>Now we are set to write the performAction function. It will look like this.</li><ul style="font-style: italic; font-family: georgia;"><ul><li>public void performAction() {<br /> try {<br /> JFileChooser projectChooser = new JFileChooser();<br /> projectChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);<br /> projectChooser.showOpenDialog(null);<br /><br /><br /> File projectToBeOpenedFile = projectChooser.getSelectedFile(); FileObject projectToBeOpened = FileUtil.toFileObject(projectToBeOpenedFile);<br /><br /> Project project = ProjectManager.getDefault().findProject(projectToBeOpened);<br /> Project[] array = new Project[1];<br /> array[0] = project;<br /> OpenProjects.getDefault().open(array, false);<br /><br /> } catch (IOException ex) {<br /> Exceptions.printStackTrace(ex);<br /> }<br />}</li></ul></ul><li>Let us go through the code quickly.</li><ul><li> <span style="font-style: italic;">JFileChooser projectChooser = new JFileChooser();</span> <span style="font-style: italic;"> projectChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);</span> <span style="font-style: italic;"> projectChooser.showOpenDialog(null);</span> </li><li>This part of the code is a nomal JFileChosser where we restrict our selection to directories only.</li><li><span style="font-style: italic;">File projectToBeOpenedFile = projectChooser.getSelectedFile(); FileObject projectToBeOpened = FileUtil.toFileObject(projectToBeOpenedFile); </span>The projectChooser now returns the java.io.File object of the selected project. This object is then converted to the NetBeans FileSystem by using the FileUtil class of the FileSystem API. This conversion returns a FileObject which the NetBeans equivalent of a file representation.<br /></li><li>Now comes the crucial part of the code. Project project = <span style="font-style: italic;">ProjectManager.getDefault().findProject(projectToBeOpened);</span> <span style="font-style: italic;"> Project[] array = new Project[1];</span> <span style="font-style: italic;"> array[0] = project;</span> <span style="font-style: italic;"> OpenProjects.getDefault().open(array, false);</span></li><li>We use the default instance of the ProjectManager class and use its findProject(org.openide.filesystems.fileobject) to find the project folder. This method returns a org.netbeans.api.project.Project. NetBeans uses this as an identifier for all of its projects. Now that we have the Project handle with us, we need to open it inside the NetBeans window. We can do this using the OpenProjects class(which belongs to the Project UI API). We get its default instance and use its <span style="font-size:100%;">open(<a href="http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/api/project/Project.html" title="class or interface in org.netbeans.api.project">Project</a>[] projects,boolean openSubprojects) to open the project folder. But we notice here that the first argument takes an array of Project. So we create a Project array called array of size 1. We assign array[0] = project and pass array as the first parameter. The boolean value here asks if the user want to wants to open subprojects or not. We pass false here. So only the main project will be opened.<br /></span></li></ul><li>Now Run the module. You will be able to see your custom icon displaying "MyOpenProject".</li><li><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip7NJKesfdu67PQcocCdpVV5Yw8qNediLbbMXK2qo4Y3Xgx3b7QVd5NOfhe1TWsz8Lti1rzt4eaibuly5ZAy2SifJGP234kL3eOxnBbNKiVqKHu4ppS7kYIYq8APJXVj0cA7oEK1VL0h5v/s1600-h/scr5.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip7NJKesfdu67PQcocCdpVV5Yw8qNediLbbMXK2qo4Y3Xgx3b7QVd5NOfhe1TWsz8Lti1rzt4eaibuly5ZAy2SifJGP234kL3eOxnBbNKiVqKHu4ppS7kYIYq8APJXVj0cA7oEK1VL0h5v/s400/scr5.JPG" alt="" id="BLOGGER_PHOTO_ID_5197563236509787554" border="0" /></a></li><li>Click it and a File Chooser Will appear.</li><li>Select a project to open.</li><li><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaJkYZFjG_B7AcDMCTf3NAZdjxOCSkqK1CVtEwpeQFhf3Ajqo4lNmM_KRZxc581u-kQR-PXa7nm54lm0zpYFH54SvzU5NynJmgzt6qx_E1d680R9IS8k1gWSvDgjzSGQs1gUc7PNHeob0J/s1600-h/scr6.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaJkYZFjG_B7AcDMCTf3NAZdjxOCSkqK1CVtEwpeQFhf3Ajqo4lNmM_KRZxc581u-kQR-PXa7nm54lm0zpYFH54SvzU5NynJmgzt6qx_E1d680R9IS8k1gWSvDgjzSGQs1gUc7PNHeob0J/s400/scr6.JPG" alt="" id="BLOGGER_PHOTO_ID_5197563236509787570" border="0" /></a></li><li>The project appears in the Project window.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqeuIxWNPfnFriBECBzmwQdWKWC3TwIxwNNEi5x4c4Z9Z72Ro-_O5Xg5xUiaD9gGRYmUG6Q3DutMFA-wxb700A-b33JbRHFx9o6FKf4gV8x3kX6jI6pgw7TK6rJlMAmRzKa25XEleDlEmF/s1600-h/scr7.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqeuIxWNPfnFriBECBzmwQdWKWC3TwIxwNNEi5x4c4Z9Z72Ro-_O5Xg5xUiaD9gGRYmUG6Q3DutMFA-wxb700A-b33JbRHFx9o6FKf4gV8x3kX6jI6pgw7TK6rJlMAmRzKa25XEleDlEmF/s400/scr7.JPG" alt="" id="BLOGGER_PHOTO_ID_5197563382538675650" border="0" /></a></li></ul>Remarks: Yet a lot of Project related information can be obtained using these APIs. This tutorial just gives a basic start to explore these APIs further. Any remarks/suggestions/comments are welcome.Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-7796142776219728143.post-83941778601098566962008-03-31T22:31:00.000-07:002008-05-11T12:19:44.412-07:00NetBeans6.1: Editor ScreenShot on DragNetBeans6.1 has quite a lot of small and big but significant features. I have come across a few yet. I ll try them and blog about them as and when I meet them :)<br />Today i saw something unusual as i dragged my editor tab.<br />As soon as i dragged the editor window, a screen shot of the editor window got attached with the dragged icon. I switched back NetBeans6.0 to confirm if i had missed it in NetBeans6.0. But yeah this is the new feature of NetBeans6.1. The screen shot is the most recent version of your file.<br />So how do you do it? Simple, click the editor tab and drag!<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpBFINhyphenhyphenndoIkk2-ftRspjyxIYl1IjadEFYJo4y3oHphzE6El03RY6VwVgC221tmRF2GM_LruImhyphenhyphenLRDHwuOLoOUBJT9V8AZBVCm6UW87G9R3L5z0Th-qCX8qR3zHGY5tphOnBxlfa94eb/s1600-h/blog-screen-cast.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpBFINhyphenhyphenndoIkk2-ftRspjyxIYl1IjadEFYJo4y3oHphzE6El03RY6VwVgC221tmRF2GM_LruImhyphenhyphenLRDHwuOLoOUBJT9V8AZBVCm6UW87G9R3L5z0Th-qCX8qR3zHGY5tphOnBxlfa94eb/s400/blog-screen-cast.JPG" alt="" id="BLOGGER_PHOTO_ID_5184669265869503106" border="0" /></a><br />Looks that NetBeans6.1 has some inbuilt feature which can take screen shots and append it to the tab icon on Drag. Need to investigate the sources. If screen shots become possible from inside NetBeans then writing tutorials and blogging becomes very easy.<br /><br />Also the same applies for all the TopComponents present in your NetBeans window(Project tab, files tab, output tab etc.)Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7796142776219728143.post-25995343447364912732008-03-21T19:33:00.000-07:002008-03-21T20:19:17.549-07:00Google Maps: Virtually Real!!These days I am on a job hunt. Looking for a job in US. I posted my resume on a few sites. I got a response from a recruiting agency. I was curious about where that agency is located. And i turned to my favorite maps.google.com for help. I put in the address and searched. As usual it showed me the map and the location. But soon my eyes caught the "Street View" option besides traffic. I just clicked it and to my surprise i was seeing the actual 3D view of the street as if i am navigating the street. You can turn left, right, 360, walk further, see the cars. Its so virtually real. My next destination was Googleplex, Mountain View, CA. And you can see the google campus from ground zero. Amazing.. But wait!! They haven't done it for all cities yet. San Francisco is the first one i guess. Though this feature may have been there for sometime now, but i am truly amazed and my jaws fell when i saw it for the first time today.<br />Some places you can try:-<br />Ghirardeli (Chocolates) - Ghirardelli Square, 900 North Point St, San Francisco, San Francisco, California, United States<br />Golden Gate Bridge(as if you are walking the bridge sans the traffic and breeze:( ) - Golden Gate Bridge, San Francisco, San Francisco, California, United States<div class="adr"><span id="sxlink">Ferry Building(the famous American Express building) - </span><span id="sxaddr" dir="ltr"><span class="street-address">1 Ferry Bldg</span>, <span class="locality">San Francisco</span>, <span class="region">CA<br /><br /></span></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMeXcOVMMWAifUCSG4WjcoHLpex7vZCXEG_pjo_JyMmb1_-6q8X5uIPbCRuLXp25xYOvFSJMo2rYTekwfiLX2dmhMlSAdNmmjBh7EwnTtCILhnJl162DviUx2jfHZtNSC7lltmXGdQKCZ2/s1600-h/Golden_gategooglemaps.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMeXcOVMMWAifUCSG4WjcoHLpex7vZCXEG_pjo_JyMmb1_-6q8X5uIPbCRuLXp25xYOvFSJMo2rYTekwfiLX2dmhMlSAdNmmjBh7EwnTtCILhnJl162DviUx2jfHZtNSC7lltmXGdQKCZ2/s400/Golden_gategooglemaps.JPG" alt="" id="BLOGGER_PHOTO_ID_5180399239448590962" border="0" /></a><br /><br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7796142776219728143.post-55372185705632614972008-03-10T22:40:00.000-07:002008-03-10T22:51:09.867-07:00Significant Contributors at CFF<a href="http://anilraju.blogspot.com/">Anil</a>, <a href="http://shantaram.co.nr/">Shantaram</a> and myself won the Significant Contributors Award at <a href="http://kgmodi.blogspot.com/2008/02/cff-concludes.html">Code For Freedom</a> contest organised by <a href="http://in.sun.com/">Sun Microsystems</a>. We won an i-Pod shuffle , a certi and a Sun Microsystems T-shirt(coolest of all). It was indeed a nice achievement, rather the biggest for any of us till now. We see this as the stepping stone for a longer journey into the exciting world of coding. There's lot to be done still. Creativity has no boundaries, be it in any field.<br />However this achievement has really boosted our confidence and time will reveal what's in store for us.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7796142776219728143.post-44692042139930974632008-03-10T22:32:00.000-07:002008-03-10T22:35:02.975-07:00Sun Tech Days, Hyderabad '08Here are few snaps of the recently concluded Sun Tech Days, Hyderabad '08<br /><embed src="http://res1.esnips.com/escentral/slideshow/folderSlideShow.swf" quality="high" scale="noscale" name="FLVPlayer" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="theXml=http://www.esnips.com//flashxml/4/e142f82a-0fd8-4001-a655-e9ad191df8e3" height="400" width="400"></embed>Unknownnoreply@blogger.com0