<?xml version="1.0" encoding="utf-8"?>
<!-- If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/ -->
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:lj="http://www.livejournal.com">
  <id>urn:lj:livejournal.com:atom1:patwardhan</id>
  <title>patwardhan</title>
  <subtitle>patwardhan</subtitle>
  <author>
    <name>patwardhan</name>
  </author>
  <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/"/>
  <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom"/>
  <updated>2009-12-05T03:50:32Z</updated>
  <lj:journal userid="9669945" username="patwardhan" type="personal"/>
  <link rel="service.feed" type="application/x.atom+xml" href="http://patwardhan.livejournal.com/data/atom" title="patwardhan"/>
  <link rel="hub" href="http://pubsubhubbub.appspot.com/"/>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:39009</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/39009.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=39009"/>
    <title>Copying or Moving Large Files</title>
    <published>2009-12-05T03:50:32Z</published>
    <updated>2009-12-05T03:50:32Z</updated>
    <content type="html">&lt;p&gt;
Many a times the days, we need to move large amounts of data from one place to another - one partition to another partition, DVD to HDD, etc. Typically, we launch Windows Explorer, select the files to copy/move and drop them on the target.
&lt;/p&gt;&lt;p&gt;
If the data is very large - like thousands of files - Windows takes a long time not only to copy/move the files, but also to bring up the "time remaining ..." message.
&lt;/p&gt;&lt;p&gt;
Though I had heard about the utility - TeraCopy - I had not used it. Recently, I installed the free version on my home PC. With TeraCopy, copying/moving large files still takes time, but less than Windows.
&lt;/p&gt;&lt;p&gt;
TeraCopy is available at &lt;a href="http://www.codesector.com/teracopy.php"&gt;http://www.codesector.com/teracopy.php&lt;/a&gt;
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:38882</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/38882.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=38882"/>
    <title>Windows Task Manager</title>
    <published>2009-11-26T17:08:29Z</published>
    <updated>2009-11-26T17:08:29Z</updated>
    <content type="html">&lt;p&gt;
Many a time, we need to bring up the Windows Task Manager in order to kill an unresponsive application. You may have noticed that even after clicking "End Task", it takes a long time for the application to get removed.
&lt;/p&gt;&lt;p&gt;
You may also have noted that when we instruct the task manager to kill an application, Windows takes asks us if we wish to send a log to Microsoft.
&lt;/p&gt;&lt;p&gt;
The next time you kill an application, go to the "Process" tab. There, look for the entry "dumpprep.exe". This application is the one that takes a dump of the application being killed and sends it to Microsoft.
&lt;/p&gt;&lt;p&gt;
I have noted that killing this application itself in the task manager removes the original application from memory, much faster.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:38506</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/38506.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=38506"/>
    <title>Diwali Driver</title>
    <published>2009-10-25T08:21:24Z</published>
    <updated>2009-10-25T08:21:24Z</updated>
    <content type="html">&lt;p&gt;
Last week (Oct 17-19), we celebrated Diwali.
&lt;/p&gt;&lt;p&gt;
This year, we had holiday on adjoining days and hence we could travel to Pune.
&lt;/p&gt;&lt;p&gt;
We went to Pune, early morning Oct 17. After reaching Pune, we got the news that my sister was not going to visit Pune, as planned earlier, due to some work. Hence we decided to travel to her town, Ahmednagar and off we went, early morning Oct 18.
&lt;/p&gt;&lt;p&gt;
After staying a day, we left for Pune early morning Oct 19 and then we were back in Mumbai early morning Oct 20.
&lt;/p&gt;&lt;p&gt;
This Diwali, I was in the driver's seat each morning for around 2 to 4 hours, depending on where we were going. In total, we did around 620Km in those 4 days.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:38173</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/38173.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=38173"/>
    <title>Uploading Large Data into Oracle Through Java</title>
    <published>2009-10-07T18:06:44Z</published>
    <updated>2009-10-07T18:06:44Z</updated>
    <content type="html">&lt;p&gt;
I have developed an application in the office where I need to process some XMLs and upload them to an Oracle database. The XMLs are downloaded from the same database.
&lt;/p&gt;&lt;p&gt;
Downloading an XML does not present a problem, but uploading an XML does. When I tried to upload an XML using JDBC, I got an error "Literal Too Long". Initially I was not able to understand the reason. At that time I let the application and the error be. The curious thing was that this error was coming only for data whose length was more than 4K.
&lt;/p&gt;&lt;p&gt;
A couple of days ago, I had to look into the same issue once again, as there was no avoiding this error. The funny thing was that our development team was uploading large XMLs using an SQL procedure directly from a Unix machine and were not facing any issues. Only when I tried to upload data through JDBC did I face an issue.
&lt;/p&gt;&lt;p&gt;
After consulting a friend, he told me that the problem was with Oracle and there was a patch that would address this problem. While he was investigating the issue, I decided to go with a different approach. I decided to upload the file in pieces. To achieve this, I inserted a new record with a minimal string and then kept on updating the string in a loop till the whole XML was uploaded. And the solution worked as it was supposed to.
&lt;/p&gt;&lt;p&gt;
While I do agree that this solution involves a lot of database updates, I was faced with a situation where the installation of patches was not in my hands. This was decided by the client. Hence this "chunking" approach was the best approach available to me.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:37899</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/37899.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=37899"/>
    <title>Yesterday Was an Aberration</title>
    <published>2009-10-05T17:17:57Z</published>
    <updated>2009-10-05T17:17:57Z</updated>
    <content type="html">&lt;p&gt;
Yesterday, Sunday, Oct 04, 2009, I tried connecting to the net, but was unable to do so. In fact, on Saturday as well, I was not able to connect, but I did not look into the reasons.
&lt;/p&gt;&lt;p&gt;
When I was not able to connect, I called the ISP to find out the reason. The reason was simple - I had run out of my allocated download limit. I know, I know!!! I still have a bandwidth limited connection for the simple reason of vitamin M.
&lt;/p&gt;&lt;p&gt;
I asked him to start my account anew, though I had exhausted the quota in about 24 days, 6 days short of the standard time. The ISP called me and asked me to make a few changes. He asked me to move to a different provider, which I did and had a pleasant surprise!!! My uTorrent download was hitting 500KB download and 700KB download!!!
&lt;/p&gt;&lt;p&gt;
I immediately initiated a popular file for download that was 900MB in size and lo and behold, the file was downloaded in around 30 minutes. I was really floored to see such amazing speeds.
&lt;/p&gt;&lt;p&gt;
I have not seem such speeds in recent times. You may be wondering why, as MTNL offers Triband at 2MBps. The reason once again is vitamin M. MTNL Triband is quite costly if you want large download capacity. When I was using MTNL, I used to get 400MB download limit for 1 month and if exceeded, Re. 1 per MB. With such pricing I was regularly paying Rs.500/- extra on my telephone bills. Hence I decided to switch to a provider who had lesser speed, but was offering more capacity, which was more like what I wanted.
&lt;/p&gt;&lt;p&gt;
Till yesterday, I had a reliable connection, that allowed me to surf the net, but the speed was not blazing fast. Hence yesterday was a big surprise.
&lt;/p&gt;&lt;p&gt;
Today, things are back to normal, proving that yesterday was an aberration. I am back to the speeds to which I have been used to. In a way, this is good. If I had continued to get the speed like yesterday, it was a guaranteed that I would run out of the monthly limit much before the month ended, effectively making me spend more.
&lt;/p&gt;&lt;p&gt;
As the saying goes in Marathi, "Je hote, te bhalya karita" - There is something good in all that happens.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:37871</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/37871.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=37871"/>
    <title>Is Anybody Out There?</title>
    <published>2009-09-23T18:09:49Z</published>
    <updated>2009-09-23T18:09:49Z</updated>
    <content type="html">&lt;p&gt;
Sometimes I wonder if anyone is reading my blog. Considering that Live Journal is a free service, it does not provides statistics of visits and views. Hence there is no way to know if the blog is being visited.
&lt;/p&gt;&lt;p&gt;
But then I get some comments (like got some on my YAML article) and I find out that someone does stumble across my blog once in a while.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:37452</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/37452.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=37452"/>
    <title>Namespaces for XPath</title>
    <published>2009-09-20T10:42:09Z</published>
    <updated>2009-09-20T10:42:09Z</updated>
    <category term="xml"/>
    <category term="xpath"/>
    <category term="jdom"/>
    <content type="html">&lt;p&gt;
These days, I am working on an application for a team. The application is a king of XML stub that is to be used during development, so that developers will be able to identify XML related mistakes during development, rather than at the time of end-to-end testing.
&lt;/p&gt;&lt;p&gt;
At the moment, all this activity is done manually. When a developer has to validate an XML manually and the XML is going to be very large, there will be some lapses. Hence, I developed the application to help do some of the standard activities in an automated manner.
&lt;/p&gt;&lt;p&gt;
Though I tested the application using a couple of XMLs, I faced problems when the application refused to fetch an element using an XPath, even though I knew that the XPath mentioned was valid and was present in the XML.
&lt;/p&gt;&lt;p&gt;
Initially, I thought the problem was because of JDOM, as it was able to fetch some XPaths while it failed for some other XPaths. I then tried DOM4J but found that it too faced similar problems. In order to find the correct reason, I looked at Xerces that is bundled with JDK, JDOM 1.1 and DOM4J 1.6. All of them gave similar results -- they failed on some XPaths and worked on some XPaths. One of the common XPaths these libraries failed on, was /SOAP-ENV:Envelope/SOAP-ENV:Body/ProvideOrderRequest.
&lt;/p&gt;&lt;p&gt;
The problem these libraries failed, was due to namespace resolution issues. When the libraries failed, they were not able to resolve the namespaces.
&lt;/p&gt;&lt;p&gt;
When all libraries failed, I did a more detailed search on multiple terms and phrases. During this, I had Firefox with about 25 to 30 tabs open. From the search terms, I found that it is possible to add namespaces to the XPath object. I looked at the XMLs and hard-coded the namespaces to be added to the XPath obejct. When I ran the application, viola! All XPaths started returning positive results.
&lt;/p&gt;&lt;p&gt;
As hard-coding was not a good solution for a flexible application, I decided to read the namespace details from an input file. Though this approach worked, even this was not flexible. Then I looked at JDOM documentation. JDOM allows us to walk through all the nodes in the document and on each element, we can get the element's namespace prefix and namespace URI.
Once I got this working, all things fell into place and the application started working as expected once again.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:37296</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/37296.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=37296"/>
    <title>Make a JAR file</title>
    <published>2009-09-17T17:50:57Z</published>
    <updated>2009-09-17T17:50:57Z</updated>
    <content type="html">&lt;p&gt;
These days, I do a lot of Java programing. Once of my favourite environments is Eclipse.
&lt;/p&gt;&lt;p&gt;
I have been writing a couple of programs for my team. Hence, I have been packaging the applications as a JAR file, for easy distribution and usage.
&lt;/p&gt;&lt;p&gt;
Each time I wanted to make a JAR file, I used to select the "File &amp;gt; Export" option and go through the wizard, to make the JAR file. Though I do not have a grouse with this procedure, my grouse was due to the fact that I had to make multiple JAR files, as I had different applications and each application was packaged in its own JAR file. In this situation, the wizard is a pain, as it does not allow us to store the JAR creation procedure. Each time we select export, it shows the name of the previous JAR file that was exported.
&lt;/p&gt;&lt;p&gt;
In comparison, JDeveloper has a very simple procedure. It has a "deploy" option, where making a JAR is one of the options. Once we choose this, it adds an entry to our project, making creation of a JAR file a trivial job - one click.
&lt;/p&gt;&lt;p&gt;
Recently, I did a Google search and found a "build.xml" that can be integrated into Eclipse. This "build.xml" can be executed as an Ant task in Eclipse 3.4. Finally, I have a one click solution to create the JAR file of the application.
&lt;/p&gt;&lt;p&gt;
The "build.xml" I use for one application is given below
&lt;pre&gt;
&amp;lt;project name=&amp;quot;XMLLibrary&amp;quot; default=&amp;quot;jar&amp;quot; basedir=&amp;quot;.&amp;quot;&amp;gt;
  &amp;lt;property name=&amp;quot;build.home&amp;quot; value=&amp;quot;D:/lib&amp;quot;/&amp;gt;
  &amp;lt;property name=&amp;quot;svn.dir&amp;quot; value=&amp;quot;D:/subversion&amp;quot;/&amp;gt;
  &amp;lt;property name=&amp;quot;packages&amp;quot; value=&amp;quot;D:/packages&amp;quot;/&amp;gt;
  &amp;lt;property name=&amp;quot;svn.apps.lib&amp;quot; value=&amp;quot;${svn.apps}/Library-jars&amp;quot;/&amp;gt;
  &amp;lt;property name=&amp;quot;jar.name&amp;quot; value=&amp;quot;XMLLibrary.jar&amp;quot;/&amp;gt;
  &amp;lt;property name=&amp;quot;scratch.dir&amp;quot; value=&amp;quot;tmp&amp;quot;/&amp;gt;
  &amp;lt;property name=&amp;quot;file.manifest&amp;quot; value=&amp;quot;MANIFEST.MF&amp;quot;/&amp;gt;

  &amp;lt;target name=&amp;quot;jar&amp;quot; description=&amp;quot;Build the JAR&amp;quot;&amp;gt;
    &amp;lt;delete file=&amp;quot;${build.home}/${jar.name}&amp;quot;/&amp;gt;
    &amp;lt;jar jarfile=&amp;quot;${build.home}/${jar.name}&amp;quot; basedir=&amp;quot;./bin&amp;quot; index=&amp;quot;true&amp;quot;&amp;gt;
      &amp;lt;exclude name=&amp;quot;**/*.java&amp;quot;/&amp;gt;
      &amp;lt;exclude name=&amp;quot;**/.classpath&amp;quot;/&amp;gt;
      &amp;lt;exclude name=&amp;quot;**/.project&amp;quot;/&amp;gt;
      &amp;lt;exclude name=&amp;quot;**/build.xml&amp;quot;/&amp;gt;
    &amp;lt;/jar&amp;gt;
    &amp;lt;copy file=&amp;quot;${build.home}/${jar.name}&amp;quot; todir=&amp;quot;${svn.apps.lib}&amp;quot;/&amp;gt;
  &amp;lt;/target&amp;gt;
&amp;lt;/project&amp;gt;
&lt;/pre&gt;
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:37103</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/37103.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=37103"/>
    <title>File Formats</title>
    <published>2009-09-13T14:00:56Z</published>
    <updated>2009-09-13T14:00:56Z</updated>
    <content type="html">&lt;p&gt;
A couple of months ago, when I was developing an application for my project using Google Web Driver, I needed to provide a mechanism for users to provide input to the application. For flexibility, I needed a simple file format.
&lt;/p&gt;&lt;p&gt;
Considering that I was going to write the parser for reading the file, I discounted the CSV (Comma Separated Values) format for the simple reason that it is difficult to give optional elements in a single line. For example, if an element is to be optional and is not included in the input file, two commas follow one another.
&lt;/p&gt;&lt;p&gt;
As I am not very Lex and Yacc savvy, I use a simple parser implemented using the Java StringTokenizer object. To parse, I read one line, tokenize it and then go through the tokens. This mechanism is simple, but not very flexible and elegant.
&lt;/p&gt;&lt;p&gt;
After some trial, I was able to implement a more descriptive format, which is as follows
&lt;pre&gt;
CheckDateRange {
    lower: 01/01/2009
    upper: 31/12/2009
    exact: 09/09/2009
    format: dd/mm/yyyy
}
&lt;/pre&gt;
&lt;/p&gt;&lt;p&gt;
As any of these fields is optional, the user can decide not to specify the field name and its value. Using a hash map, I was able to handle optional fields, overcoming the limitation of CSV.
&lt;/p&gt;&lt;p&gt;
A couple of days, ago, I was developing another application. There I decided to stick to a CSV format, with the difference being that I replaced the comma (,) separator by a pipe (|). When this format is used, the example became
&lt;pre&gt;
CheckDateRange|lower|01/01/2009|upper|31/12/2009|exact|09/09/2009|format|dd/mm/yyyy
&lt;/pre&gt;
&lt;/p&gt;&lt;p&gt;
As earlier, if the user is not going to specify a field and its value, it needs to be replaced by some special text, so that I parser does not go for a toss or (shudder!!!) read data incorrectly. If some element is to be eliminated, the example becomes
&lt;pre&gt;
CheckDateRange|lower|01/01/2009|upper|31/12/2009|exact|NIL|format|NIL
&lt;/pre&gt;
&lt;/p&gt;&lt;p&gt;
After demoing the application, I decided to re-look at the file format and looked at JSON (JavaScript Object Format). I had looked at JSON cursorily some time ago, but had a good look. I downloaded the source code from http://www.json.org, wrote a parser to read the input file and also created a simple input file. Using JSON, the example becomes
&lt;pre&gt;
{
    [
        "CheckDateRange": {
            "lower": "01/01/2009",
            "upper": "31/12/2009",
            "exact": "09/09/2009",
            "format": "dd/mm/yyyy"
        }
    ]
}
&lt;/pre&gt;
&lt;/p&gt;&lt;p&gt;
In JSON, double quotes are necessary, considering that it was mainly meant for usage in JavaScript. In JSON, [ and ] indicate start and end of a list respectively.
&lt;/p&gt;&lt;p&gt;
I had also read about another format, YAML (Yet Another Markup Language), on the blog &lt;a href="http://www.codinghorror.com"&gt;Coding Horror&lt;/a&gt; (http://www.codinghorror.com). Hence I decided to go through that format.
&lt;/p&gt;&lt;p&gt;
YAML is quite similar to JSON, but uses less double quote characters. For YAML also, I downloaded a library (SnakeYML) from the Internet, wrote a sample program and a simple input file. Using YAML, the example becomes
&lt;pre&gt;
- name: CheckDateRange
  lower: 01/01/2009
  upper: 31/12/2009
  exact: 09/09/2009
  format: dd/mm/yyyy
&lt;/pre&gt;
&lt;/p&gt;&lt;p&gt;
YAML is a subset of JSON. The main difference between JSON and YAML is the usage of double quotes and indentation. Indentation has significance. In YAML, '-' indicates a list and elements indented under it become elements of one object, which in turn is part of the list. The Snake YAML parser loads the input file and arranges the data using LinkedList and LinkedHashMap objects, which makes it quite easy to parse the data.
&lt;/p&gt;&lt;p&gt;
After all this, you might be wondering why I did not use XML of all things. My earlier application also supported XML, but I did not try to push it and instead focused on the custom format. The reason? Simply that opening and closing tags is a tedious exercise. I was slightly put off by the fact that each element and tag needs to be opened by a tag and also closed by the same tag. Hence, in addition to the data, the input file ends up containing a lot of extra information that is useful for an application, but not much useful for a person.
&lt;/p&gt;&lt;p&gt;
Moral of the story?

Does there have to a moral?  All that I can say is that use a format that is convenient and easy for the users as well as the application.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:36694</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/36694.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=36694"/>
    <title>Write Your Password</title>
    <published>2009-09-10T17:20:21Z</published>
    <updated>2009-09-10T17:20:21Z</updated>
    <content type="html">&lt;p&gt;
A couple of days ago, I was logged into my Internet banking account and it asked me to change the password. I did so promptly - as if I had a choice!
&lt;/p&gt;&lt;p&gt;
After deciding on a password, I noted it in Notepad and changed the password on the site. Then came the twist!! Before I had a chance to memorize the password, my computer decided to reboot, taking my password with it.
&lt;/p&gt;&lt;p&gt;
When the computer started again, I had no choice but to go to the banking site and raise a request for generation and dispatch of a new password.
&lt;/p&gt;&lt;p&gt;
Moral of the story - do not note the password in Windows Notepad. You are better off writing it on a pad.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:36546</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/36546.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=36546"/>
    <title>A Poem</title>
    <published>2009-09-08T18:19:54Z</published>
    <updated>2009-09-08T18:21:55Z</updated>
    <content type="html">&lt;p&gt;
A couple of days ago, my son had a school assignment for the Hindi class - make a chart on pollution and also a poem.
&lt;/p&gt;&lt;p&gt;
Though he was able to make a chart, he has not developed the skill to make a poem. Hence, the task fell to us parents. This is what I made up for him
&lt;pre&gt;
Mai Hoon Pradushan | Ek Rakshas Bheeshan |
Mujhko Kaun Marega | Jo Tarkeeb Lagaega |
Ped Hi Ped Lagao | Pradushan Bhagao |
&lt;/pre&gt;
&lt;/p&gt;&lt;p&gt;
Not a bad effort I should say, considering that I made up the poem in 15 minutes.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:36178</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/36178.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=36178"/>
    <title>Even Oracle needs a Commitment</title>
    <published>2009-09-06T06:54:06Z</published>
    <updated>2009-09-06T06:54:06Z</updated>
    <content type="html">&lt;p&gt;
A couple of days ago, I was going over a piece of code I had written a couple of months ago. In that application, I was uploading XML to an Oracle table. As the XML to be uploaded was not fixed, its size can be very large. I noted that if I tried to upload the file directly in one single update query, it was giving me a "Literal too long" error. Initially, I thought that it was an Oracle problem, as I had tried it on a table whose column type was LONG.
&lt;/p&gt;&lt;p&gt;
Earlier, LONG used to default to 2GB, but this was changed to size of VARCHA2 in Oracle 9+. Hence, it only stores 4K data. I thought the problem was due to this change.
&lt;/p&gt;&lt;p&gt;
Recently, I had a chance to run the program against a table that had a column of type CLOB. A Clob in Oracle can take 3GB data. The application failed even on this data type. But the surprising thing was that it was possible to insert the XML through a shell script that called a stored procedure. Hmmmm.
&lt;/p&gt;&lt;p&gt;
I tried the same steps (as my application), on SQL Developer and TOAD. I got the same error. More and more interesting.
&lt;/p&gt;&lt;p&gt;
After checking with a colleague, it turns out that the problem is due to an Oracle bug.
&lt;/p&gt;&lt;p&gt;
As recommended by the same colleague, I decided to upload the XML in batches.
&lt;/p&gt;&lt;p&gt;
I tried out the batch/chunked update on SQL Developer and it worked. Hence I tried it through my application. No Luck!!!
&lt;/p&gt;&lt;p&gt;
My application was failing to get the record from the database. After much trial, I gave up and went home. It was curious that the record was visible in SQL Developer but not visible through my application.
&lt;/p&gt;&lt;p&gt;
The next day, I checked with my colleague once again and he found the problem in 1 min. The reason? Not committing the database.
&lt;/p&gt;&lt;p&gt;
Though I knew that when data is added to or updated in a database, it needs a commit command, it did not strike me at that moment. By adding data through the SQL Developer session and not committing it, the data was visible only in the SQL Developer session and not to other applications. Once I did a commit, the data was visible to all.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:35943</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/35943.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=35943"/>
    <title>Windows Activation Problems</title>
    <published>2009-08-20T17:22:13Z</published>
    <updated>2009-08-20T17:22:13Z</updated>
    <content type="html">&lt;p&gt;
When I bought my home PC about 2 years ago, I decided to go for a paid copy of Windows XP Professional in spite of having the option of having it installed just like that. In fact, Windows XP Home was available for half the cost, but I still went for Windows XP Pro due to its features. One of the features of Windows XP Pro is the ability to separate users and their permissions. This is not possible in Windows XP Home.
&lt;/p&gt;&lt;p&gt;
Last week, I faced a couple of unexpected shutdowns due to heat issues with the processor. Earlier, I have had the computer go dead on me once, though that was not due to heat issues. After trying to revive it, the engineer took out the RAM DIMMs, cleaned them and put them back.
&lt;/p&gt;&lt;p&gt;
Hence, when the system shutdown and did not start a couple of times, I also pressed the various components on the mother-board, took out the RAM DIMMs and put them back. After doing this, the computer was fine for a couple of days.
&lt;p&gt;&lt;/p&gt;
Then one day last week, it suddenly gave me a message that there were significant changes in my hardware and that I had to re-activate Windows. Now that was a surprise for me as I knew that the hardware had not changed. Hence I tried to connect to the Internet and tried to activate, but my Internet refused to connect. It turned out that I had run out of my download bandwidth for that month.
&lt;/p&gt;&lt;p&gt;
Then I remembered that I had taken a backup of a couple of activation files. These files are named "wpa.bak" and "wpa.dbl" and are placed in the %WINDIR%\system32 (in layman terms, this means c:\windows\system32). I navigated to that directory and found that wpa.dbl was 2kb and wpa.bak was 14kb. Hence I overwrote these files from the backup. Once I rebooted, things were back to normal.
&lt;/p&gt;&lt;p&gt;
Or so I thought ...
&lt;/p&gt;&lt;p&gt;
After this incident, I ran into major trouble on Monday, August 17, 2009. When I started the system, it gave me a message that my Windows installation needed activation. I logged in and the system popped a message asking me to activate. When I canceled the dialog box, the system immediately logged me out. So I logged in as Admin and tried again, withe same result. I logged in again and this time clicked "yes", to activate Windows. The system took me from dialog box to dialog box, leaving me no scope to start any other application like Windows Explorer or my Internet connection. The dialog box wanted to dial using my Internet connection and tried using a 0800 number of all things. My system does not want to accept the fact that it is India and not USA.
&lt;/p&gt;&lt;p&gt;
Obviously it could not connect and when I dismissed the dialog box, it logged me out again.
&lt;/p&gt;&lt;p&gt;
Even if I agree that it was stupid of me to overwrite the wpa.dbl file, this was quite infuriating that Windows was taking full control and was not allowing me any chance to try and activate it. Of all things, it was treating a paid customer in this manner, leaving me quarter.
&lt;/p&gt;
&lt;p&gt;
I then tried the following, with no success
&lt;ul&gt;
&lt;li&gt;I tried to reboot the system (typical computer programmer behaviour :-)&lt;/li&gt;
&lt;li&gt;I changed the BIOS date and set it to 3 days prior, as Windows had indicated that I had 3 days for activation, when this message was shown for the first time.&lt;/li&gt;
&lt;li&gt;I tried to boot into safe mode command prompt.&lt;/li&gt;
&lt;li&gt;I tried to boot into safe mode with network support, but the system would not allow me to connect, giving me a message that Windows cannot be activated while in safe mode (of all things @#@$#@$#@$#@#)&lt;/li&gt;
&lt;li&gt;I tried to reboot and restore the system to last known good menu.&lt;/li&gt;
&lt;li&gt;I booted the system, logged in and went to the option where it asks us to call a representative over the phone. But the India number was no longer valid and the time was 11:30pm.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
None of these approaches worked and I was contemplating using my boot CD to boot the system and use the recover option of the setup.
&lt;/p&gt;&lt;p&gt;
I finally booted the system into safe mode and opened Windows Explorer. I navigated to c:\windows\system32 and examined the size of wpa.dbl and found that the size was 2kb once again. Hence, I renamed wpa.bak to wpa.dbl and restarted the system.
&lt;/p&gt;&lt;p&gt;
This time, luck was on my side and the activate message went away. I was able to use the system as usual. Finally after spending around 2 to 2.5 hours struggling with the activation.
&lt;/p&gt;&lt;p&gt;
I know that Microsoft wants to protect itself from piracy (while stating informally in a couple of forums that they wish that if any software is pirated, it be Windows, as that brings more user to the Windows ecosystem ultimately benefiting Microsoft directly of indirectly), this policy of not allowing any maneuvering space for the user seems frustrating and stupid. If my Windows copy is not active, Windows can allow me to use the computer for say 15 minutes or 30 minutes, leaving me some chance of connecting to the Internet and getting the copy activated. Taking full control over the system is downright frustrating and makes me quite angry using the product, which in many ways is quite nice.
&lt;/p&gt;&lt;p&gt;
Finally a word of advice. If you use Windows, make a copy of "wpa.bak" and "wpa.dbl". We never know when that backup will be useful and save you hours of frustration.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:35611</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/35611.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=35611"/>
    <title>Capped</title>
    <published>2009-08-15T11:42:29Z</published>
    <updated>2009-08-15T11:42:29Z</updated>
    <content type="html">&lt;p&gt;
Finally, my root canal treatment is over, with the dentist capping the tooth being treated.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:35512</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/35512.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=35512"/>
    <title>Mouth Shut for Some Time</title>
    <published>2009-08-09T12:05:28Z</published>
    <updated>2009-08-09T12:05:28Z</updated>
    <content type="html">&lt;p&gt;
I am nearing the end of this round of keeping my mouth open for a long time at a time. My root canal treatment is nearly over.
&lt;/p&gt;&lt;p&gt;
On Friday, 08 Aug, 2009, the dentist did shaping of the affected tooth, before taking a mold of the upper and lower jaw. The mold is necessary for making the cap for the tooth being treated.
&lt;/p&gt;&lt;p&gt;
Before making the mold, the dentist went about shaping the tooth so that a cap would fit on it. For this, the dentist had to trim the remaining tooth. As the tooth does not have any feeling, it did not hurt at all.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:35107</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/35107.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=35107"/>
    <title>Irritating Neighbor</title>
    <published>2009-07-27T18:43:11Z</published>
    <updated>2009-07-27T18:43:11Z</updated>
    <content type="html">&lt;p&gt;
Now it is the neighbor's turn. After letting a couple of days pass, it was time to deal with the irritating neighbor.
&lt;/p&gt;&lt;p&gt;
As I mentioned in an earlier post (&lt;a href="http://patwardhan.livejournal.com/34816.html"&gt;Gone in 45 minutes&lt;/a&gt; - http://patwardhan.livejournal.com/34816.html), I got my wisdom tooth extracted on July 10, 2009. It had to be taken out for the prime reason that due to its slanted position, it formed a gap between itself and its neighboring tooth. Over the years, this slanted position formed a cavity, which in turn caused food particles to get trapped, leading to tooth decay. Not only had the wisdom tooth started to go bad, it caused its neighbor to go bad to an extent that a root canal was required.
&lt;/p&gt;&lt;p&gt;
Initially, I wanted to allow a reasonable gap between the wisdom tooth extraction and the root canal, but my tooth was aching a lot, in spite of taking a course of antibiotics. Hence, instead of waiting for 15 days and starting the root canal procedure in August, I decided to start it at the earliest.
&lt;/p&gt;&lt;p&gt;
I had the first sitting of the root canal procedure on 21 July 2009. This procedure involved an injection into the gum under the tooth, followed by removal of the old filling. Once the whole tooth was opened, the root canal procedure began, where the dentist took small wires and poked them into the canals of the tooth, in order to kill the blood vessels and nerves that are present in the canal. This procedure went on for a long time - about an hour.
&lt;/p&gt;&lt;p&gt;
But, how can things be so simple? There was a complication. When the wisdom tooth was removed, it left a gap between the two sides of the gum. One of the gum skin flaps as hindering the root canal procedure. Hence, the dentist used a pair of scissors to cut away the extra gum portion, in order to have clear access to the tooth.
&lt;/p&gt;&lt;p&gt;
As the area was made numb by the anesthetic, I was not able to feel a thing. Once the dentist had cleared the canals, she filled the tooth and gave an appointment for the next session - 25 July 2009.
&lt;/p&gt;&lt;p&gt;
Once at home, I took a Combiflam tablet, to help overcome the pain and had soft/liquid food. After dinner, I tried to sleep. Tried to sleep is the correct phrase, as it had started to pain a lot. In fact, if I remember correctly, this pain was more that what I experienced after the wisdom tooth extraction. The reason might not have been the root canal procedure. I believe it was due to the gum flap that was trimmed by the dentist.
&lt;/p&gt;&lt;p&gt;
After turning and tossing for some time, I got up and tried to watch TV, to help divert my attention. A little after midnight, I found the pain to be quite unbearable and decided to take another Combiflam tablet, though it was not more than 4 hours since the last tablet. Even after taking the tablet, I was not able to sleep, as there was no reduction of pain. I tried to sleep, but no luck. I think I finally slept at around 2:30am. Fortunately, when I woke up, it was morning and it was time to start the routine.
&lt;/p&gt;&lt;p&gt;
On 25 July 2009, the dentist had another go at the tooth. The tooth was opened and cleaned once again using wires.
&lt;/p&gt;&lt;p&gt;
At present, I have a couple of sessions left. I believe the next sessions are for final closure, tooth trimming/measurement and capping, bringing an end to this 'toothy encounter'.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:34816</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/34816.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=34816"/>
    <title>Gone in 45 minutes</title>
    <published>2009-07-15T17:03:41Z</published>
    <updated>2009-07-15T17:03:41Z</updated>
    <content type="html">&lt;p&gt;
It entered my life when I was in my 20s, stayed with me for more than a decade. Then it went away in 45 minutes, leaving behind a huge gap and a lot of pain.
&lt;/p&gt;&lt;p&gt;
These days, I have no choice but to suffer in silence. On the bright side, such a painful incident is not going to happen in the near future. At least not if I take adequate care.
&lt;/p&gt;&lt;p&gt;
My wisdom tooth was finally extracted last Friday, July 10, 2009.
&lt;/p&gt;&lt;p&gt;
As mentioned earlier, my wisdom tooth had grown in a tilted manner and had started to rot due to food getting lodged between two teeth. Hence it was necessary to get it extracted before things got more serious.
&lt;/p&gt;&lt;p&gt;
Due to the nature of growth of the tooth, the extraction was done by a general surgeon. He gave me a local anesthetic in the gums near the tooth to be extracted. As I have had many extractions done due to braces during my teenage years, an injection was of not much significance. Once the area had become numb in around 15-20 minutes, the doctor was ready to start his work. To begin the procedure, the doctor used a scalpel to cut the gum that was covering the tooth, so that the whole tooth was exposed from above. This would allow the doctor access to the tooth.
&lt;/p&gt;&lt;p&gt;
With the dentist holding my cheek away from the teeth, the doctor went to work with a drill. Though I was not able to see inside my mouth, I understand that the procedure needed some grinding of the bone of the lower jaw, to free the tooth. This went on for some time. The surgeon tried a couple of times to put a lever under the tooth to dislodge it. When the tooth did not move, he once again used the drill to saw down the bone. Finally, he used another steel instrument that had a good wooden handle to dislodge the tooth. When the tooth was move from its position, he used a special "moral" forceps to pick the tooth and extract it from the jaw. He then use normal forceps to pick bone/tooth fragments. During the whole procedure, the surgeon collected bood using cotton gauze and cotton pads. The way to collect the blood was not very delicate. He took the cotton in a forceps and them went dab, dab dab on the jaw, to collect the blood. I know that this sounds very mean/unkind. But, from the surgeons perspective, the area was numb, I was not able to feel a thing and he had my health in mind. The earlier he finished the procedure, the better for everyone.
&lt;/p&gt;&lt;p&gt;
Once the tooth was out, he asked me to close my mouth for a few minutes, while he collected his thread and needle. When I opened my mouth, he used stitches at three places on the gum, to bring together the cut portion. This would help the gums heal and also prevent food particles from getting lodged into the cavity. Now I have three stitches in my mouth. These stitches will come out after a week - by this Friday. Over a period of time, the gap will heal and close.
&lt;/p&gt;&lt;p&gt;
The whole procedure took 45 minutes to complete. All this while, I was sitting there with my mouth open. Fortunately, the dentist used a suction machine to suck all the blood and the saliva. The suction machine allowed the surgeon continuous access to my mouth and prevented me from gagging.
&lt;/p&gt;&lt;p&gt;
Before I left the clinic, I asked the doctor for the tooth, as I wanted to show it to my children. The tooth was like an iceberg - 1/3 above the gums and 2/3 below the gums. Surprisingly (even for the doctors), was the fact that the tooth had three roots. It seems that a wisdom tooth usually has two roots, of which one root was about twice the thickness of the other roots. I had my doubts on this one. I believed that morals have four roots. In dental terms, it may be that a molar has two roots with each root having two threads/parts. The most logical thing was to do a Google search. As it turns out, I am wrong. Molars have two root only and not the 2 but 4 variety or the 4 variety as I thought.
&lt;/p&gt;&lt;p&gt;
After the procedure, my cheek was swollen and there was great pain for some hours, even though I had taken Combiflam. The pain reduced only by afternoon, after I woke from a short nap. For Friday and Saturday, I was on liquid, cold (room temperature) diet. At present, I am on solid, but soft food, which is not hot and spicy. Slowly I will move to a regular diet.
&lt;/p&gt;&lt;p&gt;
Considering the fact that I did a Google search, here are a couple of links related to this topic
&lt;ul&gt;
&lt;li&gt;&lt;a href=""&gt;Wisdom tooth (http://www.mynewsmile.com/dental/wisdom_tooth.htm)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=""&gt;Wisdom tooth removal (http://www.mynewsmile.com/wisdom.htm)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=""&gt;Wisdom tooth extraction (http://www.animated-teeth.com/wisdom_teeth/t3_wisdom_tooth_removal.htm)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=""&gt;Wisdom tooth extraction (http://www.animated-teeth.com/wisdom_teeth/t4_impacted_wisdom_tooth.htm)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=""&gt;Molar tooth (http://en.wikipedia.org/wiki/Molar_%28tooth%29)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=""&gt;Molar diagram (http://www.dannynicholson.co.uk/learningzone/body/organs/Molar.jpg)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=""&gt;Third molar (wisdom tooth) (http://en.wikipedia.org/wiki/Third_molar)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=""&gt;Teeth (http://www.daviddarling.info/encyclopedia/T/teeth.html)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:34807</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/34807.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=34807"/>
    <title>"Wisdom" Tooth</title>
    <published>2009-07-07T17:58:34Z</published>
    <updated>2009-07-07T17:58:34Z</updated>
    <content type="html">&lt;p&gt;&lt;br /&gt;A couple of weeks ago, a couple of my teeth started acting up. Hence, I decided to visit the dentist. One tooth on the right side had a cavity that was filled. What remained was the "wisdom" tooth on the left side lower jaw.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;For many years, I was aware that I had a gap between the last molar and the wisdom tooth in the lower jaw, but I did not pay much attention to it. When I visited the dentist last week, I was informed that this gap had caused both the teeth to go bad over the years. The only solution was to get the wisdom tooth extracted and a root canal procedure done on the moral.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;So much for my "wisdom".&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Last Friday, July 3, 2009, I finally got an X-Ray done. For the first time in my life, I got an X-Ray of all my teeth, without the X-Ray machine touching any part of my body!&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;In the X-Ray, the tedha growth of the wisdom tooth is very clear. Now for the tough part. The tooth is going to be extracted this Friday, July 10, 2009. For this, the dentist has called a general surgeon. As I understand, the surgeon is going to use local anesthesia near the tooth. If the tooth gets extracted easily, great. Else, the surgeon might have to chip some bone to get the tooth out. After extraction, some stitches may be needed. The stitches will come out after a week. Recovery will take 1 or 2 days. Hence I have set the procedure for a Friday.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;I am not really dreading the visit to the dentist, as I have had many of my milk teeth extracted before I had braces. After going through that experience, I believe this will not be more painful.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Since last Friday morning, my "wisdom" tooth has started aching. As I will be on antibiotics after the extraction, the dentist gas advised me to take painkillers. Else, I would have to be on antibiotics for something like 15 days, which is not a very good idea.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;These days, I am making do with Crocin. Though Crocin kills much of the pain, a dull ache remains and I have to bear that till this Friday. Even now, while I am writing this entry, my jaw is aching.&lt;br /&gt;&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:34322</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/34322.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=34322"/>
    <title>Standard 10 Result and Standard Score</title>
    <published>2009-06-27T04:41:00Z</published>
    <updated>2009-06-27T04:41:00Z</updated>
    <content type="html">&lt;p&gt;
On Thursday, June 25, 2009, results for the S.S.C examination were declared. For many students, this day must have been the much awaited day when they would reap the fruits of their year-long labor.
&lt;/p&gt;&lt;p&gt;
Much before this day of reckoning, a huge hullabaloo has been created due around the admission procedure and the various boards that conduct the standard 10 examination.
&lt;/p&gt;&lt;p&gt;
Being in Maharashtra, the local government feels that they should give preference to the SSC board students. Hence, a quota system of 90-10 has been announced by the government. 90% of college seats will go to SSC students and remaining 10% seats will be for students from other boards like CBSE and ICSE. This has been done as many people believe that students from other boards score higher marks and by following quotas, the field is being leveled for all boards. An additional factor this year might be the upcoming elections in August '09. Many parents of students who study in board other than SSC have now approached the court for relief.
&lt;/p&gt;&lt;p&gt;
I believe all this fighting is worthless and useless. Considering that different boards have different sylibi and different exam patters, it is but obvious that the performance of students will be different across the boards. Comparing the absolute scores of the students from different boards is like comparing apples and oranges.
&lt;/p&gt;&lt;p&gt;
If percentages have to be assigned, they can look at the number of students of various boards and then assign proportionate seats in colleges.
&lt;/p&gt;&lt;p&gt;
I believe that a mechanism that is more fair than quotas exists. And that mechanism is to use standard scores.
&lt;/p&gt;&lt;p&gt;
After results are declared, the standard score of each student should be calculated using all the results of that board. Once we have standard scores for each student, irrespective of the board, we can admit students to colleges based on the standard score, instead of absolute scores.
&lt;/p&gt;&lt;p&gt;
I was introduced to the concept of standard scores when I was in NCST (National Centre for Software Technology, Mumbai, now known as C-DAC Mumbai). Standard scores were used to admit students for the CCST and PGDST courses conducted across various locations.
&lt;/p&gt;&lt;p&gt;
A few links for standard scores are:
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Standard_score"&gt;Standard Score&lt;/a&gt; (http://en.wikipedia.org/wiki/Standard_score)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.acastat.com/Statbook/zscore.htm"&gt;Standardized Scores&lt;/a&gt;(http://www.acastat.com/Statbook/zscore.htm)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.gifted.uconn.edu/siegle/research/Normal/Interpret%20Raw%20Scores.html"&gt;Standardized Scores&lt;/a&gt;(http://www.gifted.uconn.edu/siegle/research/Normal/Interpret%20Raw%20Scores.html)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.aejmc.org/_officerhandbooks/research_chairs/3running_competition/standardized_scores.pdf"&gt;Creating Standardized Scores (pdf)&lt;/a&gt;(http://www.aejmc.org/_officerhandbooks/research_chairs/3running_competition/standardized_scores.pdf)&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;&lt;p&gt;
I am surprised that even though the issue of junior college admissions is so high-profile, no one has suggested usage of standard scores as part of the admission process. Even when such cases are argued in court, no one presents this method, which I believe is fair to everyone.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:34227</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/34227.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=34227"/>
    <title>"If" is NOT a Loop</title>
    <published>2009-06-20T06:02:41Z</published>
    <updated>2009-06-20T06:02:41Z</updated>
    <content type="html">&lt;p&gt;
I have heard so many people say something like this "We need to write an 'if loop' to handle this conditions". When I hear "if loop", I try to remain calm.
&lt;/p&gt;&lt;p&gt;
Why do programmers not understand that "if" is NOT a loop. It is a condition check. Hence, it should be "if condition" or "if statement".
&lt;/p&gt;&lt;p&gt;
But we cannot blame only the people who say this. These people have probably got these things from their teachers, who also are habituated to say "if loop".
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:33916</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/33916.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=33916"/>
    <title>Command Line Parser for Java</title>
    <published>2009-06-13T06:49:04Z</published>
    <updated>2009-06-13T06:49:04Z</updated>
    <content type="html">&lt;p&gt;
Many years ago, I wrote a small piece of code in C/C++, to manage command line arguments. The application stores the command line arguments and allows an application to look for presence of arguments and get the value of arguments. Using this code was a definite advantage over writing the code each time an application wanted to handle command line arguments.
&lt;/p&gt;&lt;p&gt;
Yesterday, while going home from office, I decided to write a similar code in Java. The reason being that I am writing a small stub application that needs to handles many command line arguments. At the moment, I have handled the arguments based on position. Positional arguments makes the application quite inflexible. Hence I came back to my old idea of having a small piece of code for handling command line arguments.
&lt;/p&gt;&lt;p&gt;
Given below is the code I have written in Java. Feel free to use it in your applications if you find it useful. These days, such statements are not enough, as companies and people have become trigger-happy in the area of copyright. Hence, I declare that this code is royalty-free and I put it into public domain. For the want of a public domain site, I am giving the code on this site.
&lt;pre&gt;
/* CommandOptions.java */
/* This code has been released into public domain by Bipin Patwardhan. */

import java.util.ArrayList;

@SuppressWarnings("unchecked")
public class CommandOptions
{
    protected ArrayList arguments;
    
    public CommandOptions(String[] args)
    {
        parse(args);
    }
    
    public void parse(String[] args)
    {
        arguments = new ArrayList();
        for ( int i = 0; i &amp;lt; args.length; i++ ) {
            arguments.add(args[i]);
        }
    }
    
    public int size()
    {
        return arguments.size();
    }
    
    public boolean hasOption(String option)
    {
        boolean hasValue = false;
        
        String str;
        for ( int i = 0; i &amp;lt; arguments.size(); i++ ) {
            str = (String)arguments.get(i);
            if ( true == str.equalsIgnoreCase(option) ) {
                hasValue = true;
                break;
            }
        }
        
        return hasValue;
    }
    
    public String valueOf(String option)
    {
        String value = null;
        
        String str;
        for ( int i = 0; i &amp;lt; arguments.size(); i++ ) {
            str = (String)arguments.get(i);
            if ( true == str.equalsIgnoreCase(option) ) {
                value = (String)arguments.get(i+1);
                break;
            }
        }
        
        return value;
    }
    
    public static void main(String[] args)
    {
        CommandOptions cmd = new CommandOptions(args);
        
        System.out.println(cmd.hasOption("-value"));
        System.out.println(cmd.hasOption("-junk"));
        System.out.println(cmd.valueOf("-value"));
        System.out.println(cmd.valueOf("-junk"));
    }
}
/* end */
&lt;/pre&gt;
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:33734</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/33734.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=33734"/>
    <title>Make your own tools</title>
    <published>2009-06-07T10:55:41Z</published>
    <updated>2009-06-07T10:55:41Z</updated>
    <content type="html">&lt;p&gt;
Sometimes, when faced with a problem, it might be a good idea to roll out a tool of your own. A custom tool/helper application might be required in situations where the standard tool does not do the intended job or the tool is not available.
&lt;/p&gt;&lt;p&gt;
Having said that, it is important to note that writing a custom tool is not advisable as compared to standard tools, due to maintenance requirements of the custom tool. But, circumstances might demand that a custom tool be created to address the problem at hand and also to deliver value to the customer.
&lt;/p&gt;&lt;p&gt;
What is needed, is a balance between the two.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:33476</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/33476.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=33476"/>
    <title>TrueCrypt for Data Security</title>
    <published>2009-06-04T15:43:00Z</published>
    <updated>2009-06-04T15:43:00Z</updated>
    <content type="html">&lt;p&gt;
Many of us these days carry USB sticks with us for carrying data, so that it is accessible to us all the time. As some of this data might be personal and sensitive, we need to ensure that we do not loose the USB stick. Loss of such data could mean changing ATM PINs, banking passwords and so on. Protection of the data is paramount.
&lt;/p&gt;&lt;p&gt;
What care do you take to secure your data? The least we can do is store the data in a password protected file - say Word or Excel or ZIP. The problem of storing data in Word or Excel format is that we need those applications for editing.
&lt;/p&gt;&lt;p&gt;
Instead of encrypting individual files, would it not be great if we could encrypt the whole USB stick?
&lt;/p&gt;&lt;p&gt;
A solution - open source at that - is to use TrueCrypt (&lt;a href="http://www.truecrypt.org"&gt;http://www.truecrypt.org&lt;/a&gt;) application . This application provides on-the-fly encryption for all platforms. Using this software, it is possible to create a virtual encrypted disk to store sensitive data.
&lt;/p&gt;&lt;p&gt;
A virtual encrypted disk when loaded appears on a Windows computer as a drive. When we read data form the drive, data is decrypted, while data is encrypted when written back to the disk. Nothing special, other than loading the disk using TrueCrypt is needed. It is possible to set the size of the virtual disk.
&lt;/p&gt;&lt;p&gt;
The only downside is to have a copy of TrueCrypt. If you carry encrypted data on the USB stick, it would be a good idea to carry a copy of TrueCrypt on an accessible partition so that we need not hunt for TrueCrypt on a third-party system.
&lt;/p&gt;&lt;p&gt;
You also need to have administrator privileges to run the driver.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:33114</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/33114.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=33114"/>
    <title>Switched to Cobian Backup</title>
    <published>2009-06-01T17:35:26Z</published>
    <updated>2009-06-01T17:35:26Z</updated>
    <content type="html">&lt;p&gt;
I have recently moved from Microsoft SyncToy to Cobian Backup 9. The reason for the move was editable nature of the relationships between the source and destination directories.
&lt;/p&gt;&lt;p&gt;
I was using Microsoft SyncToy (&lt;a href="http://patwardhan.livejournal.com/32594.html"&gt;http://patwardhan.livejournal.com/32594.html&lt;/a&gt;)to take backup of important data from my fixed, desktop HDD to my portable HDD. When the portable HDD is connected via USB, a drive letter is assigned. I had created folder pairs using directories on the drive. Sometimes, if different devices are connected or if a virtual CD is mounted or due to some other reason, a different drive letter gets assigned to the portable HDD, than the one expected. This creates problems as SyncToy is not able to locate the destination directory. The only solution is either to re-create the folders pairs or reconnect the portable HDD till we get the drive letter we want. Both options are a bit painful.
&lt;/p&gt;&lt;p&gt;
After spending many months using SyncToy, I decided to try Cobian Backup 9. Though in most situations it behaves in the same manner as SyncToy, it has one very good feature. You guessed it!! Cobian Backup 9 allows us to edit the source and target folders names before executing a synchronization operation.
&lt;/p&gt;&lt;p&gt;
Due to this feature, Microsoft SyncToy has been uninstalled and Cobian Backup 9 is in its place.
&lt;/p&gt;&lt;p&gt;
Sorry SyncToy, you did me good service for many months.
&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:patwardhan:32970</id>
    <link rel="alternate" type="text/html" href="http://patwardhan.livejournal.com/32970.html"/>
    <link rel="self" type="text/xml" href="http://patwardhan.livejournal.com/data/atom/?itemid=32970"/>
    <title>Crocodile ... for a fleeting moment</title>
    <published>2009-05-31T14:47:04Z</published>
    <updated>2009-05-31T14:47:04Z</updated>
    <content type="html">&lt;p&gt;
Yesterday, May 30, 2009, we visited the garden next to Powai lake.
&lt;/p&gt;&lt;p&gt;
We went there expecting some play things for the children, but no luck. For many years now, it seems all the play things in the park have been take out. Now the park has only trees.
&lt;/p&gt;&lt;p&gt;
Though the park does not have much, it can be good spot after the rains, when the whole park will have lots of green cover.
&lt;/p&gt;&lt;p&gt;
While in the park, we went to the lake side (which does not have a good approach). While looking out over the water, I noted something and realized that it was a crocodile! We were only able to see its snout and some part of its tail. After that spotting, the crocodile went under the water and unfortunately were not able to spot it anymore.
&lt;/p&gt;&lt;p&gt;
As I was not aware that the lake had crocodiles, it was a surprise for me.
&lt;/p&gt;</content>
  </entry>
</feed>
