<?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>No Mind</title>
	<atom:link href="http://www.vivekkhurana.net/no-mind/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vivekkhurana.net/no-mind</link>
	<description>It's the mind that makes you miss the shot</description>
	<lastBuildDate>Fri, 22 Jul 2011 18:03:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Introducing Krivah</title>
		<link>http://www.vivekkhurana.net/no-mind/introducing-krivah/</link>
		<comments>http://www.vivekkhurana.net/no-mind/introducing-krivah/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 18:01:30 +0000</pubDate>
		<dc:creator>Vivek Khurana</dc:creator>
				<category><![CDATA[Clojure]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software architecture]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[krivah]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.vivekkhurana.net/no-mind/?p=90</guid>
		<description><![CDATA[For past some time I have been working on numerous &#8220;Enterprise&#8221; application. What I noticed that most of them have same bunch of problems. In majority of cases you have some data and bunch of rules to be applied on the data. When I explored this a bit I came to a list of features [...]]]></description>
			<content:encoded><![CDATA[<p> For past some time I have been working on numerous &#8220;Enterprise&#8221; application. What I noticed that most of them have same bunch of problems. In majority of cases you have some data and bunch of rules to be applied on the data. When I explored this a bit I came to a list of features that I will like to have in a business management framework. Here is the initial list I came up</p>
<p>&#8211; Define data easily. By &#8220;easily&#8221; I mean that a Business user should be able to define data (preferably visually) or modify existing data.<br />
&#8211; Pull data from various sources and define a collective business object.<br />
&#8211; Define rules with a drag and drop interface.<br />
&#8211; Define workflows.<br />
&#8211; Define presentation of data.<br />
&#8211; Package bunch of features as components and mix components to create applications (SCA)<br />
&#8211; Allow individual applications to be stored on separate nodes (hardware) so that you can scale individual applications depending on demand.At the same time whole application should be available to user in a single interface, seamlessly.<br />
&#8211; Reporting<br />
&#8211; Incremental development of applications and components.</p>
<p> Since I had some free time today, I decided to start writing a framework which meets above requirements. The framework is called Krivah and is based on clojure. The code repo is available at https://github.com/vivekkhurana/krivah . Please note, at the time of writing this post, Krivah is pre-pre-alpha!. The code is for developers only. (not for faint hearted! <img src='http://www.vivekkhurana.net/no-mind/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )<br />
 Right now nothing special is working. Just a basic entity framework for defining entities. Current code supports only NoSQL and is based on MongoDB. But support for other database is coming soon.</p>
<p><strong>Why Clojure</strong><br />
 Clojure is a dialect of lisp that runs in JVM or .Net CLR. Lisp is a language that I find most suitable for business applications. The ability to treat code as data is a blessing for defining business rules. One can use older program source code and pass it to new function, making wrapping functions and extending functions a breeze.</p>
<p><strong>What Krivah is not?</strong><br />
 Krivah is not a generic framework. It is focused on business applications and workflow based applications to be precise. So you cannot expect to see Krivah used to build a social networking site. But expect things like inventory management, production planning etc.<br />
 To cut down on speculations, I am not trying to build SAP or anything similar. I dont think, this framework will be used by anyone beyond SME.</p>
<p><strong>What is in the name?</strong><br />
 Krivah (pronounced Kree-waah) is formed by joining two Sanskrit words Kree meaning work and Vaha meaning flow. Since one of the main focus on this framework will be business workflow, joining Kree and Vaha will mean workflow. <img src='http://www.vivekkhurana.net/no-mind/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Why announcement in pre-pre-alpha ?</strong></p>
<p> Its Friday night here in India and I have whole weekend. I think by Monday morning I should be able to finish couple of task and by sometime mid-next week have something usable by end-user. Since the project is going to be open source, the sooner you release the project, the better it is. <img src='http://www.vivekkhurana.net/no-mind/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p> So stay tuned for more updates&#8230; <img src='http://www.vivekkhurana.net/no-mind/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.vivekkhurana.net%2Fno-mind%2Fintroducing-krivah%2F&amp;title=Introducing%20Krivah" id="wpa2a_2"><img src="http://www.vivekkhurana.net/no-mind/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.vivekkhurana.net/no-mind/introducing-krivah/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Revisioning in custom drupal module</title>
		<link>http://www.vivekkhurana.net/no-mind/revisioning-in-custom-drupal-module/</link>
		<comments>http://www.vivekkhurana.net/no-mind/revisioning-in-custom-drupal-module/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 17:23:19 +0000</pubDate>
		<dc:creator>Vivek Khurana</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[No category]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[cusotm module]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[revision]]></category>

		<guid isPermaLink="false">http://www.vivekkhurana.net/no-mind/?p=82</guid>
		<description><![CDATA[Today I was faced a problem with revision handling in Drupal. I was developing a custom module which had some data stored in separate DB table.  The second requirement was to be able to do revisioning on the additional data.  All was fine till I got stuck in one place. When you revert to an [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was faced a problem with revision handling in Drupal. I was developing a custom module which had some data stored in separate DB table.  The second requirement was to be able to do revisioning on the additional data.  All was fine till I got stuck in one place. When you revert to an older revision, Drupal invokes &#8216;update&#8217; op for nodeapi. In both cases, revision revert as well as &#8216;update&#8217;, &#8216;presave&#8217; op is also called. My requirement  was to be able to pull the data for the previous version and store it as new version. But the question is how do I come to know if the &#8216;presave&#8217; is called for new node, a node being edited or a revision being reverted ?</p>
<p>After some debugging I found, that when &#8216;presave&#8217; op for nodeapi is called for node revert,  the $node object has vid for the version to be reverted to and when the node is being updated, the vid is the latest vid. So, fetching the current vid of the $node in &#8216;presave&#8217; op and comparing it with the vid of the $node passed to presave operation, solved the problem. If the vid of the$node passed is same as the vid in the node table, then it is an update, else it is a node revert.</p>
<p>What about new node creation ? Well in case of new node creation the vid for $node is not set. <img src='http://www.vivekkhurana.net/no-mind/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here is the code snippet explaining the above logic</p>
<p><code><br />
 function mymodule_nodeapi(&#038;$node, $op, $arg = 0){<br />
 &nbsp;  switch($op){<br />
 &nbsp; &nbsp;case 'presave':<br />
 &nbsp; &nbsp;    if($node->vid){<br />
 &nbsp; &nbsp; &nbsp;      //node vid is set, means a this is edit or revision revert.<br />
 &nbsp; &nbsp; &nbsp;       $sql = 'select vid from {node} where  nid=%d';<br />
 &nbsp; &nbsp; &nbsp;      $vid_db = db_fetch_array(db_query($sql,$node->vid));<br />
 &nbsp; &nbsp; &nbsp;      if($node->vid == $vid_db['vid']){<br />
 &nbsp; &nbsp; &nbsp; &nbsp;         //Execute edit logic.<br />
 &nbsp; &nbsp; &nbsp;       }else{<br />
 &nbsp; &nbsp; &nbsp; &nbsp;        //Execute revision revert logic.<br />
 &nbsp; &nbsp; &nbsp;        }<br />
   &nbsp; &nbsp;   }<br />
  &nbsp;   }<br />
}<br />
</code></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.vivekkhurana.net%2Fno-mind%2Frevisioning-in-custom-drupal-module%2F&amp;title=Revisioning%20in%20custom%20drupal%20module" id="wpa2a_4"><img src="http://www.vivekkhurana.net/no-mind/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.vivekkhurana.net/no-mind/revisioning-in-custom-drupal-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why designers should learn HTML5</title>
		<link>http://www.vivekkhurana.net/no-mind/why-designers-should-learn-html5/</link>
		<comments>http://www.vivekkhurana.net/no-mind/why-designers-should-learn-html5/#comments</comments>
		<pubDate>Fri, 07 May 2010 10:36:11 +0000</pubDate>
		<dc:creator>Vivek Khurana</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[designers]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[standard]]></category>
		<category><![CDATA[w3c]]></category>

		<guid isPermaLink="false">http://www.vivekkhurana.net/no-mind/?p=75</guid>
		<description><![CDATA[Of recently I had a discussion with few designers questioning the adoption of HTML5 and why should they learn HTML5. As everyone knows HTML5 is the new upcoming standard for the browsers. HTML5 enhances browser capabilities. Many capabilities which required using javascript libraries or flash, like drag and drop or video/audio playback, can now be [...]]]></description>
			<content:encoded><![CDATA[<p>Of recently I had a discussion with few designers questioning the adoption of HTML5 and why should they learn HTML5. As everyone knows HTML5 is the new upcoming standard for the browsers. HTML5 enhances browser capabilities. Many capabilities which required using javascript libraries or flash, like drag and drop or video/audio playback, can now be done in browser natively, with HTML5.</p>
<p>But the question still remains, why should a designer waste her time in learning HTML5, when HTML5 specification is not yet complete. It makes no sense to invest time into something, because your nerd friend wants you to learn <img src='http://www.vivekkhurana.net/no-mind/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>HTML5 adoption is happening at a faster pace then you can imagine. All major browser vendors are now supporting HTML5, some have already started shipping HTML5 features in the current browser builds, while others are busy catching up. Not only browsers but several websites like youtube, facebook, scribd etc. have started HTML5 based versions. So unlike previous improvements in HTML, such as CSS, which took years to be adopted by browsers, HTML5 adoption is progressing at a healthy pace.</p>
<p>HTML5 is a standard that has took many years into making, with input from various software vendors and individuals, including designers. This process has ensured that most commonly used features of web development are supported by browsers natively, without need of any external libraries. At the same time, HTML5 has tried to add tags that will make content layout easier along with support for microformats. This makes presentation as well as sharing of data easy.</p>
<p>Though you may argue that HTML5 specification is not yet ready, then how are browsers implementing HTML5 ? This is acceptable. HTML5 is a big standard. It is so big that during the discussion stages, HTML5 specification has to be broken down into couple of smaller standards. Standardization process require drafts to be published and comments be received. Once drafts are published, the core ideas /features/processes/algorithms are rarely changed. Although it will take couple of years for the full specification to be ready, test suite be prepared and browsers passing those test. You can safely assume that the features/algorithms defined in the standard will not change.</p>
<p>So, no harm in investing time into learning HTML5 as it is going to become the defacto standard for web based applications in the decade to come.</p>
<p>How to learn HTML5 ? There are lots of tutorials available on the internet on HTML5. You can also, keep an eye on this blog, as there will many posts in near future, explaining various features of HTML5.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.vivekkhurana.net%2Fno-mind%2Fwhy-designers-should-learn-html5%2F&amp;title=Why%20designers%20should%20learn%20HTML5" id="wpa2a_6"><img src="http://www.vivekkhurana.net/no-mind/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.vivekkhurana.net/no-mind/why-designers-should-learn-html5/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Css3 &#8211; HSLA color model</title>
		<link>http://www.vivekkhurana.net/no-mind/css3-hsla-color-model/</link>
		<comments>http://www.vivekkhurana.net/no-mind/css3-hsla-color-model/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 02:37:53 +0000</pubDate>
		<dc:creator>Vivek Khurana</dc:creator>
				<category><![CDATA[css3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[color model]]></category>
		<category><![CDATA[hsl]]></category>

		<guid isPermaLink="false">http://www.vivekkhurana.net/no-mind/?p=71</guid>
		<description><![CDATA[The css3 candidate recommendation from W3C brings HSL (hue-saturation-lightness) model to web browser. This model is a complement to RGBA model supported by CSS. While RGBA provides a method for defining color, RGBA model reflects how CRT&#8217;s understand color. Humans on the other hand have a different thinking process for color. HSL model is closer [...]]]></description>
			<content:encoded><![CDATA[<p>The css3 candidate recommendation from W3C brings HSL (hue-saturation-lightness) model to web browser. This model is a complement to RGBA model supported by CSS. While RGBA provides a method for defining color, RGBA model reflects how CRT&#8217;s understand color. Humans on the other hand have a different thinking process for color. HSL model is closer to how a human would pick a color.</p>
<p><strong>So what is HSL model ?</strong></p>
<p><strong><span style="font-weight: normal;">To understand HSL model, let us first look at how a human would pick a color. When you want to paint your room, how will you choose the color(s) of the wall ?  You will first choose a base color that is,  you will choose whether you want read, blue, yellow, pink or any other color. Then you will decide on the shade and tone of the color, to select the exact color you want. You will never go about piking the values of red, green and blue and mixing them to find the color you want. </span></strong></p>
<p><strong><span style="font-weight: normal;">Artist follow a more streamlined approach to picking a color. Artist paint a <a title="Color wheel on wikipedia" href="http://en.wikipedia.org/wiki/Color_wheel" target="_blank">color wheel</a> , in which color hues are organized in a<a title="Color circle" href="http://upload.wikimedia.org/wikipedia/commons/c/c8/RYB_color_circle_1904.png" target="_blank"> circle</a>.  Once the color hue is decided, an artist would decide on the tone of the color that is, what is the blueness of blue or what is the redness of red, whether to use pure blue or to mix it with some yellow. Tones for a color are generated by mixing pure colors or a shade of gray . Lastly comes the shade of the color or how dark the color will be. Shades of color can be created by mixing white or black, to vary the darkness of the color. When all three; hue, tone and shade are decided, artist arrives at the color he wanted.</span></strong></p>
<p><strong><span style="font-weight: normal;">HSL model is closer to the way an artist or a normal human would choose a color. HSL is represented by a triple (hue, saturation, lightness). Hue is represents the <a title="Hue values." href="http://upload.wikimedia.org/wikipedia/commons/a/ad/HueScale.svg" target="_blank">angle</a> in the color wheel.  Red is 0 or 360, greenis 120, blue is 240 etc. Saturation and lightness are represented by percentages. Saturation varies from 100% for full saturation to 0% for shade of gray. Lightness varies from 100% for white to 0% for black.</span></strong></p>
<p><strong>HSL model in CSS3</strong></p>
<p>In CSS3 HSL model supports a fourth argument, opacity or the alpha channel. Opacity value of one is fully opaque while opacity value of 0 is fully transparent. Following example defines a semitransparent solid blue using HSL/A model.</p>
<pre>p { color: hsla(240, 100%, 50%, 0.5) }</pre>
<pre></pre>
<p><strong>Advantages of HSL model</strong></p>
<p>HSL model is intuitive and closer to how humans think of color. RGBA model on the other hand will require some sort of internal translation by a human, to visualize the actual color.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.vivekkhurana.net%2Fno-mind%2Fcss3-hsla-color-model%2F&amp;title=Css3%20%26%238211%3B%20HSLA%20color%20model" id="wpa2a_8"><img src="http://www.vivekkhurana.net/no-mind/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.vivekkhurana.net/no-mind/css3-hsla-color-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scalable application architectures &#8211; stability</title>
		<link>http://www.vivekkhurana.net/no-mind/scalable-application-architectures-stability/</link>
		<comments>http://www.vivekkhurana.net/no-mind/scalable-application-architectures-stability/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 18:01:52 +0000</pubDate>
		<dc:creator>Vivek Khurana</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[software architecture]]></category>
		<category><![CDATA[fault tolerance]]></category>
		<category><![CDATA[scalable applications]]></category>
		<category><![CDATA[software design]]></category>
		<category><![CDATA[software testing]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[transactions]]></category>

		<guid isPermaLink="false">http://www.vivekkhurana.net/no-mind/?p=61</guid>
		<description><![CDATA[Recently I started working on an application that will have to cater to the needs of thousands of users. It is not just the number of users but the application needs to aggregate data from multiple web services and push data to multiple webservice. This might sound as a simple but when you have to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I started working on an application that will have to cater to the needs of thousands of users. It is not just the number of users but the application needs to aggregate data from multiple web services and push data to multiple webservice. This might sound as a simple but when you have to talk to about 30 webservice which have nothing in common except the HTTP and XML. Each webservice represents data in different format even though most of them deal with a simple text document. This means we need to figure out a way to create the business object from multiple sources at the same time keep the application linear. The complexity of the requirements increases by leaps and bounds when you have to work with live data. Yup, live up to date data. So the only way out seems to be to have a stateless, asynchronous design. But it is not easy to write stateless asynchronous applications <img src='http://www.vivekkhurana.net/no-mind/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>You may argue that why am I worried about the scalability of the application. Let the design evolve over a time. My experience with building applications is that, you cannot have a scalable design that &#8220;evolves&#8221;.  Not without tons of hard work later and not without breaking few things.  Writing scalable applications is like building an earthquake resistant skyscrapper. You cannot wait for the earthquake to come before you will start working on making the building earthquake resistant. You have to design it up front and test the model in lab before you lay the foundation stone of the building.</p>
<p>So what exactly is scalable. The sad part of computer industry is, we still dont have a scale to measure the scalability. What works for one set of data may fail for another set of data. A friend of mine suggested that, he measures his application profitability if the cost per transaction is less than the revenue per transaction.  I think the logical way to measure scalability would be, to measure how far the application can scale while keeping cost per transaction lower than the revenue per transaction <img src='http://www.vivekkhurana.net/no-mind/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So lets try to define stability. To  an end user stability means that the system is available and capable of doing transaction irrespective load.  So first we need to identify what hampers system availability.</p>
<ol>
<li>Sudden surge of requests (like being slashdotted)</li>
<li>Large number of requests being received continuous  over a period of time.</li>
<li>Internal problems like memory leaks.</li>
</ol>
<p>For point 1 we do have a solution. Do a load testing. That should give you an indication how long the system will survive before crashing under the load of sudden surge of request or in short what category of earthquake can building handle.</p>
<p>What about point number 2 ? How do you test a system under large number of continuous requests ? Do you do load testing for couple of days before releasing a new build in production ? One may argue that given the way most internet companies work, you have release the work very often. Acceptable point, but what is the use of adding that on cool new feature, that your marketing guy wants like anything, without testing the system stability ? If your cool new feature crashes it is only going to shake users confidence. To handle the point number 2, you need to test your application under different load conditions continuously for few days. I remember building a stock market ticker which would pass all the tests in development but crash in production. We found later that when the application was in productopn for 3 days continuously, some parts of application suffered from data overflow. Though it might sound a stupid mistake from a developer but the fact is the company suffered considerable losses due to repeatedly crashing application. And this was in the era when stock ticker from webservices was a new feature on the internet and every business head of a financial site, wanted to have the feature on the site because some competitor had it.</p>
<p>Testing for longevity of application is a very important test that is ignored more often than it is conducted. A test for longevity can bring out bugs in application that will go untraced in any other type of testing. The test of longevity needs to handle different load conditions under different time. It is equally important to measure the performance of the application during night conditions (low load) to peak conditions (day time).  Performance of different systems as the application load ramps up or down could reveal certain startling facts about your application.</p>
<p>What about point number 3 ? It takes some experience to identify internal problems. For instance memory leak can only be identified by seasoned programmer as compared to a johnny. So code review plays an important part here.  But what ever you do, some or the other internal problem will arise.  You need to build safety nets for such situations. Like building air bags for front passengers which inflate automatically when the car is hit.  Such impact absorbers will be able to handle internal problems and yet let the system perform or what is known as fault tolerance.</p>
<p>So keeping above points in mind, I have started designing the application. Currently I am evaluating whether to use a RDBMS or go with no-sql. Will post about the same when I arrive to a decision <img src='http://www.vivekkhurana.net/no-mind/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p>More later&#8230;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.vivekkhurana.net%2Fno-mind%2Fscalable-application-architectures-stability%2F&amp;title=Scalable%20application%20architectures%20%26%238211%3B%20stability" id="wpa2a_10"><img src="http://www.vivekkhurana.net/no-mind/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.vivekkhurana.net/no-mind/scalable-application-architectures-stability/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A rose by any other name will end up as a cabbage</title>
		<link>http://www.vivekkhurana.net/no-mind/a-rose-by-any-other-name-will-end-up-as-a-cabbage/</link>
		<comments>http://www.vivekkhurana.net/no-mind/a-rose-by-any-other-name-will-end-up-as-a-cabbage/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 04:17:30 +0000</pubDate>
		<dc:creator>Vivek Khurana</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[software architecture]]></category>
		<category><![CDATA[axiom]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[requirement specification]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.vivekkhurana.net/no-mind/?p=49</guid>
		<description><![CDATA[Last night a friend of mine pointed me to the 97 things wiki and an interesting axiom &#8220;A rose by any other name will end up as a cabbage&#8220;. The axiom page talked about how you should name the components in a software project. The idea arises from a simple argument &#8220;If you don&#8217;t know [...]]]></description>
			<content:encoded><![CDATA[<p>Last night a friend of mine pointed me to the 97 things wiki and an interesting axiom &#8220;<a title="link to wiki page" href="http://97-things.near-time.net/wiki/a-rose-by-any-other-name-will-end-up-as-a-cabbage" target="_blank">A rose by any other name will end up as a cabbage</a>&#8220;. The axiom page talked about how you should name the components in a software project. The idea arises from a simple argument &#8220;If you don&#8217;t know what it is to be called you don&#8217;t know what it is&#8221;.</p>
<p>In my opinion natural languages are the best tools for describing the requirements of a project.  Although diagrams are very helpful in explaining the overall logic or flow, but the details of the requirement should always be explained in natural language such as plain English. When requirements are written in plain English, you can toss the requirements across users for comments and get feedback at an early stage of software development. Not all users can understand the complexities of state machines, use case diagrams, ER diagrams etc. but all of them  understand, jargon free simple English. Yes, you can use any other natural language than English, when working with non-English speaking population.</p>
<p>Another advantage of using a natural language to describe requirement is that you get a natural abstraction layer called &#8216;name&#8217;. When you name something you try to come up with a mental abstraction based on the major characteristics of a (physical) object and second time you have to refer to same object or collection of characteristics you call it by a name, instead of long description of the object.  When you see a repeating pattern, give that a name. When you see a bunch of instructions to be executed repeatedly give it a name. When you see an interface, give it a name. At the same time ensure that the name is specific enough to convey the characteristics (eg. cheap,fast,easy, strong etc.) of the abstraction or object. A name that is not specific enough points to lack of clarity in the abstraction layer and is a sign of either too much of abstraction in the system or over engineering. At the same time you need not build abstraction only when you see lots of features being clubbed. An interface might implement only two or three features but the frequency of repetition of those features will make them as a candidate for abstraction and thus a name.</p>
<p>Creating abstraction comes natural to all the humans and it is easy for us to identify things by a name. May be that is why we came up with an idea of commands to computers because it was easier for a human to remember a single command instead of typing a set of instructions to see a list of files in a directory for example.  We further progressed into creating scripts which would be a collection of commands (essentially an abstraction), giving name to a script and then remembering the name as a command.</p>
<p>When you are designing a new software, having a specific name for a component will create the abstraction automatically.  But do watch out if you have too many names in your requirements, you might be suffering from over engineering and you might have created too many abstractions&#8230;</p>
<p>Who says whats in the name ?</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.vivekkhurana.net%2Fno-mind%2Fa-rose-by-any-other-name-will-end-up-as-a-cabbage%2F&amp;title=A%20rose%20by%20any%20other%20name%20will%20end%20up%20as%20a%20cabbage" id="wpa2a_12"><img src="http://www.vivekkhurana.net/no-mind/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.vivekkhurana.net/no-mind/a-rose-by-any-other-name-will-end-up-as-a-cabbage/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Playing with dejavu</title>
		<link>http://www.vivekkhurana.net/no-mind/playing-with-dejavu/</link>
		<comments>http://www.vivekkhurana.net/no-mind/playing-with-dejavu/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 05:38:44 +0000</pubDate>
		<dc:creator>Vivek Khurana</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[RDBMS]]></category>
		<category><![CDATA[dejavu]]></category>
		<category><![CDATA[ORM]]></category>

		<guid isPermaLink="false">http://www.vivekkhurana.net/no-mind/?p=44</guid>
		<description><![CDATA[So spend last night messing around with dejavu orm. While I was chatting with dejavu team over IRC and pointing bugs, fumanchu was busy fixing them asap. We had 3 revisions of dejavu in one hour and one new ticket.  It turned out that geniusql can not handle NULL in mysql timestamp type. Mysql&#8217;s timestamp [...]]]></description>
			<content:encoded><![CDATA[<p>So spend last night messing around with dejavu orm. While I was chatting with dejavu team over IRC and pointing bugs, fumanchu was busy fixing them asap. We had 3 revisions of dejavu in one hour and one new ticket.  It turned out that geniusql can not handle NULL in mysql timestamp type. Mysql&#8217;s timestamp is a badly designed data type, from the manual, &#8220;TIMESTAMP columns are NOT NULL by default, cannot contain NULL values, and assigning NULL assigns the current timestamp. However, a TIMESTAMP column can be allowed to contain NULL by declaring it with the NULL attribute&#8221;.  Now that&#8217;s a horrible way to design a datatype. To support both NULL and NOT NULL, some modifications are required in the geniusql and a ticket has been filed for the same.</p>
<p>So dejavu 2.0 is becoming stable day by day&#8230; Enjoy&#8230;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.vivekkhurana.net%2Fno-mind%2Fplaying-with-dejavu%2F&amp;title=Playing%20with%20dejavu" id="wpa2a_14"><img src="http://www.vivekkhurana.net/no-mind/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.vivekkhurana.net/no-mind/playing-with-dejavu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software fault tolerance</title>
		<link>http://www.vivekkhurana.net/no-mind/software-fault-tolerance/</link>
		<comments>http://www.vivekkhurana.net/no-mind/software-fault-tolerance/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 05:29:31 +0000</pubDate>
		<dc:creator>Vivek Khurana</dc:creator>
				<category><![CDATA[Fault]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[fault tolerance]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[software architecture]]></category>

		<guid isPermaLink="false">http://www.vivekkhurana.net/no-mind/?p=34</guid>
		<description><![CDATA[Ever got frustrated when your software stops responding and crashes, throwing a popup message asking you to send the information to xyz developer? With increasing complexity in the software we see an increasing trend of software hangups. The classic case was the windows blue screen. Thanks to microsoft for getting rid of ugly blue screen [...]]]></description>
			<content:encoded><![CDATA[<p>Ever got frustrated when your software stops responding and crashes, throwing a popup message asking you to send the information to xyz developer? With increasing complexity in the software we see an increasing trend of software hangups. The classic case was the windows blue screen. Thanks to microsoft for getting rid of ugly blue screen and keeping windows OS running when one program misbehaves.</p>
<p>Even though whole world was fed up with blue screen, programmers have  not yet learned that one action by a misbehaving component should not bring the whole system down. With rise of web 2.0 we have seen rise in rich internet applications and a rise in hanging browsers. One misbehaving plugin or a misbehaving tab can crash the whole browser. Gosh, have they forgotten about keeping program stable while writing the initial code ? or introduce new uber cool unstable feature was more important than overall software performance ?</p>
<p>It is very easy to blame software authors for all the mess but lets spend some time trying to understand what causes software to fail and how to avoid failures.</p>
<p>Software failure can be divided in 3 parts, error,fault and failure. Fault or bug is that produces error and error leads to failure. Error is a state of the system under investigation, a state that can bring down the whole system. So our discussion will focus on handling the system states that are liable for failures. Fault tolerance is the set of techniques aimed at detecting, isolating and recovering from computational state that can lead to failure. In <a title="Link to book on amazon" href="http://www.amazon.com/Software-Tolerance-Techniques-Implementation-Computer/dp/1580531377/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1230604447&amp;sr=8-1" target="_blank">Software fault tolerance techniques and implementations</a> Laura Pullum  identifies 4 steps for fault tolerance viz</p>
<ol>
<li>Error identification or detection</li>
<li>Error diagnostic to identify the cause of error.</li>
<li>Error containment to prevent further damage.</li>
<li>Error recovery the transition from erroneous state to error-free state.</li>
</ol>
<p>The simplest approach to faul tolerance is try-catch block in OOP. As soon as an error is detected an exception is thrown and a catch block isolates the error giving an option to recover from the fault.  Simple solution which works&#8230;  But OOP is a programming language feature whereas software is made of components, so one example is not enough. In this series I will pick examples from foss projects and show how fault tolerance can be built into a system. So see you for more&#8230;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.vivekkhurana.net%2Fno-mind%2Fsoftware-fault-tolerance%2F&amp;title=Software%20fault%20tolerance" id="wpa2a_16"><img src="http://www.vivekkhurana.net/no-mind/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.vivekkhurana.net/no-mind/software-fault-tolerance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Saturday code jam details</title>
		<link>http://www.vivekkhurana.net/no-mind/saturday-code-jam-details/</link>
		<comments>http://www.vivekkhurana.net/no-mind/saturday-code-jam-details/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 17:09:48 +0000</pubDate>
		<dc:creator>Vivek Khurana</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.vivekkhurana.net/no-mind/?p=27</guid>
		<description><![CDATA[So we seem to be all set for saturday code jam on 20th Dec. 2008. What you need to join the code jam You should have a laptop with python installed. You should know some python programming (read &#8220;hello world&#8221;) You should be ready to work on completely new software. You should be willing to [...]]]></description>
			<content:encoded><![CDATA[<p>So we seem to be all set for saturday code jam on 20th Dec. 2008. What you need to join the code jam</p>
<ol>
<li>You should have a laptop with python installed.</li>
<li>You should know some python programming (read &#8220;hello world&#8221;)</li>
<li>You should be ready to work on completely new software.</li>
<li>You should be willing to opensource your code.</li>
<li>If you are proficient with python, come with cherrypy, dejavu, simplejson and jquery installed.</li>
<li>If you dont know python but know databases, still you can join, we will need good db guys.</li>
<li>You should know how to use git.</li>
<li>You should be willing to code without internet, though python manual will be available.</li>
</ol>
<p>So see you at code jam..</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.vivekkhurana.net%2Fno-mind%2Fsaturday-code-jam-details%2F&amp;title=Saturday%20code%20jam%20details" id="wpa2a_18"><img src="http://www.vivekkhurana.net/no-mind/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.vivekkhurana.net/no-mind/saturday-code-jam-details/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Saturday code jam</title>
		<link>http://www.vivekkhurana.net/no-mind/saturday-code-jam/</link>
		<comments>http://www.vivekkhurana.net/no-mind/saturday-code-jam/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 17:05:57 +0000</pubDate>
		<dc:creator>Vivek Khurana</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[code jam]]></category>

		<guid isPermaLink="false">http://www.vivekkhurana.net/no-mind/?p=21</guid>
		<description><![CDATA[Inspired by foss.in workouts, I am arranging a small hack session in my office this Saturday, 20th Dec 2008.  We plan to hack some core features for stipend platform to get the basic application running. Already 3 people have confirmed and I have space left for 3 more. Sorry cant accommodate more than 6 people [...]]]></description>
			<content:encoded><![CDATA[<p>Inspired by foss.in workouts, I am arranging a small hack session in my office this Saturday, 20th Dec 2008.  We plan to hack some core features for stipend platform to get the basic application running. Already 3 people have confirmed and I have space left for 3 more. Sorry cant accommodate more than 6 people due to space restriction.</p>
<p>Oh yes&#8230; we are trying this hack session without wifi&#8230; Lets see how far we go&#8230; and if you are interested ping me&#8230; hurry&#8230;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.vivekkhurana.net%2Fno-mind%2Fsaturday-code-jam%2F&amp;title=Saturday%20code%20jam" id="wpa2a_20"><img src="http://www.vivekkhurana.net/no-mind/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.vivekkhurana.net/no-mind/saturday-code-jam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

