<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hitesh Sarda</title>
	<atom:link href="http://hitesh.in/feed/" rel="self" type="application/rss+xml" />
	<link>http://hitesh.in</link>
	<description>Thoughts on life, technology, education and entrepreneurship</description>
	<lastBuildDate>Sat, 31 Jul 2010 09:52:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Dumping thread stack trace in Java &amp; .NET</title>
		<link>http://hitesh.in/2010/dumping-thread-stack-trace-in-java-net/</link>
		<comments>http://hitesh.in/2010/dumping-thread-stack-trace-in-java-net/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 06:26:35 +0000</pubDate>
		<dc:creator>Hitesh</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[@work]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://hitesh.in/?p=609</guid>
		<description><![CDATA[Multi-threaded Java practitioners know about the indispensible ways to taking thread dumps to see a snapshot of what’s happening in the JVM, and resolve ‘hang’ issues. There are plethora of options, ranging from simple command line tools and utilities to nice GUI applications to writing some code in your application. A sampling of such options: [...]]]></description>
			<content:encoded><![CDATA[<p>Multi-threaded Java practitioners know about the indispensible ways to taking thread dumps to see a snapshot of what’s happening in the JVM, and resolve ‘hang’ issues. There are plethora of options, ranging from simple command line tools and utilities to nice GUI applications to writing some code in your application. A sampling of such options:</p>
<h3>Stack trace in Java</h3>
<h4>Command Line</h4>
<p>If the application is running as a console application, you can try one of these:</p>
<p><strong>Sending a signal to the Java Virtual Machine</strong></p>
<p>On UNIX platforms you can send a signal to a program by using the kill command. This is the quit signal, which is handled by the JVM. For example, on Solaris you can use the command <code>kill -QUIT process_id</code>, where process_id is the process number of your Java program.</p>
<p>Alternatively you can enter the key sequence <code>&lt;ctrl&gt;\</code> in the window where the Java program was started. Sending this signal instructs a signal handler in the JVM, to recursively print out all the information on the threads and monitors inside the JVM.</p>
<p>To generate a stack trace on Windows, enter the key sequence <code>&lt;ctrl&gt;&lt;break&gt;</code> in the window where the Java program is running, or click the Close button on the window.<br />
(Excerpt from <a href="http://java.sun.com/developer/technicalArticles/Programming/Stacktrace/">http://java.sun.com/developer/technicalArticles/Programming/Stacktrace/</a>)</p>
<p>If the application is not running in a console, you can use the <a href="http://download.oracle.com/javase/1.5.0/docs/tooldocs/share/jstack.html">jstack</a> tool that ships with J2EE since 1.5</p>
<pre><strong>jstack</strong> [ option ] pid
<strong>jstack</strong> [ option ] executable core
<strong>jstack</strong> [ option ] [server-id@]remote-hostname-or-IP</pre>
<h4>GUI Tools</h4>
<p>Since the JVM provides APIs to hook in and get the thread state and other information, there are several tools in the market that allows you to see the state of the running application including the thread stack trace. One such freely available option is <a href="http://download-llnw.oracle.com/javase/6/docs/technotes/guides/visualvm/index.html">VisualVM</a>. In fact it ships with JDK these days. Although VisualVM is pretty self explanatory, here are some instructions to get you started. <a href="http://download-llnw.oracle.com/javase/6/docs/technotes/guides/visualvm/threads.html">http://download-llnw.oracle.com/javase/6/docs/technotes/guides/visualvm/threads.html</a></p>
<p><img title="screenshot of thread dump (stack trace) in thread dump sub-tab" src="http://download-llnw.oracle.com/javase/6/docs/technotes/guides/visualvm/images/thread-dump-screen.png" alt="screenshot of timeline in Threads tab" /></p>
<p>You could also use jConsole for similar purpose, but I prefer VisualVM. Check this for more information: <a href="http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html#DeadlockDetection">http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html#DeadlockDetection</a></p>
<p><img src="http://java.sun.com/developer/technicalArticles/J2SE/jconsole/FindDeadlock-IDs.jpg" border="0" alt="Figure 11: Find Deadlocked Threads" width="675" height="530" /></p>
<h4>Programmatically capturing the stack trace</h4>
<p>from within an appilcation, you can call : <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Thread.html#getStackTrace()" target="_blank">Thread.getAllStackTraces()</a>. But if you want to do the same from a different application, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/management/ThreadMXBean.html" target="_blank">ThreadMXBean</a> exposes the needed data, which can be retrieved by using the <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/management/ManagementFactory.html" target="_blank">JMX interface</a>.</p>
<h3>Dumping thread Stack trace in .NET</h3>
<p>.NET does not seem to have the variety of options like Java. The only reasonable option I have seen so far is the <a href="http://www.codeplex.com/wikipage?ProjectName=MSE" target="_blank">Managed Stack Explorer</a>. This can be run from the command line as</p>
<pre>mse /s /p &lt;pid&gt;</pre>
<p>or as a GUI application:</p>
<p><a href="http://hitesh.in/wp-content/uploads/2010/DumpingthreadstacktraceinJava.NET_76CB/image.png"><img style="display: inline; border: 0px;" title="image" src="http://hitesh.in/wp-content/uploads/2010/DumpingthreadstacktraceinJava.NET_76CB/image_thumb.png" border="0" alt="image" width="586" height="454" /></a></p>
<p>Since it is an open source (MSPL) project, I took a peek into its source to check the API used. It depends on some sample code released by the CLR Team called <a href="http://www.microsoft.com/downloads/details.aspx?familyid=38449a42-6b7a-4e28-80ce-c55645ab1310&amp;displaylang=en" target="_blank">mdbg</a>. This in turn is a managed layer on the unmanaged <a href="http://msdn.microsoft.com/en-us/library/bb397953.aspx" target="_blank">CLR Debugging Services API</a>.</p>
<p>From what I see there seems to be no direct way to get a stack trace in .NET, apart from either using the debugger API, or rolling your own on top of the <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.stacktrace.aspx" target="_blank">StackTrace</a> class. Check <a href="http://stackoverflow.com/questions/51768/print-stack-trace-information-from-c" target="_blank">this question on StackOverflow</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://hitesh.in/2010/dumping-thread-stack-trace-in-java-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beware of the clone</title>
		<link>http://hitesh.in/2010/beware-of-the-clone/</link>
		<comments>http://hitesh.in/2010/beware-of-the-clone/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 07:12:02 +0000</pubDate>
		<dc:creator>Hitesh</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[@work]]></category>

		<guid isPermaLink="false">http://hitesh.in/?p=605</guid>
		<description><![CDATA[Why Clone In this world of concurrent, multi-threaded programming, functional style of programming makes more sense. And one of the key tenets of functional programming is immutability. Even in OO languages, a few benefits of FP can be derived if the objects are made immutable. Clone gone wrong We follow a similar approach in our [...]]]></description>
			<content:encoded><![CDATA[<h2>Why Clone</h2>
<p>In this world of concurrent, multi-threaded programming, functional style of programming makes more sense. And one of the key tenets of functional programming is immutability. Even in OO languages, a few benefits of FP can be derived if the objects are made immutable.</p>
<h2>Clone gone wrong</h2>
<p>We follow a similar approach in our application. But this is not always possible, especially the mutable by default approach of Java. To overcome this, we pass around clones of instances, instead of the instance itself. This works in most cases, but we experienced a very subtle bug last week, where one thread was changing the values on a clone held by another thread, in spite of having no reference to it.</p>
<h2>The cause</h2>
<p>After lot of disbelief and head scratching, the reason was there, right in front. We were calling the instance.clone() to create a clone. The clone function defined in the Object class (more or less) takes each variable and makes a copy if it and assigns it to the variable of the new instance. This works great for stack variable, but the for the ones on the heap, only the reference is copied, in effect both the clones have reference to the same instance of the member variable. In other words, it does a shallow copy and you might actually need a deep copy sometimes.</p>
<p><strong>Before Clone</strong></p>
<p><img src="http://hitesh.in/wp-content/uploads/2010/07/072410_0712_Bewareofthe1.png" alt="" /></p>
<p><strong>After Clone</strong></p>
<p><img src="http://hitesh.in/wp-content/uploads/2010/07/072410_0712_Bewareofthe2.png" alt="" /></p>
<h2>The effect</h2>
<p>Thus any change made to MyClassInstance.OtherClass after MyClassClone was created also changes the MyClassClone.OtherClass, leading to confusing side effects.</p>
<h2>The solution</h2>
<p>Once the problem is understood, the solution is obvious. Just override the clone method and clone any reference classes in it.</p>
<p>Check <a href="http://stackoverflow.com/questions/2890340/question-about-cloning-in-java">http://stackoverflow.com/questions/2890340/question-about-cloning-in-java</a> for more.</p>
]]></content:encoded>
			<wfw:commentRss>http://hitesh.in/2010/beware-of-the-clone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft LifeCam VX-1000 on Ubuntu + Skype</title>
		<link>http://hitesh.in/2010/microsoft-lifecam-vx-1000-on-ubuntu-skype/</link>
		<comments>http://hitesh.in/2010/microsoft-lifecam-vx-1000-on-ubuntu-skype/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 18:23:19 +0000</pubDate>
		<dc:creator>Hitesh</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[lifecam]]></category>
		<category><![CDATA[skype]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://hitesh.in/?p=582</guid>
		<description><![CDATA[Quick note to self, to save some searching next time. Microsoft LifeCam VX-1000 does not quite work on Ubuntu and even worse with Skype. To get video working on Skype, start it as : env LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype And to get the microphone working, run this in a terminal sudo rmmod gspca_sonixj sudo modprobe gspca_sonixj]]></description>
			<content:encoded><![CDATA[<p class="note">Quick note to self, to save some searching next time.</p>
<p>Microsoft LifeCam VX-1000 does not quite work on Ubuntu and even worse with Skype.<br />
To get video working on Skype, start it as :<br />
<code>env LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype</code></p>
<p>And to get the microphone working, run this in a terminal<br />
<code>sudo rmmod gspca_sonixj<br />
sudo modprobe gspca_sonixj</code></p>
]]></content:encoded>
			<wfw:commentRss>http://hitesh.in/2010/microsoft-lifecam-vx-1000-on-ubuntu-skype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interesting new business ideas for India</title>
		<link>http://hitesh.in/2010/interesting-new-business-ideas-for-india/</link>
		<comments>http://hitesh.in/2010/interesting-new-business-ideas-for-india/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 06:42:57 +0000</pubDate>
		<dc:creator>Hitesh</dc:creator>
				<category><![CDATA[Entrepreneurship]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[idea]]></category>

		<guid isPermaLink="false">http://hitesh.in/?p=592</guid>
		<description><![CDATA[A short post about interesting business ideas, I came across in the last week or so. Lost-key drop service A service, that sells numbered key chains, which has something like this written on it: When the key is lost, the owner will contact the service hotline to ascertain if the key, with id number 123654789 [...]]]></description>
			<content:encoded><![CDATA[<p>A short post about interesting business ideas, I came across in the last week or so.</p>
<h2>Lost-key drop service</h2>
<p>A service, that sells numbered key chains, which has something like this written on it:</p>
<p><img class="size-full wp-image-593 alignnone" title="Sample Keychain" src="http://hitesh.in/wp-content/uploads/2010/07/keychain.png" alt="" width="390" height="192" /></p>
<p>When the key is lost, the owner will contact the service hotline to ascertain if the key, with id number 123654789 in the above example, has been returned. If yes, he can pick it up or have it mailed for a fee. Works best if the operation is distributed having franchise operators in each city. Thus the turnaround time between losing the key and regaining it can be minimised.</p>
<p>A customer can register the key code online, to get an email / SMS whenever the key is returned.</p>
<h2>Help and advice to <acronym title="Do it yourself">DIY</acronym> farmers</h2>
<p>About 6-months ago, I discussed with a friend on, how I am interested in growing a vegetable garden, but have no clue where to begin. I was interested if someone will give me advice on what to grow, when and how as well as supply the needed materials. Six month later, I read about <a href="http://www.sproutrobot.com/">sproutrobot</a>, on <a href="http://techcrunch.com/2010/06/04/gardening-for-dummies-sproutrobot-sends-you-seeds-and-tells-you-when-to-plant-them/">techcrunch</a>. Sproutrobot, is a US based start-up, pretty much doing what I described above. Now if someone can replicate this for India.</p>
<h2><acronym title="Do it yourself">DIY</acronym> greeting cards</h2>
<p>Create an online service that allows users to create a greeting card selecting the paper, design and wordings. This is then handmade and either mailed to the user or distributed to the list provided. There are a few similar services, but none having the refinement and social integration of the &#8220;new web&#8221;.</p>
<p>This is the one I am most likely to try out, just for the technical kick. I also intend to concentrate on a very specific niche to be able to provide templates to best match what the user might want.</p>
]]></content:encoded>
			<wfw:commentRss>http://hitesh.in/2010/interesting-new-business-ideas-for-india/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software development methodology</title>
		<link>http://hitesh.in/2010/software-development-methodology/</link>
		<comments>http://hitesh.in/2010/software-development-methodology/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 18:30:42 +0000</pubDate>
		<dc:creator>Hitesh</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[scrum]]></category>
		<category><![CDATA[software-development]]></category>
		<category><![CDATA[waterfall]]></category>

		<guid isPermaLink="false">http://hitesh.in/?p=586</guid>
		<description><![CDATA[Recently I had a good discussion on twitter about the different methodology out there and their relevance. Although I agree with @ravi_mohan in a broader sense of not following blindly and not being a process fanatic or slave, I do not think he was quite right in dismissing all methodologies as fraud meant for idiots. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had a <a href="http://twitter.com/#search?q=ravi_mohan%20%40hitezh" target="_blank">good discussion on twitter</a> about the different methodology out there and their relevance. Although I agree with <a href="http://twitter.com/ravi_mohan">@ravi_mohan</a> in a broader sense of not following blindly and not being a process fanatic or slave, I do not think he was quite right in dismissing all methodologies as fraud meant for idiots.</p>
<p>Since I found twitter a very limiting medium to discuss the nuances, I would rather blog about it.</p>
<h3>What is a methodology?</h3>
<p><a href="http://en.wikipedia.org/wiki/Methodology">As per wikipedia</a>: Methodology may refer to nothing more than a simple set of methods or procedures, or it may refer to the rationale and the philosophical assumptions that underlie a particular study relative to the scientific method.</p>
<h3>Methodologies we use every day.</h3>
<p>We follow some methods or another all through the day, including when we are coding. We follow a set method for source control, bug tracking etc. taking these at a higher plain and we get a software development methodology.</p>
<p>We apply certain standard solutions to specific problem type, and then a few people saw these patterns and came up with design patterns. They work in most cases, evolved after years of refinement and are guidelines that can be used if you encounter similar design problem.</p>
<p>Similarly, few people saw some patterns in how we go about the process of developing software, saw what works and what does not and came up with <a href="http://en.wikipedia.org/wiki/Software_development_process">Software Development Models</a>.</p>
<p>Like design patterns, they are not to be used everywhere, and certainly not without a thought. In fact like several design patterns are actually counterproductive, like a Visitor pattern in dynamic languages. Similarly some development process recommendations are only to work around problems in workspace instead of actually addressing them. If you know the problems and have the ability and power to fix them, do it. You can then skip the part of the methodology that no longer makes sense.</p>
<p>Dismissing the collective wisdom of people who were able to see patterns in day to day work and were able to abstract and present it, is not right. Saying that the patterns are bad because the people who saw the patterns are not star programmers is, like saying, <a href="http://en.wikipedia.org/wiki/Harsha_Bhogle" target="_blank">Harsha Bhogle</a> is not a good commentator because he is not a star player.</p>
<h3>Development methods in the wild (world of open source)</h3>
<p>All great programmers follow a method. In fact open source projects with great leaders have the most articulated development process. Take for example the <a href="http://ldn.linuxfoundation.org/book/1-a-guide-kernel-development-process">linux kernel development process</a>. These processes are what work for that project but certainly you can see influences of well defined process. Who can deny that the 6 month <a href="https://wiki.ubuntu.com/UbuntuDevelopment">Ubuntu development cycle</a> is a perfect example of a time-boxed agile release cycle?</p>
<h3>Conclusion</h3>
<p>If you are working even is a small team, a process that is agreed and understood by all is useful. Preferably this needs to be written down, but if the process is part of the culture it is not needed. This has nothing to do with the skill level of the team members, as appropriately demonstrated by the teams working on the kernel. Whether you arrive at the process, by taking a &#8216;template&#8217; and arriving at what works for you or seeing what is working and then refine and codify it, makes no difference.</p>
<p>Even if you are coding alone, you follow some process, even if it&#8217;s subconscious.</p>
]]></content:encoded>
			<wfw:commentRss>http://hitesh.in/2010/software-development-methodology/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Strange biases we have</title>
		<link>http://hitesh.in/2010/strange-biases-we-have/</link>
		<comments>http://hitesh.in/2010/strange-biases-we-have/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 21:20:53 +0000</pubDate>
		<dc:creator>Hitesh</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[bias]]></category>

		<guid isPermaLink="false">http://hitesh.in/?p=584</guid>
		<description><![CDATA[When we see a person, like the one below, nothing seems out of the ordinary. Even if we come across the person below, hardly ever an eyebrow is raised, but… … when we see him, something crosses our mind. Why is that? Because it’s some form of impairment? Then why don’t similar thought cross our [...]]]></description>
			<content:encoded><![CDATA[<p>When we see a person, like the one below, nothing seems out of the ordinary.</p>
<p><a href="http://www.flickr.com/photos/17423713@N03/3752652055/" target="_blank"><img src="http://farm3.static.flickr.com/2556/3752652055_dac6d6b249.jpg" alt="Me, Myself, and I by danielfoster437." width="375" height="500" /></a></p>
<p>Even if we come across the person below, hardly ever an eyebrow is raised, but…</p>
<p><a href="http://hitesh.in/wp-content/uploads/2010/Strangebiaseswehave_145C0/PutarecordonbyStephenMcleodartisticmoobs.jpg"><img style="display: inline;" title="Put a record on by StephenMcleod - artistic moobs" src="http://hitesh.in/wp-content/uploads/2010/Strangebiaseswehave_145C0/PutarecordonbyStephenMcleodartisticmoobs_thumb.jpg" alt="Put a record on by StephenMcleod - artistic moobs" width="500" height="333" /></a></p>
<p>… when we see him, something crosses our mind. Why is that? Because it’s some form of impairment?</p>
<p><a href="http://hitesh.in/wp-content/uploads/2010/Strangebiaseswehave_145C0/ManWithHearingAidbyArtySmokes.jpg"><img style="display: inline;" title="Man With Hearing Aid by Arty Smokes" src="http://hitesh.in/wp-content/uploads/2010/Strangebiaseswehave_145C0/ManWithHearingAidbyArtySmokes_thumb.jpg" alt="Man With Hearing Aid by Arty Smokes" width="500" height="345" /></a></p>
<p>Then why don’t similar thought cross our minds when we see this form of impairment?</p>
<p><img src="http://farm1.static.flickr.com/106/275394869_d43370a255.jpg" alt="sexy girls, sexier glasses by .scarlet.." width="500" height="375" /></p>
<p>Maybe because visual disability is so common, we have gotten used to it? In which case, should these be replaced…</p>
<p><a href="http://www.flickr.com/photos/42941459@N00/2993507037" target="_blank"><img src="http://farm4.static.flickr.com/3052/2993507037_b6cea87ba6.jpg" alt="hearing aid close-up by Photos by Mavis." width="500" height="375" /></a></p>
<p>… with something like this?</p>
<p><a href="http://picasaweb.google.com/lh/photo/wHMBvsoj8EcvY1rw1AHOxQ" target="_blank"><img src="http://lh6.ggpht.com/_Q2HXP-gYYdw/Sq-pDIzmUGI/AAAAAAAAFjY/9GcTXnNM21Q/s576/Bluetooth_Headset_HBH-PV740_Xperia.jpg" alt="" /></a></p>
<p>One thing to bear in mind, that hearing impairment will become common place as well, with everything around us getting louder, this is bound to happen. So get used to seeing more people with hearing aids on.</p>
]]></content:encoded>
			<wfw:commentRss>http://hitesh.in/2010/strange-biases-we-have/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When in Rome, do as the Romans do</title>
		<link>http://hitesh.in/2010/when-in-rome-do-as-the-romans-do/</link>
		<comments>http://hitesh.in/2010/when-in-rome-do-as-the-romans-do/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 19:17:19 +0000</pubDate>
		<dc:creator>Hitesh</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://hitesh.in/?p=578</guid>
		<description><![CDATA[A few incidents in the last few weeks, made me think of this saying again and again. There is so much truth in it, which is simply glossed over. The biggest culprits are we (non-resident) Indians. Maybe what I say applies to other nationality as well, but I cannot talk on their behalf. When we [...]]]></description>
			<content:encoded><![CDATA[<p>A few incidents in the last few weeks, made me think of this saying again and again. There is so much truth in it, which is simply glossed over. The biggest culprits are we (non-resident) Indians. Maybe what I say applies to other nationality as well, but I cannot talk on their behalf.</p>
<p>When we visit a new place, we take no time to dismiss their taste in food, clothing and lifestyle. Why do we yearn for a Indian food, abroad? Do people abroad not eat, or they have no taste for good food? Why not try local cuisine? It is not about imitating others or trying to blend in. It is about putting yourself in the other person&#8217;s shoes to understand and appreciate their culture and the generations of refinement that has gone into their way of life as well.</p>
<p>Food was an easy one to pick on, but I can go on about several other things. We never seem to stop and think why are things the way they are. Just because they are not the same as we are used to, they are bad or stupid.</p>
<p>On the flip side, when we visit India, we do not blend in there as well. We will criticize the traffic, the life style, the nosy neighbors etc. etc. We will not even drink the same water that others do. Are they so beneath us?</p>
<p>So instead of feeling at home, we are foreigner or might I say aliens, at home and abroad. What a cursed life to live.</p>
]]></content:encoded>
			<wfw:commentRss>http://hitesh.in/2010/when-in-rome-do-as-the-romans-do/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>1 year old!</title>
		<link>http://hitesh.in/2010/1-year-old/</link>
		<comments>http://hitesh.in/2010/1-year-old/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 07:53:11 +0000</pubDate>
		<dc:creator>Hitesh</dc:creator>
				<category><![CDATA[Everything else]]></category>
		<category><![CDATA[blogging]]></category>

		<guid isPermaLink="false">http://hitesh.in/?p=569</guid>
		<description><![CDATA[The blog is now one year old, woo hoo! When I started the blog, I was not sure if I could sustain it. But here I am, 1 yr and 49 posts later. Although I could not post once a week as I promised myself, I was close enough. If only I could share statistics [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignright" style="width: 243px"><a href="http://www.flickr.com/photos/hfb/2052055803/"><img class=" " title="One year old!" src="http://farm3.static.flickr.com/2362/2052055803_a508c7ed75.jpg" alt="" width="233" height="350" /></a><p class="wp-caption-text">photo credit: hfb @ flickr</p></div>
<h4>The blog is now one year old, <em>woo hoo</em>!</h4>
<p>When I started the blog, I was not sure if I could sustain it. But here I am, 1 yr and 49 posts later. Although I could not post once a week as I promised myself, I was close enough.</p>
<p>If only I could share statistics to prove how popular this blog is, but both of you know it isn&#8217;t <img src='http://hitesh.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So, here&#8217;s looking forward to another year of blogging, and hope to see you soon with a non-self-congratulatory post.</p>
<p>PS. The break in blogging was a result of a nice long vacation in May.</p>
]]></content:encoded>
			<wfw:commentRss>http://hitesh.in/2010/1-year-old/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text processing options</title>
		<link>http://hitesh.in/2010/text-processing-options/</link>
		<comments>http://hitesh.in/2010/text-processing-options/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 10:54:13 +0000</pubDate>
		<dc:creator>Hitesh</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[lexical-analysis]]></category>
		<category><![CDATA[nltk]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[TOTW]]></category>

		<guid isPermaLink="false">http://hitesh.in/?p=565</guid>
		<description><![CDATA[The last two weeks, I have been researching options for processing free text. I think I have explored the entire spectrum of possibilities. Below are some notes that I can revisit in a few months and not spend the same effort again. Background I was looking at a way to process auto-generated tweets, like the [...]]]></description>
			<content:encoded><![CDATA[<p>The last two weeks, I have been researching options for processing free text. I think I have explored the entire spectrum of possibilities. Below are some notes that I can revisit in a few months and not spend the same effort again.</p>
<h3>Background</h3>
<p>I was looking at a way to process auto-generated tweets, like the ones on <a href="http://twitter.com/moneyvidya_com">http://twitter.com/moneyvidya_com</a>. Some sample tweets:</p>
<blockquote>
<ul>
<li>#moneyvidya arunthestocksguru (5 Star rated) says Buy Vijay Shanthi Builders &#8211; 6m (Monday 29 March 2010 @ 09:55 &#8230; <a href="http://bit.ly/bd5JgC">http://bit.ly/bd5JgC</a></li>
<li>#moneyvidya arunthestocksguru (5 Star rated) says Buy Bhagwati Banquets &amp; Hotels &#8211; 6m (Monday 29 March 2010 @ 09&#8230; <a href="http://bit.ly/9MzRDG">http://bit.ly/9MzRDG</a></li>
<li>#moneyvidya NSV (5 Star rated) says Buy ACC &#8211; 6m (Wednesday 24 March 2010 @ 09:55 AM): <a href="http://bit.ly/b5xTrN">http://bit.ly/b5xTrN</a></li>
<li>#moneyvidya justsurjit (5 Star rated) says Sell Sesa Goa &#8211; Intraday (Monday 22 March 2010 @ 10:31 AM): <a href="http://bit.ly/9lLo8U">http://bit.ly/9lLo8U</a></li>
</ul>
</blockquote>
<p>As it is clear, the text follows a specific format, but has its own little variations. I intended to process the ‘insights’ and see each expert&#8217;s success rate. Although I never got around actually completing the task, I did learn a lot about text processing.</p>
<h3>Approach</h3>
<h4>The apprentice – Regular Expressions</h4>
<p>The first approach was the most obvious one – regular expressions. I am sure RegEx would have addressed the particular task at hand. But the parsing expression would become a convoluted mess very soon. So I started looking for better alternatives.</p>
<h4>The strict teacher – Lexical Analysis</h4>
<p>Lexical analysis starts where regular expression give up. This also needs pretty strict rules on the allowed input text, but the rules could be a lot more flexible and easy to comprehend.</p>
<p>I especially enjoyed using <a href="http://irony.codeplex.com/" target="_blank">Irony</a>, which makes it trivial to convert <a href="http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form" target="_blank">BNF</a> formed rules to C# code. There is a good gentle introduction to <a href="http://www.codeproject.com/KB/recipes/YourFirstDSL.aspx" target="_blank">lexical analysis using Irony</a> on code project.</p>
<h4>The guru – Natural Language Processing</h4>
<p>Processing test using tools like <a href="http://www.nltk.org/" target="_blank">NLTK</a>, allows you to parse and understand any unstructured text and understand it. Although this gives you maximum freedom, it also needs a lot of work to get right. For this to produce good results, be sure you have lots of data to be able to tweak and test your implementation. I guess this is the reason Google and co., can do so much better at translation, since they have huge data available for improving.</p>
<h3>Conclusions</h3>
<p>I don’t have one <img src='http://hitesh.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I guess, there are several ways to solve a problem, and half the solution is to identify the best way to solve the given problem. As for me, it was a good learning exercise and may come in handy if I ever write a DSL.</p>
]]></content:encoded>
			<wfw:commentRss>http://hitesh.in/2010/text-processing-options/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I still use paper</title>
		<link>http://hitesh.in/2010/why-i-still-use-paper/</link>
		<comments>http://hitesh.in/2010/why-i-still-use-paper/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 19:34:36 +0000</pubDate>
		<dc:creator>Hitesh</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[notetaking]]></category>
		<category><![CDATA[paper]]></category>

		<guid isPermaLink="false">http://hitesh.in/?p=562</guid>
		<description><![CDATA[and pencil for jotting ideas… A quick list of advantages of the good old way of taking notes: When ideas flow, only pencil can keep up with their speed. Doodling actually helps with the idea flow. Ideas are random, typing is linear. You can get away with drawing something on paper to depict a long [...]]]></description>
			<content:encoded><![CDATA[<p><em>and pencil for jotting ideas…</em></p>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.flickr.com/photos/deathtogutenberg/3432296447/" target="_blank"><img title="Try that electronically!" src="http://farm4.static.flickr.com/3661/3432296447_661818ca05.jpg" alt="Visual Note-taking Conference Call Notes by Austin Kleon." width="500" height="338" /></a><p class="wp-caption-text">Try that electronically!</p></div>
<p>A quick list of advantages of the good old way of taking notes:</p>
<ul>
<li>When ideas flow, only pencil can keep up with their speed.</li>
<li>Doodling actually helps with the idea flow.</li>
<li>Ideas are random, typing is linear.</li>
<li>You can get away with drawing something on paper to depict a long sentence. Doing the same on a computer will mean sidetracking into finding a clipart.</li>
<li>No pesky distractions, including those from the spelling or grammar checkers.</li>
<li>My best UI design always starts on paper</li>
<li>Easy to create mind maps.</li>
<li>Paper is truly portable, I can take it anywhere.</li>
<li>Only once I have all the thoughts on paper, do i try to organise them and make them <em>electronic</em></li>
</ul>
<p>How about you? What do you prefer, electronic or paper based note taking?</p>
<p>PS: I do like <a href="http://freemind.sourceforge.net/wiki/index.php/Main_Page" target="_blank">freemind</a> when I am in mood for electronic note taking.</p>
]]></content:encoded>
			<wfw:commentRss>http://hitesh.in/2010/why-i-still-use-paper/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->