tag:blogger.com,1999:blog-61977790386585633392008-10-09T19:21:52.318+05:30Karthi's BlogSearching SelfKarthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comBlogger62125tag:blogger.com,1999:blog-6197779038658563339.post-14988196618471351692008-10-08T13:00:00.001+05:302008-10-08T13:46:42.292+05:30Sourav – A Determined Leader !!<p>After twelve years of international cricket, <a href="http://en.wikipedia.org/wiki/Sourav_Ganguly">Sourav Ganguly</a>, a flamboyant left handed opener from Kolkata has called “Its day”, before the hyped four-match test series against the Oz. Sourav, who has been known for his ability to pierce the offside field and timing the ball with perfection will be playing his last four match against Australia in the next 30 days. As a captain he has taken the Indian team from “bunch of lazy batsmen” to a “rich blend of talented youths”. As a rhetoric leader he has been respected in the team as a captain and a senior player. By taking India to the <a href="http://en.wikipedia.org/wiki/Cricket_World_Cup">2003 World cup final</a> and remarkable Test Series victories outside sub-continent, arguably he is the best captain India has ever produced. Yesterday once again he set standard by <a href="http://content-ind.cricinfo.com/indvaus2008/content/story/372830.html">announcing his retirement</a> from cricket for giving way to the young talents in the country.</p> <p><a href="http://lh5.ggpht.com/karthikeyanmect/SOxhcW4bSNI/AAAAAAAAB8Q/7NF-F1mdrN8/s1600-h/sourav_ganguly%5B3%5D.gif"><img title="sourav_ganguly" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="244" alt="sourav_ganguly" src="http://lh6.ggpht.com/karthikeyanmect/SOxhdjS3ZtI/AAAAAAAAB8U/cVPkhotMexI/sourav_ganguly_thumb%5B1%5D.gif?imgmax=800" width="189" border="0" /></a>Sourav was predominantly a batman in earlier stages of his carrier. His ability to score runs consistently at the top of the order gave balance in batting order for the Indian team, which was suffering from lack of skilled openers in 1996 world cup in the sub-continent. <a href="http://en.wikipedia.org/wiki/Rahul_Dravid">Rahul</a> once complimented Sourav as “next to God on the offside”. <a href="http://en.wikipedia.org/wiki/Geoffrey_Boycott">Geoffrey Boycott</a>, the notorious English commentator, praised him as a “gifted timer” of the cricket ball. Sourav’s name has been appended in the list of Indian star batsmen, which was having only the name of <a href="http://en.wikipedia.org/wiki/Sachin_Tendulkar">Sachin</a> for almost a decade. His cricketing skills enthralled crowds across the country and earned him respect and love among the sentimental Indian fans.</p> <p>He got the opportunity to lead the Indian side when Sachin stepped-down as  captain after the 2000 Australian tour debacle. He had transformed himself from a player to a great leader. Sourav’s decision making; team selection and field setup were widely appreciated by commentators and cricket lovers. He has backed youngsters like Yuvraj, Kaif, Zaheer, Harbhajan and given freedom for them to perform and establish themselves as players. He lead a team with rich blend of experience and youth, which had won the historic Final in Lords against England; victories outside subcontinent; famous test victory at Leeds and first Test series win in England. He is great communicator and extracted the best out of all individuals and created history by beating Australia in their home after 35 years. He was involved in couple of controversies on and off the field, But I personally feel that he is one of  the few Indian players, who responded properly to happenings on the field like sledging.</p> <p>As unanimously happening to all players of the game, Sourav also had been dropped from the team following series of poor show with the bat. In the midst of these humiliations, he had been criticized by Indian media and column writers for his incapability to play bouncers and the deliveries moving away from his bat. He responded to all the criticism by scoring consecutive hundreds in domestic tournaments and county matches, which earned him a place in the national Team when India toured South Africa by 2007. He emerged as a player of the series and sent a strong message to the world that, he was still determined to play cricket with passion. I was really impressed by the comeback from the “prince of Kolkata”. In a post match presentation he said “ It’s all about guts and determination, ” when someone asked about his comeback.</p> <p>Sourav has been a role model for lot of young emerging players from India. His knowledge and passion for the game is still a valuable resource that <a href="http://en.wikipedia.org/wiki/Board_of_Control_for_Cricket_in_India">BCCI</a> can exploit for betterment of cricket in India. With hefty experience of international cricket, Sourav still has a lot with him to deliver to Indian cricket.</p> Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-37641332975605923342008-09-29T18:59:00.002+05:302008-09-29T19:09:12.859+05:30Quick Fix in a Blog<p>While writing a blog on Flash tennis, I have embedded the flash tennis game in my blog. I was happy to present this to my readers, but I forgot the fact that this flash file was having an audio playing in the background. So, whenever someone open the site, flash will be loaded and and eventually they will get the sound produced by the flash file. Reader opening my blog from a silent place may get annoyed by the unexpected loud noise. <a href="shankarvinayarul@gmail.com">Shankar</a>, one of my friend had experienced this, when he casually opened my pages when he was in a library. I understood the problem when he conveyed the message to me, and the same instigate me to provide an immediate fix for this bug in my writing. Here is the fix,</p> <ul> <li>Download the <a href="http://karthikeyanmect.googlepages.com/FlashCode.txt">html code</a> from this Link.</li> <li>Open a notepad.</li> <li>Paste this code and save the file with HTML extension</li> <li>Open the file with a browser you will get the flash tennis.</li> </ul> <p>I have removed the attached flash from my old blog. Shankar’s advice at right time will help me to avoid my readers getting annoyed.</p> Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-39780431117711861572008-09-26T19:28:00.001+05:302008-09-28T12:33:14.123+05:30An Adorable Essay !!<p>Forwarding mails has become a hobby for some of my friends. Forwarded mail contents are like scintillating series of picture; creating awareness about health; urgent requirement of help; mockery which could be analogous to any recent movie; a wired picture; some time puzzles. Recently I got an interesting mail having an essay written by an <a href="http://en.wikipedia.org/wiki/Indian_Administrative_Service">IAS</a> exam candidate, It was really a scintillating and gibberish transliteration from his mother-tongue to English. I took sometime for me and Sunil to control our laughing. I am presenting the same to you guys. </p> <p><a href="http://lh5.ggpht.com/karthikeyanmect/SN8sKxF-ucI/AAAAAAAAB7I/eKPehu-xyBU/s1600-h/Giberrish%5B3%5D.png"><img title="Giberrish" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="507" alt="Giberrish" src="http://lh4.ggpht.com/karthikeyanmect/SNzqczEoCbI/AAAAAAAAB7M/tgntr33V0u8/Giberrish_thumb%5B3%5D.png?imgmax=800" width="519" border="0" /></a> </p> <p>Even I am taking efforts to improve my vocabulary for giving my GRE. Who knows ? my analytical writing may be as gibberish as this one to my GRE readers.</p> Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-68155113713247415362008-09-24T11:32:00.001+05:302008-09-24T12:23:56.687+05:30Jubilant Federer !!<p>“I am jubilant, because <a href="http://en.wikipedia.org/wiki/Roger_Federer">Federer</a> is jubilant”, these were the words I was murmuring when Federer made a remarkable come back by winning the US open 2008. He has taken his game to a new level of perfection and controlled aggression. After failed to prove his class in the Australian open; out lashed by Nadal in the <a href="http://en.wikipedia.org/wiki/French_Open">French Open</a> and unlucky in the epic final at the <a href="http://en.wikipedia.org/wiki/The_Championships,_Wimbledon">Wimbledon</a>, Federer also lost his regime of number one spot in ATP tennis ranking after almost four and half years. Because of shear excellence and class he has dominated world tennis for consecutive four years which made media to bestow him the best player ever to play the game.The same media started speculating about the thirteen-time grand slam champion’s down fall so early. Once his unusual calm and uncommon lack of visible frustration has been praised by media and same set of crazy people in the recent past remarked his game as “lack of self-confidence”. But he has given answer to all the question in an unanimous way by winning the US open for the fifth time at <a href="http://en.wikipedia.org/wiki/Flushing_Meadows-Corona_Park">Flushing Meadows</a>.</p> <p>                               <a href="http://lh4.ggpht.com/karthikeyanmect/SNnkAOvy37I/AAAAAAAAB6g/9IOfxJBabvA/s1600-h/b_0908_035_Federer%5B1%5D.jpg"><img title="b_0908_035_Federer" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="241" alt="b_0908_035_Federer" src="http://lh3.ggpht.com/karthikeyanmect/SNnX293C8sI/AAAAAAAAB6k/G4aq8odVtJM/b_0908_035_Federer_thumb.jpg?imgmax=800" width="348" border="0" /></a> </p> <p align="center"><strong>Federer with fifth (consecutive) US Open Trophy</strong></p> <p><a href="http://en.wikipedia.org/wiki/Andy_Murray_(tennis)">Andy Murray</a> one of strong forehanded emerging player from Scotland was finding difficult to match the 16 time grand slam finalist from Switzerland. Federer started this US Open with average wins, as he progressed further he got his serves stronger and returns accurate. I was able to feel difference in his performance in semifinal against <a href="http://en.wikipedia.org/wiki/Novak_Đoković">Djokovic</a>. Federer was able to convert all his breakpoint successfully into winners. In the post semifinal press meeting he was asked on, whom would he prefer in the final among Nadal and Murray. He said “I would prefer the trophy”, which showed his desperation to win a grand slam this year. Being a top player for consecutive 230 odd weeks you can't think of an year without any Grand title.</p> <p><a href="http://en.wikipedia.org/wiki/Rafael_Nadal">Nadal</a> was lacking his usual agility and endurance in hard court this year. Even though, he won French and Wimbledon he lost in all hard-court tournaments this year. He failed to produce his trademark cross-court return, which earned him vital points in crucial stages of games he played in the past. Murray was too good to beat Nadal in the semis and ready to face Federer in the Final of US open 2008.</p> <p>Rejuvenated Roger was completely back at his best in final against Murray. He swept opening set by 6 games to 2. Federer game used to be dominated by aces, but contrastingly in the finals he produced only 3 aces but he displayed all-round game by converting 70% of his break point to winners; 70% success by volleying at the nets. He thrust to a 5-0 lead in the final set by breaking the Scot thrice. He was at the peak of his form in the final set producing some unbelievable baseline shots. Finally he won convincingly 6-2, 7-5, 6-2 to become the first man to win US open five times in a row. "It definitely feels great," said Federer afterwards. "This is a very special moment in my career,” he added.</p> <p>He is one title away from <a href="http://en.wikipedia.org/wiki/Pete_Sampras">Pete Sampras</a> record of 14 grand slam title. "I'm not going to stop at 13 - that would be terrible!” he said in the after match presentation. Murray said "I had a great tournament but I came up against, in my opinion, the best player ever to play the game today".</p> <p>Federer would have felt lot better after winning US Open. "I think the French Open loss was brutal, but I got over that one pretty easily, played great on the grass and had a really tough loss at Wimbledon which - you know, I was proud to be part of such a great match, but at the same time it just sort of made me sad not having won that great epic match,” he shared.</p> <p>Finally he revealed the fact that he was annoyed by media’s comment on his form and performance over the last year. "I mean, I'm a bit disappointed. Sometimes to a point a bit annoyed, because all sorts of crazy people started writing me and trying to reach me, telling me I need some help either mentally or physically. "You're laughing but it's the way it goes. People come out of the closet and think they can start helping me now. It's just a pain.</p> <p>"For me, this sort of puts them to rest a little bit, and calms down the phones at my parents' a little bit, which I'm happy about”. Federer shines away from the press meet.</p> Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-4396661431330357792008-09-04T11:33:00.006+05:302008-09-04T13:07:08.454+05:30Google Chrome is PhenomenalOne more milestone in Google's history when they have launched the impeccable browser <strong><a href="http://www.google.com/chrome">Chrome</a></strong>. I read about Chrome in <a href="http://infotech.indiatimes.com/quickiearticleshow/3436729.cms">Times of India</a> yesterday, and I was furious to see how it looks and works. Today as I walked into the office, the first thing I did was download and install the browser Chrome. I feel Chrome resembles <a href="http://picasa.google.com/">Picasa </a>(web album by Google) in look and feel. It opens as fast as a notepad and the interface is also as simple as notepad. Apparently it seems it will beat Opera in speed and response. Importantly it does not have any array of menus or heavy tool bars.<br>It looks very gentle and light with a simple address bar and tab bar. Controls which are currently active in the browser are automatically highlighted with saffron color, which helps people who predominantly use keyboard rather than mouse. All the menu and options are embedded on the right side of your browser as a drop down menu. It makes your browser spacious to display content of the site your are surfing. Menus are grouped in to two main categories like Control menus and Customize menus.<br><br><strong>Snap of Google Chrome</strong><span style="font-weight: bold"><br></span><br> <div class="separator" style="clear: both; text-align: center"></div> <div class="separator" style="clear: both; text-align: center"><a style="margin-left: 1em; margin-right: 1em" href="http://4.bp.blogspot.com/_6f5ZIVsV0Qg/SL987T3RQAI/AAAAAAAAB1M/vRFlEXyrWzA/s1600-h/Chrome+Snap.bmp" imageanchor="1"><img src="http://4.bp.blogspot.com/_6f5ZIVsV0Qg/SL987T3RQAI/AAAAAAAAB1M/7cxdMAt0cEs/s400-R/Chrome+Snap.bmp" border="0"></a></div><strong>Control menu & Customize Menu </strong><br> <div class="separator" style="clear: both; text-align: center"></div> <div class="separator" style="clear: both; text-align: center"><a style="margin-left: 1em; margin-right: 1em" href="http://2.bp.blogspot.com/_6f5ZIVsV0Qg/SL98T-SxZqI/AAAAAAAAB08/brAYfO-tXwk/s1600-h/Control+Menu.bmp" imageanchor="1"><img src="http://2.bp.blogspot.com/_6f5ZIVsV0Qg/SL98T-SxZqI/AAAAAAAAB08/li8qYbx2SQ0/s200-R/Control+Menu.bmp" border="0"></a><a style="margin-left: 1em; margin-right: 1em" href="http://4.bp.blogspot.com/_6f5ZIVsV0Qg/SL-CEzofMZI/AAAAAAAAB1s/aqYuxfgaT74/s1600-h/Cutomize+Menu.bmp" imageanchor="1"><img src="http://4.bp.blogspot.com/_6f5ZIVsV0Qg/SL-CEzofMZI/AAAAAAAAB1s/DKIaH0EMtzQ/s200-R/Cutomize+Menu.bmp" border="0"></a></div><span style="font-weight: bold"><span style="font-weight: normal">Its left to you to exercise the functions of each menu shown above. Chrome is using the Internet setting of MSIE. Options menu will take you to the proxy setting of IE browser.</span></span><br><br><span style="font-weight: bold">Incognito Window</span><br> <div class="separator" style="clear: both; text-align: center"></div> <div style="text-align: left"><span style="font-weight: bold"><span style="font-weight: normal">Google does not fail to enthrall people with unique features. It has an option called "incognito window", which will not store the browsing history and they won't leave other traces, like cookies</span></span></div><br> <div class="separator" style="clear: both; text-align: center"><a style="margin-left: 1em; margin-right: 1em" href="http://3.bp.blogspot.com/_6f5ZIVsV0Qg/SL9968_2afI/AAAAAAAAB1U/WUjtXYfwOyk/s1600-h/Incognito+window.bmp" imageanchor="1"><img src="http://3.bp.blogspot.com/_6f5ZIVsV0Qg/SL9968_2afI/AAAAAAAAB1U/mHfeiGVB25k/s400-R/Incognito+window.bmp" border="0"></a></div><span style="font-weight: bold">For Developers</span><br><span style="font-weight: bold"><span style="font-weight: normal"> T</span><span style="font-weight: normal">he highlight of the browser for web developers is the developer menu, which allows us to debug the java script of the site we are browsing. Chrome has also provided a console for Javascript and it will help us in checking the <a href="http://en.wikipedia.org/wiki/JavaScript">Javascript </a>and the <a href="http://en.wikipedia.org/wiki/Stylesheets">Stylesheet </a>(CSS) used in the page. Google has incorporated all the functionality of web-developer plugins provided by firefox inside its browser itself.</span></span><br><span style="font-weight: bold"><span style="font-weight: normal"><span style="font-weight: bold">Task manager</span></span></span><br> <div class="separator" style="clear: both; text-align: center"><a style="margin-left: 1em; margin-right: 1em" href="http://4.bp.blogspot.com/_6f5ZIVsV0Qg/SL9-dV3B0_I/AAAAAAAAB1c/zVm8zzoF4X4/s1600-h/task+manager.bmp" imageanchor="1"><img src="http://4.bp.blogspot.com/_6f5ZIVsV0Qg/SL9-dV3B0_I/AAAAAAAAB1c/nGHD_3UgO74/s320-R/task+manager.bmp" border="0"></a></div> <div class="separator" style="clear: both; text-align: left"></div> <div class="MsoNormal"><span style="color: black"><span style="font-size: medium"><span style="font-size: x-small"><font size="2">Chrome handles every tab as a different operating system process, which helps in handling the unresponsive windows separately. It also encapsulate the functionality of one tab from other. So if any tab hangs because of some issue, it won't affect the other tabs performance and evidently allow us to kill it by leaving the others untouched. Chrome also provides a separate task manager for the browser for killing the "not responding" tabs. Task Manager provides you same valuable details like memory consumption and CPU. One step further we can drill memory statistics of the tabs in your browser up to its process nerds.</font></span></span></span></div> <div class="MsoNormal"></div> <div class="MsoNormal"><span style="color: black"><span style="font-size: medium"><span style="font-size: x-small"><font size="2">If you click the stats for nerds in your task manager, it will show you the panoramic details of each process like</font></span></span></span></div> <ul> <li>Process id<br></li> <li>Virtual Memory<br></li> <li>Physical Memory<br></li> <li>Private and shared split up of each memory.</li></ul> <div class="separator" style="clear: both; text-align: center"><a style="margin-left: 1em; margin-right: 1em" href="http://2.bp.blogspot.com/_6f5ZIVsV0Qg/SL9_MsyunbI/AAAAAAAAB1k/kDNJn7HT1WU/s1600-h/Stats.bmp" imageanchor="1"><img src="http://2.bp.blogspot.com/_6f5ZIVsV0Qg/SL9_MsyunbI/AAAAAAAAB1k/tiBkbu8uP0w/s400-R/Stats.bmp" border="0"></a></div><span style="font-style: italic"></span> <div class="separator" style="clear: both; text-align: center"><span style="font-style: italic">Stats For Nerds<span class="Apple-style-span" style="font-style: normal"></span></span></div> <div class="separator" style="clear: both; text-align: center">Chrome is simply a heap of ingenious functionality with unbelievable speed. Its awesome, isn't it?</div>Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-51715588428893501952008-09-01T13:48:00.012+05:302008-09-29T19:03:30.140+05:30Addicted to Flash Tennis!!Online Flash are really perky.Isn't it ? Especially, if you love a game and failed in finding time to play and enjoy it.You can feed your hunger in playing the flash version of the game. As I was fascinated by Cricket and Tennis, I spent most of my leisure time in either reading about the game or playing it with my friends.Once you become a pro you are subjected to relinquish some of your habits (As I left my habit of "obsession to cricket"). For guys who sacrificed playing games these Flash games are real treat.<br /><br />There are innumerable sites for online Flash games with attractive graphics and challenging rounds. Best of the pack is Tennis. As <a href="http://suniljain14.blogspot.com/2008/08/links-to-online-games.html">Sunil</a> listed we use to play Flash Tennis a lot. It is a game which challenges your speed, accuracy, tactics and knowledge of the game. It provides option for you to set your skill level and your opponents' in terms of <a href="http://en.wikipedia.org/wiki/Forehand">Forehand</a> ,<a href="http://en.wikipedia.org/wiki/Backhand">Backhand</a>, <a href="http://en.wikipedia.org/wiki/Serve_%28tennis%29">Serve</a> and Footwork in scale of zero to ten.You can choose an exhibition match for practice and tournament for testing your skills.<br /><br />This game is reachable with simple Google search for "<a href="http://www.google.com/search?hl=en&q=Flash+tennis&btnG=Search">Flash tennis</a>", but obviously you need to have Internet connection. As most of the employers are blocking URLs like flash and games; you could not enjoy tennis in office leisure hours. This provoked me and Sunil to explore the option of downloading the Flash (SWF) and embed it in an excel sheet.We have succeed in doing this. Hopefully we will explain you elaborately on, how to download and embed flash in an excel in near future. But as of now I am attaching the most amazing Flash tennis game here.Enjoy!!<br /><br />Embeded Flash has been moved to <a href="http://www.karthikeyanm.com/2008/09/quick-fix-in-blog.html">new location </a>for better User Interface.<br /><br /><span style="font-weight: bold;">Challenge</span><br /><br />I would reckon you guys to follow these steps to make it more exciting.<br /><ul><li>Set 10 for you and 8 for you opponent and try to win 3-0.</li><li>Set 10 for both of you and try to win 3-0.</li><li>Set 10 to your opponent and 8 to you and try to win 3-0.</li><li>Set 10 to your opponent and reduce your rating gradually from 8 to 1 and try to win 3-0 in all possible combinations.</li></ul>We are now trying to post a 3-0 win with a combination of 10 to opponent and 1 to us.Its really an adorable game to play.Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-10813931847004051972008-08-25T13:29:00.001+05:302008-08-25T13:29:56.141+05:30Oracle Performance Tuning and Optimization Part II<p>As I mentioned in my last <a href="http://www.karthikeyanm.com/2008/08/oracle-performance-tuning-and.html">blog on oracle performance</a>, we will see some more better ways of writing SQL queries in oracle.</p> <p><strong>While Joining multiple tables specify smallest table at last.</strong></p> <p>As we saw, using joins produce better results than inner query, we have to order the table in such a way that the small table will be specified at last in SQL, so that the number of times oracle compare the records will be reduce.</p> <table cellspacing="0" cellpadding="2" width="710" border="1" unselectable="on"> <tbody> <tr> <td valign="top" width="374"><strong>Before Optimization</strong></td> <td valign="top" width="334"><strong>After Optimization</strong></td></tr> <tr> <td valign="top" width="372">select so.documnet_number<br> count(1)<br>from activation a,<br> serv_ord so,<br> task t<br>where t.documnet_number=so.document_number and<br> so.serv_item_id=a.serv_item_id <br>group by so.document_number</td> <td valign="top" width="336">select so.documnet_number<br> count(1)<br>from task t,<br> serv_ord so,<br> activation a,<br>where t.documnet_number=so.document_number and<br> so.serv_item_id=a.serv_item_id <br>group by so.document_number</td></tr> <tr> <td valign="top" width="371">Time Taken :<strong> 10 Sec</strong></td> <td valign="top" width="337">Time Taken : <strong>2.1 Sec</strong></td></tr></tbody></table> <p><b>Replace NOT IN with NOT EXISTS</b> <p>This is very similar to avoiding sub query </p> <table cellspacing="0" cellpadding="2" width="707" border="1" unselectable="on"> <tbody> <tr> <td valign="top" width="348"><strong>Before Optimization</strong></td> <td valign="top" width="357"><strong>After Optimization</strong></td></tr> <tr> <td valign="top" width="348">Select count(1)<br>from task t <br>where t.document_number not in (<br>select tt.document_number from task_bkp)</td> <td valign="top" width="357">select count(1)<br>from task t <br>where not exists<br>(select tt.document_number from task_bkp)</td></tr> <tr> <td valign="top" width="348">Time Taken :<strong> 500 Sec</strong></td> <td valign="top" width="357">Time Taken :<strong> 6 Sec</strong></td></tr></tbody></table> <p><strong>Use FORALL instead of FOR</strong></p> <p>This is a handy option available in oracle for inserting bulk records. I have already given more details about this in my blog on <a href="http://www.karthikeyanm.com/2008/01/my-first-presentation-about-best.html">Best practices in PL/SQL</a>.Think about <strong>FORALL </strong>whenever you write a cursor.It will reduce the loop execution time.</p> <table cellspacing="0" cellpadding="2" width="706" border="1" unselectable="on"> <tbody> <tr> <td valign="top" width="355"><strong>Before Optimization</strong></td> <td valign="top" width="349"> <p><strong>After Optimization</strong></p></td></tr> <tr> <td valign="top" width="351"> <p>DECLARE <p>TYPE NumTab IS TABLE OF NUMBER(5) INDEX BY BINARY_INTEGER; <p>TYPE NameTab IS TABLE OF CHAR(15) INDEX BY BINARY_INTEGER; <p>pnums NumTab; <p>pnames NameTab; <p>BEGIN <p>FOR j IN 1..20000 LOOP -- load index-by tables <p>pnums(j) := j; <p>pnames(j) := 'Part No. ' || TO_CHAR(j); <p>END LOOP; <p>FOR i IN 1..20000 LOOP -- use FOR loop <p>INSERT INTO parts VALUES (pnums(i), pnames(i)); <p>END LOOP; <p>END; <p> </p></td> <td valign="top" width="349"> <p>DECLARE <p>TYPE NumTab IS TABLE OF NUMBER(5) INDEX BY BINARY_INTEGER; <p>TYPE NameTab IS TABLE OF CHAR(15) INDEX BY BINARY_INTEGER; <p>pnums NumTab; <p>pnames NameTab; <p>BEGIN <p>FOR j IN 1..20000 LOOP -- load index-by tables <p>pnums(j) := j; <p>pnames(j) := 'Part No. ' || TO_CHAR(j); <p>END LOOP; <p>FORALL I in 1 .. 20000 -- use FORALL <p>INSERT INTO parts VALUES (pnums(i), pnames(i)); <p>END;</p></td></tr> <tr> <td valign="top" width="348"> <p><b>Time taken in sec: 11.0 Sec</b></p></td> <td valign="top" width="349"> <p><b>Time Taken in Secs: 0.5 sec</b></p></td></tr></tbody></table> <p>FORALL will reduce the loop-back time between PL/SQL and SQL engine.You can <a href="http://karthikeyanmect.googlepages.com/BestPracticesinPLSQL.ppt">download</a> my presentation on best practices of PL/SQL from my site.</p> <p><strong>use BULK COLLECT</strong></p> <p>BULK COLLECT is an option provided by Oracle for avoiding the use of loops in collecting data from table.For any heavy data processing application BULK COLLECT will be useful.For example we need to select 1000 records from a table and process the records and insert it into another table, then we can either bulk collect.</p> <table cellspacing="0" cellpadding="2" width="687" border="1" unselectable="on"> <tbody> <tr> <td valign="top" width="352"> <p><strong>Before Optimization</strong></p></td> <td valign="top" width="333"> <p><strong>After Optimization</strong></p></td></tr> <tr> <td valign="top" width="352"> <p>declare <p>Type bcode is table of products.barcode%TYPE; <p>i int; <p>barc bcode; <p>cursor cur_seq is <p>select barcode from products where rownum<100001; <p>begin <p>i:=0; <p>for cur_dta in cur_seq loop <p>i:=i+1; <p>barc:=cur_dta.barcode; <p>end loop; <p>end;</p></td> <td valign="top" width="333"> <p>declare <p>Type bcode is table of products.barcode%TYPE; <p>i int; <p>barc bcode; <p>begin <p>select barcode BULK COLLECT into barc from products where rownum<100001; <p>end;</p></td></tr> <tr> <td valign="top" width="352"> <p>Time taken <b>: 17sec</b></p></td> <td valign="top" width="333"> <p>Time taken <b>: 1.41 sec</b></p></td></tr></tbody></table> <p><b>Summary of Optimization </b> <ul> <li>Use uniform coding standards across the application</li> <li>Avoid data type mismatch for index columns</li> <li>Avoid functions on index columns</li> <li>Move conditions from having clause to where clause</li> <li>Use joins instead of nested selects, whenever possible</li> <li>Replace <strong>Not IN</strong> by <strong>Not EXISTS</strong> or <strong>OUTER JOIN</strong> (but not in distributed environment) </li> <li>Use bulk inserts when inserting more records</li> <li>Use BULK COLLECT clause when fetching records</li></ul> <p>As a fan of Mr.<a href="http://www.cbs.com/primetime/how_i_met_your_mother/community/barney_blog/index.php">Barney</a>.</p> <p>I demand, you fellow programmers to follow some best practices while writing PL/SQL code.</p>Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-54657887398069064442008-08-21T10:38:00.001+05:302008-08-21T10:53:49.747+05:30Oracle Performance Tuning and Optimization<p>With the overwhelming hits from allover the world for <a href="http://www.karthikeyanm.com/2008/05/view-on-oracle-locks.html">my blog on oracle locks</a>, I thought of sharing some performance tuning methods with all.Performance is a parameter, which is critical for any application. Since no users will be willing to compromise on performance of his system, we are subjected to develop a system with less response time and greater throughput.As all distributed systems use database for implementing the business logic, its performance is directly proportional to number of tuned queries and optimized PL/SQL objects in the database.Tuning is not a separate process as such. It should be carried out parallel to the <a href="http://en.wikipedia.org/wiki/Systems_Development_Life_Cycle">SDLC</a>.</p> <p>Oracle is one of the widely use database in the world. We will go through some optimization technique that can be implemented to develop better systems.</p> <p><b>Avoid data type mismatch for index columns</b> <p>Most people, who are novice in database use single quote (in the filter condition) irrespective of the data-type they are querying.This makes oracle to do an internal typecast to the required data-type. </p> <table cellspacing="0" cellpadding="2" width="559" border="1" unselectable="on"> <tbody> <tr> <td valign="top" width="271"><strong>Before Optimization</strong></td> <td valign="top" width="286"><strong>After Optimization</strong> </td></tr> <tr> <td valign="top" width="271"> <p>select name,age,city,state <p>from employee <p>where employee_id='1000';</p></td> <td valign="top" width="286"> <p>select name,age,city,state <p>from employee <p>where employee_id=<strong>1000</strong>; </p></td></tr> <tr> <td valign="top" width="271">Time taken :<strong> 2.3 sec</strong></td> <td valign="top" width="286"> <p>Time taken : <strong>0.3 sec</strong></p></td></tr></tbody></table> <p><b>Avoid functions on indexed columns</b> <p>Normally, we identify the most frequently queried column from table and create an index on it.But while querying we use functions on the indexed column. This will ultimately annul the purpose of creating an index on the column. </p> <table cellspacing="0" cellpadding="2" width="559" border="1" unselectable="on"> <tbody> <tr> <td valign="top" width="273"><strong>Before Optimization</strong></td> <td valign="top" width="284"><strong>After Optimization</strong> </td></tr> <tr> <td valign="top" width="273">select name,age,city<br>from employee<br>where substr(employee_name,1,3)='kar';</td> <td valign="top" width="284">select name,age,city<br>from employee<br>where employee_name like 'kar%';</td></tr> <tr> <td valign="top" width="273"> <p>Time Taken :<strong> 2.8 sec</strong> </p></td> <td valign="top" width="284"> <p>Time Taken<strong> : 0.3 sec</strong></p></td></tr></tbody></table> <p>If we cannot avoid using a function in the query. we can create functional index on the specific column</p> <p><strong>Specify the condition in WHERE instead of HAVING</strong></p> <table cellspacing="0" cellpadding="2" width="558" border="1" unselectable="on"> <tbody> <tr> <td valign="top" width="272"><strong>Before Optimization</strong></td> <td valign="top" width="284"><strong>After Optimization</strong> </td></tr> <tr> <td valign="top" width="272">select name,<br> count(1)<br>from employee<br>group by name<br>having name='karthi';</td> <td valign="top" width="284">select name,<br> count(1)<br>from employee<br>where name='karthi'<br>group by name;<br></td></tr> <tr> <td valign="top" width="272"> <p>Time Taken = <strong>2.2 sec</strong></p></td> <td valign="top" width="284"> <p>Time Taken = <strong>0.3 sec</strong></p></td></tr></tbody></table> <p>This is an obvious error.If you are not filtering before grouping, then all unnecessary data will be grouped and finally the required data will be filtered. Applying filter before grouping will avoid unnecessary sorting and grouping.</p> <p><strong> Use Joins instead of inner query</strong></p> <table cellspacing="0" cellpadding="2" width="563" border="1" unselectable="on"> <tbody> <tr> <td valign="top" width="262"><strong>Before Optimization</strong></td> <td valign="top" width="299"><strong>After Optimization</strong> </td></tr> <tr> <td valign="top" width="262">select employee_name<br>from employee where employee_id in ( select employee_id from defaulters)</td> <td valign="top" width="299">select employee_name<br>from employee e,<br> defaulters d<br>where e.employee_id=d.employee_id</td></tr> <tr> <td valign="top" width="262"> <p>Time Taken : <strong>14.1 sec</strong></p></td> <td valign="top" width="299"> <p>Time Taken <strong>: 5.5 sec </strong></p></td></tr></tbody></table> <p> This is actually considered as a bad practice in writing SQL, writing inner query results in querying the outer table for each output of the inner query.I would consider this as potential area where we can improve the system performance.</p> <p>I feel that, I am overloading every blog with more data.So I will try to present rest of the optimization techniques in next blog.</p>Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-6834135185595072142008-08-11T16:07:00.004+05:302008-08-11T17:47:26.908+05:30Quality Vs Indian ITThis title may be awkward for those who literally portray IT as a boom in Indian economy for the last two decades, in which GDP of India increased from 4 to around 8% per year. This is more than four times when compared to our GDP in first thirty years after independence. Its is evident that it has improved our standard of living, and it rejuvenated the beliefs of middle class people to pursue their goal of owning a house or a secure job. Dramatic change is the last generation's jobs in government offices, running small business in a town, agriculture and their sibling are working in computers in centralized air conditioned room. IT industry is certainly a boom for a developing country like India, which needs to provide jobs to million of its young generation to keep its rate of growth in a constant level. But I feel this view of IT Industry as a boom is just abstract and without deep insight. We need to have a deep insight of anatomy of the change this IT is making in India. It would provide the panoramic view of India's standard in delivering a product or service.<br /><br />I was unfortunate to not to read a <a href="http://karthikeyanmect.googlepages.com/hatsoff">mail</a> sent by my friend before being part of this industry.It vividly explained my future, what I am witnessing now. It would be highly pessimistic to just hate anything without any substantial reason.So let me put my view delicately in Barney's style.<br /><br />Indian service industries are recruiting students from best engineering colleges from India by showing attractive packages and tempting perks. As most of the students are from middle class background they are naturally attracted towards these high paying jobs and landed in one of the metros polis in India. Colleges are also keen in getting more companies for recruitment irrespective of its domain and background. It has become a business strategy for colleges to show its placement cout in their pamphlets and web sites.<br /><br /><br />Any fresher recruited by an IT industry usually will undergo a training program, where he/she will be inculcated with soft skills, computer basics and probably one technology in which the so called expertise is required by the company for billing the client.Indian IT giants like TCS has its in-house training center in Trivandrum and Infosys own an impeccable center in Mysore in state of Karnataka.TCS traninig center is getting the requirement from global HR and mending professional accordingly.Its counterpart in Infosys also follows almost the same logic and the latter has been perceived as a quality trainer compared to the former.<br /><br />After getting trained for couple of months in a particular technology employees are assigned to totally unrelated projects.So their training is merely a paradox.Ironically the cost involved in training a resource is getting wasted because of improper training plan and execution.More than 95 percent of the projects of any major Indian IT company are Maintenance and Support.Clients from west are out-sourcing the low graded support and maintenance to India and the jobs like design,where quality matters are out-sourced to foreign consultancy.<br /><br />In support most of the jobs are like running scripts once in a day;monitoring logs for exceptions or alarms;report generation sometimes it is like attending user calls and providing support on call.This is terrible.isn't it ?.Indian engineers from IIT who learned cutting edge technology in signal processing or hydrogen fuel or system on chip will be solving trouble tickets raised by clients.People are doing this because they are getting money and socially they are respected as software engineers.Calling any guy doing this work as an engineer is the peak of ignorance or stupidity.<br /><br />My points are not lopsided by explaining only the adverse part of the industry.I do accept that there are some projects with high standard.Companies are working on designing enterprise application for Telecom, Health care even some mission critical applications.But overall quality of a company has been decided by majority of its work.It shows that work these companies are providing to the young engineers are not exciting.Inspite of the quality of work they offer , they are not ready to compromise on the quality they except from freshers.Everyone might aware of the conditions being imposed on the college managements by the companies before they visit for recruitment.They are desperate to be the first company to visit for recruitment.If you need cream layer of students from the universities then you should be able to provide the work the cream layer students deserve.It is quite obvious from the recruitment strategies,traninig plan and allocation plan that these companies need resources to slog for them.It hardly matters for them whether the resource is he, she or it.<br /><br />I have a friend working in IT who has done his masters in Communication systems.He was very much worried about work he is doing.He was forced by his family condition to not to quit and do his Phd.He was hilarious while we discussed about the usage of the word R&D by IT guys."Even reading a pdf on java scripts become R&D here" he laughed.<br /><br />Even if anyone understand the real situation after getting in to these companies he can't even think of the moving out as he has been tied with a lock called service agreement.I don't understand how it is possible in India as we have a law against bonded labors.Mostly ignorance of students along with attractive packages results in engineers doing these menial works.<br /><br />My views are not against Indian IT industry.They should understand their current strategy of getting whatever project west offers to you will not work on the long run.So we should realize that its not about quantity, when we release our quarter results.Its a matter of quality, which will sustain your growth in long run. It also provides motivation and challenge to your associates and get the best out of them.So we need a commitment from our IT managers to shift their mode of business from evil support and maintenance to a more conservative job, which helps us to compete with our counterparts in other countries.<br /><br />Finally.As I mentioned, It has transformed the living standard of million of Indians.But the question is should we compromise the quality of work we are doing for the money we are getting ??Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-84027269678321771112008-08-07T15:40:00.001+05:302008-08-16T11:43:38.702+05:30Interesting Derivation !<a href="http://www.stumbleupon.com/">Stumble-upon</a> is really an exciting Internet tool.It will provide you variety of sites, which would be impractical to reach through search engine.Just you need to select the topic you like most and start stumbling.Once you start stumbling through, you will reach sites of different flavor.It provide a valuable time-pass when ever you get bored with chronic work.I want to share a derivation we got, <br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_6f5ZIVsV0Qg/SJrSZBEkfkI/AAAAAAAAB0g/7wM0QAL7_P0/s1600-h/girls-are-evil.jpg" imageanchor="1" style="background-color: transparent; border-bottom: 0pt; border-left: 0pt; border-right: 0pt; border-top: 0pt; margin-left: 1em; margin-right: 1em;"><img src="http://1.bp.blogspot.com/_6f5ZIVsV0Qg/SJrSZBEkfkI/AAAAAAAAB0g/3gwpNgUyv0g/s400-R/girls-are-evil.jpg" style="border-bottom: 0pt; border-left: 0pt; border-right: 0pt; border-top: 0pt;" /></a></div> <br />Its nothing serious,just for fun :)Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-43388596226142444112008-07-07T13:17:00.004+05:302008-07-07T14:03:36.976+05:30Unbelievable Match I have ever witnessed!!It was midnight quarter passed two, I was at the edge of the seat watching the Wimbledon 2008 Final between impeccable Federer and the young roaring Nadal.It is evident from my older blogs that, I am an admirer and a die hard fan of Federer, and obviously I was expecting Roger to crush Nadal to get his sixth consecutive title at England lawn tennis Club. As everyone expected it was a thrilling match both the world top rank players showed their elegance and enthralled the cloud with amazing serves, forehands, volleys and backhands.<br /><br /><strong>Analogous Arch-rivalry<br /></strong>It was the repeat of 1980 finals between flawless Borg and the fighter McEnroe.This final was also an analogous match between a five time champion and a young emerging player. McEnroe emerged as a winner of that Final stopping Borg from taking his six consecutive Title. Nadal emerged as a winner of yesterdays final stopping the king of grass from breaking the record of his role-model. Both players were absolutely spotless in shot selection and played with great heart and temperament.<br /><br /><strong>Defensive Federer</strong><br />Federer was too much defensive in first two sets and payed the penalty for it. Federer was aiming to avoid the strong forehand return from Nadal by pushing the ball to the wrong hand of Nadal. I am seeing him using the same strategy from French Open final 2008.But Federer failed to execute his plan to perfection, which results in unnecessary unforced errors. For the last two weeks Federer was hardly doing more than couple of unforced errors. But to play his new strategy he played avoiding some great forehand chances and tried too much on Nadal’s serve. It ultimately cause the champion to lose two opening sets.<br /><br /><strong>Great Comeback</strong> <br />Being two set down in final and playing third set with much calm and composure is possible only for Feddy. He started playing like a champion in the third set which went for tie break and Federer eased it through his immaculate Aces. I was able to see a Sampras inside Federer especially in his drop-shot and consistent forehands close to the baseline.<br />“<em>Come on Federer</em>!!” I shouted from my heart. I still remember a quote by Shane Warne<br />“I never fall out of my game. Sometimes I may, But when ever I comeback, I comeback strongly”<br />Federer was showing these line his as character to the crowd in the fourth set. Even he failed to break Nadal throughout fourth set; he was storming through the tie break with strong, high and accurate serves. Nadal was nervous and missed a championship point in the fourth set.“Thank God!!” I was praying for my hero.<br /><br /><strong>Ultimate Match</strong><br />The crowd was astonished to see a rally kind of match extending for more than four and half hours. Rain interrupted the match twice which was good for the spectators to take some breathe. When the players walked out for the second time, when matched stopped due to rain the score was :<br /> <strong>Sets Game Points</strong><br /><strong>-----------------------------------------------</strong><br /><strong>Nadal</strong> 2 2 40<br /><strong>Federer </strong> 2 2 40<br />shows it was nothing but an amazing tennis match in the history. The aroma of excitement was around us even at 2 ‘O clock in the midnight, when we were watching the match. The level of composure botht these guys showed was really a point we have to learn from this game.<br /><br /><strong>The Decider</strong><br />Again Federer was too much defensive and trying to play on wrong hand side of Nadal made several attempts to break the Spaniard bit all went in vain. Fifth set went to 6-6 as the match was reaching the pinnacle of nervous excitement. Finally too much of unforced errors from Federer and agility and endurance of Nadal helped the latter to break Federer’s serve, which ultimately provided a new player capable of winning against the five time champion at his own den. I found Nadal has improved his game a lot especially in serve and backhand. “<em>Congrats Nadal</em>!!”,I admired<br />Every true lover of the game witnessed the fantastic and unbelievable match. All the tennis greats expressed their opinions.<br /><br />“Federer wouldn't be Federer if he didn't come back with something amazing”<br /> -By Boris Becker<br />“It's so tough to pinpoint one area where Nadal won it. There was barely anything to separate them; it just came down to a question of the Spaniard's endurance and his sheer determination.”<br />- By Tim Henman<br /><br />Federer was beaten in the grass after 6 years. It was an unbelievable record winning streak of 65 matches, which has given him five consecutive titles. I feel everything is perfect about Roger Federer, except his fear for Nadal. If you list out the qualities of both player definitely Roger will have an edge over Nadal in <br /><br />• Strong and Accurate Serve<br />• Fluent Backhand <br />• Drop shots and Volleys<br /><br />But still his fear over Nadal’s victory over him in the last few Finals has made a huge influence in Federer’s game. But still he is the master of the game. He just need to believe that he can beat Nadal, the rest will happen with the quality of the game he is playing since 2003.<br />We can expect even a better game if these two greats meet in the near future. But I believe in Shane’s Words.”<strong><em>Come on Feddy</em></strong>!!”Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-68137041769496699692008-06-27T14:37:00.002+05:302008-07-08T13:55:43.367+05:30A Stress-Relief Trip To LonavlaOur team had planned for a trip to <a href="http://en.wikipedia.org/wiki/Lonavla">Lonavla</a>. I had hesitated to go, as I was not feeling well.I was down with cough and cold. After <a href="http://gehariharan.blogspot.com/">Hari</a> and Charan left, I was feeling a bit restless and alone. Since we were staying and sharing things together for last one year, It look sometime for me to overcome their separation. They played an eminent role in all my success in last couple of years. Last weekend I was suppose to be alone in home. To avoid this I said OK for Lonavla.<br /><a href="http://akush.blogspot.com/">Amit</a> and Anant were the tour managers. As per our plan we have started from Yantra Park by a mini bus at 7 AM. As usual we got the last seat along with Amol. It remembers me the Industrial visit we had in college days.<br /><br />Oh !! Those were golden days, when we use to start the journey by shouting SALA PULA SALA PULA KUMTAHLAKA. Normally I use to avoid being in a group. My affinity towards groupisim was increased because of the unity we had in our college days. Mootai Annamalai and Maheswaran all use to get themselves involved in '<a href="http://tamilslangs.blogspot.com/">OOO Poodu'</a>.I feel these kind of small things are playing immense role in bringing people together and creating better relationships. As I was thinning about my olden days we have reached a place in Pune-Mumbai Highway where we had the first stopping for having Vada pav to break our fast. I am planning to write a blog in <a href="http://en.wikipedia.org/wiki/Vada_pav">Vada Pav</a>, the quintessential food for all Mumbaikars.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://bp0.blogger.com/_6f5ZIVsV0Qg/SGTA5Ef-T3I/AAAAAAAABzY/3CJJVrkVXlQ/s1600-h/In+Lonavla.jpg" imageanchor="1" style="border-right: 0px; border-top: 0px; margin-left: 1em; border-left: 0px; margin-right: 1em; border-bottom: 0px; background-color: transparent; cssfloat: ;"><img ja="true" src="http://bp0.blogger.com/_6f5ZIVsV0Qg/SGTA5Ef-T3I/AAAAAAAABzY/ITNZzt4ivtc/s400-R/In+Lonavla.jpg" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px; cssfloat: ;" /></a></div><div class="separator" style="clear: both; text-align: center;">Amol,Me Sendhil and Gokul</div><br /><br />After the first stop we had an hour of journey and reached Lonavla. As I heard It was really a pleasant place with full of greeneries. The monsoon was started already and it has added a bit of lush to the greens around. Actually Lonavla is lying some 600Feet from ground. As we came out of the bus with preparation for taking bath we saw lot of families, couples and friends were already there for enjoying their weekend. We had to trek for about 500 meters in the small mountain to reach a water falls. We spent couple of hours in the water falls.<br /><br />From there our tour mangers directed us Tiger point. Its a place about five to six miles from Lonavla. It was like “suicide point” in Kodaikanal. We reached there at 3 PM so it was very windy. We were taking snaps and spend the evening there.<br /><br />We started our journey back to Mumbai from Tiger point. I have to talk about the immaculate highways between Mumbai and Pune. It was really well planned and constructed. Maintaining road of that much width and lanes in hilly area is really difficult. In the return journey I shared my seat with Saurabh , Mr. Billing in our project. He was discussing about his plan to name his child as "Billing”. I know he has gone crazy after doing billing for last two years.<br /><br />We reached home by half past eight in the evening. I was feeling free after coming back from the trip. Really having some trips to some remote places now and then will definitely relive stress.Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-43124220471002953222008-06-24T14:19:00.005+05:302008-06-24T15:42:50.088+05:30முதல் தமிழ் வலைபதிவுவணக்கம் நண்பர்களே !<br />எனது 50 ஆவது வலைப்பதிவை தமிழில் எழுழ்துவதில் பெரும் மகிழ்ச்சி அடைகிறேன்.இந்தியமொழி அனைத்தும் வழ்ங்கம்படும் இந்த மும்பை நகரம் மொழி மட்டுமல்லாது பல கலாச்சாரங்களின் தொகுப்பாக நான் கண்கிறேன்.சரியாக 2 ஆண்டுகளுக்கு முன்பு ஒரு சாமானிய தமிழனாக, மும்பை பணியை கட்டாய தாலியாக ஏற்ற எங்களுக்கு, இந்த மாநகரம் கற்றுக் கொடுத்திருபவை ஏராளம்.எலக்ட்ரானிக்ஸ் மற்றும் ப்ரோக்ரம்மிங்கில் மட்டும் இருந்த எனது ஆர்வம், மொழி, கலாச்சாரம், லெமுரியா என்று பல பரிமானம் எடுத்து இங்குதான்.<br />எனது தாய் மொழி அல்லாத பிற மொழியை கேட்கவும் பேசவும் இங்கே வாய்ப்பு கிடைத்தது.தமிழின் அண்டைய மொழியான தெலுங்கு,மலையாளம் போன்ற மொழிகளை கேட்கும் போது நம் மொழியின் தொன்மையும், தொடர்பும் இனிமையும் புலப்படும்.தமிழின் தோற்றத்தின் மேல் ஆர்வம்; தமிழர் கலாச்சரத்தின் மீது மரியாதையை என பல மாற்றங்களை என்னுள் விதைத்தது மும்பை வாழ்க்கை.<br />நான் எழதிய 49 படிமத்தின் முடிவில், எதோ எனது எண்ணங்கள் அனைத்தும் எழுத்துகளாக மாறாமல் போனதுபோல் ஓர் மாயை மட்டுமே முடிவுரையாக நிற்கும்.தமிழில் சிந்தித்தால் .... இதோ ஒரு கச்சிதமான வரிவடிவம் பெற்றுஇருகிறது என் எண்ணம்.<br /><br />நன்றி : <a href="http://www.google.com/transliterate/indic/Tamil">கூகிள் transliterate</a>Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-38608501011977529012008-06-07T16:01:00.001+05:302008-06-07T16:02:40.107+05:30Wiki Relation - Six Degrees<p>Wikipedia has now become a standard reference for definition of any matter in this universe.You can see almost all bloggers create a back link to Wiki page for definition of any words they use.It is having analogy with magazines in late 95's referring to oxford dictionary for any peculiar word in their article.I recently read an article on new Mars rover in daily local paper, where they have used a new word related to Mars surface property and the explanation was given like... "As Per Wikipedia....."It shows the power and growth of wikipedia as a standard reference  in last couple of years.</p> <p>Today I heard the concept of finding the relationship between any two the articles in Wikipedia.It is not the logical relation.It is the number of links between the two articles.In simple words it the number of clicks required to reach one article from other.We can say it the distance between the two articles.So the biggest distance between any two article will define the diameter of the Wikipedia.I have read that this project was an attempt to find the diameter of Wikipedia, but it has given a handy algorithm to find out the distance between two articles.</p> <p>Example( You can also <a href="http://www.netsoc.tcd.ie/~mu/wiki/">have a try</a>)</p> <p>I gave vague unrelated topic,but see! Wiki is having awesome relationship between articles</p> <blockquote> <p>               <a href="http://lh4.ggpht.com/karthikeyanmect/SEpjjfRssaI/AAAAAAAAByc/HtVrnoTmYU0/s1600-h/Wiki%20Blog%5B11%5D.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="409" alt="Wiki Blog" src="http://lh6.ggpht.com/karthikeyanmect/SEpjkm55QTI/AAAAAAAAByg/Uaw5P3LnCPY/Wiki%20Blog_thumb%5B7%5D.jpg?imgmax=800" width="548" border="0" /></a></p> <p>                                  <em>Wiki relation between Y2K and Purananuru</em></p> </blockquote> <p>According to Stephen Dolan,Wikipedia has 2301486 articles with 55550003 links between them.The largest "strongly-connected-component" of Wikipedia has 2111480 articles. That is, there are 2111480 articles with the property that from any of them, it is possible to get to any other one. The rest are mostly pages that no-one has linked to or disambiguation pages.</p> <p>Stephen has used graph theory to convert the relation between articles as a graph.From Wikipedia's database Stephen got the XML and used scripts to parse the XML to find the graph.Finally distributed Computing algorithms has been used to identify </p> <ul> <li>The diameter of Wikipedia</li> <li>The distance between any two articles.</li> </ul> <p>The techincal concepts like parsing, graph Theory and distributed computing has been clearly explained in <a href="http://www.netsoc.tcd.ie/~mu/wiki/">Stephen's site</a></p> <p>It is really an interesting game to play.I tried combinations of two completely different articles but I was able to get the maximum distance of 4.If any one could get more than four please comment on this blog.</p> Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-28433247837165416352008-05-08T14:18:00.003+05:302008-05-08T22:30:53.993+05:30A View on Oracle Locks<p>Reliability of a database has been determined by the degree to which it strives to achieve atomicity, consistency, isolation and durability, what we can call simply as ACID properties. Oracle is a robust and highly reliable database which has these ACID properties. Locks play a vital role in achieving couple of these properties. Oracle defined lock as Mode and type. Mode defines the way in which a session locks a row or set of rows in a table. Type can be defined as the transaction type which makes this lock happened. <br /> <br /><strong>Modes of Lock</strong> <br />There are six lock modes in oracle out of which the sixth lock is NULL lock.They are</p> <table cellspacing="0" cellpadding="2" width="362" border="1"><tbody> <tr> <td valign="top" width="195"><strong>Lock Mode</strong></td> <td valign="top" width="165"><strong>Abbreviation</strong></td> </tr> <tr> <td valign="top" width="194">Row Shared</td> <td valign="top" width="166">SS</td> </tr> <tr> <td valign="top" width="193">Row Exclusive</td> <td valign="top" width="167">RX</td> </tr> <tr> <td valign="top" width="193">Share</td> <td valign="top" width="167">S</td> </tr> <tr> <td valign="top" width="193">Share Row Exclusive</td> <td valign="top" width="167">SRX/SSX</td> </tr> <tr> <td valign="top" width="193">Exclusive </td> <td valign="top" width="167">X</td> </tr> </tbody></table> <p> <br /><strong>Lock types </strong> <br />There are three lock types like TM .TX and UL. They are classified according to the transaction which is locking the table. TX denotes a transactional lock which occurs when any transaction changes data from a table. TM is a DML lock which occurs when ever an object is changed. UL is a user defined lock. <br /> <br /><strong>Data Dictionary Views</strong> <br />Oracle uses any one of the above locks modes according to the transaction type to achieve the Isolation of ACID. Oracle provides couple of data dictionary views to identify almost all details about locks like who is locking an object, which sessions are waiting for the same object and session details. File and the block where the lock has been made can also be easily identified from the data dictionary views. <br />• V$lock <br />• V$locked_object <br /> <br />We will take an example where we will create a lock and we will try to gather the lock details <br /> <br />ses1>create table test_lock( <br />2 id number, <br />3 name varchar(200)); <br />Table created. <br /> <br />ses1>insert into test_lock values(1,'apple'); <br />1 row created. <br />ses1>insert into test_lock values(2,'orange'); <br />1 row created. <br />ses1>insert into test_lock values(3,'banana'); <br />1 row created. <br />ses1>insert into test_lock values(4,'mango'); <br />1 row created. <br />ses1>commit; <br />Commit complete. <br /> <br />ses1>column id format 99 <br />ses1>column name format a10 <br />ses1>select * from test_lock for update; <br /> <br />ID NAME <br />--- ---------- <br />1 apple <br />2 orange <br />3 banana <br />4 mango <br /> <br /><strong>Session 2 created for updating a single row from the same table <br /></strong> <br />SQL> set sqlprompt ses2> <br />ses2> <br />ses2>column id format 99 <br />ses2>column name format a10 <br />ses2>select * from test_lock where id=1 for update; <br /> <br />ID NAME <br />--- ---------- <br />1 apple <br /><strong>Session 3 for studying the locks due to session 1 and 2 <br /></strong> <br />SQL> set sqlprompt ses3> <br />ses3>column addr format a18 <br />ses3>column kaddr format a18 <br />ses3>column sid format 999 <br />ses3>column ty format a3 <br />ses3>column id1 format 99999999 <br />ses3>column id2 format 99999999 <br />ses3>column lmode format 9999 <br />ses3>column request format 999 <br />ses3>column request format 999 <br />ses3>column block format 9 <br />ses3>set linesize 300 <br />ses3>Select *from v$lock where type in ('TX','TM'); <br /> <br />ADDR KADDR SID TY ID1 ID2 LMODE REQUEST CTIME BLOCK------------------ ------------------ ---- -- --------- --------- ----- ------- ---------- -----070000000BBB72B0 070000000BBB7428 48 TX 393237 8560 6 0 2478 1070000000BB6C7E8 070000000BB6C810 48 TM 45405 0 3 0 2478 0070000000BB6C8A8 070000000BB6C8D0 54 TM 45405 0 3 0 2478 0070000000B3C3D90 070000000B3C3DB0 54 TX 393237 8560 0 6 2478 0070000000BBADD18 070000000BBADE90 75 TX 262182 9758 6 0 7460 0070000000BB6C728 070000000BB6C750 75 TM 45400 0 3 0 7460 0070000000BBE3FB0 070000000BBE4128 77 TX 589867 7411 6 0 5773 0070000000BB6C668 070000000BB6C690 77 TM 43850 0 3 0 5773 0 <br /> <br />8 rows selected. <br /> <br /><strong>LMODE and REQUEST</strong> <br /> <br />The LMODE and REQUEST columns both use the same numbering for lock modes, in order of increasing exclusivity: from 0 for no lock, to 6 for exclusive lock. A session must obtain an exclusive TX lock in order to change data; LMODE will be 6. If it can't obtain an exclusive lock because some of the rows it wants to change are locked by another session, then it will request a TX in exclusive mode; LMODE will be 0 since it does not have the lock, and REQUEST will be 6. <br />You can see this interaction in the rows we selected earlier from v$lock: <br /> <br /><strong>SID </strong> <br />This is session id you can join with the V$session and v$sql for finding the session details and sql which is causing the lock. <br />ses3></p> <blockquote> <p>select q.SQL_TEXT <br />from v$session s, <br />v$sql q <br />where s.sid= 54 and <br />s.SQL_ADDRESS=q.ADDRESS; <br /> <br />SQL_TEXT <br />------------------------ <br />select * from test_lock where id=1 for update</p> </blockquote> <p><strong>CTIME</strong> <br />Time since current mode was acquired <br /><strong>ID1 and ID2 <br /></strong>The ID1 and ID2 columns point to the rollback segment and transaction table entries for that transaction. <br />For DML lock the column ID1 shows the object being modified <br /> <br />ses3>select object_name from dba_objects do where do.object_id=45405; <br /> <br />OBJECT_NAME <br />--------------------------- <br />TEST_LOCK <br /> <br /><strong>Block <br /></strong>This column shows whether this lock is blocking some other session <br /> <br /><strong>Identifying Locked Table and its Row</strong> <br />We can identify the sid from v$lock table and the corresponding sid in v$session table will gives us the <br />• object ID, <br />• the relative file number, <br />• the block in the datafile, <br />• the row in the block that the session is waiting on <br /> <br />We can calculate the extended rowid from the above four parameters using the procedure rowid_create in DBMS_ROWID package. <br /> <br />ses3>column object_name format a15 <br />ses3>column row_id format a60 <br />ses3>column query format a 60 <br />ses3>column query format a60 <br />ses3>select do.object_name, <br />        dbms_rowid.rowid_create(1, <br />        ROW_WAIT_OBJ#, <br />        ROW_WAIT_FILE#, <br />        ROW_WAIT_BLOCK#, <br />        ROW_WAIT_ROW#) row_id, <br />        'select * from ' do.object_name ' where rowid = ''' <br />        dbms_rowid.rowid_create(1, <br />        ROW_WAIT_OBJ#, <br />        ROW_WAIT_FILE#, <br />        ROW_WAIT_BLOCK#, <br />        ROW_WAIT_ROW#) '''' query <br />from v$session s, <br />       dba_objects do <br />where s.sid = 54 and <br />         s.ROW_WAIT_OBJ# = do.object_id; <br /> <br />OBJECT_NAME              ROW_ID                                                          QUERY <br />--------------- ------------------------- -------------------------------------------------------- <br />TEST_LOCK AAALFdAALAAAlQ1AAA    select * from TEST_LOCK where rowid = 'AAALFdAALAAAlQ1AAA' <br /></p> <blockquote> <p>The third column of this query will give the query which will show the column which got locked by the session</p> <p> <br />ses3>select * from TEST_LOCK where rowid = 'AAALFdAALAAAlQ1AAA'; <br />ID NAME <br />--- ------- <br />1 apple <br /> <br />. So this way we can find out the <br />• Lock <br />• Type of lock and locking user <br />• object which is locked <br />• SQL which is locking <br />• Row which is locked <br /> <br />It would be good if some one reading this blog add some points I missed out :)</p></blockquote> Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-22631615810358548902008-05-05T16:03:00.009+05:302008-05-08T22:49:47.285+05:30Real Live Cricket !!<p>I am proud to be a passionate lover and follower of the game cricket for long time.Even it has taken a lot of my time in return it has inculcated lot of qualities in me. I started understanding the English conversation after hearing cricket commentary. Even the way I am speaking the language has the influence of commentators I loved to hear. The passion for the game drives me to learn its sensible and exiting parts like pitch preparation and strategy used for controlling a batsman or the planning involved in field setting and using bowlers; testing batsmen patience; even some abusing words in English. <br /> <br />I haven’t got any opportunity to enjoy the game as a spectator among the crowd; I was just enjoying the matches on television. After being to Mumbai I was waiting for an opportunity to get an international match in Mumbai. Last Sunday we got the opportunity to watch a Twenty-Twenty match here in <a href="http://en.wikipedia.org/wiki/DY_Patil_Stadium">DY Patil Stadium</a> in Nerul. <br />The match was between Mumbai Indians and Delhi Dare Devils. The effort taken by one of my friend Saurab in arranging tickets for the match has been exceptional. He was in a tight schedule last weekend as he travelled to Indore to attend one of his colleague’s marriage and he travelled back to Pune on Saturday night. He returned to Mumbai the next day morning to give tickets to us. We reached the cricket stadium by half past three in the evening. <br />There was a big crowd out side the DY Patil Stadium. I was accompanied by Saurabh, Hari, Gokulan and Amol. We were able to see the excitement spread in the ambience. <br /> <br />                                 <a href="http://lh6.ggpht.com/karthikeyanmect/SCM2GLmWeZI/AAAAAAAABvw/VLJ86SMIXa4/s1600-h/DY%20Patil1%5B4%5D.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="293" alt="DY Patil1" src="http://lh4.ggpht.com/karthikeyanmect/SCM2IrmWeaI/AAAAAAAABv4/fcTIaGerdb8/DY%20Patil1_thumb%5B2%5D.jpg?imgmax=800" width="383" border="0" /></a> </p> <p>                                                             DY Patil Stadium</p> <p>We went inside the stadium. It was really a well designed and constructed stadium, Galleries were remembering me the galleries of <a href="http://en.wikipedia.org/wiki/Brisbane_Cricket_Ground">Gabba, Brisbane</a>. It certainly looks eccentric from normal Indian grounds. The boundary size has been reduced to amplify the excitement of the game. I thought why the game has deriving its new dimensions by favoring the batsmen and curtailing the bowler’s interest in the game. Before we reached there Delhi won the toss and elected to field. There where two LCD screens for displaying the slow motions after every delivery and ads. <br /> <br />Five minutes before the match was scheduled one Delhi Player with red and black jersey came out. It was really difficult to identify the player in the ground from the gallery. But I identified him. He was <a href="http://content-usa.cricinfo.com/australia/content/player/6565.html">Glen McGrath</a>. I was excited to see him; I was shouting … Hey Mcgra… Mcgra !!.He was doing warm up and bowling with short run-up to his mates. I did not believe that I was seeing McGrath bowling. It took some time for me to bring myself back to the ground state. After that Delhi players started jogging inside the ground I was able to identify Asif ,<a href="http://content-ind.cricinfo.com/india/content/player/35263.html">Shewag </a>and <a href="http://content-www.cricinfo.com/india/content/player/28763.html">Ghambir</a>.Mcgrath bowled the first over. Watching the match live on the filed is not the same as we are watching in the television. Here we are able to see the reaction of batsmen and the action of bowler and pitch of the ball direction of swing of the bat and running between wickets when ball running down the ground with the help of technology. But if you watch the match live, it is very simple. It was like a college cricket match we played. But I saw players like Sanath playing their shots fluently from middle of their bat. Sixes were hit effortlessly and elegantly by players. It is really a batsmen game.Margin of error is very less so bowlers have to be careful about on their line and length.</p> <p>                                   <a href="http://lh5.ggpht.com/karthikeyanmect/SCM2J7mWebI/AAAAAAAABwA/6wSrQU3XM0s/s1600-h/DY%20Patil2%5B4%5D.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="283" alt="DY Patil2" src="http://lh4.ggpht.com/karthikeyanmect/SCM2LrmWecI/AAAAAAAABwI/T_yOD36dJME/DY%20Patil2_thumb%5B2%5D.jpg?imgmax=800" width="369" border="0" /></a> </p> <p>                                                             Second Innings <br /> <br /><a href="http://content-usa.cricinfo.com/southafrica/content/player/46774.html">Shaun Pollock</a> has been really agile in the filed and he lead the team in the absence of Sachin. We enjoyed couple of big sixers from Pollock one over point and other over the mid wicket. I was enjoying watching the game it doesn’t matter who player against whom and what was the score. <br /> <br />Delhi came to bat with in-form Ghambir and Shewag. The left hander failed to open his account and went back to pavilion as he was caught in short cover of a tight bowling from Mumbai Indians. Shewag was really awesome in hitting the ball without moving his feet. He played a mammoth six over the covers of Pollock and a one huge six over mid wicket of Sanath.The elegance with which the game has been played in the international level makes the game seems to be played effortlessly.Brutally punishing bowlers and ear tearing music for cheering the batsman and the cheer leaders dancing for every shot played has made this game as a tool for earning money. I guess I would be wonderful to watch a test match in DY Patil stadium,Mumbai.</p> Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-63751595474283115912008-04-28T18:41:00.003+05:302008-04-28T18:54:12.901+05:30Relaxing or Harbhajan Singh !!This is not a serious analysis on why Bhajji slapped the pace man from Kerala. Harbhajan was known for his atrocities on and off the ground. There were number of incidents where he misbehaved and got suspended. He was suspended from National cricket Academy for misbehaving in the camp. He was fined for racially abusing Symonds. (Sachin helped him in getting the punishment less).It clearly shows that the man from Jalandhar don’t have control over his self. His character is leading himself as an Akthar of India, Talent with immutable animosity.<br />Actually I have started writing the blog for sharing a Joke I have read about this slapping inceident.By the way I lost my track. Read this !!<br /><br />Harbhanjan Singh was enjoying the Match. Yuvraj Singh came and asked him, are you relaxing?? Harbhajan answered No I am Harbhajan Singh. VRV Singh Came and asked the same Question. Sardar answered No No Me Harbhajan Singh. Third one came and asked the same question Sardar was totally annoyed and decided to shift his place. While walking Harbhajan saw Sreesanth enjoying the Match. He went and asked him are you Relaxing?? Sreesanth was much educated and answered Yes I am relaxing. Harbhajan slapped him on his face and said Idiot, Sab tere Ko wahahn dhoond rahe hai aur tu Yahaan Aaram Kar raha haiKarthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-69314253863501583962008-04-25T18:29:00.009+05:302008-04-26T00:05:24.650+05:30Query to find Nth MAX or MIN of a columnWriting a query for eccentric requirement is always exiting and challenging. Today I was asked to write a query to find Nth maximum or minimum value of a column in a table with one more column having a common data. (Not that much odd requirement right?).OK, I decided to write it directly without googling it. I manage to write this below query in couple of minutes. Check this query<br /><br /><strong>select [column] from <br />(select [column],<br /> rank() over(order by [column ]) rnk,<br /> (select count(distinct [column]) from [table]) cnt<br /> from [table] t ) where rnk=cnt+1-&N;</strong><br /><br />N will be the variable deciding the position of maximum data. For Nth minimum we can use the same query with <strong>desc</strong> clause in the order by section of the analytic function. Check the steps involved in this requirement<br /><br />SQL> create table test_tbl(<br /> 2 id number,<br /> 3 num number);<br /><br />Table created.<br /><br />SQL> insert into test_tbl(<br /> 2 select rownum,dbms_random.random from task where rownum < 11);<br /><br />10 rows created.<br /><br />SQL> commit;<br /><br />Commit complete.<br /><br />SQL> select * from test_tbl;<br /><br /><br /> ID NUM<br />---------- ----------<br /> 1 8576<br /> 2 566<br /> 3 3343<br /> 4 100<br /> 5 4<br /> 6 356<br /> 7 345<br /> 8 222<br /> 9 7465<br /> 10 122 <br /><br />10 rows selected.<br /><br />SQL> select num from<br /> 2 (select num,<br /> 3 rank() over(order by num ) rnk,<br /> 4 (select count (distinct id ) from test_tbl) cnt<br /> 5 from test_tbl) where rnk=cnt+1-&n;<br />Enter value for n: 3<br />old 5: from test_tbl) where rnk=cnt+1-&n<br />new 5: from test_tbl) where rnk=cnt+1-3<br /><br /> NUM <br />---------- <br /> 3343 <br /><br />SQL> /<br />Enter value for n: 2<br />old 5: from test_tbl) where rnk=cnt+1-&n<br />new 5: from test_tbl) where rnk=cnt+1-2<br /><br /> NUM <br />---------- <br /> 7465 <br /><br />SQL> /<br />Enter value for n: 4<br />old 5: from test_tbl) where rnk=cnt+1-&n<br />new 5: from test_tbl) where rnk=cnt+1-4<br /><br /> NUM <br />---------- <br /> 566 <br /><br />SQL> spool off<br /><br />After writing this query I thought of checking the same functionality in the web.I found couple of queries. One of them from oracle site is<br /><br /><strong>select * from tab1 a <br />where &n = (select count(distinct(b.col1)) <br />from tab1 b where a.col1<=b.col1);</strong><br /><br />But if you compare the execution plan of the above two queries you will find the first one as much better. Guys, reading this can make a better query and add it as a comment in this blog!!Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-59444377498992097802008-04-19T23:58:00.002+05:302008-04-24T16:02:03.806+05:30God equated to energy !<blockquote> <p>I remember those long discussion with my friends about the existence of God.Mostly all of those discussion use to start politely and gain some verbosity, finally end up with every one insisting their own views.Mostly It use to happen with me and Reuben.We use to give shape and life to our thoughts with little explanation using  physics.This physics has created a bond between me and him when we were in eleventh standard, where we play some ridiculous game with SI units.</p> <p>After college life we depart, I am in Mumbai now and he is working in Chennai.Two days back I got a mail from him explaining God and something spiritual.I thought of replying my thought / understanding of god, to that mail.</p> <p>What I feel is God in general is the energy involved in this world. It may be in the form of nature or inside a human being or may be as a thought in someone's mind. Man has no power on the energy existing in this word as we cannot create or destroy it, we are just transformers (as Law of conservation of Energy says).you have transformed your energy to get a job. I am transforming my energy to write this letter. Now you might have a question of the source energy from where all the existing energies are transformed. Science has some prediction for this. I guess you know about this..I.e. the single hydrogen atom blasted out and formed these galaxies. But Science don't have proof for this! </p> <p>You know pretty well you cannot give shape to energy, But we humans are perceiving it with a shape of the object where energy resides. For some people god is stone as he thinks that the energy is within the stone; for some people it is light as they believe the energy of light is god. We all know that energy is the source of life; you can say god is source of life if you believe god is nothing but this cosmos with energy. Study of energy for understanding it logically is science. Experiencing the same energy within you (Feeling the same energy within you) is what is spiritual. For Einstein it is E where he found that Energy can be derived or transformed from mass. He has not experienced it but he experimented with energies around him to find the relationship between the mass and energy inside the mass. </p> <p>I know people are saying that you cannot formulate everything as Einstein did for Energy, and they are saying you can just feel/experience it. Logically reasoning the existence and the energy with which it has been imbibed may be practically not possible for a normal human brain. </p> <p>But for me, since from my first class to this letter all are logical. My brain hesitate to accept anything without logical base (i.e experiencing the energy).I firmly believe that one day this world will have formulation or scientific explanation for energy in this ambience </p> <p>I just wrote what I understood.</p> <p>Regards</p> <p>Karthikeyan M</p></blockquote>Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-72750829757731964912008-04-11T14:19:00.005+05:302008-04-11T14:33:40.351+05:30Science of ColorToday we will talk about color, the most sensational aspect which makes life lively without which life could be a monotonus black and white picture.According to <a href="http://en.wikipedia.org/wiki/James_Clerk_Maxwell">Maxwell</a>, color is an electromagnetic wave of particular range of wavelength. We know that visible range of electromagnetic spectrum is from 380 to 750 <a href="http://en.wikipedia.org/wiki/Nanometer">nm</a>. Electromagnetic radiation in this range of wavelengths is called visible light or simply light. So we can say light/energy is wavelength (point A)White light is a bundle of electromagnetic wavelength of all colors. When white light falls on a prism the different colors or wavelength will be unbundled according to the refractive index of the prism. The electromagnetic waves are colorful according to the wavelength it carry but how come objects are having colors. Interesting?<br /><br /> Every object is this universe is made up of atoms which have its own nucleus and electrons revolve around it in shells and orbits. The shell in which the electrons revolve depends on the energy carried by the electron. When it gain energy from ambience and it tends to move to higher orbits which we call as higher energy level. As it loses some energy to the ambience it comes down to lower orbit. The stable state will be reached when electrons reach it ground level.<br /><br /> So electrons in an object absorb required energy i.e. wavelength (point A) to move from one level to another and thus it will reflect the rest of the wavelength. The color of the particular reflected wavelength appears to be the color of the object. The wavelength that got reflected depends on the atomic structure of the object. So obviously the color of any object will be decided by the atomic structure and energy level of electrons.<br /><br /> Chilly is red because it absorbs all wavelengths from white light apart from 625–740 nm which is the wavelength of color red. This concept suits for all the objects which are having color complexion.To prove this concept if you place a green leaf in red light which is nothing but a filtered vibration of 480-405 THz ,then leaf which will absorb all the red light will not be green any more as the light fall on it is not having the green wavelength.It’s quite evident that the color of the leaf will be black as all wavelengths have been absorbed by the leaf.<br /><br />Now we know why iron is red as we heat it.Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-61812637371630270772008-04-06T18:42:00.004+05:302008-04-06T19:10:46.840+05:30English words of Tamil originI don't know whether I am obsessive in understanding the roots of Tamil words in English. I really find it interesting in reading and learning the root of words. My subconscious mind always insists me that the Latin and Greek roots from which English got derived are directly or indirectly from Tamil.<br /> For last one week I was in search of a good etymological site which perhaps gives me better understanding of words by explaining the root and history of it. Obviously, the book in my shelf is also a result of this search.<br />Finally I found a site which is fulfilling my requirement specification. I was morbidly obnoxious(I have started using this phrase more after reading <a href="http://www.amazon.com/Word-Power-Made-Norman-Lewis/dp/067174190X">Normal Lewis Word Power</a>) in searching the word Tamil there also. I found a rich result set. Those are English words of Tamil origin, after reading those 20 odd words the synapse in my brain, which has the above mentioned subconscious understanding, got a bit stronger.<br /><br />I would reckon you to have a glance through these <a href="http://www.etymonline.com/index.php?search=tamil&searchmode=none">intresting roots</a>Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-73909927777794977932008-04-01T16:23:00.006+05:302008-04-01T16:50:06.553+05:30Time is Absolutely RelativeTime is really a fascinating concept, which is tricky to understand. I was attracted by reality and excitement involved in learning physics in my high school. I use to spend more time in reading physics textbook than others, which gave me good understanding of time. Here I just want to share the concept of time and possibility of a machine that can take us over to different instant of time<br /><br /> As all we learned in our higher school that Second is defined as<br />"The second is the duration of 9 192 631 770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the cesium 133 atom"<br /><br />So the standard time taken by cesium 133 atom to move from one energy level to another energy level after radiating energy has been considered as a second. Please do remember this point; we will come back to this point again.<br /><br /><strong>Concept of Radioactivity</strong><br /><br /> Nucleus of an electron has protons and neutrons. The protons which are positively charged particle will be repelling each other inside the nucleus. The repelling force will be directly propositional to the number of protons in nucleus. Nuclear reaction is nothing but separating a proton or adding protons to the nucleus and thus generating huge energy. Metals heavier than Iron will have more protons, so more repulsive force inside the nucleus. Repulsive nature makes these elements highly unstable. Uranium with 92 protons is an example for reactive elements. It will emit energy in the form of radioactive signals until it come to ground state. We call these elements as Radioactive.<br /><br /><strong>Relation between Mass and Speed</strong><br /><br /> In quantum physics explained by Einstein, mass can be converted to energy and vice versa. This has been governed by the equation<strong> E=mC2.</strong>That is,when a mass of m Kilogram travels at a speed of light it will be converted to energy equal to the product of mass of the object and square of the speed of light. It is quite oblivious that tremendous energy will be released (because of C2 ).<br /><br /><strong>Time Machine</strong><br /><br /> All the properties of any object traveling in the speed of light will change with respect to the object which is stable. According to Einstein’s equation as the object approaches speed of light the mass of the object become infinite. Likewise the time taken by the cesium 133 atom to change from one energy level to another level will change. This shows that the standard one second is no more same as you started travelling at light's speed.<br /><br /> So in the condition of a mass travelling at the speed of light, the time taken for cesium 133 atom to move from one level to another will be different.So time differs between that object and us. I guess this is the concept people are trying to use in Time machine.May be in future we can bombard a mass with light speed so the entire property of the object changes. If it carries some human being (which is also composed of electrons) will also undergo the same changes, which will be some thing next to fatal.Karthikeyan Mhttp://www.blogger.com/profile/17194328746702737155noreply@blogger.comtag:blogger.com,1999:blog-6197779038658563339.post-26212758540652864442008-03-03T16:25:00.006+05:302008-03-06T11:41:08.468+05:30Lack of Foresight !Foresight is an important thing in life which is like a selfcompass.It guides one in choosing direction in life. It decides how much you are aware of your interest, capabilities, passion and more over knowledge on the ambience you are living. when I was doing my graduate I came across lot of people who were not happy with the work they were doing and the life they were leading. I use to question on these guys' attitude and behavior. But now a days I am feeling the same kind of boring you can say monotonous feeling which is really cumbersome. <br /><br />I am here because of lack of foresight on my carrier, future, ability, desire ??<br />Nooo.!!<br />I was interested and involved in designing electronics circuits and programming processors for automating systems. I was passionate for controlling small systems and components through PC, but where I am now is an irrelevant area. This was outcome