tag:blogger.com,1999:blog-40913319702293046122024-03-13T12:55:35.606-05:00Cognitive CacheA thought repositorySaagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.comBlogger55125tag:blogger.com,1999:blog-4091331970229304612.post-62132887824847858502019-02-05T17:13:00.002-06:002021-03-11T21:48:37.582-06:00TIBCO BW (BusinessWorks) and BE (BusinessEvents) Code Review Automation<div dir="ltr" style="text-align: left;" trbidi="on">
<span face=""arial" , "helvetica" , sans-serif">As part of setting up DevOps pipeline for Continuous Integration / Continuous Deployment (CI – CD) for TIBCO BW (BusinessWorks) and BE (BusinessEvents), we used the BW Code Scanner and BE Code Scanner products from <a href="https://bwcodescanner.com">https://bwcodescanner.com</a>. They are very comprehensive from code review perspective with 100+ rules for BW Code review and 75+ rules for BE Code Review. Automating this as part of DevOps pipeline helped us to focus the manual code reviews on Design and functional gaps.</span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span face=""arial" , "helvetica" , sans-serif">BW Code Scanner and BE Code Scanner perform the static code review analysis for hard coded configurations, adherence to best practices, optimization opportunities and known patterns of defects. One interesting part about them is that they are very in-depth. BW Code Scanner, for example, traverses all the paths from each activity node in a process instance and evaluates the transitional conditions in all paths from Start to End while evaluating for missed configurations and missing transitions. In our case, we had a JMS Queue Receiver in client acknowledgment mode and it highlighted all the success and error paths from Start to End where there was no message confirmation. This helps to ensure that the message doesn’t end up in an infinite loop. In addition to this, it was doing dynamic global variable mapping, so, in the above case, even if the acknowledgment mode was configured as Global variable, it was able to detect based on value and highlight the paths where message confirmation is missing. Pretty comprehensive indeed.</span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span face=""arial" , "helvetica" , sans-serif">Another interesting feature is SonarQube plugins for TIBCO BW 5.x, 6.x and BE. You can copy these plugins in the extensions folder of SonarQube and the code review results are pushed into SonarQube so that you can assign, track, add comments – all the niceties associated with SonarQube platform. In addition to these, they provide an override platform to customize the output report. This helped us reduce the severity of some of the rules, and ignore the rules that we did not agree with.</span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span face=""arial" , "helvetica" , sans-serif"><b>How to automate TIBCO BW Code Review with Jenkins and SonarQube – The steps</b></span><br />
<ol style="text-align: left;">
<li><span face=""arial" , "helvetica" , sans-serif">We setup the command-line version of BWCodeScanner and BECodeScanner in one of the Jenkins slave nodes. This setup is needed to break the build.</span></li>
<li><span face=""arial" , "helvetica" , sans-serif">Copy the BW SonarQube plugin into extensions directory on Sonarqube server</span></li>
<li><span face=""arial" , "helvetica" , sans-serif">Install Sonarqube Scanner plugin for Jenkins</span></li>
<li><span face=""arial" , "helvetica" , sans-serif">In the Jenkins job, under Execute Sonarqube Scanner, configure the Analysis properties to configure Sonarqube server, any BW Code Scanner specific properties like license, override file path etc.</span></li>
<li><span face=""arial" , "helvetica" , sans-serif">We created the build parameters for source location, reports location etc. and added Build step to execute BW Code Scanner command line. They showed us similar configuration for the Enterprise Cloud version too, but we went with command line version.</span></li>
<li><span face=""arial" , "helvetica" , sans-serif">As part of the build setup, we piped these steps, so that SonarQube execution happens, pushing the results to Sonarqube server, then based on the parameter that we pass, the build is broken in command line execution for a specific threshold. For example, we configured BW Code Scanner command line to break the build whenever it finds a code violation of severity – Critical or above.</span></li>
<li><span face=""arial" , "helvetica" , sans-serif">As part of the DevOps pipeline, this would run code review analysis on the BW and BE projects, push the results to SonarQube, break the build if the code has any critical violations (customized by us) from the developers, and emails the code review report as excel sheet. Pretty nifty right !</span></li>
<li><span face=""arial" , "helvetica" , sans-serif">One interesting thing to note is that BW Code Scanner and BE Code Scanner support multiple projects even with Sonarqube plugin. So, for certain SVN repositories, we setup one job that would do a complete code review analysis across multiple projects in the repository and send one consolidated report as email.</span></li>
<li><span face=""arial" , "helvetica" , sans-serif">Enterprise on-premise version came with web version in addition to command line and we could just drop the WAR file in Tomcat and have a functional website where someone could just review the Source zip file or EAR files manually to get a consolidated Excel or PDF report.</span></li>
</ol>
<div>
<span face=""arial" , "helvetica" , sans-serif"><b>Sample Report - Excel Project Details</b></span></div>
<div>
<span face=""arial" , "helvetica" , sans-serif"><b><br /></b></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB_QaWou4H1Er36pJHrHopisYUtaMCWPR0eioEg4quZqBF6xkLOrWmPUS3KRBPmD9thV0aDpFpFrsXjU_g7sE43_-UIWPx64BGAMp4Lxnv9c-3J-tS2p1Takb2-mryES4ZdpeJSw8NPWk/s1600/BW+Code+Scanner+Sample+Excel+Report.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="358" data-original-width="1399" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB_QaWou4H1Er36pJHrHopisYUtaMCWPR0eioEg4quZqBF6xkLOrWmPUS3KRBPmD9thV0aDpFpFrsXjU_g7sE43_-UIWPx64BGAMp4Lxnv9c-3J-tS2p1Takb2-mryES4ZdpeJSw8NPWk/s640/BW+Code+Scanner+Sample+Excel+Report.png" width="640" /></a></div>
<div>
<span face=""arial" , "helvetica" , sans-serif"><b><br /></b></span></div>
<br />
<span face=""arial" , "helvetica" , sans-serif"></span><br />
<div>
<span face=""arial" , "helvetica" , sans-serif"><br /></span></div>
<div>
<br /></div>
<div>
<span face=""arial" , "helvetica" , sans-serif"><b>Sample Report – Sonarqube Issues Report</b></span><br />
<span face=""arial" , "helvetica" , sans-serif"><b><br /></b></span></div>
<div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcB4V_FSm-I1xoCbFPmzc38Xot4pgFKIwEDT8VslIhUmCdiCcxS1UG67Ui7Yd77_tAfhUWmRNh4A_ex2JStdhL5kDZtr3IdpI0tglA5exVUbZGJeMQ3pJqOiKk_al0FHyNdA53RbOISUY/s1600/BW+Code+Scanner+Sonarqube+Sample+Report.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="477" data-original-width="1304" height="234" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcB4V_FSm-I1xoCbFPmzc38Xot4pgFKIwEDT8VslIhUmCdiCcxS1UG67Ui7Yd77_tAfhUWmRNh4A_ex2JStdhL5kDZtr3IdpI0tglA5exVUbZGJeMQ3pJqOiKk_al0FHyNdA53RbOISUY/s640/BW+Code+Scanner+Sonarqube+Sample+Report.png" width="640" /></a></div>
<span face=""arial" , "helvetica" , sans-serif"><b><br /></b></span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
<br /></div>
<div>
<span style="background-color: white; color: #333333; font-size: 12.87px;"><span face=""arial" , "helvetica" , sans-serif"><b>References</b></span></span></div>
<div>
<span style="background-color: white;"><span face=""arial" , "helvetica" , sans-serif"></span></span><br />
<div>
<ul style="text-align: left;"><span style="background-color: white;"><span face=""arial" , "helvetica" , sans-serif">
<li>BW 5.x Code Scanner - <a href="https://bwcodescanner.com/tibco-bw-5/governance-code-review/scanner">https://bwcodescanner.com/tibco-bw-5/governance-code-review/scanner</a></li></span></span></ul></div>
<div style="font-weight: bold;">
<span style="background-color: white;"><span face=""arial" , "helvetica" , sans-serif"><br /></span></span></div>
<span style="background-color: white;"><span face=""arial" , "helvetica" , sans-serif">
</span></span></div>
<div>
<ul style="text-align: left;">
</ul>
</div>
</div>
Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com0tag:blogger.com,1999:blog-4091331970229304612.post-4885100040111535502016-05-06T16:56:00.000-05:002016-05-06T16:56:37.106-05:00My dear daughter - my princess<div dir="ltr" style="text-align: left;" trbidi="on">
She opens her eyes,<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>and looks at me for the first time..<br />
And I know instantly that,<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>she is my everything and everything I have is hers<br />
She smiles at me for the first time,<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>brightens my life like never before<br />
I hold her in my arms,<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>and I promise myself to get the world at her feet<br />
When she takes her first steps towards me,<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>I experience the most significant achievement<br />
<br />
I know that if I truly love her,<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>I have to let her go some day,<br />
I have to let her live,<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>explore the world and discover herself<br />
I know it's a long time away,<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>but the mere thought makes me sour<br />
For now, I have nothing to fear,<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>as she puts her arms around me and sleeps on my shoulder<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
My little darling, my princess Medha,<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>I hope you realize that,<br />
I will always love you unconditionally,<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>and always want the best for you, now and ever</div>
Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com0tag:blogger.com,1999:blog-4091331970229304612.post-51433284948329278982016-05-02T22:40:00.002-05:002016-05-03T09:30:46.296-05:00Mapping Google App engine application to Namesilo domain<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: "georgia" , "times new roman" , serif;">I just finished mapping a Google App engine application to a domain purchased from NameSilo.com. Needless to say, it was NOT an easy experience. Jotting down the steps in case, any one else plans to do the same and hopefully I can save you time.</span><br />
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span>
<br />
<ol style="text-align: left;">
<li><span style="font-family: "georgia" , "times new roman" , serif;">Go to AppEngine Dashboard and go to Settings page on left-hand side.</span></li>
<li><span style="font-family: "georgia" , "times new roman" , serif;">Select Custom Domains page on the right hand page and click on Add Custom domain</span></li>
<li><span style="font-family: "georgia" , "times new roman" , serif;">Under Add a New custom domain, in Step 1, give your domain name and click on Verify.</span></li>
<li><span style="font-family: "georgia" , "times new roman" , serif;">This takes you to google webmasters page with link starting with https://www.google.com/webmasters/verification/verification?</span></li>
<li><span style="font-family: "georgia" , "times new roman" , serif;">In Select your domain dropdown, select Other (last Option).</span></li>
<li><span style="font-family: "georgia" , "times new roman" , serif;">Under Step 1 "Add the TXT record below to the DNS configuration for" copy the whole link starting with google-site-verification=xxxx. Keep this page open.</span></li>
<li><span style="font-family: "georgia" , "times new roman" , serif;">Now, go to Namesilo domain manager and in the middle find "Add TXT/SPF" record link and paste the value in TEXT field. Leave HOSTNAME field blank. This is critical step and it took me a while to figure it out.</span></li>
<li><span style="font-family: "georgia" , "times new roman" , serif;">Now go back to web master tools page and click Verify. Depending on your stars, it might take about 5 minutes for this to work and it might show error or unable to verify.</span></li>
<li><span style="font-family: "georgia" , "times new roman" , serif;">Once this is done, go back to App Engine cloud console page. Sign out and sign back in. You should see that verification is done and the domain shows up under step 2.</span></li>
<li><span style="font-family: "georgia" , "times new roman" , serif;">Under Step 2, select the domain in http://myDomainName.com. Under 3. it shows a bunch of A and AAAA records.</span></li>
<li><span style="font-family: "georgia" , "times new roman" , serif;">Go back to Domain manager page on Namesilo and click on A and AAAA records and create these 8 entries. For each, even though google says host as @, leave it as blank as Namesilo rejects it. This also took me a while to figure out.</span></li>
<li><span style="font-family: "georgia" , "times new roman" , serif;">Now you are all set. Type your domain name in new browser and it should work. If using chrome open incognito tab and type your domain name. It should now work since chrome caches and you probably tried in between when it was not working.</span></li>
</ol>
<b><span style="font-family: "georgia" , "times new roman" , serif;">Forwarding www.myDomainName<domainname>.com</domainname></span></b><br />
<ol style="text-align: left;">
<li><span style="font-family: "georgia" , "times new roman" , serif;">In App Engine settings page Under Step, there is sub-domain mapping link. Add www and click on Add. It shows CNAME record to be added. Now go to Namesilo and add this record there as is. CNAME as WWW and value as shown in the App Engine settings page. This did not work after creating this record for me, so I am not sure if this step is required.</span></li>
<li><span style="font-family: "georgia" , "times new roman" , serif;">Now go back to Domain manager page, select the check box in front of domain, and click on Forward Domains above that gets activated on selecting check box.</span></li>
<li><span style="font-family: "georgia" , "times new roman" , serif;">Now, scroll down and under forwarding address, fill as www.myDomainName.com and choose http in dropdown before.</span></li>
<li><span style="font-family: "georgia" , "times new roman" , serif;">Select Forwarding method as permanent forwarding and Path Forwarding as Yes and click Submit.</span></li>
</ol>
<div>
<span style="font-family: "georgia" , "times new roman" , serif;">Congratulations!! Now you are all set to access your app engine application at http://myDomainName.com and www.myDomainName.com</span></div>
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span></div>
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><b>Update</b></span></div>
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><b><br /></b></span></div>
<div>
<span style="font-family: "georgia" , "times new roman" , serif;">It turns out the above forwarding for www broke the Entire thing, since I started getting Error 301, too many redirects. What happened was that NameSilo removed A entries and CNAME entry from above steps with their own copies. I had to delete those entries and recreate those entries for this work. I could not find a way to remove the forwarding to www.myDomainName.com but I see from NameSilo pages that when you edit DNS entries, forwarding is disabled automatically even though I see the Domain forwarding page with entry to www.myDomainName.com. I am getting mixed results with forwarding based on browser cache, but it is finally working both for naked domain - http://myDomainName.com and www.myDomainName.com, so I am all set.</span></div>
<br />
<span style="font-family: "georgia" , "times new roman" , serif;"><domainname></domainname></span><br />
<div>
<br /></div>
<br />
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span></div>
Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com1tag:blogger.com,1999:blog-4091331970229304612.post-42879786754502511372014-06-06T09:32:00.002-05:002014-06-06T09:34:29.474-05:00Google App engine application with godaddy domain mapping issue<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Recently, I had an issue with mapping a domain to the Google App engine application that I had built. </div>
<div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
I bought a domain - cinemahunter.com and setup forwarding on godaddy to redirect from <a href="http://cinemahunter.com/" rel="nofollow" style="background-color: transparent; border: 0px; color: #4a6b82; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">http://cinemahunter.com</a> to <a href="http://www.cinemahunter.com/" rel="nofollow" style="background-color: transparent; border: 0px; color: #4a6b82; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">http://www.cinemahunter.com</a></div>
<div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
In Google App Engine, I clicked on settings, and then Add Domain. It asked me for Google Apps, gave my domain name, it asked me to login to godaddy.com, I logged in successfully with the credentials and it was good. At this point, there are 2 steps outlined.</div>
<ol style="background-color: white; border: 0px; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1em 30px; padding: 0px; vertical-align: baseline;">
<li style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Change how your naked domain (cinemahunter.com) is redirected. I have www in the textbox between http:// and .cinemahunter.com. It also said - You must change the A-record at your domain host for this change to take effect. I am assuming this is the forwarding that I setup in Godaddy. I clicked on continue</li>
<li style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Now it said to create a A record in DNS management page. I went to Godaddy and under A (host) I deleted the entry with IP - 50.63.202.22 and created 4 records with the following as specified in Google apps for Host @ points to 216.239.32.21, 216.239.34.21, 216.239.36.21, 216.239.38.21</li>
</ol>
<div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
I saved the changes twice in Godaddy. Also, I verified that under CName(Alias) www points to @.</div>
<div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
At this point, I clicked on I completed the steps on Google Apps website. But when I try to access my website by typing www.cinemahunter.com or <a href="http://cinemahunter.com/" rel="nofollow" style="background-color: transparent; border: 0px; color: #4a6b82; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">http://cinemahunter.com</a>, I get the following error.</div>
<div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Google</div>
<ol style="background-color: white; border: 0px; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1em 30px; padding: 0px; vertical-align: baseline;">
<li style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">That’s an error.</li>
</ol>
<div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
The requested URL / was not found on this server. That’s all we know.</div>
<div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
After hours of going round and round with several links from google searches, I figured out that most of the documentation was outdated for the domain mapping.</div>
<div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
So for anyone else, having this issue, here is the resolution.</div>
<div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Google Apps is no longer free. You have to pay about $60 a year for the service. For Google App engine users, google started giving $50 upto maximum of 3 because of this issue. They stopped it after having a fix for directly mapping Google app engine to domain. Now you no longer need Google Apps and what you need to do is to go to <a href="https://console.developers.google.com/" rel="nofollow" style="background-color: transparent; border: 0px; color: #4a6b82; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">https://console.developers.google.com</a> and select your application. On the left hand side, click under App Engine --> settings. This will give you three steps</div>
<ol style="background-color: white; border: 0px; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1em 30px; padding: 0px; vertical-align: baseline;">
<li style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><div style="background-color: transparent; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
If you haven't already, verify that you own the domain. It will then be added to the list in step 2. --> Give your domain name here and verify. Now it will take you to godaddy login page and you sign in with your credentials.</div>
</li>
<li style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><div style="background-color: transparent; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Select the domain you want to point to. This will show nodomain even after domain is verified in step 1 below. This confused me. But I logged out and logged in and I saw the domain cinemahunter.com in the dropdown. There are two options here either the main domain or the sub-domain with www. I chose the sub-domain since I had forwarding setup in godaddy.</div>
</li>
<li style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><div style="background-color: transparent; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Go to godaddy and under CName, under www change points to ghs.googlehosted.com.</div>
</li>
</ol>
<div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Thats it!! It worked like a charm within a minute. Google makes it so difficult with all these changes. All the search results for mapping GAE to godaddy were old instructions which led to nowhere and the info on these changes were to be found only after digging deeply. Hopefully this will help someone without wasting some 8 hours like for me. Good luck !!</div>
</div>
Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com1tag:blogger.com,1999:blog-4091331970229304612.post-82169998933395580782010-01-06T16:48:00.004-06:002010-01-06T17:10:34.368-06:00Migrating Firefox Profile from one computer to anotherRecently, I had to get a new laptop at work since the lease on my old laptop had expired and it was acting weird. I transferred the data swiftly using <a href="http://www.newegg.com/Product/Product.aspx?nm_mc=AFC-SlickDeals&cm_mmc=AFC-SlickDeals-_-NA-_-NA-_-NA&Item=N82E16834997293">this cord</a>. But Firefox was a big deal since I stored a lot of bookmarks and passwords for some sites on the Firefox. First I tried copying the profiles folder directly but it didn't work and Firefox was giving me the message "Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system." Here is how I got it working.<br /><br />Lets say you want to transfer bookmarks, history, passwords from Computer A to Computer B. Firefox calls it profiles.<br /><br />On Computer B, install firefox. Go to Windows Run, and type firefox -P. In the next screen click Create New profile, and give a name of your choice. Now go to <c>(C or D drvive):\Documents and Settings\(your user id)<your>\Application Data\Mozilla\Firefox\Profiles. Identify the profile you just created. You need to be able to see hidden folders to see this folder.<br /><br />On Computer A go to the same location and the contents of your profile to a Flash drive and copy the contents. On Computer B, replace the contents of the profile folder you just created with the contents from the flash drive. Do this when Firefox is closed and you checked in Task Manager that its not running. That's all there is to it. Open firefox on Computer B and its exactly the same as Computer A with bookmarks, passwords and Master password too.<br /></your></c>Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com0tag:blogger.com,1999:blog-4091331970229304612.post-31560195814977854152010-01-01T23:53:00.008-06:002010-01-02T16:10:50.903-06:003 idiots - emphasizing the need to follow your passionSaari umar hum mar marke jee liye,<br />ik pal tho ab hamein jeene dho jeene dho .....<br /><br />Saari umar hum mar marke jee liye,<br />ik pal tho ab hamein jeene dho jeene dho .....<br /><br />(All our life, we have been dead while we were alive, at least for a moment let us live, let us live..)<br /><br />Give me some sunshine,<br />give me some rain,<br />Give me another chance,<br />I wanna grow up once again ...<br /><br />The song above pretty much sums up the entire movie from a student's perspective. The pain in Joy Lobo when he just doesnt get another chance to follow up his passion and commits a suicide, haunts you long after you leave the movie theater. As Aamir puts it, Education is supposed to be about learning and growing wiser and not about cramming some lines from a textbook for an exam. In our search for riches and society-defined comfortable life, we lose the emphasis in following our passion, the passion that defines a meaning to our life. And yet, we put our children in the same path thinking about what Mr. Kapoors' and the like would think of our children if they don't become doctors or engineers. And the cycle never ends.<br /><br />An excellent movie with an excellent emotional and comic mix, 3 idiots touches your heart though it takes some cinematic liberties. At the end of the day, "All izz well"<br /><br />Do yourself a favor and watch it. If it doesn't make you change your lifestyle and the way of thinking, it will atleast make you think for some time about what your passion is and the meaning of life for you is. It will define the importance of following your passion which would be followed by success and not the vice-versa.<br /><br />At the outset, I think it's a great move by my <a href="http://expressionsinsolitude.blogspot.com/">friend </a>who chose to leave a society-defined great job and comfortable life style in USA to follow his passion through to India. I sincerely wish him all the very best in his endeavors...<br /><br />And by the way Happy New year 2010 everyone...Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com1tag:blogger.com,1999:blog-4091331970229304612.post-80332191305818936542009-12-18T13:26:00.003-06:002009-12-18T13:35:15.422-06:00Creating a routed queue between two Tibco EMS Servers with Authorization enabledImagine a scenario of creating a routed queue between two Tibco EMS servers A and B with home queue on B. Pretty simple right,<br /><br />On server A, just define<br /><br />create queue Q1@B secure, failsafe, global<br /><br />Not so simple with Authorization enabled on the two servers. For messages to flow on routed queue, ServerA has to have ServerB as an authorized user to receive and ServerB has to have ServerA as an authorized user to send. So to setup the route properly with Authorization enabled the following has to be worked upon. This assumes that the route is already in place and the user ServerB is created on ServerA and the user ServerA is created on ServerB and Q1 is setup as a global queue on Server B.<br /><br />Routing between two servers A and B<br /><br />Q1 is on B (home queue) and we need to create a routed queue on A and send to B<br /><br />On server A<br /><br />create queue Q1@B secure, failsafe, global<br />grant queue Q1 user=ServerB receive<br /><br />On Server B<br /><br />grant queue Q1 user=ServerA sendSaagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com3tag:blogger.com,1999:blog-4091331970229304612.post-60244825208128143932009-08-15T13:55:00.005-05:002009-08-15T13:58:41.812-05:00Conquering Gravity MasterRads from <a href="http://kowthas.wordpress.com/2009/08/11/gravity-muster/">Tunneling Thru</a> posted about this game Gravity Master and I read her post on Friday evening. The game is simple yet complex in its own way but pretty interesting though. Involves Physics and common sense. Most levels were a breeze but some levels were indeed tricky. Finally I finished the game today, Saturday afternoon after spending like 2-3 hours in total. No googling, no cheating. Man, I was so happy after finishing it :) Here are the screenshots for those who are looking for proofs. I did not care about total score though since I was looking to finish the levels. If I have enough time someday, may be I will work on maximizing the scores :) Try it when you have time, its fun...<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaicLTwFfQhpClEzrM9CKsqInZzDIHQyAEV2jnKBpGQrJtR9oowWBlu-DtEnT3Bwe1nLX-7JAjxzbTJNPOOUR8ofQP__ETSDpO46TUPPYW8CSmoAUgQKvjDbCb9xMIeryMWWp3Ehm-XB4/s1600-h/gravity+master+finish.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 262px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaicLTwFfQhpClEzrM9CKsqInZzDIHQyAEV2jnKBpGQrJtR9oowWBlu-DtEnT3Bwe1nLX-7JAjxzbTJNPOOUR8ofQP__ETSDpO46TUPPYW8CSmoAUgQKvjDbCb9xMIeryMWWp3Ehm-XB4/s400/gravity+master+finish.JPG" alt="" id="BLOGGER_PHOTO_ID_5370266610040775618" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv6re3hbeYiR2JPj_ayx16gr2dmrc3MYp7Wj-vJgFQbRIMAGa3FyyxysLWbr1QnK8V5xCb0HMiun13I5JvAmepBLwk_QzCB8mwVpvQIo8SxhNmC_1TTwMxsiV_6fu63BUsqIKA7NIPIec/s1600-h/gravity+master+levels.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 262px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv6re3hbeYiR2JPj_ayx16gr2dmrc3MYp7Wj-vJgFQbRIMAGa3FyyxysLWbr1QnK8V5xCb0HMiun13I5JvAmepBLwk_QzCB8mwVpvQIo8SxhNmC_1TTwMxsiV_6fu63BUsqIKA7NIPIec/s400/gravity+master+levels.JPG" alt="" id="BLOGGER_PHOTO_ID_5370266736751634178" border="0" /></a>Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com1tag:blogger.com,1999:blog-4091331970229304612.post-2226712491473105392009-02-14T09:27:00.004-06:002009-02-16T10:38:58.764-06:00Love or something like it...<br/><br/><div style="text-align: center;">One fine morning I saw you.<br />Oh God, I could not believe my eyes nor could my eyes believe me.<br />You saw me, approached me and gave me a gentle smile,<br />to give me a live canvas of Monalisa's smile.<br />You spoke to me, your words coming out like that of a gentle dew,<br />yet bringing into bloom the fairest thoughts of the world.<br />And then we became great friends,<br />You encouraged me to leave my hesitation,<br />You enchanted me to get my determination,<br />You enlightened the path from which I drew my inspiration,<br />You made me stand ahead of others in great position.<br />But by the time I came to tell you, how much<br />I love you, it was too late, for, you went away.<br />Leaving behind memories to stay.<br />Your memories still linger in my mind,<br />Your gracious picture spread over my heart,<br />and I put my thoughts into words to tell you<br />that I love you forever and ever and ever...</div><br/><br/>Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com1tag:blogger.com,1999:blog-4091331970229304612.post-31403537236455862502009-02-03T16:01:00.007-06:002009-02-03T16:19:38.367-06:00Configuring JDBC Datasource in Tomcat 5.0.28 in Eclipse WTPI use Eclipse WTP for developing Web applications. In my <a href="http://cognitivecache.blogspot.com/2009/01/configuring-jdbc-datasource-in-weblogic.html">previous post</a> I mentioned that I changed the Database connection pool to use the Weblogic connection pool. The configuration in Weblogic was straightforward and simple, but it posed an issue for me during development because I was not able to configure the Datasource in the Installed Server Runtime in my Eclipse WTP. Either I had to use Reflection to supply the class and modify it between Environment deployments and local deployments or needed to fix the issue with Tomcat Datasource. The error that I was constantly getting was<br /><br /><div style="background-color: #eeeeee;border-color: #CCCCCC;border-width: 1px;border-style: solid;padding: 5px;"><br />ERROR DatabaseManager.getConnection - org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'<br />org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'<br /> at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)<br /> at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)<br /> at com.pepsi.bdb.connections.DatabaseManager.getConnection(DatabaseManager.java:36)<br /></div><br /><br />Googling the error wasn't very fruitful because it mostly dealt with configuring Datasource in Tomcat directly, but not much information was available on configuring with Eclipse WTP. Also, there were several ways of configuring it mentioned in <a href="http://www.theserverside.com/discussions/thread.tss?thread_id=25459">Serverside website</a> and none seem to work for me. Finally I figured it out today and here is how I did<br /><br />In Eclipse WTP, expand the configured Server under Servers, you will see a file server.xml. This is a copy of the server.xml file that Eclipse creates for you, but uses the libs from the Tomcat folder you configured. In this file add your Datasource under the tag <GlobalNamingResources> as shown below:<br /><br /><div style="background-color: #eeeeee;border-color: #CCCCCC;border-width: 1px;border-style: solid;padding: 5px;"><br /> <GlobalNamingResources><br /> <Environment name="simpleValue" type="java.lang.Integer" value="30"/><br /> <Resource auth="Container" description="User database that can be updated and saved" name="UserDatabase" type="org.apache.catalina.UserDatabase"/><br /> <Resource name="myDbPool" type="javax.sql.DataSource"/><br /> <ResourceParams name="UserDatabase"><br /> <parameter><br /> <name>factory</name><br /> <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value><br /> </parameter><br /> <parameter><br /> <name>pathname</name><br /> <value>conf/tomcat-users.xml</value><br /> </parameter><br /> </ResourceParams><br /> <ResourceParams name="myDbPool"><br /> <parameter><br /> <name>validationQuery</name><br /> <value>select * from dual</value><br /> </parameter><br /> <parameter><br /> <name>maxWait</name><br /> <value>5000</value><br /> </parameter><br /> <parameter><br /> <name>maxActive</name><br /> <value>4</value><br /> </parameter><br /> <parameter><br /> <name>password</name><br /> <value>(password)</value><br /> </parameter><br /> <parameter><br /> <name>url</name><br /> <value>jdbc:oracle:thin:@(servername):(portNum):(SID)</value><br /> </parameter><br /> <parameter><br /> <name>driverClassName</name><br /> <value>oracle.jdbc.driver.OracleDriver</value><br /> </parameter><br /> <parameter><br /> <name>maxIdle</name><br /> <value>2</value><br /> </parameter><br /> <parameter><br /> <name>username</name><br /> <value>(username)</value><br /> </parameter><br /> </ResourceParams><br /> </GlobalNamingResources><br /></div><br /><br />Go to the folder where your server is actually located and place the jar file ojdbc14.jar (for Java 1.4, for lower versions, uses classes12.jar) in the folder %TOMCAT_HOME%\common\lib. <br /><br />In the server.xml on the Eclipse, place an entry inside the <Context> element of your application that is inside the <Host> element as below:<br /><br /><div style="background-color: #eeeeee;border-color: #CCCCCC;border-width: 1px;border-style: solid;padding: 5px;"><br /> <Context docBase="myApp" path="/myApp" reloadable="true" source="org.eclipse.jst.j2ee.server:myApp"><br /> <ResourceLink name="myDbPool" global="myDbPool" type="javax.sql.DataSource"/><br /> </Context><br /></div><br /><br />That is it. This did the trick for me. For the web.xml entry inside your web application and Java code, refer to my <a href="http://cognitivecache.blogspot.com/2009/01/configuring-jdbc-datasource-in-weblogic.html">previous post</a>.Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com0tag:blogger.com,1999:blog-4091331970229304612.post-18345535945027888962009-01-22T15:41:00.007-06:002009-01-22T16:34:37.283-06:00Configuring JDBC Datasource in Weblogic and using it in the code in a web applicationI decided to leverage the Connection pooling features provided by Weblogic in one of the web applications that I wrote. This application uses plain JDBC since dome dynamic capabilities are required for sql statements and so we decided against Hibernate/Spring. Initially the code was written against Open source Snaq DB Connection pooling. Apparently, Weblogic has very good connection pooling features that an application can leverage. Since the code was object oriented and all DAO classes used a DBManager class to get their connection, all I needed to change was a method.<br /><br />The Weblogic documentation shows how to configure a Data source on Weblogic but has little mention on how to get it working from your web application. The following details should help you set it up. To configure a Data source check the following Weblogic documentation. <br /><a href="http://edocs.bea.com/wls/docs90/jdbc_admin/jdbc_datasources.html">http://edocs.bea.com/wls/docs90/jdbc_admin/jdbc_datasources.html</a>.<br />In the Data source, I am assuming that you configured the JNDI name as "myAppDbPool"<br /><br />In your web application, you will need a web.xml entry and an entry in a new file weblogic.xml. <br /><br />The web.xml entry looks like below<br /><div style="background-color: #eeeeee;border-color: #CCCCCC;border-width: 1px;border-style: solid;padding: 5px;"><br /> <resource-ref><br /> <res-ref-name>myAppDbPool</res-ref-name><br /> <res-type>javax.sql.DataSource</res-type><br /> <res-auth>Container</res-auth><br /> </resource-ref><br /></div><br /><br />If you don't have a weblogic.xml file in your app create one. It goes in your WEB-INF beside web.xml file. The weblogic.xml file looks like below<br /><div style="background-color: #eeeeee;border-color: #CCCCCC;border-width: 1px;border-style: solid;padding: 5px;"><br /><!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"<br /><br />"http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd"><br /><br /><weblogic-web-app><br /><br /> <reference-descriptor><br /> <resource-description><br /> <res-ref-name>myAppDbPool</res-ref-name><br /> <jndi-name>myAppDbPool</jndi-name><br /> </resource-description><br /> </reference-descriptor><br /><br /></weblogic-web-app><br /></div><br /><br />That's the configuration part. Now all you need to do is code your web application to retreive the Database connection from this Datasource. I made the DBManager class singleton to make sure only one instance runs at a given time. The DBManager class method looks like below:<br /><div style="background-color: #eeeeee;border-color: #CCCCCC;border-width: 1px;border-style: solid;padding: 5px;"><br /> public Connection getConnection() throws Exception<br /> {<br /> InitialContext ctx=new InitialContext();<br /> DataSource ds=(DataSource)ctx.lookup("java:comp/env/myAppDbPool");<br /> Connection connection=ds.getConnection();<br /> return connection;<br /> }<br /></div><br /><br />That's it. Use this connection in your DAO and you are all set. But make sure that your DAO object calls connection.close() when it is done accessing the data. According to Weblogic documentation, this returns the connection to the pool for other objects to access it.<br /><br />If you have better approach or you see any flaws in this, let me know in the comments.Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com2tag:blogger.com,1999:blog-4091331970229304612.post-75627184164517131232009-01-20T22:19:00.003-06:002009-01-22T17:28:23.252-06:00Stay Hungry Stay FoolishA man single-handedly builds an empire out of his vision, a cult following among generations, and as he fights off his personal health problems, a multi-billion dollar company, the shareholders and the whole tech world are eagerly awaiting just the signal that he is fine and we can expect more wonders from this genius. Thats Steve Jobs, the man who brought Apple back to an industry leading giant, a man who never ceases to amaze the world with his unconventional outlook. The speech that he delivered in Stanford is just marvelous, as it continues to inspire me all the time.<br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/UF8uR6Z6KLc&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/UF8uR6Z6KLc&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br /><br /><div style="background-color: #eeeeee;border-color: #CCCCCC;border-width: 1px;border-style: solid;padding: 5px;"><br />Steve Jobs, 2005 Stanford Commencement Address :This is the prepared text of the address by Steve Jobs, CEO of Apple Computer and of Pixar Animation Studios, who spoke at Commencement on June 12, 2005.<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.<br /><br />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."<br /><br />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. And 17 years later I did go to college.<br /><br />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.<br /><br />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. 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.<br /><br />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: 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.<br /><br />But it was very, very clear looking backwards ten years later. 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.<br /><br />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. 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.<br /><br />It freed me to enter one of the most creative periods of my life. 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 retuned 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. I'm pretty sure none of this would have happened if I hadn't been fired from Apple.<br /><br />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 your 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 very thing is buttoned up so that it will be as easy as possible for your family. It means to say your goodbyes. I lived with that diagnosis all day.<br /><br />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. This was the closest I've been to facing death, and I hope it's 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. Your time is limited, so don't waste it living someone else's life.<br /><br />Don't be trapped by dogma - which is living with the results of other people's thinking. Don't let the noise of other's 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.<br /><br />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. 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:<br /><br />"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 /></div>Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com1tag:blogger.com,1999:blog-4091331970229304612.post-29484092383930599332009-01-09T17:38:00.004-06:002009-01-09T17:45:44.733-06:00Errors when using Struts 1.3.x that are not intuitive javax.servlet.ServletException: org/apache/commons/lang/UnhandledExceptionToday, I decided to upgrade a new application that I was working on to Struts 1.3.10. After getting the necessary jars and stuff from the struts-blank.war, and upgrading my webapp library with those, everything was fine until I ran into this error. Apparently, Struts 1.3.x removed some jars from the distribution, and the dependecies had to be resolved externally. The error gave me no clue that it was unable to find the commons-lang.jar. After struggling with it for sometime, I finally figured out that the commons-lang.jar was the missing jar. Usually when a jar is missing we get a NoClassDefFoundError that points in the right way, but the error trace for this gave no clue at all. Anyways if you happen to run into this error the key is to have the commons-lang.jar in your classpath from this location <a href="http://74.125.95.100/translate_c?hl=en&sl=fr&u=http://commons.apache.org/downloads/download_lang.cgi&prev=/search%3Fq%3DInsertTag%2524InsertHandler.doEndTag%2B-%2BServletException%2Bin%2B:%2Borg/apache/commons/lang/UnhandledException%26hl%3Den%26safe%3Doff%26client%3Dfirefox-a%26channel%3Ds%26rls%3Dorg.mozilla:en-US:official%26hs%3D2Ol%26sa%3DG&usg=ALkJrhiqCzjsMwbD88ud6jd6cbaqNj9JTw">Apache Commons</a><br /><br /><div style="background-color: #eeeeee;border-color: #CCCCCC;border-width: 1px;border-style: solid;padding: 5px;"><br />2009-01-09 17:30:34,001 ERROR InsertTag$InsertHandler.doEndTag - ServletException in '/pages-bdb/batchListDetail.jsp': org/apache/commons/lang/UnhandledException<br />javax.servlet.ServletException: org/apache/commons/lang/UnhandledException<br /> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:244)<br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)<br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)<br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)<br /> at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)<br /> at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)<br /> at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)<br /> at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)<br /> at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:610)<br /> at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:604)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br /> at java.lang.reflect.Method.invoke(Method.java:324)<br /> at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:129)<br /> at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:152)<br /> at org.apache.struts.tiles.taglib.InsertTag.doInclude(InsertTag.java:764)<br /> at org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTag.java:896)<br /> at org.apache.struts.tiles.taglib.InsertTag.doEndTag(InsertTag.java:465)<br /> at org.apache.jsp.pages.shared.template_jsp._jspx_meth_tiles_insert_2(template_jsp.java:173)<br /> at org.apache.jsp.pages.shared.template_jsp._jspService(template_jsp.java:92)<br /> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)<br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)<br /> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)<br /> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)<br /> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)<br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)<br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)<br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)<br /> at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)<br /> at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)<br /> at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)<br /> at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)<br /> at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1083)<br /> at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:295)<br /> at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:271)<br /> at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:332)<br /> at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:232)<br /> at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)<br /> at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)<br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)<br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)<br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)<br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)<br /> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)<br /> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)<br /> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)<br /> at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)<br /> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)<br /> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)<br /> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)<br /> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)<br /> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)<br /> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)<br /> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)<br /> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)<br /> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)<br /> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)<br /> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)<br /> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)<br /> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)<br /> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)<br /> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)<br /> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)<br /> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)<br /> at java.lang.Thread.run(Thread.java:534)<br /></div>Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com0tag:blogger.com,1999:blog-4091331970229304612.post-72988702757868220862008-12-31T10:22:00.002-06:002008-12-31T10:37:51.813-06:00The Best Things in Life are always FreeWell, probably they are always not. But these days, information is. If you truly have the passion and drive to learn something, then the opportunities today are wide ranged thanks to Internet.<br /><br />MIT Open courseware gives everyone an opportunity to experience the standard of its courses from previous semesters. Some of them might be outdated with respect to changes in technology but many core courses are usually not. Here is a link to <a href="http://ocw.mit.edu/OcwWeb/web/home/home/index.htm">MIT Open Courseware</a><br /><br />Other universities offering free online courses that I have come across are below:<br /><br /><a href="http://www.cmu.edu/oli/index.shtml">Carnegie Melon</a><br /><a href="http://itunes.stanford.edu/">Stanford</a><br /><a href="http://ocw.tufts.edu/">Tufts</a><br /><a href="http://webcast.berkeley.edu/courses.php">UC Berkley </a><br /><a href="http://ocw.usu.edu/">Utah State University OpenCourseWare</a><br /><a href="http://ocw.jhsph.edu/">Johns Hopkins OCW</a><br /><a href="http://ocw.nd.edu/">Notre Dame</a><br /><a href="http://oyc.yale.edu/">Yale</a><br /><br />To find courses available from several countries, use <a href="http://www.ocwconsortium.org/use/use-dynamic.html">Open course ware consortium</a><br /><br />If you are interested in a specific course use <a href="http://ocwfinder.com/">OCWFinder</a> to find all the options that you have. Good luck.Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com0tag:blogger.com,1999:blog-4091331970229304612.post-24215654997534166912008-11-09T22:23:00.006-06:002009-04-29T14:58:11.223-05:00Notes/Thoughts from an accident1. Life is too short. A minute or even a second could decide if you will see the next moment..<br />2. Live every moment of the life as if it is your last moment in your life. You never know what might come up in the next moment.<br />3. Nothing is permanent. You might not live to think about what you could have accomplished with your life. Spend at least 2-5 mins a day thinking what the day has meant to you, if you were given a chance to re-live the same day, what would you have done differently, and then try to implement that difference in the next day<br />4. Working out, looking good, trying to impress people don't have much to do when your moment arrives. It doesn't matter. Nothing matters actually.<br />5. If in each day, you could do something that would make you feel better as a person, as a human being, do it, you can find excuses to tell others, but there is no excuse from your conscience.<br />6. Procrastination could really be dangerous. If there is something that needs to be done, do it now or else have a fixed plan to do it on a particular day by a particular time. If its a big project split it into pieces and have a fixed time for completing each piece.<br />7. Before complaining about a thousand things that happened to you today, stop for a moment and be thankful for the fact that you are alive, you lived to see another day in your life, you got one more day to prove your essence in the world, whether you utilized it in the right way is a different story.<br />8. Have a fixed set of things that you really want to do in your life. Give them fixed years. do a bucket list for yourself and assign importance to them. For example, By 30, I want to own a BMW etc. Work out an exact plan how you would do it, day dreaming won't work, have an exact plan within the means..<br />9. When a moment can decide your life, live it up, live every minute part of a moment..Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com1tag:blogger.com,1999:blog-4091331970229304612.post-7454395343576096592008-11-07T14:49:00.007-06:002008-12-18T13:06:02.369-06:00Oracle SQL group by on a portion of a clob field in the databaseI work on an application which writes its internal errors in processing to a DB table. The input data that caused the failure due to a parsing error or missing configuration error is put in a clob column in the database. This input data is an XML message and one of the tags identifies each application that sends data to my application. We had one of the architects who requested us to give a split up on the number of errors that have occurred for each application. <br /><br />This was significant from Oracle perspective because you cannot do a group by on a clob. In order to do a group by, you need to be able to sort and clob fields do not have a natural sort order. The workaround is to do a to_char function on the clob field but you can get a max of 4000 chars. For me, this suited the requirement because the substring I needed was a small string. But the issue is that I needed to sort a portion of an XML tag inside the clob field and group them based on that. Not only that I needed to find a specific type of error in the XML message and count them.<br /><br />After a little food for thought, here is the final query that fetched the sweet results<br /><br /><div style="background-color: #eeeeee;border-color: #CCCCCC;border-width: 1px;border-style: solid;padding: 5px;"><br />SELECT k.application_name, COUNT (*)<br /> FROM (SELECT TO_CHAR<br /> (SUBSTR (clobfield,<br /> ( INSTR (clobfield,<br /> 'ns0:appName',<br /> 1,<br /> 1<br /> )<br /> + 21<br /> ),<br /> ( INSTR (clobfield,<br /> 'lt;/ns0:appName',<br /> 1,<br /> 1<br /> )<br /> - INSTR (clobfield,<br /> 'ns0:appName',<br /> 1,<br /> 1<br /> )<br /> - 22<br /> )<br /> )<br /> ) AS application_name<br /> FROM tableName<br /> WHERE appID = 1<br /> AND INSTR (clobfield, 'ns0:appName', 1, 1) <> 0<br /> AND INSTR (clobfield, 'ErrorMsg', 1, 1) <> 0<br /> AND INSTR (clobfield, 'Application Not Configured', 1, 1) <> 0) k<br />GROUP BY k.application_name<br /></div><br /><br />The INSTR function selects the index of the occurrence of a string inside another string, while substr gets the substring from a string. The numbers 21 and 22 account for the tag name lengths and the additional characters in the tag name like > etc.<br /><br />If you need to count based a specific portion of a clob, just modify the above query and you are good to go..Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com0tag:blogger.com,1999:blog-4091331970229304612.post-15701321922506439062008-09-03T16:24:00.002-05:002008-09-03T16:31:27.234-05:00Lifestyle savings etc. a nice comment from an enlightened personLately, thoughts have been springing into my mind as to what I should save for, what my real goals in life are, etc. I was navigating through some links and landed on <a href="http://www.mymoneyblog.com/archives/2007/05/trying-to-avoid-lifestyle-inflation.html#comment-115241">this post</a> about Lifestyle inflation. More than the post, this comment from Ron made a lot of sense. He sure must be an enlightened person. With his kind permission (haven't received it yet, since I have no way of communicating except leaving a comment on the same blog), I publish it here for my future reference and for any readers. I hope to emulate him some day..<br /><br />----------------------------------------------------------------------------------<br /><br />Some very interesting comments and I see everyone is very committed to saving…but I wonder for what? What are you saving for, why do you want to earn more money? I am not being facetious; I really want to know the reason behind your efforts.<br /><br />One of the seven habits: Begin with the end in mind. I see the blogger has a goal of a million dollar net worth…same question…why? What will having that net worth accomplish? And what are you measuring? And what is the nature of the net worth you are after, specifically?<br /><br />I mean, do you want a million in equity (say, in real estate) or a million in the bank earning 5%? Two totally different scenarios.<br /><br />Many people fixate on some number but it is often like leaning the ladder of success against the wrong wall. My clients come to me with that same idea sometimes; that is, to grow their net worth to some magic number as if it will resolve their financial issues somehow.<br /><br />Look, as a goal I guess a million is as good as any but, really, if you are saving just to reach a number…what is the life you want? What would an ideal day look like, feel like?<br /><br />Money is a tool…but for what? To build the life you want, IMO. So isn’t that the real goal? What is the life you want and, now, break that up into pieces and cost those pieces out:<br /><br />The house I want: $x<br />The car I want: $x<br />Number of kids: $x<br /><br />So on and so forth. Then you add that all up and you will have a bottom line and that is your real goal.<br /><br />I wanted a small but comfortable home in a safe neighborhood and a five year old car that I would keep for five years and then sell and start over. Cost for that: $1,000 a month where I live. Plus expenses: Another $1000 a month.<br /><br />My savings earn me $15,000 a year ($300K at 5%) and the rest I earn working three days a week doing what I really enjoy doing and what I would do for free if I could afford to do so. And I also manage to save some of what I earn so my savings are growing, as well.<br /><br />I am married and we have a daughter and we look for all the world like a typical middle-class family. But we pay for it all with 24 hours of work a week; meanwhile both spouses work in all the other houses on the block.<br /><br />We are not better or smarter, we were just able to decide what we wanted, price it out, and fund it with just enough work to get the REAL job accomplished (the life we wanted). Four day weekends are great!<br /><br />Good luck!<br /><br />-----------------------------------------------------------------------------------Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com1tag:blogger.com,1999:blog-4091331970229304612.post-78323602497877930252008-08-07T17:20:00.005-05:002008-12-18T13:07:34.413-06:00Log4j writing to a dynamic log file for every runIn my recent project, I was using Log4J and I had a requirement where I had to write to a new dynamic log file every time and the name of the log file was determined at runtime. In specific terms each run would produce a Project and the log file had to reflect the project name. Since this project name could be repeated across runs, the timestamp needed to be added to the log file. I searched across Google and didn't find much help in this regard. So I decided to post the code I wrote.<br /><br />I didn't want to lose setting the log levels from the log4j.xml file and wanted all the options I could configure for the FileAppender except the file name. The file name was configured too, but the code had to overwrite and create a new file at runtime. Here is the code..<br /><br /><div style="background-color: #eeeeee;border-color: #CCCCCC;border-width: 1px;border-style: solid;padding: 5px;"><br /><br /> Date projDate = new Date(Long.parseLong(project.getTimeStamp()));<br /> StringBuffer dateStr = new StringBuffer();<br /> SimpleDateFormat sdf = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss");<br /> dateStr = sdf.format(projDate, dateStr, new FieldPosition(0));<br /> String logFileName = logsDir + File.separator + project.getName() + "_" + dateStr.toString() + ".log";<br /> log.info("\n**************Log file for this run: " + logFileName + "\n**************\n");<br /><br /> Logger rootLogger = Logger.getRootLogger();<br /> Enumeration appenders = rootLogger.getAllAppenders();<br /> FileAppender fa = null;<br /> while(appenders.hasMoreElements())<br /> {<br /> Appender currAppender = (Appender) appenders.nextElement();<br /> if(currAppender instanceof FileAppender)<br /> {<br /> fa = (FileAppender) currAppender;<br /> }<br /> }<br /> if(fa != null)<br /> {<br /> fa.setFile(logFileName);<br /> fa.activateOptions();<br /> }<br /> else<br /> {<br /> log.info("No File Appender found");<br /> }<br /><br /></div><br /><br />That's it. The logs were created for each and parallel runs would write to different files...Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com19tag:blogger.com,1999:blog-4091331970229304612.post-45360778515764953082008-07-18T19:59:00.004-05:002008-07-18T20:33:20.484-05:00Totally Annoyed with Toyota of Plano service guysI went to Toyota of Plano and was pretty annoyed with their service department and this Chris guy who was upset that I didnt get the Dealer recommended maintenance for $300 and got just the factory recommended one. Here is the story..<br /><br />I needed a 15000 mile maintenance for my car and I called up the Toyota of Plano guys and asked how much it would cost. The guy on the phone said it costs me $335 or so. I was indeed surprised at such high amount and checked the Toyota website. All the Toyota recommends for my car is the following. (<a href="http://smg.toyotapartsandservice.com/guides.php?v=3&y=2007&int_id=3">Source</a>)<br /><br />Replace engine oil and oil filter 1<br />Rotate tires<br />Clean cabin air filter<br />Visually inspect brake linings/drums and brake pads/discs<br />Inspect the following:<br /> Ball joints and dust covers <br /> Brake lines and hoses <br /> Drive shaft boots <br /> Engine coolant 3 <br /> Exhaust pipes and mountings <br /> Steering gear box<br /><br />I then asked this service dept. guy if it was the factory recommended one or the Dealer recommended one. He said it was dealer recommended one and he went on to list a bunch of things they would do. He said they were very important for the car. The only question I had in my mind was if all those were so important for the car then why wouldn't Toyota recommend that. But I didnt ask him that and asked him how much would the factory recommended one cost me. He says $93.20. He said I could come in and talk to some Chris guy who would take care of it. I say okay and start out to get one.<br /><br />I go there and wait for my turn and then some guy comes in and fills my request form. I mentioned clearly I needed 15k facory recommended maintenance and asked him how much it would cost. He said, oh it costs 80 bucks and notes 80 on the sheet. I say okay and ask are you Chris. He is like, no, that guy right there is Chris, I will fill it and keep it on Chris' desk so he can take care of it. I say okay and then leave my car and wait. After an hour or so, Chris guy comes and tells me its ready. I say okay and go to pay the bill. The lady at the counter says $85 and some change. I asked her if I could get a sheet that describes what all has been done and she shows me a billing list which doesnt contain most of those listed above. I asked if they have been done at all and like to see the detailed list and she tells me, Oh ask Chris and he will have the checklist that they check the boxes when they perform the inspections and all. I say okay, pay my bill and walk out to Chris. <br /><br />I ask this Chris guy if I could get a detailed list, he is like, wait and he says, If you got a dealer recommended one, I would have the list, and then he answers his cell phone, and then says it would be in the maintenance guide you have in the car, and then brings me a list that has the above checked. And then he goes on, "See you just have tire rotation and oil change, there is no wheel balancing and all done because you took a factory recommended one and not a dealer recommended one", and I say, "Okay, so what difference does it make". He says "Oh you will not know that now, after a few miles when you hit 70 miles per hour and your wheels start vibrating then you will notice." I never knew thats a way to talk to a customer and in such derogatory tone. I got really pissed off and asked him, "So if its gonna affect my car and all, why doesnt Toyota recommend whatever your dealership is recommending. And he says "Look man, I am just trying to help you.." Great way to escape without an answer. <br /><br />The checklist that he gave me says the service is $93.20 and I show it to him and ask if it costs $93.20 then how come, I was charged only $85 and change and he says, ya its lesser than that right. I say, of course, but I am just curious why the difference. And he says, the guy who talked to you put 85 on the paper (he had actually put 80 but may be taxes is 5), so I had to give it to you for 85. This was totally ridiculous. I dont know if they have a pricing system at all, some guy says its 80 to me and so he says he gave it to me 85 instead of 93. The difference might be a few dollars, but what I dont like is the fact that the same thing costs different amount to different people. So, you go to walmart and ask a rep what the price of a hdtv on a tv stand is. He mistakes the price of the tv stand to be that of TV and says 200, so now will Walmart give the TV to you for 50 bucks. Doesnt make sense to me at all..<br /><br />And then I ask him, did you put the seal on my Toyota Passport guide, and he was like you didnt give it to me. The last two times, the service rep guys took care of it without me even asking them. I say, okay, let me get it for you, and then he walks with me to the car. I give him the booklet, and I say, I just need the signature and your seal and he goes "I know what I need to put in there, I have been doing this for some time". I wouldn't mind if he said that in a friendly way but he was outright rude. He goes, fills it up and comes back and I ask him, one last qn, is the blinking message on Dashboard that says "Maint Reqd" reset, and he says, it should have been, and guess what I start and the blinking is still present. And then he resets it and says, now it is reset. If I hadn't asked I needed to go back again for that. <br /><br />I am totally surprised by the total inefficiency and the carelessness that they show towards the customers and the worst part is they are getting away with it. And I am also appalled at their discretionary variable pricing system. May be today was a bad day or I got the wrong guys, but in my opinion today, Thumbs down to Toyota of Plano...Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com1tag:blogger.com,1999:blog-4091331970229304612.post-75159065548286673362008-07-16T18:07:00.009-05:002008-12-18T13:08:44.217-06:00Java: Loading an XML file from the CLASSPATHToday, I faced this issue in Java coding. I needed to load an XML file which was in my classpath but not in the same directory as the classes. The deliverable was a jar and the properties and the configuration XML files were in a different folder and were appended to the classpath at the runtime. The issue was that the file could not be located through the the statement<br /><div style="background-color: #eeeeee;border-color: #CCCCCC;border-width: 1px;border-style: solid;padding: 5px;"><br />String fileName = getClass.getSystemResource("config.xml").getFile;<br /></div><br /><br />Then I thought that it checks relative to the current class and so used the statement<br /><br /><div style="background-color: #eeeeee;border-color: #CCCCCC;border-width: 1px;border-style: solid;padding: 5px;"><br />String fileName = ClassLoader.getSystemResource("config.xml").getFile;<br /></div><br /><br />But then, it wouldn't still recognize the file. The reason is the same, it checks relative to the classes folder. I did not want to get the classpath from the system and browse through it for the config file since the class path could get larger. A couple of google searches and a little research later, I found the solution. The workaround is by using the following statement<br /><br /><div style="background-color: #eeeeee;border-color: #CCCCCC;border-width: 1px;border-style: solid;padding: 5px;"><br />String fileName = Thread.currentThread().getContextClassLoader().getResource("config.xml").getFile;<br /></div><br /><br />It only makes sense since in the above statement, you get hold of the context class loader and find the path in the entire classpath...Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com12tag:blogger.com,1999:blog-4091331970229304612.post-69250473901396376582008-06-25T22:34:00.003-05:002008-11-13T06:50:29.988-06:00Dont ever say that you don't have enough timeNice quote from <a href="http://www.pravsworld.com/">Pravsworld</a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEKY-3PqNqq0x2FoLHIAYZ6HZFWnbD2Tk64YgXcGpJOa2x45vOIfHkAzGgFI8_SvwI__pdjjTZLydFsy1SWO59CCZ5Gxfu1qoaGG6ADYf2qa1wz5yf-QKMGzq8JLRxdq0y_vTsxmrN07g/s1600-h/enough_time.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEKY-3PqNqq0x2FoLHIAYZ6HZFWnbD2Tk64YgXcGpJOa2x45vOIfHkAzGgFI8_SvwI__pdjjTZLydFsy1SWO59CCZ5Gxfu1qoaGG6ADYf2qa1wz5yf-QKMGzq8JLRxdq0y_vTsxmrN07g/s400/enough_time.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5216029087730599490" /></a><br /><br />If you want to get inspired daily, subscribe to their email list. Its pretty cool :)Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com1tag:blogger.com,1999:blog-4091331970229304612.post-7408142723860768742008-06-18T22:26:00.006-05:002008-07-23T11:26:45.412-05:00Mee Sreyobilashi - Suicide is not an option, so is giving up for an entrepreneurJust watched the Telugu movie Mee Sreyobhilashi. Gist of the story. Around 10 people who are vexed with life and want to end it travel together in a bus to take the bus down to a valley and die together. Their journey to the realization of the value of life is the movie...<br /><br />The movie spurred a bunch of thoughts. First of all, why should anyone commit a suicide. God has given us the life to live. Life is a challenge, we need to face it. If everyone starts ending their life due to some problems or the other, then what is the essence of life in itself. Death is just the absence of life, not an end to it. No problem on earth is big enough to force any one to death. People who are handicapped or have many other disabilities are living a happy life with tons of self-confidence. Why cant normal people do the same...<br /><br />And then there is one more way of looking at the whole thing. If living the life symbolizes your dream of making it big, your dream of being a success, giving up symbolizes the death of a life, the death of an aspiration, the death of a hope.. A person never really is a failure until he gives up. One thing is for sure. Every one of us is going to die sooner or later. And that is one thing that we can never avoid. That is one thing we cannot run away from. Then whats the point of living life in an insipid manner. What is the point of giving up... Live life to the fullest and never give up... The day you give up is the day you fail, whether you give up your hopes or dreams or even your life... Dont quit your hopes, your aspirations, your life...Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com0tag:blogger.com,1999:blog-4091331970229304612.post-58032865048366640902008-05-14T18:15:00.006-05:002008-12-18T13:09:31.828-06:00Power of Java, In deleting the files that Windows cannotToday, in one of the programs, I messed up a little piece of code that creates a folder in another, which ended up creating folders in an infinite loop. The folder name was ae, but there were so many of them ae in ae in ae .... Then I just wanted to clear the folder and start afresh with the fixed code. But guess what. Windows would not delete the folder because the name is too long. This was the exact error..<br /><br />"cannot delete the file name you specified is not valid or too long"<br /><br />I tried from Command prompt and tried other solutions from Google search like assigning a name on shared and trying to delete from network. And nothing worked. That's when I decided, let's take Java's help. Wrote a simple piece of code to loop through until it reaches the final folder and deletes everything. Ran the code and 2 minutes later, everything was gone. One more reason to love Java and being a programmer. Here is the code in case you are interested..<br /><br /><div style="background-color: #eeeeee;border-color: #CCCCCC;border-width: 1px;border-style: solid;padding: 5px;"><br /><p><br />import java.io.File;<br />public class FileDelete<br />{<br /><br /> private void deleteFiles(File file)<br /> {<br /> if(file.isDirectory())<br /> {<br /> File child[] = file.listFiles();<br /> for(int i = 0; i < child.length; i++)<br /> {<br /> deleteFiles(child[i]);<br /> }<br /><br /> }<br /> if(!file.delete())<br /> {<br /> System.out.println("Cannot delete file: " + file.getAbsolutePath());<br /> }<br /> }<br /> public static void main(String[] args)<br /> {<br /> System.out.println("Attempting to delete files");<br /> File _work = new File("<folder name>");<br /> FileDelete fd = new FileDelete(); <br /> fd.deleteFiles(_work);<br /> }<br />}<br /></p><br /></div>Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com2tag:blogger.com,1999:blog-4091331970229304612.post-15614309598060885222008-05-02T19:41:00.000-05:002008-05-02T19:42:55.777-05:00Britain's got talent, hell ya with these kind of Michal Jackson + Bhangra, it sure doesDon't need to describe the video much. The audience reaction says it all :)<br /><br /><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/KA2B5X0LhMY&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/KA2B5X0LhMY&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com0tag:blogger.com,1999:blog-4091331970229304612.post-59228493819759190342008-04-29T17:05:00.002-05:002008-04-29T17:16:35.814-05:00Impressed with Jawbone headset and its customer service supportA week or two ago, I purchased the <a href="http://jawbone.com">Jawbone bluetooth headset</a> which has got a lot of reviews as the best bluetooth headset in the market. I should say I am pretty impressed. The noise canceling feature is just awesome, people on the other side rarely hear any other noises other than my voice. After trying the multiple ear pieces and loops and fixed on a set. I haven't used a bluetooth headset before so I can't really compare. My long calls started turning effortless and I was pretty happy with the piece. Worth every penny, oh yeah..<br /><br />And then the inevitable according to <a href="http://en.wikipedia.org/wiki/Murphy's_law">Murphy's law</a> had happened. I broke the left standard ear loop. I was trying to remove it when it broke. I called up the Jawbone support guy. They wouldn't give their number on the website but a quick Google search revealed their support phone number 408-848-4348. The customer service guy was cool and he told me that he will send me a complimentary one in 7 business days. Now, how cool is that. I didn't know you could also buy the ear loops from their website, you pay $10 for the ear loops but then you will need to order the 4 piece set. I should say that I am pretty impressed both with the piece and the customer service. All the negative reviews on the web, I guess those guys were probably having a bad day :)Saagarhttp://www.blogger.com/profile/10994611183990395475noreply@blogger.com0