<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>InTellect</title>
	<atom:link href="http://blog.ashwinraghav.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ashwinraghav.com</link>
	<description>The place for mindless rants</description>
	<lastBuildDate>Sun, 06 May 2012 21:15:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.ashwinraghav.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/0ff780da5a8b6d98ad1b39a20d8d6604?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>InTellect</title>
		<link>http://blog.ashwinraghav.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.ashwinraghav.com/osd.xml" title="InTellect" />
	<atom:link rel='hub' href='http://blog.ashwinraghav.com/?pushpress=hub'/>
		<item>
		<title>How are the optimal end-points chosen from a CDN when content is served?</title>
		<link>http://blog.ashwinraghav.com/2012/02/20/how-are-the-optimal-end-points-chosen-from-a-cdn-when-content-is-served/</link>
		<comments>http://blog.ashwinraghav.com/2012/02/20/how-are-the-optimal-end-points-chosen-from-a-cdn-when-content-is-served/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 21:29:12 +0000</pubDate>
		<dc:creator>ashwinraghav</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[optimal end-points]]></category>

		<guid isPermaLink="false">http://blog.ashwinraghav.com/?p=414</guid>
		<description><![CDATA[There is a lot said in the Internet about how Content Delivery Networks speed-up the delivery of static content to a website. Sure &#8212; there is a lot of sense in saying that servers that are in physical proximity to the end point (typically a browser) are capable of delivering content with lesser latency than [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=414&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">There is a lot said in the Internet about how Content Delivery Networks <a href="http://serverfault.com/questions/46830/how-do-cdn-content-delivery-networks-server-work">speed-up the delivery of static content to a website</a>. Sure &#8212; there is a lot of sense in saying that servers that are in physical proximity to the end point (typically a browser) are capable of delivering content with lesser latency than those that are on another continent. There were some important questions that I did not ask myself when I used Akamai&#8217;s CDN (due credit to them for nicely abstracting these details away!). Off late I have been reading about <a href="http://www.coralcdn.org/">Coral</a>, a more <a href="http://www.coralcdn.org/pubs/">open CDN in an academic sense</a>. <span id="more-414"></span>There are some questions that need to be answered as far as how CDN resolutions are carried out on the fly:</p>
<p style="text-align:justify;"><strong>1) Does my application have to be aware of where a web-request is coming from and respond with the the static files pointing to the correct cdns?</strong></p>
<p style="text-align:justify;"><strong>2) How does the Internet know what server is closest to the user?</strong></p>
<p style="text-align:justify;"><strong>3) Which part of the Internet knows this?</strong></p>
<p style="text-align:justify;">I will try to answer these in order.</p>
<p style="text-align:justify;">The short answer to the first question is &#8220;No&#8221;. An application <strong>need not figure</strong> out where a request is originating from and embed appropriate static urls. In short, this would be an inappropriate solution simply because it would not scale &#8212; Scale in terms of the CDN. What if a CDN decided to remove/add new servers in a country? He would have to inform all subscribers/clients about the new/removed servers !!</p>
<p style="text-align:justify;">So how does the Internet automatically resolve this?</p>
<p style="text-align:justify;">The short answer to this <a href="http://en.wikipedia.org/wiki/Anycast">Anycast addressing.</a> Anycast addressing is  conceptually a method on the Internet by which several endpoints on the Internet advertise the same IP addresses (typically resulting in a conflict when these are withing a LAN. I am sure you have seen IP address conflicts). The point to Anycast addressing when it comes to CDNs is that all servers that are geographically spread out can publicize the same IP address. What this does is that when a DNS Resolver (insert link here) tries to resolve a1.akamai.com/image it will always receive the same IP address from DNS servers irrespective of whether the resolver (conveniently viewed as the client) is located in Australia/Asia. However when the client tries sending out a request to the resolved IP address, different routers in different parts of the world understand this address differently. How is this done?</p>
<p style="text-align:justify;">Enter <a href="http://en.wikipedia.org/wiki/Border_Gateway_Protocol">Border Gateway Protocol</a> : A simple mechanism using which routers can speak to each other and advertise their ability to reach particular addresses. So when 2 routers advertise to a Router R1 that they can both reach &#8220;1.2.3.4&#8243; with weights x and y respectively, it is R1&#8242;s prerogative to chose to send messages intended to 1.2.3.4 via either of thses based on which advertised a cheaper &#8220;reach&#8221; mechanism. This essentially is part of the shortest path finding mechanism that the Internet has incorporated.</p>
<p style="text-align:justify;">To answer the third question ,Servers setup by a CDN advertise the same IP. DNS resolvers even resolve these to the same addresses at all points on the Internet. However, the routers are the gatekeepers that chose to route to the correct edge-of-the-Internet thanks to shortest path finding mechanisms that are hacked around. The router simple thinks that it is sending a request out through via the shortest path that it knows to the IP. The fact that these are different servers that are potentially in different geographic locations is not known to the routers. Ah&#8230; how we hack!</p>
<p style="text-align:justify;">There are parts of this article that I might have over simplified &#8212; like <a href="http://en.wikipedia.org/wiki/Domain_Name_System#Recursive_and_caching_name_server">DNS caching</a> and DNS Resolvers. However, the best way to understand how the Internet &#8220;works&#8221; is to view these as orthogonal concepts that are built keeping each system&#8217;s autonomy in mind. Hence over-simplifying is the right way to go. Forming a holistic view will happen with time.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashwinraghav.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashwinraghav.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashwinraghav.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashwinraghav.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashwinraghav.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashwinraghav.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashwinraghav.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashwinraghav.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashwinraghav.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashwinraghav.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashwinraghav.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashwinraghav.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashwinraghav.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashwinraghav.wordpress.com/414/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=414&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.ashwinraghav.com/2012/02/20/how-are-the-optimal-end-points-chosen-from-a-cdn-when-content-is-served/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b0e537968a1ced1ded02fa337f5e2245?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ashwinraghav</media:title>
		</media:content>
	</item>
		<item>
		<title>Predicate Abstractions for Dynamic Languages</title>
		<link>http://blog.ashwinraghav.com/2011/09/02/predicate-abstractions-for-dynamic-languages/</link>
		<comments>http://blog.ashwinraghav.com/2011/09/02/predicate-abstractions-for-dynamic-languages/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 14:40:14 +0000</pubDate>
		<dc:creator>ashwinraghav</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://blog.ashwinraghav.com/?p=403</guid>
		<description><![CDATA[SLAM and BLAST are automated static checkers that took the programming language world by storm. Recently I have spent a bit of time trying to understand the way these tools work and quite honestly, I think it is their ability to formalize their ideas that have made them such successes over as opposed to the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=403&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;"><a href="http://www.cs.virginia.edu/~weimer/2011-6610/reading/p1-ball.pdf">SLAM</a> and BLAST are automated static checkers that took the programming language world by storm. Recently I have spent a bit of time trying to understand the way these tools work and quite honestly, I think it is their ability to formalize their ideas that have made them such successes over as opposed to the ingenuity which we ideally want to promote as good samaritans.<span id="more-403"></span></p>
<p style="text-align:justify;"><a title="Model Checking in Software systems and Programming Languages" href="http://blog.ashwinraghav.com/2011/08/26/model-checking-in-software-systems-and-programming-languages/">State Space Explosion</a> is what limits checker from being built at run time. So what do you do? Build <a href="http://www.cs.virginia.edu/~weimer/2011-6610/reading/p203-ball.pdf">some abstractions</a> over some things in your program and keep asserting these at all points. For eg: My mutex C program should never call unlock or lock twice continuously&#8211; clearly a cause for deadlock. This is a predicate that is invariant over the lifetime of a program (Did I just say lifetime? Rich Hickey influence I guess). Now, how does one make these abstractions? Remove all lines of code in your program that are not associated to the assertion(s) you are making and retain just those that are.</p>
<p style="text-align:justify;">Fintd the state space and you are practically done. This may not have been a simple task in terms of the programming work involved with building the tool. But there are several gaps between what I would expect a tool to do and what SLAM and BLAST accomplish.</p>
<p style="text-align:justify;">Many of the thoughts and conclusions I have expressed on BLAST may be premature since they are predictive more than experiential. In the interest of analyzing how BLAST would do &#8220;on the field&#8221;, I was forced to take the (bold) predictive approach. BLAST (like SLAM) is designed to check if software conforms to the recommended behavioral properties of interfaces that are used &#8212; much like unit-tests that seem like BLAST&#8217;s <em>design-driving</em> runtime counterparts. Like UT, BLAST has the overhead of needing a specification from a programmer. Since it requires this meta-data (meta-code actually), I tend to feel that it is most beneficial in cases where the test is to be run on several pieces of software that need to conform to a common specification &#8212; Eg: Windows Drivers need to conform to interfaces provided by the OS&#8217; API. In such cases the return on investment on the meta-code will clearly be high.</p>
<p style="text-align:justify;">It is also interesting to think of what it would take to rewrite BLAST for other (some dynamic) languages. Several difficulties that may have (possibly) been encountered with regard to providing memory safety and pointer aliasing intelligence tend to get trivialized with languages like Java that provide well-managed memory. There is a necessity to abstract a piece of code into a boolean program to control the state space explosion that is a run-time consequence of having a &#8220;rich&#8221; type-system like C does. Drawing from that, rewriting BLAST for a duck-typed language like Ruby can pose challenges in other domains too. Contrary to what may seem, the state space explosion problem will only be <strong>more acute</strong> in duck-typed languages. Hence it may be necessary for BLAST to bring in a pseudo-type system into itself  in order for any meaningful predicate/propositional assertions to be made before a Ruby program runs &#8212;- a bit of an irony. In either of these language-types, I find that the specifications (meta-code) can often communicate intent better than the code itself (much like unit-tests).</p>
<p style="text-align:justify;">Another interesting aspect of the implementation is how the atomicity of operations has been handled. When a statement <em>long pval=0</em> is encountered in a program, the ART constructed assumes that Predicate(pval == 0) holds true after that statement. It is clear from this that BLAST will not handle multi threaded software. The assumption of all assignments being atomic can cause havoc in most languages (C included). Although this may be more related to the non functional way the code is written and the static nature of the mechanism, it is still fair to expect that a tool understands atomicity of operations in a language and constructs its ART considering other threads running (in the same process). This may bring us back to the state explosion problem once again on account of the numerous orders of execution threads may assume. Intuitively, languages like Clojure that support immutable data structures may tend to benefit/tolerate the static nature of the atomicity that blast proposes. I am thinking of building an equivalent tool for a language with immutable data structures for a final project.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashwinraghav.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashwinraghav.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashwinraghav.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashwinraghav.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashwinraghav.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashwinraghav.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashwinraghav.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashwinraghav.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashwinraghav.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashwinraghav.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashwinraghav.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashwinraghav.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashwinraghav.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashwinraghav.wordpress.com/403/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=403&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.ashwinraghav.com/2011/09/02/predicate-abstractions-for-dynamic-languages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b0e537968a1ced1ded02fa337f5e2245?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ashwinraghav</media:title>
		</media:content>
	</item>
		<item>
		<title>Model Checking in Software systems and Programming Languages</title>
		<link>http://blog.ashwinraghav.com/2011/08/26/model-checking-in-software-systems-and-programming-languages/</link>
		<comments>http://blog.ashwinraghav.com/2011/08/26/model-checking-in-software-systems-and-programming-languages/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 22:41:54 +0000</pubDate>
		<dc:creator>ashwinraghav</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://blog.ashwinraghav.com/?p=397</guid>
		<description><![CDATA[Most of this article may seem like I am stating the obvious (offcourse unlike the rest of my blog!). I have been attending a course on Programming Languages by Prof Wesley Weimer. Been quite awesome till date. We were speaking about static analysis of programming languages and the success of Microsoft&#8217;s SLAM project in automatically [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=397&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Most of this article may seem like I am stating the obvious (offcourse unlike the rest of my blog!). I have been attending a course on Programming Languages by <a href="http://www.cs.virginia.edu/~weimer/">Prof Wesley Weimer</a>. Been quite awesome till date. We were speaking about static analysis of programming languages and the success of Microsoft&#8217;s <a href="http://research.microsoft.com/en-us/projects/slam/">SLAM</a> project <span id="more-397"></span>in automatically finding bugs in Windows Device Drivers by testing their compliance to the Operating System&#8217;s API specifications.</p>
<p style="text-align:justify;">This blog is about model checking or checking every state of a finite state automata system just so as to make sure that some undesirable states are unreachable in real time. To make this sound more human,  you want to exhaustively test a system by  bringing it to all possible scenarios(states) that it can encounter during the course of its life and ensuring that none of these scenarios get it to misbehave. Quite like any normal tester would want to do.</p>
<p style="text-align:justify;">However the need to formalize the concept comes in only because of the practical difficulties involved in bringing every system to all states and testing it exhaustively.  This is particularly applicable to software and prog languages.  For example, if you are writing your program in a language that supports complex types i.e most object oriented languages, you are basically in an infinite state space. Even simpler languages that have not support for OO techniques are difficult to exhaustively test. If your language supports <em>long numbers </em>for example, every possible that a particular long variable might assume might introduce a new state in the program. Technically your program could show behavioral difference only selectively i.e  if <em>long_var&gt;1000 perform_action1 else perform_action2. </em>However, there are still infinite state spaces in the above case if (say) comparison in long variables is not an atomic action in the language that you are programming. Concurrency will bring in infinite state spaces #fail</p>
<p style="text-align:justify;">In the past week I have come across so many papers and tools that do exactly the same thing and call it different things. SLAM from Microsoft is the original (I think). All these software and code testing tools bring in some sort of abstraction or modelling into the system and then exhaustively test the space that can be occupied by the code. Clearly, the abstraction reduces the states that can be occupied. In the case of SLAM this abstraction seems to be by reducing C programming Language&#8217;s type system to only a boolean type system, clearly removing the infiniteness of the space caused by complex types. Quite ingenious.</p>
<p style="text-align:justify;">Whats been striking is the number of other tools that seem to be doing things that are similar. I do not want to trash any of these on a public post, but <a href="http://www.youtube.com/watch?v=azTVEwxN8zM">this</a> one in particular was just unavoidable.</p>
<p style="text-align:justify;">State explosion of software systems is just a complex way of saying that it is not possible to exhaustively test software. Knuth&#8217;s famous &#8220;I have not tested these algorithms but only proved them to be correct&#8221; yada, yada are causally related to this. Inspite of model checking mostly stating the obvious, I loved the math. Quite analogous to a reason I like programming. Not too many people seem to get it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashwinraghav.wordpress.com/397/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashwinraghav.wordpress.com/397/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashwinraghav.wordpress.com/397/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashwinraghav.wordpress.com/397/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashwinraghav.wordpress.com/397/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashwinraghav.wordpress.com/397/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashwinraghav.wordpress.com/397/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashwinraghav.wordpress.com/397/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashwinraghav.wordpress.com/397/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashwinraghav.wordpress.com/397/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashwinraghav.wordpress.com/397/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashwinraghav.wordpress.com/397/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashwinraghav.wordpress.com/397/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashwinraghav.wordpress.com/397/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=397&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.ashwinraghav.com/2011/08/26/model-checking-in-software-systems-and-programming-languages/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b0e537968a1ced1ded02fa337f5e2245?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ashwinraghav</media:title>
		</media:content>
	</item>
		<item>
		<title>Evolution&#8217;s Delusive Backdoor Programming in our brains</title>
		<link>http://blog.ashwinraghav.com/2011/07/14/the-delusive-backdoor-programming-in-our-brains/</link>
		<comments>http://blog.ashwinraghav.com/2011/07/14/the-delusive-backdoor-programming-in-our-brains/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 19:49:10 +0000</pubDate>
		<dc:creator>ashwinraghav</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[atomicity of ideas and things]]></category>
		<category><![CDATA[functional programming]]></category>
		<category><![CDATA[intended humor]]></category>
		<category><![CDATA[neurology]]></category>
		<category><![CDATA[phantoms in the brain]]></category>
		<category><![CDATA[vs ramachandran]]></category>

		<guid isPermaLink="false">http://blog.ashwinraghav.com/?p=372</guid>
		<description><![CDATA[I recently read V.S.Ramachandran&#8217;s Phantoms in the Brain. It is quite brilliant. I would really recommend it to anyone who prides himself of being a rationalist. The book has several rare and interesting cases of neural (mal)functions and VSR conducts some ingenious experiments to diagnose these cases. Almost every case is a bizarre, seemingly incomprehensible [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=372&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I recently read V.S.Ramachandran&#8217;s Phantoms in the Brain. It is quite brilliant. I would really recommend it to anyone who prides himself of being a rationalist.<span id="more-372"></span></p>
<p style="text-align:justify;">The book has several rare and interesting cases of neural (mal)functions and VSR conducts some ingenious experiments to diagnose these cases. Almost every case is a bizarre, seemingly incomprehensible neuro-psychiatric case and the experiments are typically aimed at disproving some ingenious yet incorrect <a href="http://en.wikipedia.org/wiki/Sigmund_Freud.">Freudian Explanations</a> for the syndromes and identifying precise scientific explanations using the known neuro-anatomy of the brain. At the risk of sounding like a stereo-typer, it is quite scientist like <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p style="text-align:justify;"><span style="color:#00ccff;"><strong>Phantom Arm and the Inappropriate Pun</strong></span></p>
<p style="text-align:justify;">One very interesting syndrome explained in the book and <a title="VS Ram Ted" href="http://www.ted.com/talks/vilayanur_ramachandran_on_your_mind.html">this video</a> is that of the <a href="http://en.wikipedia.org/wiki/Phantom_limb">Phantom arm</a>. It is a syndrome that is experienced by people who have lost or had their hands amputated as a result of some accident/surgery. The syndrome being that they continue feeling sensations in the non existent arm, sometimes severing pain (sorry about the inappropriate pun) in a part of the hand that does not exist anymore. Hence phantom. VSR beautifully explains why the pain is caused.</p>
<p style="text-align:justify;"><span style="color:#00ccff;"><strong>What a hack by Evolution!!</strong></span></p>
<p style="text-align:justify;">Before the arm was amputated, it was found that several of these patients had their arms attached to a sling for several months (because of a fracture / severely damaged tissues). When the brain issued a &#8220;Move&#8221; command to the arm and the arm refused to move there occurs some learned paralysis. Apparently the brain looks for a visual feedback from the eyes expecting to hear that the arm is moving. Since there is no such thing the brain is forced to learn the paralysis. ( Quite a hack for something that is a result of million year long evolutions). And this learned paralysis is retained, even after the amputation.</p>
<p style="text-align:justify;">Watch <a title="VS Ram Ted" href="http://www.ted.com/talks/vilayanur_ramachandran_on_your_mind.html">the video</a> to see how VSR treats the paralysis in an arm that does not exist.</p>
<p style="text-align:justify;"><span style="color:#00ccff;"><strong>Identifying the  Separation of Concerns in DEBUG mode</strong></span></p>
<p style="text-align:justify;">Every case in the book was diagnosed fascinatingly. All cases explained were seemingly rare. By conducting a series of experiments on the patients, their oddness in  physiology and psychological behavior were mapped to the specific parts of the brain that had been affected. This is really the way medical researchers identify the separation of concerns in the neuro-anatomy. Sort of the same way how you would identify what part of your code is responsible for doing what? By removing some part of the code, and seeing what blows up in your application.</p>
<p style="text-align:justify;"><span style="color:#00ccff;"><strong>One more Pun</strong></span></p>
<p style="text-align:justify;">Thank God all my code has unit tests.</p>
<p style="text-align:justify;"><span style="color:#00ccff;"><strong>Non Atomic Entities and Functions Spread over Time</strong></span></p>
<p style="text-align:justify;">One great issue confronting OO programmers is that Objects are actually composite entities that take intermediate(unexpected) states over a time dimension. A reason why functional programming languages thrive today. The brain seems to be having quite the same problem. There are clearly 3 independent functions that moving your arm is composed of. a) Sending out signals to move it b) Responding with ack c) Getting visual feedback by seeing it move. If any of these composite behavior were to fail, you would acquire a learned paralysis. Quite a high risk situation.</p>
<p style="text-align:justify;"><span style="color:#00ccff;"><strong> Functional Programming getting ahead of evolution?</strong></span></p>
<p style="text-align:justify;">Immutable datastructures, pure functions and the likes seem to have surpassed evolution in achieving larger atomicity of functionality. Maybe its because we have not yet programmed anything as complex as the human body! But the possibilities theoretically exist atleast. I pride myself of my ability to understand Darwinian Selection and I am quite stunned why it has given us a chance to think we are doing better than evolution in coming up with functional programming! Maybe it is really this chance to think that you have bettered  evolution that is reffed to as mutation.</p>
<p style="text-align:justify;">Befuddled as usual.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashwinraghav.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashwinraghav.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashwinraghav.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashwinraghav.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashwinraghav.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashwinraghav.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashwinraghav.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashwinraghav.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashwinraghav.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashwinraghav.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashwinraghav.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashwinraghav.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashwinraghav.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashwinraghav.wordpress.com/372/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=372&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.ashwinraghav.com/2011/07/14/the-delusive-backdoor-programming-in-our-brains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b0e537968a1ced1ded02fa337f5e2245?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ashwinraghav</media:title>
		</media:content>
	</item>
		<item>
		<title>A rationalist&#8217;s views on Functional-Programming</title>
		<link>http://blog.ashwinraghav.com/2011/05/13/a-rationalists-views-on-functional-programming/</link>
		<comments>http://blog.ashwinraghav.com/2011/05/13/a-rationalists-views-on-functional-programming/#comments</comments>
		<pubDate>Fri, 13 May 2011 15:21:51 +0000</pubDate>
		<dc:creator>ashwinraghav</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://blog.ashwinraghav.com/?p=353</guid>
		<description><![CDATA[The greatest apparent threat that causes us to program functionally is the fact that Object Oriented Programming has failed to address mutability in states that results because of most objective implementations. I am no FP guru but I think a number of difficulties that FP overcome are because if intermediaries. OO fails to address intermediate [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=353&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">The greatest apparent threat that causes us to program functionally is the fact that Object Oriented Programming has failed to address mutability in states that results because of most objective implementations. <span id="more-353"></span>I am no FP guru but I think a number of difficulties that FP overcome are because if intermediaries. OO fails to address intermediate states that objects tend to take. When an object is in the process of changing state, what really is changing is the composite part of the object and not really the abstraction itself. If these objects were not composite and were really supported by the type system of the language (thereby making them inherently a part of it), the intermediary states could probably have been avoided #staging-the-obvious</p>
<p style="text-align:justify;">It is interesting to think of how human beings actually avoid such intermediate states while exchanging ideas/arguing. Think about this (not so) hypothetical situation:</p>
<p style="text-align:justify;"><span style="color:#ffcc99;"><em>Person1: I want no hierarchy in the organisation that I am working in!</em></span><br />
<span style="color:#ffcc99;"><em>Person2: Eh? Every decision that you take, you are picking one choice over another. You are establishing hierarchy right there</em></span><br />
<span style="color:#ffcc99;"><em>Person 3: (Boing! But I still want to work in a place with no hierarchy)</em></span></p>
<p style="text-align:justify;">How do we manage to keep minds stable and keep belief systems from toppling over in such conversations. Is it because we have managed to keep our thoughts completely decoupled from each other? Or is it because we have really made sure our belief system is simply just protected from rationality(selectively).</p>
<p>Why is this really something that cannot be done with code? Selectively have a purely functional/rational part? And then another part that is state based? Every (commercially) successful functional programming language (Clojure say) has a story to say about a functional part and a non-functional state based part. It all maps together beautifully if you ask me.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashwinraghav.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashwinraghav.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashwinraghav.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashwinraghav.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashwinraghav.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashwinraghav.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashwinraghav.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashwinraghav.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashwinraghav.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashwinraghav.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashwinraghav.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashwinraghav.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashwinraghav.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashwinraghav.wordpress.com/353/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=353&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.ashwinraghav.com/2011/05/13/a-rationalists-views-on-functional-programming/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b0e537968a1ced1ded02fa337f5e2245?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ashwinraghav</media:title>
		</media:content>
	</item>
		<item>
		<title>Writing cohesive event driven code in Ruby</title>
		<link>http://blog.ashwinraghav.com/2011/05/11/it-is-possible-to-write-cohesive-event-driven-code/</link>
		<comments>http://blog.ashwinraghav.com/2011/05/11/it-is-possible-to-write-cohesive-event-driven-code/#comments</comments>
		<pubDate>Wed, 11 May 2011 14:00:37 +0000</pubDate>
		<dc:creator>ashwinraghav</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://ashwinraghav.wordpress.com/?p=342</guid>
		<description><![CDATA[For those of you who have played around with some bleeding edge asynchronous HTTP servers like python&#8217;s tornado and Ruby&#8217;s goliath, I am sure there have been several ahaaaa! moments finding out  things that need improvement. As part of these things, I find that structuring evented code and taking a bottom up approach to debugging [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=342&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">For those of you who have played around with some bleeding edge asynchronous HTTP servers like python&#8217;s <a href="https://github.com/facebook/tornado">tornado</a> and Ruby&#8217;s <a href="https://github.com/postrank-labs/goliath">goliath</a>, I am sure there have been several ahaaaa! moments finding out  things that need improvement. As part of these things, I find that structuring evented code and taking a bottom up approach to debugging nested calls can really dissuade you from asynchronous http approaches itself.<span id="more-342"></span></p>
<p style="text-align:justify;">For the sake of convenience, I have taken a small block of code that you can write with eventmachine (Ruby&#8217;s most popular gem for building evented apps).</p>
<p><pre class="brush: ruby;">
require 'eventmachine'
require 'em-http'
require 'fiber'

def asynchronous_call
  current_fiber = Fiber.current
  puts &quot;making calls&quot;
  http = EventMachine::HttpRequest.new(&quot;http://www.google.com&quot;).get :timeout =&gt; 10

  puts &quot;declaring callbacks&quot;

  http.callback {
    puts &quot;resuming things&quot;;
    current_fiber.resume(http);
  }

  http.errback {
    puts &quot;resuming things&quot;;
    current_fiber.resume(http);
  }

end

EventMachine.run do
  asynchronous_call
  puts &quot;its all over&quot;
end

##making calls
##declaring callbacks
##its all over
##resuming things
</pre></p>
<p style="text-align:justify;">Its easy to see how cumbersome it gets to  debug evented code apart from the fact that it may get less cohesive progressively. Taking a bottom-up approach to debug nested calls is painful. Obviously it is possible to thread your way out of the situation and get things in order. However, that would tend to contribute to making the code less cohesive as well.</p>
<p style="text-align:justify;">Fibers are a construct in ruby that are not essentially a concurrency construct but can effectively solve some of the same problems that threads intend to. Fibers are really nothing but coroutines that can simply be entered at several points and exitted at several points as well. In fact, a subroutine is a specific strain of a coroutine where there is only a single entry and exit point.</p>
<p><pre class="brush: ruby;">

require 'eventmachine'
require 'em-http'
require 'fiber'

def asynchronous_call
  current_fiber = Fiber.current
  puts &quot;making calls&quot;
  http = EventMachine::HttpRequest.new(&quot;http://www.google.com&quot;).get :timeout =&gt; 10

  puts &quot;declaring callbacks&quot;

  http.callback {
    puts &quot;resuming things&quot;;
    current_fiber.resume(http);
  }

  http.errback {
    puts &quot;resuming things&quot;;
    current_fiber.resume(http);
  }

  puts &quot;pausing fiber until call is complete&quot;
  Fiber.yield
end

EventMachine.run do
  Fiber.new do
    asynchronous_call
    puts &quot;its all over&quot;
  end.resume
end

##making calls
##declaring callbacks
##pausing fiber until call is complete
##resuming things
##its all over
</pre></p>
<p style="text-align:justify;">Obviously a cleaner way to structure and write evented code. Not only do co routines help you clearly bind the order of execution of code to the order that is apparent, but they are quite efficient in memory as well.</p>
<p style="text-align:justify;">Unlike threads, Fibers are blessed with a memory stack of 20KB each. Every time a coroutine/Fiber is paused and restarted, the overhead of switching context is avoided since the memory stack is .. well already available.</p>
<p style="text-align:justify;">Clearly this comes at the limitation of not having 100s of Fibers concurrently paused. It will simply blow your stack. However, with the above example the cohesiveness they bring into the code is commendable.</p>
<p style="text-align:justify;">Its important to bear in mind that Fiber i not really a concurrency construct. Threads are. Clearly understanding the differences and similarities will help writing better evented code.</p>
<p style="text-align:justify;">If you wish to understand more about Fibers in Ruby, <a href="http://www.rubyinside.com/ruby-fibers-8-useful-reads-on-rubys-new-concurrency-feature-1769.html">here</a> are a list of must read articles.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashwinraghav.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashwinraghav.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashwinraghav.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashwinraghav.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashwinraghav.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashwinraghav.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashwinraghav.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashwinraghav.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashwinraghav.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashwinraghav.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashwinraghav.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashwinraghav.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashwinraghav.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashwinraghav.wordpress.com/342/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=342&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.ashwinraghav.com/2011/05/11/it-is-possible-to-write-cohesive-event-driven-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b0e537968a1ced1ded02fa337f5e2245?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ashwinraghav</media:title>
		</media:content>
	</item>
		<item>
		<title>Interactive Jabber Bots</title>
		<link>http://blog.ashwinraghav.com/2011/05/09/interactive-jabber-bots/</link>
		<comments>http://blog.ashwinraghav.com/2011/05/09/interactive-jabber-bots/#comments</comments>
		<pubDate>Mon, 09 May 2011 10:10:21 +0000</pubDate>
		<dc:creator>ashwinraghav</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Jabber Chat Bot]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://ashwinraghav.wordpress.com/?p=334</guid>
		<description><![CDATA[Vinkesh and I made a presentation at xonf Bangalore on building jabber chat bots in cases where web application seem like a redundant solution.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=334&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Vinkesh and I made a presentation at xonf Bangalore on building jabber chat bots in cases where web application seem like a redundant solution.<span id="more-334"></span></p>
<div class='embed-vimeo' style='text-align:center;'><iframe src='http://player.vimeo.com/video/23472691' width='400' height='300' frameborder='0'></iframe></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashwinraghav.wordpress.com/334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashwinraghav.wordpress.com/334/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashwinraghav.wordpress.com/334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashwinraghav.wordpress.com/334/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashwinraghav.wordpress.com/334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashwinraghav.wordpress.com/334/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashwinraghav.wordpress.com/334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashwinraghav.wordpress.com/334/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashwinraghav.wordpress.com/334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashwinraghav.wordpress.com/334/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashwinraghav.wordpress.com/334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashwinraghav.wordpress.com/334/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashwinraghav.wordpress.com/334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashwinraghav.wordpress.com/334/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=334&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.ashwinraghav.com/2011/05/09/interactive-jabber-bots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b0e537968a1ced1ded02fa337f5e2245?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ashwinraghav</media:title>
		</media:content>
	</item>
		<item>
		<title>Pushing Concurrency out of your System</title>
		<link>http://blog.ashwinraghav.com/2011/05/06/pushing-concurrency-out-of-your-system/</link>
		<comments>http://blog.ashwinraghav.com/2011/05/06/pushing-concurrency-out-of-your-system/#comments</comments>
		<pubDate>Fri, 06 May 2011 16:08:07 +0000</pubDate>
		<dc:creator>ashwinraghav</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[squid]]></category>
		<category><![CDATA[threading]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://ashwinraghav.wordpress.com/?p=321</guid>
		<description><![CDATA[I am currently working on a project in ThoughtWorks that required a lot of operations work to be done. Translating that to English, we wrote a lot of code that needed to be shared by an online application and a set of background jobs. Not to mentions that a large part of these operations were [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=321&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I am currently working on a project in ThoughtWorks that required a lot of operations work to be done. Translating that to English, we wrote a lot of code that needed to be shared by an online application and a set of background jobs. Not to mentions that a large part of these operations were speaking to REST APIs. Not rocket science right? So  Here is what we did.<span id="more-321"></span></p>
<p style="text-align:justify;">The online application was written in a conventional MVC where some of the models made REST api calls(and you though they were all ActiveRecord?), parsed and returned results that the controllers could understand.</p>
<p style="text-align:justify;">The jobs used these models in exactly the same way the controllers did except that these processes were off-course offline and each job invoked the model methods 1000s of times.</p>
<div class="mceTemp mceIEcenter" style="text-align:justify;">
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><a href="http://ashwinraghav.files.wordpress.com/2011/05/blocked.png"><img class="size-full wp-image-325" title="Blocking calls" src="http://ashwinraghav.files.wordpress.com/2011/05/blocked.png?w=510&#038;h=382" alt="" width="510" height="382" /></a></dt>
<dd class="wp-caption-dd">Request Response Pattern</dd>
</dl>
</div>
<p style="text-align:justify;">At the end of the project we came to a point where we wanted to parallelize some of these jobs to get them to run faster and it was clear quite immediately that the blocking calls made to the REST APIs were the biggest bottlenecks. For starters, parallelizing these calls could save us time. These were the factors that had to be addressed as part of this:</p>
<ol>
<li>All calls were being made from inside the models that were clearly unaware (in a good way) of whether its methods were being invoked by (online) controllers or by (offline) jobs. What this meant was that a lot of code that was written in the model was tuned to being invoked from a <a title="Request Response Pattern" href="http://en.wikipedia.org/wiki/Request-response">request-response pattern</a> following system. This meant that there was no effort to keep the model&#8217;s code thread safe as like most conventional request-response patterns. What did this mean? A good amount of refactoring to write thread-safe code.</li>
<li>Some of the most common xml-parsing libraries in Ruby (the likes of <a href="http://nokogiri.org/">Nokogiri</a> and <a href="http://railstips.org/blog/archives/2008/11/17/happymapper-making-xml-fun-again/">HappyMapper</a>) are not <a href="http://en.wikipedia.org/wiki/Thread_safety">thread-safe</a>.</li>
<li>Ruby is not really the king of concurrency. Threads in ruby are provided to make parts of your code concurrent. This concurrency is unfortunately not pushed to the operating system but is instead handled by the ruby interpretter. What this means is that a threaded application can never really directly benefit from increasing the number of cores on your processor since these are run as sub-procs of your ruby-interpretter process. This is a topic that requires much larger a debate and I am not going to address it as part of this blog. Lets assume for now that Ruby&#8217;s concurrency is not so cool!</li>
</ol>
<p style="text-align:justify;">For me no 2 was the most compelling reason to rethink our strategy. There was no way I am going to write a thread-safe xml parsing library of my own (in the interest of time and personal-ability combined).</p>
<p style="text-align:justify;">I remembered a chat  with <a title="Mark's blog" href="http://markhneedham.com/">Mark Needham</a> where we were speaking about pushing the concurrency out of `your` system. The riskiness involved in refactoring, replacing the core libraries in the system in the last few days before release clearly suggested that pushing the concurrency out of the system would win it for us. Here is what we did!</p>
<p style="text-align:justify;"><a href="http://ashwinraghav.files.wordpress.com/2011/05/unblocked.png"><img class="aligncenter size-full wp-image-326" title="Calls are not blocked anymore" src="http://ashwinraghav.files.wordpress.com/2011/05/unblocked.png?w=510&#038;h=382" alt="" width="510" height="382" /></a></p>
<p style="text-align:justify;">Before the jobs are run, we made a quick computation of all the rest urls that were going to be hit during the course of running the job. We hit these from the job with the help of some asynchronous libraries like <a href="https://github.com/dbalatero/typhoeus">typhoeus</a>. The calls were not only asynchronous, but we also ensured that the rest of the job would not wait for the responses of the jobs to come in but would simply continue.</p>
<p style="text-align:justify;">What we also did was to put a <a title="Forward Proxy" href="http://en.wikipedia.org/wiki/Proxy_server#Forward_proxies">forward proxy</a> (Squid FP) caching all responses between out system and the rest services. What this actually did for us was that, once the calls were bundled and made asynchronously, all calls would simply get cached at the FP that would handle the asynchronous nature of the http responses. And the jobs would simply continue running hoping that when the calls are made the equivalent calls have already preemptively been fetched into the Forward Proxy. Improved our job performance by over 100%.  Clearly a win as a result of pushing the concurrency onto squid and out of our system. #win <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Off course, from an OO perspective, we did remove the cohesiveness of the Rest API calls from the models. But by inserting a decorator in between the models and the jobs/controllers, a clear strategy could be devised to avoid this cohesion removal. #refactoring</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashwinraghav.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashwinraghav.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashwinraghav.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashwinraghav.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashwinraghav.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashwinraghav.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashwinraghav.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashwinraghav.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashwinraghav.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashwinraghav.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashwinraghav.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashwinraghav.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashwinraghav.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashwinraghav.wordpress.com/321/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=321&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.ashwinraghav.com/2011/05/06/pushing-concurrency-out-of-your-system/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b0e537968a1ced1ded02fa337f5e2245?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ashwinraghav</media:title>
		</media:content>

		<media:content url="http://ashwinraghav.files.wordpress.com/2011/05/blocked.png" medium="image">
			<media:title type="html">Blocking calls</media:title>
		</media:content>

		<media:content url="http://ashwinraghav.files.wordpress.com/2011/05/unblocked.png" medium="image">
			<media:title type="html">Calls are not blocked anymore</media:title>
		</media:content>
	</item>
		<item>
		<title>Design Patterns in Ruby [Composite, Iterator, Command][Part 2]</title>
		<link>http://blog.ashwinraghav.com/2011/03/14/design-patterns-in-ruby-composite-iterator-commandpart-2/</link>
		<comments>http://blog.ashwinraghav.com/2011/03/14/design-patterns-in-ruby-composite-iterator-commandpart-2/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 06:56:16 +0000</pubDate>
		<dc:creator>ashwinraghav</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Clean Code]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://ashwinraghav.wordpress.com/?p=288</guid>
		<description><![CDATA[Part1 continued&#8230;.. Composite Pattern Wiki Link. Use this in cases where your DSL seems to have a hierarchy. The hierarchy can be established  by data/logic i.e Tasks &#38; SubTasks, Parts &#38; SubParts. Note here that the complex weight methods have been implemented in the component class and not the leaf class. Iterator Composite Objects often [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=288&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><a title="Design patterns in Ruby [Template, Strategy, Observer]" href="http://ashwinraghav.wordpress.com/2011/03/07/design-patterns-in-ruby-part-1/">Part1</a> </strong><span style="color:#00ccff;"><span style="color:#003300;"><span style="color:#ffffff;">continued&#8230;..</span><br />
</span><span id="more-288"></span> <strong>Composite Pattern</strong></span></p>
<p>Wiki Link. Use this in cases where your DSL seems to have a hierarchy. The hierarchy can be established  by data/logic i.e Tasks &amp; SubTasks, Parts &amp; SubParts.</p>
<p><pre class="brush: ruby;">
class Part
  def initialize name
    @name = name
  end
  def weight
    0
  end
end

class Hand &lt; Part
  def initialize
    super(&quot;Hand&quot;)
    @children = []
    5.times {add_child Finger.new}
  end

  def weight #component object
    weight  = 5
    @children.each { |c| weight += c.weight }
    weight
  end

  def add_child child
    @children &lt;&lt; child
  end
end

class Finger &lt; Part
  def initialize
    super(&quot;Finger&quot;)
  end

  def weight #Leaf object
    1
  end
end
hand = Hand.new
puts hand.weight #7
</pre></p>
<p>Note here that the complex weight methods have been implemented in the component class and not the leaf class.</p>
<p><span style="color:#00ccff;"><strong>Iterator</strong></span></p>
<p>Composite Objects often are composed of lists of elements that are treated alike. This is particularly simple to accomplish in a duck typed language like Ruby. There is often a need to access individual items in the list. That really is the problem that iterators solve. For the Java folks java.util.iterator &amp; java.util.Enumeration interfaces should strike a Bell. Typical use-case (Java Code):</p>
<p><pre class="brush: java;">
ArrayList list = new ArrayList();  //Composite Object
list.add(&quot;java&quot;);
list.add(&quot;c++&quot;);
list.add(&quot;ruby&quot;);
for(Iterator i = list.iterator(); i.hasNext();)
{
  System.out.println(&quot;Language:&quot; + i.next());
}
</pre></p>
<p>Although these are inherently a part of the code that you may write everyday, it pays to have an understanding of the problem that iterators essentially solve. There are essentially <em>External Iterators. </em>External since they are external to the Composite Object that they iterate.</p>
<p>Ruby on the other hand has internal iterators. Here is what is internal about them.</p>
<p><pre class="brush: ruby;">
list = [&quot;java&quot;, &quot;c++&quot;, &quot;ruby&quot;]
list.each do |language|
  puts &quot;Language: #{language}&quot;
end
</pre></p>
<p>The difference here clearly being that the logic that you wish to apply in an iterative way is passed as a code bock to the composite object. Its clear from this example that internal iteratirs are an inherent part of languages that support closures. In this case the method <em>each </em>takes the code block to be applied iteratively.<br />
<a href="http://gafter.blogspot.com/2007/07/internal-versus-external-iterators.html">Here</a> is a nice article that explains the pros and cons of using different types of iterators.</p>
<p><span style="color:#00ccff;"><strong>Command</strong></span></p>
<p><a href="http://en.wikipedia.org/wiki/Command_pattern">Wiki Link</a>. Clearly, the closures in Ruby are bound to have an influence on the command patterns. As explained in the Composite pattern above, we can maintain commands as a bunch of proc objects. This example however is meant to demonstrate cases where there is a need to remember states. Hence the more conventional approach to solving command problems.</p>
<p><a href="http://en.wikipedia.org/wiki/Command_pattern"></a></p>
<p><pre class="brush: ruby;">

class Command
  def initialize(description, proc1, proc2)
    @description = description
    @function =  proc1
    @inverse = proc2
  end

  def execute
    @function.call unless @function.nil?
  end

  def unexecute
    @inverse.call unless @inverse.nil?
  end
end
class CreateFile &lt; Command
  def initialize
    proc1 = Proc.new do
      puts &quot;File Created&quot;
    end
    proc2 = Proc.new do
      puts &quot;File Destroyed&quot;
    end
    super(&quot;creating new file&quot;, proc1, proc2)
  end
end

class CheckMemory &lt; Command ##ireversible
def initialize
  proc1 = Proc.new do
    puts &quot;Checking Memory...&quot;
  end
  proc2 = Proc.new do
    puts &quot;Mem Check need not be reversed&quot;
  end
  super(&quot;Checking memory avalability&quot;, proc1, proc2)
  end
end

class Installer
  def initialize
    @commands = []
  end

  def add_command command
    @commands &lt;&lt; command
  end

  def install
    @commands.each {|c| c.execute}
  end

  def uninstall
    @commands.reverse.each do |command|
      command.unexecute
    end
  end
end

installer = Installer.new
installer.add_command(CheckMemory.new)
installer.add_command(CreateFile.new)
installer.installinstaller.uninstall
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashwinraghav.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashwinraghav.wordpress.com/288/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashwinraghav.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashwinraghav.wordpress.com/288/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashwinraghav.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashwinraghav.wordpress.com/288/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashwinraghav.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashwinraghav.wordpress.com/288/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashwinraghav.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashwinraghav.wordpress.com/288/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashwinraghav.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashwinraghav.wordpress.com/288/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashwinraghav.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashwinraghav.wordpress.com/288/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=288&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.ashwinraghav.com/2011/03/14/design-patterns-in-ruby-composite-iterator-commandpart-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b0e537968a1ced1ded02fa337f5e2245?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ashwinraghav</media:title>
		</media:content>
	</item>
		<item>
		<title>Campus Recruitment</title>
		<link>http://blog.ashwinraghav.com/2011/03/08/campus-recruitment/</link>
		<comments>http://blog.ashwinraghav.com/2011/03/08/campus-recruitment/#comments</comments>
		<pubDate>Tue, 08 Mar 2011 19:47:01 +0000</pubDate>
		<dc:creator>ashwinraghav</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Jobs]]></category>
		<category><![CDATA[Placement]]></category>
		<category><![CDATA[PSG]]></category>
		<category><![CDATA[PSG COllege of Technology]]></category>

		<guid isPermaLink="false">http://ashwinraghav.wordpress.com/?p=277</guid>
		<description><![CDATA[Any expression of sarcasm is just some frustration leaking out amidst what otherwise is ramblings that are rationalized sporadically. There is only one driving reason for most students to join PSG College of Technology. Job offerings! Fair enough if you ask me. Fear of failure (learn the word atychiphobia) that is so often the reason [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=277&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Any expression of sarcasm is just some frustration leaking out amidst what otherwise is ramblings that are rationalized sporadically. There is only one driving reason for most students to join PSG College of Technology. Job offerings! Fair enough if you ask me.<span id="more-277"></span> Fear of failure (learn the word atychiphobia) that is so often the reason for mediocrity in the Indian middle class drives 18 year old kids to point where they are forced to base educational decisions on &#8216;phamily responsibilities&#8217;. Fair enough. I wish to remain objective.</p>
<p style="text-align:justify;">I had a chance to be a course coordinator, a role that was made up to act as the assistant to a placement coordinator. So the experience and the emotions that I express here are validated beyond the common Joe&#8217;s point of view. Kuberan, a very good friend of mine and I played this role not just once but twice. He did most of the donkey&#8217;s work. I was witness.</p>
<p style="text-align:justify;">As a grad there were just 2 things that I heard so often from folks around when asked what kind of a job they wanted. These classifications are not just misnomers, but barely represent what graduate students use as the classifiers.</p>
<p style="text-align:justify;">1) Management Job</p>
<p style="text-align:justify;">2) Technical Job. (Further classified as Core Job for the non Tech Grads. Coding Job for computer-science grads)</p>
<p style="text-align:justify;">What is interesting is that these are the classifiers that grads were expressing. What they really used to classify was.</p>
<p style="text-align:justify;">1) Pay Package</p>
<p style="text-align:justify;">2) Travel Opportunities</p>
<p style="text-align:justify;">3) Exclusivity of the Job (in terms of the number of grads recruited from the campus. Lesser the better)</p>
<p style="text-align:justify;">It really is possible to rationalize each of these criteria with reasons like &#8216;phamily pressure&#8217;. Pretty short sighted if you ask me. After all, we are a generation that is yet to see what it is for an IT engineer to lead a retired life. It is mathematically unknown.</p>
<p style="text-align:justify;">Amidst these things, it was/is at times flustering to see FaceBook status messages &#8220;Life Sucks.. Lost something that I was aiming for a very long time!&#8221; from grads who were not selected into firms that they wanted to be a part of. Seriously? how much about the job did you really know for it to have been a life long dream?</p>
<p style="text-align:justify;">No more ranting. Now for some advice</p>
<p style="text-align:justify;">1) Dont mix education and jobs. Dont mix jobs and money. These are actually beautifully isolatable concepts. And if your thinking I am wrong by saying this, well it is MY blog post after all. Education, Work and Money are needs.(Work is a need too. Read Dan Ariely&#8217;s <a href="http://www.amazon.com/Upside-Irrationality-Unexpected-Benefits-Defying/dp/0061995037">Upsides of Irrationality</a>).</p>
<p style="text-align:justify;">2) All these are needs at all points of time in life. They are not exclusive to specific stages. Try and find jobs that can offer you clearly isolatable benefits. Benefits like learning, money, travel, chance to meet hackers, chance to attend conferences, chance to pursue your technical interests outside work hours, incentives for learners, incubation facilities if you have a cool idea, freedom to express opinions, freedom to drive the business. I agree that these are things that are driven by the individual and not by the workplace. Well then, why look for a job? Do something on your own.</p>
<p style="text-align:justify;">3)Stop wasting your time trying to compete with other classes and courses and trying to show to the rest of the world that your better. Believe me!  Noone gives a shit about your contest.</p>
<p style="text-align:justify;">4)Stop ranting on FaceBook about how you missed your Dream Job. Disappointments are understandable. But let me tell you this. There is no history (exhaustively) of a deserving grad not landing up in a good job. You think you deserve a good job right?</p>
<p style="text-align:justify;">5)Stop using fuzzy terms like job satisfaction. You have not worked before. You dont know what it means. I did not.</p>
<p style="text-align:justify;">6)Instead of wasting time finding ways to better your competitor courses, spend some time speaking to people who work at the companies that you are looking at. Think about whether you can do what they do to make a living.</p>
<p style="text-align:justify;">7) Prioritize your learning very highly. After a year, any job typically gets boring. Learners will find it easy to switch jobs at this point.</p>
<p style="text-align:justify;">8) If seniors/alumni (which I am clearly now a part of) are disappointed with your class&#8217;s performance on the job charts, they can F*** off.</p>
<p style="text-align:justify;">Dont take campus recruitments too seriously. They truly mean nothing. Remember you are in college to get educated. Traditionally, these institutions were never meant to be job fairs. Learn your way through college. I am not going to say &#8220;It will pay in the long run&#8221;. I am just saying that there is tremendous joy in learning something new everyday. Dont let recruitment drives ruin that joy.</p>
<p style="text-align:justify;">P.S: If at any point, you were thinking &#8220;Sure Ashwin, speak on. You have a job now. I know you were no different when you were at PSG&#8221;, your argument/comment is exactly my point.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashwinraghav.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashwinraghav.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashwinraghav.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashwinraghav.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashwinraghav.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashwinraghav.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashwinraghav.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashwinraghav.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashwinraghav.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashwinraghav.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashwinraghav.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashwinraghav.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashwinraghav.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashwinraghav.wordpress.com/277/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ashwinraghav.com&#038;blog=9501592&#038;post=277&#038;subd=ashwinraghav&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.ashwinraghav.com/2011/03/08/campus-recruitment/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b0e537968a1ced1ded02fa337f5e2245?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ashwinraghav</media:title>
		</media:content>
	</item>
	</channel>
</rss>
