<?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>Computing Life</title>
	<atom:link href="http://computinglife.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://computinglife.wordpress.com</link>
	<description>Insights from the world of computing</description>
	<lastBuildDate>Fri, 09 Dec 2011 04:15:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='computinglife.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Computing Life</title>
		<link>http://computinglife.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://computinglife.wordpress.com/osd.xml" title="Computing Life" />
	<atom:link rel='hub' href='http://computinglife.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Way of the warrior &#8230;</title>
		<link>http://computinglife.wordpress.com/2011/03/29/way-of-the-warrior/</link>
		<comments>http://computinglife.wordpress.com/2011/03/29/way-of-the-warrior/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 01:14:20 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Samurai]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=793</guid>
		<description><![CDATA[The other day, while automating our load tests, (you heard that right &#8211; we are even automating load tests as part of agile efforts) i came across an interesting scenario. Load runner, which we where using to automate the clustered web application, spread all its output across tons of small files, containing one/many similar lines. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=793&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><a href="http://en.wikipedia.org/wiki/Zat%C5%8Dichi_%282003_film%29"><img class="aligncenter" title="Zatoichi " src="http://ia.media-imdb.com/images/M/MV5BMjkyNjA1Nzg2OF5BMl5BanBnXkFtZTcwMDk2OTUyMQ@@._V1_.jpg" alt="" width="180" height="270" /></a></p>
<p>The other day, while automating our load tests, (you heard that right &#8211; we are even automating load tests as part of agile efforts) i came across an interesting scenario.</p>
<p>Load runner, which we where using to automate the clustered web application, spread all its output across tons of small files, containing one/many similar lines. The 2-3 lines each file contained would look something like this</p>
<blockquote><p><em>Report.c(199): Error: App Error: refresh report. DataSet took longer than the refresh rate to load.  This may indicate a slow database (e.g. HDS) [loadTime: 37.708480, refreshRate: 26].      [MsgId: MERR-17999]</em><br />
<em>Report.c(83): Error: App Error: report took longer than refresh rate: 26; iter: 32;  vuser: ?; total time 41.796206    [MsgId: MERR-17999]</em></p></blockquote>
<p>But what we wanted to know to know at the end of the test was a summary of errors as in</p>
<ul>
<li><em>Report.c(199): Error: App Error: refresh report. DataSet took longer  than the refresh rate to load.  This may indicate a slow database (e.g.  HDS) &#8211; 100 errors</em></li>
<li><em>Report.c(200) Error Null arguments &#8211; 50 errors </em></li>
</ul>
<h2>Approaching the solution</h2>
<p>How would you solve this problem ? Think for a moment and not more &#8230;.</p>
<p>Well being the C++ junkie that i&#8217;m, i immediately saw an oppurtunity to apply my sword and utility belts of hash-tables / efficient string comparisons etc and whipped out Visual Studio 2010 (i havent used 2010 too much and wanted to use it) and then it occured to me</p>
<p>Why not use Java ? I had recently learned it and it might be easier.</p>
<h2>The Final Solution</h2>
<blockquote><p>cat *.log | sed  &#8216;s/total time \([0-9]*\)\.\([0-9]*\)/total time/;s/loadTime: \([0-9]*\)\.\([0-9]*\)/loadTime: /;s/iter: \([0-9]*\)/iter: /;s/refresh rate: \([0-9]*\)/refresh rate:  /;s/refreshRate: \([0-9]*\)/refreshRate:  /&#8217; | sort | uniq –c</p></blockquote>
<p>I probably should optimize the sed list of commands such that i can pass in the replacement commands as input to sed from a file. But i left it at that, happy that my solution was ready to use / would work all the time / does not require maintenance / saved me a lot of time.</p>
<h2>The end</h2>
<p>&nbsp;</p>
<p>Thinking about the episode, i was reminded of the hit Japanese samurai movie Zatoichi and its happy ending at the end.</p>
<ul>
<li>The villain (problem) is dead</li>
<li>Samurai is happy with his effort</li>
<li>The subjects (files/compiler/system/software/hardware) are happy due to the efficiency created</li>
<li>Karma (company + job) is happy due to the time saved.</li>
</ul>
<p>and to boot it nearly follows the <a href="http://www.customerthink.com/blog/sun_tzu_and_the_art_of_war_avoid_direct_confrontations_at_all_costs" target="_blank">Art of War</a> zen which advices the clever warrior to win without pulling out his sword &#8230;</p>
<p>&nbsp;</p>
<p>Happy coding !!!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/793/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/793/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/793/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/793/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/793/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/793/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/793/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/793/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/793/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/793/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/793/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/793/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/793/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/793/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=793&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2011/03/29/way-of-the-warrior/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>

		<media:content url="http://ia.media-imdb.com/images/M/MV5BMjkyNjA1Nzg2OF5BMl5BanBnXkFtZTcwMDk2OTUyMQ@@._V1_.jpg" medium="image">
			<media:title type="html">Zatoichi </media:title>
		</media:content>
	</item>
		<item>
		<title>Good reads from around the Web</title>
		<link>http://computinglife.wordpress.com/2010/08/06/good-reads-from-around-the-web-2/</link>
		<comments>http://computinglife.wordpress.com/2010/08/06/good-reads-from-around-the-web-2/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 09:38:55 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Good reads]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=782</guid>
		<description><![CDATA[What if you had bought Apple stock instead of Apple products How to find and keep crappy programmers Why japan is doomed (and US and EU too) 97 things every architect should know about ilities a software system can have How a small town went bust much like US and Greece<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=782&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kyleconroy.com/apple-stock.php" target="_blank">What if you had bought Apple stock instead of Apple products</a></p>
<p>How to <a href="http://www.codeanthem.com/blog/2010/04/how-to-hire-crappy-programmers-the-job-post/" target="_blank">find</a> and <a href="http://www.codeanthem.com/blog/2010/04/how-to-keep-crappy-programmers" target="_blank">keep</a> crappy programmers</p>
<p><a href="http://www.oftwominds.com/blogaug10/Japan-doomed07-10.html" target="_blank">Why japan is doomed (and US and EU too)</a></p>
<div id="_mcePaste"><a href="http://97things.oreilly.com/wiki/index.php/97_Things_Every_Software_Architect_Should_Know_-_The_Book" target="_blank">97 things every architect should know about</a></div>
<div></div>
<div id="_mcePaste"><a href="http://en.wikipedia.org/wiki/Ilities" target="_blank">ilities a software system can have</a></div>
<p><a href="http://www.rollingstone.com/politics/news/12697/64833?RS_show_page=0" target="_blank">How a small town went bust much like US and Greece</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/782/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/782/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/782/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/782/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/782/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/782/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/782/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/782/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/782/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/782/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/782/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/782/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/782/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/782/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=782&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2010/08/06/good-reads-from-around-the-web-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>
	</item>
		<item>
		<title>VS 2010 Solution Explorer Feature Design</title>
		<link>http://computinglife.wordpress.com/2010/07/31/vs-2010-solution-explorer-feature-design/</link>
		<comments>http://computinglife.wordpress.com/2010/07/31/vs-2010-solution-explorer-feature-design/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 06:44:35 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=774</guid>
		<description><![CDATA[The not so new VS 2010 has added what seems like a cool feature in the solution explorer window. It shows all your external dependencies But wait a minute,  what is all this that you see when you expand the external dependencies ? The drop down shows ALL the dependencies, even those that are indirectly [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=774&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The not so new VS 2010 has added what seems like a cool feature in the solution explorer window. It shows all your external dependencies</p>
<p><a href="http://computinglife.files.wordpress.com/2010/07/vs-2010-external-dependencies.jpg"><img class="aligncenter size-full wp-image-776" title="vs 2010 External dependencies" src="http://computinglife.files.wordpress.com/2010/07/vs-2010-external-dependencies.jpg?w=510" alt=""   /></a></p>
<p>But wait a minute,  what is all this that you see when you expand the external dependencies ?</p>
<p><a href="http://computinglife.files.wordpress.com/2010/07/vs-2010-depe-expanded.jpg"><img class="aligncenter size-full wp-image-777" title="vs 2010 depe expanded" src="http://computinglife.files.wordpress.com/2010/07/vs-2010-depe-expanded.jpg?w=510" alt=""   /></a></p>
<p>The drop down shows ALL the dependencies, even those that are indirectly pulled in. The feature is useful but i wish someone had put a thought into how it is used &#8230; If i had been shown the layered dependencies, that showed the directly referred h files and then the ones that are further pulled in and so on, it might have been more usable.</p>
<p>Wish someone from Microsoft does hear this and make amends !!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/774/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=774&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2010/07/31/vs-2010-solution-explorer-feature-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>

		<media:content url="http://computinglife.files.wordpress.com/2010/07/vs-2010-external-dependencies.jpg" medium="image">
			<media:title type="html">vs 2010 External dependencies</media:title>
		</media:content>

		<media:content url="http://computinglife.files.wordpress.com/2010/07/vs-2010-depe-expanded.jpg" medium="image">
			<media:title type="html">vs 2010 depe expanded</media:title>
		</media:content>
	</item>
		<item>
		<title>Create your own OS</title>
		<link>http://computinglife.wordpress.com/2010/07/28/create-your-own-os/</link>
		<comments>http://computinglife.wordpress.com/2010/07/28/create-your-own-os/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 14:04:58 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Appliance model]]></category>
		<category><![CDATA[Custom distribution]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[OS]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=768</guid>
		<description><![CDATA[I remember during the days of Slackware free CD and windows 98 , how me and my friends used to customize the OS installation to make it lean and very fast, on the almost always older hardware we had to run them on. But anytime we had to install or test a new software we [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=768&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I remember during the days of Slackware free CD and windows 98 , how me and my friends used to customize the OS installation to make it lean and very fast, on the almost always older hardware we had to run them on. But anytime we had to install or test a new software we had found or someone had shared, it would break the entire install and we had to re-install stuff from scratch.</p>
<p>Even ghosting was not an option those days, since (Well we hadn&#8217;t heard of that back then) and the hard disk sizes was changing so often, we had to keep upgrading them every now and then.</p>
<p>Now finally, there is a <a href="http://susestudio.com/" target="_blank">PERFECT solution for this</a> &#8211; create your own OS image or appliance (if you are into selling devices) using free software and cool web applications -</p>
<p>SUSE studio allows you to -</p>
<ul>
<li>choose the packages you want, (automatic dependency pull in)</li>
<li>default customizations (locale, users, startup, installation scripts etc)</li>
<li>copy your own files into the final system</li>
</ul>
<p>You can finally create an installable image, of that perfect OS you had always dreamt of. Or at least the one we guys used to dream of.</p>
<p>Watch the web casts  on the home page and <a href="http://susestudio.com/#screencast" target="_blank">dedicated screen cast page</a>. They are really cool. I wish this could be done with windows too and it would be god send for folks who sell computers or sell applications to dumb end customers. wow !!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/768/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/768/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/768/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/768/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/768/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/768/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/768/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=768&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2010/07/28/create-your-own-os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>
	</item>
		<item>
		<title>Coping with overload?</title>
		<link>http://computinglife.wordpress.com/2010/07/23/coping-with-overload/</link>
		<comments>http://computinglife.wordpress.com/2010/07/23/coping-with-overload/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 10:36:57 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Management]]></category>
		<category><![CDATA[Unrelated]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[information overload]]></category>
		<category><![CDATA[time management]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=760</guid>
		<description><![CDATA[I read a lot of blogs (or at least i used to). After neglecting my enthusiastic collection of blog links (157) of THE top most readable material on the web for over an year, i decided it was time to change. I made 3 folders Check daily &#8211; contains max 10 blogs i will check [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=760&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I read a lot of blogs (or at least i used to). After neglecting my enthusiastic collection of blog links (157) of THE top most readable material on the web for over an year, i decided it was time to change.</p>
<p>I made 3 folders</p>
<ul>
<li>Check daily &#8211; contains max 10 blogs i will check and read new articles from</li>
<li>Tech Stuff &#8211; Has blogs, tech news and lots of similar stuff</li>
<li>Photography stuff</li>
</ul>
<p>The point is, the only way i could catch up on my reading was if i was not trying to catch up with a lot of things. In short, i was coping with information overload by just ignoring all that information.</p>
<p>So my solution was to arrange stuff so that i could catch up with the ones that mattered. The rest, well i might flip through them on evenings or weekends IF i get around doing that and i would still be better than before, and not ignore it totally.</p>
<p><strong>Where else do we face overload and how do you cope ? </strong></p>
<p><a href="http://computinglife.files.wordpress.com/2010/07/information_overload.jpg"><img class="aligncenter size-full wp-image-761" title="information_overload" src="http://computinglife.files.wordpress.com/2010/07/information_overload.jpg?w=510" alt=""   /></a></p>
<ul>
<li>email accounts</li>
<li>Electronic stuff that you work with/want to buy</li>
<li>Health notes from forwards and emails</li>
<li>List of things to do / read etc</li>
<li>Things to keep track off, and manage at work</li>
<li>Education (exams skipped during school coz you would not score anyway?)</li>
<li>Weight loss &#8211; (So much to do, might as well not try)</li>
<li>Social Networking updates ?</li>
<li>Cooking ?</li>
<li>Stocks and Financial info ?</li>
</ul>
<p>I wonder if there is<a href="http://www.readwriteweb.com/archives/info_overload_the_problem.php" target="_blank"> any other way to cope with overload</a>, other than just filtering  &#8230; outsourcing  ??</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/760/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/760/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/760/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/760/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/760/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/760/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/760/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/760/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/760/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/760/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/760/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/760/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/760/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/760/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=760&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2010/07/23/coping-with-overload/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>

		<media:content url="http://computinglife.files.wordpress.com/2010/07/information_overload.jpg" medium="image">
			<media:title type="html">information_overload</media:title>
		</media:content>
	</item>
		<item>
		<title>Cisco promoting free beer :)</title>
		<link>http://computinglife.wordpress.com/2010/07/22/cisco-promoting-free-beer/</link>
		<comments>http://computinglife.wordpress.com/2010/07/22/cisco-promoting-free-beer/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 10:48:25 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Free software]]></category>
		<category><![CDATA[GIMP]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=757</guid>
		<description><![CDATA[It had to happen &#8211; organizations are starting to warm up to stable free applications like GIMP. In fact CISCO notice boards (aka active LCD displays) has started asking employees whether they are using the free apps. Once this trend takes hold, we might at last see the uptake FSF hoped to see, in Free (Free [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=757&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It had to happen &#8211; organizations are starting to warm up to stable <a href="http://www.masternewmedia.org/news/2006/10/24/what_is_free_software_a.htm" target="_blank">free applications</a> like<a href="http://www.gimp.org/" target="_blank"> GIMP</a>. In fact CISCO notice boards (aka active LCD displays) has started asking employees whether they are using the free apps. Once this trend takes hold, we might at last see the uptake FSF hoped to see, in Free (<a href="http://www.c2.com/cgi/wiki?FreeAsInBeer" target="_blank">Free as in Free beer</a>) applications and other <a href="http://www.google.co.in/url?sa=t&amp;source=web&amp;cd=3&amp;ved=0CCwQFjAC&amp;url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FGNU&amp;ei=1_NHTITgOIXOvQOAiv3DDg&amp;usg=AFQjCNEgN_dN7dBC1bjOvanIZG9qfqcF-g" target="_blank">GNU</a> apps &#8230;.</p>
<p>The significance of this move is the implication that companies like CISCO are ready to provide internal support and has made resources available to support free apps like GIMP, or are paying someone else to do this, which basically means the same thing. This is really cool.</p>
<p>The loss of social stigma against uptake of free applications is the most important <em>win</em> here for the software development community as a whole. wow !! I guess we shall now see lots of small startups come up to support the free software and hopefully  this would mean more volunteers to add features and fix issues in free software.</p>
<p>FSF rocks !!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/757/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/757/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/757/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/757/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/757/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/757/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/757/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/757/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/757/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/757/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/757/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/757/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/757/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/757/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=757&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2010/07/22/cisco-promoting-free-beer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Server Table Variables vs Temp tables</title>
		<link>http://computinglife.wordpress.com/2010/07/21/temporary-table-variables-vs-temp-tables/</link>
		<comments>http://computinglife.wordpress.com/2010/07/21/temporary-table-variables-vs-temp-tables/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 10:41:01 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[SQL-Server]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=754</guid>
		<description><![CDATA[Some time back i encountered a scenario, in which a chain of stored procedures gets called recursively and this was eating into our performance (90% cpu time). All of a sudden obscure micro issue about whether to use table variable or temp tables suddenly became important. After ferreting out some good sources of information on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=754&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">Some time back i encountered a scenario, in which a chain of stored procedures gets called recursively and this was eating into our performance (90% cpu time). All of a sudden obscure micro issue about whether to use table variable or temp tables suddenly became important.</div>
<div id="_mcePaste">After ferreting out some good sources of information on comparing these, we managed to reduce the cpu consumption by</div>
<div></div>
<div>
<ul>
<li>Making all our stored proc use temp tables rather than table variables made a difference for us, because our procedures where getting invoked frequently and stored-procedures are recompiled every time if table variables are used.</li>
<li> But we had minimal impact from db writes due to temp tables because very few data was actually used</li>
</ul>
</div>
<div><span style="text-decoration:underline;">Ultimately the maximum improvement came from changes to the algorithm to make sure that the procedures do not get needlessly invoked or at least parts of them do not run (recursive algorithm was flattened out)</span></div>
<div><span style="text-decoration:underline;"><br />
</span></div>
<div></div>
<div><em><strong>Learning</strong></em> &#8211; <em>If micro optimizations start to look important, it is time to look for improvements in the algorithms that are used</em>.</div>
<div></div>
<div></div>
<div></div>
<div>NOTES &#8211; Information gleamed from the exercise</div>
<div id="_mcePaste">
<ol>
<li> Most often you will require table variables</li>
<li>Table variables cause FEWER recompilations than temporary tables. (<a href="http://msdn.microsoft.com/en-us/library/ms175010.aspx" target="_blank">source MSDN</a>)</li>
<li>Table variables seems to be scoped at the stored proc level. So if you create a table variable inside a while loop, it would retain old data (painfully found from a bug)</li>
<li>Table variables cannot have indexes created on them except the primary key specified when creating these tables</li>
<li>Create index command can cause query recompilations</li>
<li> Table variables are held in memory and involve no disk IO &#8211; therefore no rollbacks are possible on these. On the upper side no locks are acquired by using table variables.</li>
<li>Table variables cannot have statistics created on them so for huge data it COULD be inefficient  ?</li>
</ol>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/754/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=754&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2010/07/21/temporary-table-variables-vs-temp-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>
	</item>
		<item>
		<title>Man days no longer !!</title>
		<link>http://computinglife.wordpress.com/2010/06/24/man-days-no-longer/</link>
		<comments>http://computinglife.wordpress.com/2010/06/24/man-days-no-longer/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 00:24:17 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Process]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=752</guid>
		<description><![CDATA[An internal mail on the cost and success of our agile implementation efforts, describe the cost of a single bug as x &#8230;&#8230;person days &#8230; Finally, change !!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=752&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>An internal mail on the cost and success of our agile implementation efforts, describe the cost of a single bug as x &#8230;&#8230;person days &#8230;</p>
<p>Finally, change !! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/752/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/752/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/752/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/752/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/752/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/752/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/752/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/752/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/752/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/752/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/752/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/752/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/752/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/752/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=752&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2010/06/24/man-days-no-longer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>
	</item>
		<item>
		<title>Where do you spend your time mostly?</title>
		<link>http://computinglife.wordpress.com/2010/05/05/where-do-you-spend-your-time-mostly/</link>
		<comments>http://computinglife.wordpress.com/2010/05/05/where-do-you-spend-your-time-mostly/#comments</comments>
		<pubDate>Tue, 04 May 2010 18:33:22 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[time management]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=738</guid>
		<description><![CDATA[I was reading the VC++ team blog ten minutes back and took their poll, inputs from which would go to improve the next Visual Studio release. The interesting question (one of many) from the survey, which prompted me into writing this post is as follows - How much of your time do you spend on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=738&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was reading the VC++ team blog ten minutes back and took their <a href="http://blogs.msdn.com/vcblog/archive/2010/03/22/vc-developer-survey.aspx" target="_blank">poll</a>, inputs from which would go to improve the next Visual Studio release.</p>
<p>The interesting question (one of many) from the survey, which prompted me into writing this post is as follows -</p>
<h3>How much of your time do you spend on each of the following?</h3>
<ul>
<li><span style="font-weight:normal;font-size:13px;">Defining the problem </span></li>
<li><span style="font-weight:normal;font-size:13px;">Requirements gathering </span></li>
<li><span style="font-weight:normal;font-size:13px;">Designing solution </span></li>
<li><span style="font-weight:normal;font-size:13px;">Writing code </span></li>
<li><span style="font-weight:normal;font-size:13px;">Building code </span></li>
<li><span style="font-weight:normal;font-size:13px;">Refactoring code </span></li>
<li><span style="font-weight:normal;font-size:13px;">Debugging code </span></li>
<li><span style="font-weight:normal;font-size:13px;">Writing tests </span></li>
<li><span style="font-weight:normal;font-size:13px;">Testing </span></li>
<li><span style="font-weight:normal;font-size:13px;">Deployment Support</span></li>
</ul>
<p>The options against each are, (Not at all, some, About 50% and A lot). There can be overlaps. So what would be your answer?</p>
<p>Here is mine -</p>
<ol>
<li>About 50% time designing the solution</li>
<li>About 50% time writing code (Base code writing time)</li>
<li>About 50% time refactoring it  (I always keep improving the structure)</li>
<li>some time testing it    (I write a lot of functional tests to test my code)</li>
<li>some time debugging (I pride myself in lowest bug counts ever in most teams i ever worked)</li>
</ol>
<p>What does your distribution look like?</p>
<p>ps : If you are in big corporation, your time spend overall for coding related activities above might be only 30-40% of the overall time you have.  This poll is meant to measure the activity spread within that little amount of time you really get to work with the code.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/738/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=738&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2010/05/05/where-do-you-spend-your-time-mostly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>
	</item>
		<item>
		<title>Visual Studio 2010 Released !!</title>
		<link>http://computinglife.wordpress.com/2010/04/28/visual-studio-2010-released/</link>
		<comments>http://computinglife.wordpress.com/2010/04/28/visual-studio-2010-released/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 13:07:50 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[VC++]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=728</guid>
		<description><![CDATA[The latest version of Visual Studio is here and here are the different versions it supports (Premium / Ultimate / Professional) and their feature differences. Personally i&#8217;m most thrilled and would be testing out these VC++ features in the same order - Call Hierarchy Window (great for learning existing code layout) VC++ Parallel programming Library (PPL) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=728&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://msdn.microsoft.com/en-us/library/bb386063.aspx" target="_blank">The latest version of Visual Studio</a> is here and here are the different versions it supports (Premium / Ultimate / Professional) and their feature differences.</p>
<p><a href="http://computinglife.files.wordpress.com/2010/04/vstudio-2010.png"><img class="aligncenter size-full wp-image-729" title="VStudio 2010" src="http://computinglife.files.wordpress.com/2010/04/vstudio-2010.png?w=510&#038;h=336" alt="" width="510" height="336" /></a></p>
<p>Personally i&#8217;m most thrilled and would be testing out these VC++ features in the same order -</p>
<ul>
<li>Call Hierarchy Window (great for learning existing code layout)</li>
<li><a href="http://blogs.msdn.com/nativeconcurrency/default.aspx" target="_blank">VC++ Parallel programming Library (PPL</a>)</li>
<li>Return of the MFC class wizard.</li>
<li>Ribbon Designer for MFC. Wonder how this control works and how to define a context.</li>
<li>Code profiling and coverage (out with Rational for these tasks)  with emphasis on threading</li>
<li>Generating code and architecture diagrams</li>
<li>Recordings of manual tests and their playback &#8211; wow for QA teams i suppose ?</li>
</ul>
<p> <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/728/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/728/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/728/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/728/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/728/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/728/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/728/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/728/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/728/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/728/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/728/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/728/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/728/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/728/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=728&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2010/04/28/visual-studio-2010-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>

		<media:content url="http://computinglife.files.wordpress.com/2010/04/vstudio-2010.png" medium="image">
			<media:title type="html">VStudio 2010</media:title>
		</media:content>
	</item>
		<item>
		<title>Top 10 programming bug origins</title>
		<link>http://computinglife.wordpress.com/2010/04/19/common-prog-errors/</link>
		<comments>http://computinglife.wordpress.com/2010/04/19/common-prog-errors/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 11:09:46 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=723</guid>
		<description><![CDATA[Top 10 reasons why i think folks introduce bugs into their programs<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=723&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Last week i had some spare time which used in creating a tool to parse JUNIT reports and produce automated reports. This was done to do away with the stupid recurring responsibility which the team members used to get every once in a while, to baby-sit some JAVA project builds .</p>
<p>However since this was a pet project and done on my personal time, i could not get any QA time on this or afford to spend the normal time i would spend in creating the code normally. Not with the new Agile process and the accompanying rally tool used to measure all my tasks.  So  i  did a real quick job out it and ended making some parts sloppy and corrected a few not yet encountered bugs, which i had to rework, since after all i could not afford to have such a sloppy tool lying around with my name on it.</p>
<p>It was then that i thought i should perhaps list down the origins of the bug which i saw in the code, along with the other common ones i have seen over the years in different code bases. So here they are, without much ado.</p>
<ol>
<li>An unfinished running list of &#8220;things to do&#8221; like cleanups / <a href="http://computinglife.wordpress.com/2007/10/23/it-takes-one-to-know-one/" target="_blank">code smells</a>, which introduces an unmanageable level of <a href="http://computinglife.wordpress.com/2009/01/27/recession-lessons-for-it-know-your-debts/" target="_blank">code debt</a>.</li>
<li>Heavy refactoring, which moves code around, which changes post and preconditions for the code copied, which is not handled or ignored in its new area &#8211; <em>this was the new one for me</em>.</li>
<li>Lack of adequate error checks</li>
<li>Not performing required cleanup when you exit a function or block</li>
<li>Performing <a href="http://www.joelonsoftware.com/articles/fog0000000022.html" target="_blank">multiple things at a time</a> WHILE coding (2 code-bases / support calls/ emails / calls / meetings &#8230;etc)</li>
</ol>
<p>Bugs produced from this category of reasons are the most common and perhaps the most easiest to sense early, from a casual read of the code. For the same reason therefore, it is totally irresponsible of a team or its management if code which <em>smells</em> of the above manages to get released.</p>
<p>The next category of bug origins, would lie on a higher level and are more difficult to address and cannot be found from glancing the code and would typically require good code checking tools like lint or good reviews.</p>
<ol>
<li>Incomplete information about the API being used (eg free has to be combined with malloc and not new)</li>
<li>Logical mistakes in the program flow</li>
</ol>
<p>Seriously though, any programmer worth their salt, would have learned enough of their tools and would have passed enough theoretical exams, to make the above two points, extremely rare in the real world. It is here that the importance of the <em>&#8216;frivolous&#8217;</em> reasons, increases in significance. In all my programming career, the most bugs i have seen are due to initial set of 5 reasons, which makes it all the more important to eliminate those.</p>
<p>It is also  true, that<a href="http://computinglife.wordpress.com/2009/10/12/making-code-reviews-stick/" target="_blank"> only if the first set is eliminated, will the second become more obvious in code reviews</a>, which is another reason why the initial set MUST be caught and corrected.   The majority of the cost of a programming project,  which is incurred after the coding is done, (80/20) over its support cycle, is also perhaps a good reason why these frivolous yet frequent bugs must be rooted out of the code base.</p>
<p>The remaining 3 reasons which complete our top 10 would be</p>
<ul>
<li>Platform complexity (custom Operating Systems, rare databases / applications, messy legacy code etc)</li>
<li>Architectural mess</li>
<li>Missing or wrong or Incomplete Requirement</li>
</ul>
<p>Of-course the last few are issues  that cannot be easily corrected once inherited and one can but put up with the mess and keep chugging along, managers and programmers included. In such conditions it is obvious that one need not add to the woes by creating more bugs and unwelcome noise on top of an already complex platform.</p>
<p>Therefore by all means and for gods sake create CLEAN code the first time !!!.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/723/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/723/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/723/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/723/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/723/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/723/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/723/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/723/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/723/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/723/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/723/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/723/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/723/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/723/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=723&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2010/04/19/common-prog-errors/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>
	</item>
		<item>
		<title>Have trouble updating windows components from add-remove?</title>
		<link>http://computinglife.wordpress.com/2010/04/14/have-trouble-updating-windows-components-from-add-remove/</link>
		<comments>http://computinglife.wordpress.com/2010/04/14/have-trouble-updating-windows-components-from-add-remove/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 06:41:17 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[XP]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=716</guid>
		<description><![CDATA[Today i was trying to add remove IIS from add remove windows components, from the add remove programs option in the control panel.  However the install could not proceed due to errors, which complained about dlls which could not be located. After many trials, of  SP3 file download / CAB download etc, i found this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=716&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today i was trying to add remove IIS from add remove windows components, from the add remove programs option in the control panel.  However the install could not proceed due to errors, which complained about dlls which could not be located.</p>
<p>After many trials, of  SP3 file download / CAB download etc, i found this simple command, after running which the install succeeds</p>
<p>Jut run &#8221; esentutl /p %windir%/security/database/secedit.sd<a href="http://support.microsoft.com/kb/555268" target="_blank">b</a> &#8220;</p>
<p>Yup, thats all.</p>
<p>Why does this happen &#8211; check these KB articles <a href="http://support.microsoft.com/kb/555268" target="_blank">1</a> , <a href="http://support.microsoft.com/kb/894351" target="_blank">2</a> and here is the page that has a small description of <a href="http://support.microsoft.com/kb/827664" target="_blank">what secedit.sdb (Local security database) might be</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/716/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/716/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/716/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/716/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/716/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/716/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/716/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/716/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/716/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/716/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/716/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/716/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/716/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/716/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=716&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2010/04/14/have-trouble-updating-windows-components-from-add-remove/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>
	</item>
		<item>
		<title>Good reads from the web</title>
		<link>http://computinglife.wordpress.com/2010/03/16/good-reads/</link>
		<comments>http://computinglife.wordpress.com/2010/03/16/good-reads/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 16:49:06 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=697</guid>
		<description><![CDATA[IE8 runs 10 times faster with Google plug-in Are you rationally Minded ? LightPeak Port Windows 7 makes SSD goes faster Windows 7 comes with DirectX 11 and it allows apps to use the spare processing power in GPU 40+ great free tools 15 great chrome extensions The best FireFox addons Inspiring read about a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=697&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.computerworld.com/s/article/9138459/IE8_runs_10_times_faster_with_Google_plug_in?source=rss_dev" target="_blank">IE8 runs 10 times faster with Google plug-in</a></p>
<p><a href="http://www.codinghorror.com/blog/archives/001301.html" target="_blank">Are you rationally Minded ?</a></p>
<p><a href="http://www.extremetech.com/article2/0,2845,2353569,00.asp?kc=ETRSS02129TX1K0000532">LightPeak Port</a></p>
<p><a href="http://www.extremetech.com/article2/0,2845,2354230,00.asp?kc=ETRSS02129TX1K0000532" target="_blank">Windows 7 makes SSD goes faster</a></p>
<p><a href="http://www.downloadsquad.com/2009/10/23/windows-7-and-directx-11-not-just-good-news-for-gamers/" target="_blank">Windows 7 comes with DirectX 11 and it allows apps to use the spare processing power in GPU</a></p>
<p><a href="http://www.downloadsquad.com/2009/05/18/40-great-open-source-apps-and-games-to-trick-out-your-new-windows/" target="_blank">40+ great free tools</a></p>
<p><a href="http://www.downloadsquad.com/2009/11/02/15-great-google-chrome-extensions/" target="_blank">15 great chrome extensions</a></p>
<p><a href="http://www.downloadsquad.com/2009/06/10/downloadsquad-firefox-add-on-pack-2009-ready-for-subscription/2" target="_blank">The best FireFox addons</a></p>
<p><a href="http://www.wired.com/magazine/2009/11/ff_avatar_cameron/" target="_blank">Inspiring read about a truck driver who has changed the movie industry (AGAIN)</a></p>
<p><a href="http://www.computerworld.com/s/article/9141465/Microsoft_s_top_developers_prefer_old_school_coding_methods?source=rss_dev" target="_blank">Microsoft Top coders prefer old school programming tools</a></p>
<p><a href="http://www.computerworld.com/s/article/9141664/Google_exec_says_it_resists_hiring_some_industry_stars?source=rss_dev" target="_blank">Google says they resist hiring industry stars </a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/697/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/697/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/697/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/697/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/697/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/697/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/697/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/697/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/697/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/697/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/697/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/697/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/697/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/697/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=697&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2010/03/16/good-reads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>
	</item>
		<item>
		<title>Making code reviews stick</title>
		<link>http://computinglife.wordpress.com/2009/10/12/making-code-reviews-stick/</link>
		<comments>http://computinglife.wordpress.com/2009/10/12/making-code-reviews-stick/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 18:44:29 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Coding Styles & Code Smells]]></category>
		<category><![CDATA[Management]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=687</guid>
		<description><![CDATA[The ultimate aim of code review is to find bugs and not be another check box<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=687&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><strong>Spot the bug</strong></h2>
<p>Code A</p>
<p><pre class="brush: cpp;">
STDMETHODIMP CMIB2Iface::CollectData(LONG DeviceId, BSTR IpAddress) {
	list&lt;CString&gt;::iterator listIter;
	for(listIter = ccmList.begin(); listIter != ccmList.end(); listIter++) {
		CString ccmIP = *listIter;
		long tempCCMID = getDeviceID(ccmIP);

		// Handle it only if device ID is valid
		if (tempCCMID != -1) {
				CString component;
				long eventType = 0;
				if (endPointType == 0) {
					eventType = 47;
					component = &quot;Gateway Link - &quot;;
				} else if (endPointType == 1) {
					eventType = 48;
					component = &quot;Unity Link - &quot;;
				}

				component += endPointName;
				// Construct an event.
				LunaEvent ev;
				CString attributes = &quot;linkDestination = &quot; + endPointIP;
				ev.attributes = attributes.AllocSysString();
				ev.eventTypeId = eventType;
				ev.deviceId = theCCMID;
				ev.component = component.AllocSysString();
				ev.timestamp = (COleDateTime::GetCurrentTime()).operator DATE();

				try {
					if (endPointStatus == 0) {
						if (tempCCMID == theCCMID) {
							// Raise/Update an event whenever status is 0
							if (prevEndPointStatus == 0) {
								// Case 00
								unsigned long result;
								MY_LOG_DBG(functionName &lt;&lt; &quot;: Updating Event on Component : &quot; &lt;&lt; component);
								if (faultManager-&gt;updateEvent(ev, &amp;result) == S_OK) {
									MY_LOG_DBG(functionName &lt;&lt; &quot;: Updating Event Secceeded&quot;);
								}
							} else {
								// Case 10
								unsigned long result;
								MY_LOG_DBG(functionName &lt;&lt; &quot;: Raising Event on Component : &quot; &lt;&lt; component);
								if (faultManager-&gt;raiseEvent(ev, &amp;result) == S_OK) {
									MY_LOG_DBG(functionName &lt;&lt; &quot;: Raising Event Secceeded&quot;);
								}
							}
						}
					} else {
						// Case 11 and 01
						// Always clear the event, and for all CCMs in the cluster.
						unsigned long result;
						MY_LOG_DBG(functionName &lt;&lt; &quot;: Clearing Event on Component : &quot; &lt;&lt; component);
						if (faultManager-&gt;clearEvent(ev, &amp;result) == S_OK) {
							MY_LOG_DBG(functionName &lt;&lt; &quot;: Clearing Event Succeeded&quot;);
						}
					}
				} catch(...) {

				}

				SysFreeString(ev.component);
				SysFreeString(ev.attributes);
		} // End of if (deviceID != 0)
	} // End of for loop
	return 0;
}
</pre></p>
<p>Code B</p>
<p><pre class="brush: cpp;">

STDMETHODIMP CMIB2Iface::CollectData(LONG DeviceId, BSTR IpAddress)
	{
	this -&gt; m_sLog.SetIpAddress(IpAddress);

	/*   ---------------------------------------------------------------------   */

	m_oInspector.AddCollatedRowInspectorFn_Post(FilterIfTypeInfoCollect,
						(void *) this);

	/*   ---------------------------------------------------------------------   */

	m_oInventory.ClearAllCollectors();

	if (BOMBED(DoTableGenericInit(m_oInventory, sIfaceTblColln, m_sLog)))
		{
		_log(L_ERROR, &quot;Mib2 collect table init failed \n&quot;);
		return S_OK;
		}

	/*   ---------------------------------------------------------------------   */

	if (PASSED(m_oInventory.CollectInventory (DeviceId, IpAddress)))
		{
		GetIfFaultsExistForDevice(DeviceId, LINK_DOWN_NUM , m_iFaultExist, m_sLog);
		m_oInventory. InspectData(DeviceId, eForInventory);
		m_oInventory. SaveData   (DeviceId, eForInventory);
		}

	return S_OK;
	}

</pre></p>
<div class="wp-caption alignleft" style="width: 147px"><img title="Review " src="http://t0.gstatic.com/images?q=tbn:hrzwY5m1X-CxiM:http://img3.ifilmpro.com/resize/image/stills/films/resize/istd/2921609.jpg" alt="Code Review Department" width="137" height="103" /><p class="wp-caption-text">Code Review Department</p></div>
<p>If tasked at reviewing the 2 pieces of code listed above, chances are that, you might as a reviewer, want to get rid of the task of reviewing A, than spend any more time on an obviously bad effort at coding. Having badly styled code around, allows bugs to remain, and fixes to be nothing more than half hearted patches which neither the patcher nor the original coder can recognize after the act is done.</p>
<p>One bad turn soon begets another and the rate at which the bad code degenerates into sphagetti mess can only be matched by the speed at which engineers long for a total rewrite of this mess. (Failing which they secretly start yearning for a change of job or worse, stick to the same one in a lost/zombie sort of way or decide what they really want to be is a manager)</p>
<h2>Humans are not compilers</h2>
<div class="wp-caption alignnone" style="width: 364px"><img src="http://www.sylvainpaillard.com/wordpress/wp-content/uploads/2009/01/iui.jpg" alt="Human Compiler" width="354" height="400" /><p class="wp-caption-text">Human Compiler</p></div>
<p>Unlike compilers, humans being are quite easily put off by bad code and no act of redemption can save a bad piece of code from degenerating further and further until it can only be discarded. This is frequently the reason why engineers advocate re-architecture, which is hugely more expensive than adapting existing code. <a href="http://www.joelonsoftware.com/articles/fog0000000069.html" target="_blank">The lost business oppurtunity that this represents can be huge</a> and the very effort of doing so could run into millions of dollars per year for a major software company like CISCO.</p>
<p>Any act of review on such a bad piece of code can only seen as a sham &#8211; who after all in their right mind would want to spend so much time reviewing someone else&#8217;s code when it would so obviously take such a long time to do it.</p>
<blockquote><p><em>So the first step in getting working reveiws is to not let the process to be viewed as sham &#8211; and the only way that this can be achieved is by respecting the reviewer&#8217;s time and patience</em>.</p></blockquote>
<h2>How do you respect a reviewers time ?</h2>
<p>By giving readable code (see above)</p>
<h2>How do you make code readable ?</h2>
<ol>
<li>By avoiding <a href="http://martinfowler.com/bliki/CodeSmell.html" target="_blank">coding smells</a></li>
<li> bi folwing sm cdng convntns(by following the same coding conventions aka coding style)</li>
</ol>
<p>Twenty different people and their cousins would have an equal number of vastly differing coding styles. If all of these are to be heaped on same page or on the same reviewer, again its equivalent to implicitly admitting that you have no control and that the whole process is a sham. Therefore getting the same style of code to be used EVERYWHERE is what has to be ENFORCED for successful code reviews to happen.</p>
<h2>My experience</h2>
<p>In the <a href="http://www.omnesys.com/index.htm" target="_blank">only place i have personally seen code reviews to actually work</a>, a body of code could be rejected simply because a character exceeded the max allowed no of column width of 80 or because in a single location in code, variable was not aligned. The rationale behind this was the assumption that that the coder did not know about this rule and therefore there would be many other places where this mistake would be made.</p>
<p>The act of rejecting the whole body of code due to single misfitting character sends the right signals and soon it becomes a matter of pride to get code accepted without major comments.</p>
<p>The other <a href="http://www.codinghorror.com/blog/archives/000615.html" target="_blank"><strong>advantages in having readable code</strong></a> is that</p>
<ol>
<li>Simple Bugs are easier to spot</li>
<li> Design issues are easier to spot</li>
<li> Review happens faster (that builds more support for review)</li>
<li> Bug fixes are easier</li>
<li> Module upgrades or re-architecture would be easier</li>
<li> SPotting reuse chances are easier &#8211; and hence aids faster development</li>
<li>tois which so often happens are much more easier</li>
</ol>
<h2>How can the organizations aid in creating readable code</h2>
<ol>
<li>Use tools that can perform static analysis based on accepted coding styles and flags issues, before reviewer  even reads one line of code</li>
<li> Make code readability indexes, part of statistics of the project so that they can be easily tracked</li>
<li>Use tools that can reformat existing code base to the accepted style, no matter what that is, so that its  easy to get off the block when the process starts</li>
</ol>
<h2>1 out of 2 is still only 50%</h2>
<p>Fixing the code review-ability is only half the fight. Where would a reviewer be, without a programmer who wants the code to be reviewed ? In a team of colleagues, its only more than easy for everyone to scratch everyone else&#8217;s back and implicitly give easy reviews. Its also natural for colleagues to contest one others reviews. Therefore, there has to be an external entity and stimulus to engage in code reviews.</p>
<p>Of-course enforcing the code standards using tools part of the build process and enforced through management numbers would be a good start, though that alone might not make it stick.</p>
<p>My experience is that usually stimulus takes the form of bragging factor or nerd pride amongst peers. When an obviously respected person  / geek is to review your code, you would want it to be more shiny and that extra perfect.</p>
<p>Companies like Cisco can easily make this happen by having more tech leads to review the code, and having a system of recommendations where recommended parts of code can even get promoted to technical evangelists like Stroustrup or Gosling once a year for review, which can be such an honor. Tracking  programmers, coding bullshit index would also be a good measure for wanting a review.</p>
<h2>The human factor</h2>
<p>Coding and reviewing code, is ultimately a very human activity and any mechanical solutions to the problems in this domain are bound to fail. Ultimately a more humane and social solution would be required to transform this bit of &#8216;work&#8217; into something more than statistic, and something of an advantage.</p>
<blockquote><p><strong>“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”</strong></p>
<p style="padding-left:30px;"><em>- Martin Fowler</em></p>
</blockquote>
<p><!--Session data--></p>
<p><!--Session data--></p>
<p><!--Session data--></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/687/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/687/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/687/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/687/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/687/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/687/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/687/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/687/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/687/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/687/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/687/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/687/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/687/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/687/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=687&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2009/10/12/making-code-reviews-stick/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>

		<media:content url="http://t0.gstatic.com/images?q=tbn:hrzwY5m1X-CxiM:http://img3.ifilmpro.com/resize/image/stills/films/resize/istd/2921609.jpg" medium="image">
			<media:title type="html">Review </media:title>
		</media:content>

		<media:content url="http://www.sylvainpaillard.com/wordpress/wp-content/uploads/2009/01/iui.jpg" medium="image">
			<media:title type="html">Human Compiler</media:title>
		</media:content>
	</item>
		<item>
		<title>Which platform to use for a new application?</title>
		<link>http://computinglife.wordpress.com/2009/07/14/which-platform-to-use-for-a-new-application/</link>
		<comments>http://computinglife.wordpress.com/2009/07/14/which-platform-to-use-for-a-new-application/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 17:07:53 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=671</guid>
		<description><![CDATA[We , (me and my kid sis) have been recently thinking of creating an expense manager application. Why an expense manager? Well, because an expense manager would be useful for us to keep expenses and since we could not really find any good ones (UI , usability wise) on the net, for free. Once we [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=671&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We , (me and <a href="http://computinglife.wordpress.com/2007/06/14/my-kid-sis-sister-wrote-a-better-grep-than-microsoft-programmers/" target="_blank">my kid sis</a>) have been recently thinking of creating an expense manager application. Why an expense manager? Well, because an expense manager would be useful for us to keep expenses and since we could not really find any good ones (UI , usability wise) on the net, for free.</p>
<p>Once we decided to make one, the question was, what tools to use? Which platform /  language and related tools should we chose? Well after ruminating over these for a few days here is what we came up with.</p>
<p><strong>Platform Choice &#8211; iPhone is cool but Apple has entry barriers for dev</strong><strong>elopment. </strong></p>
<p><img class="alignleft size-full wp-image-677" title="Bad apple" src="http://computinglife.files.wordpress.com/2009/07/bad-apple.gif?w=510" alt="Bad apple"   /></p>
<p>I was initially in favor of developing the application for the iPhone but there seems to be so many available. We were also discouraged from developing for iPhone by the fact that it required a hacked up VM or a Mac for iPhone application development.  Rumors, of how Apple tight fistedly controls, who could develop for the platform, along with an entry fees for being listed, took out a lot of enthusiasm from Apple development.  I kept having this deja Vu on <a href="http://www.vikingwaters.com/htmlpages/PCHist.htm" target="_blank">how Apple missed the boat on the PC revolution</a>, due to its tight fisted policies of the past regarding Macs and now it seems to be doing the same, all over again.</p>
<p>I do though feel that a mobile phone based application would have more no of users, since the expenses can be entered into it without fail, and therefore very convenient. Its a shame that Apple is playing so hard to develop for. It</p>
<p><strong>Platform Choice &#8211; Re-invent the desktop experience</strong></p>
<p>Since iPhone seemed out of the question, the desktop screen area and its powerful graphics cards seemed the next best for developing a cool eye catching UI application and to utilize the bigger screens for useful reports.</p>
<p>So, its a desktop app that we would do.</p>
<p><strong>What language should i use for desktop development? </strong></p>
<p>Next up the question is the choice of programming language / platform on the desktop, which we are going to use for our apps. I definitely cant use C++ because that doesn&#8217;t seem to make any sense these days with all those .NET and Java or python type easy to use platforms available. These are simply too productive to ignore and we are not making a performance sensitive application anyhow. So that brings our choice down to a compiled Ui friendly language like</p>
<p><strong>.NET or Java</strong></p>
<p style="text-align:left;">I believe a slick UI (User Interface) is going to influence users more than anything else, with customer&#8217;s bar of expectations set high, by the iPhone and Vista user experiences.  .NET with its WPF User Interface and close Windows OS integration, supported by the excellent Visual Studio development environment would make for a great platform is what i felt.</p>
<p style="text-align:center;"><img class="aligncenter size-full wp-image-675" title="WPF UI" src="http://computinglife.files.wordpress.com/2009/07/wpf-ui.jpg?w=510" alt="WPF UI"   /></p>
<p> </p>
<p>I did not want to use Java remembering its old slower Spring based User experience and since .NET looked much more slicker (due to WPF) and Visual Studio would  be a more productive tool to develop with than eclipse can be, for the windows platform. JavaFX is still too unstable and the tool support is lacking to move into it. (We did run a small evaluation and it does seem another six months or one year would be gone before some support of JFX development was available)</p>
<p>Most of our probable customers (and the future ones who might be ready to pay for a better version) are probably running Windows, so cross platform is not a big consideration. NET also plays into my expertise with windows platform and win32 API experience. So we might not get stuck with any platform issues.</p>
<p><strong>Choice of Database</strong></p>
<p>The next tool that we wanted to freeze on was a database that i would want to use along side my application. It would have to be free since i plan to ship my application for free initially. The ones i have heard of that i think might be useful here are Microsft SQL Express, SQL Lite, FireBird, MySQL, PostGres, Ingres and HSQLDB. These are the ones i have heard the most about. The one thing i have learned from my years of experience is that a more widely used tool would have most of its common problems ironed out and the public forum based support might be better too.</p>
<p><strong>So which of these can be my database? </strong></p>
<p>Multi-platform support is not a big deal for me since i have already decided to use .NET and WPF. However it definitely needs to support .Net well and it should be small. I cant expect users to make 100MB downloads to check out if a free tool is good. 6-10MB is what i think the size ought to be for this app download for it to be viable.</p>
<p>That preempts PostGres and Ingres which are both heavy weight. I did not have to try these out to know they are heavy weight because a two minute search on Google reveals how PostGres is already a competitor for enterprise apps and Ingres used to be one. Additionally Ingres seems to have lost out all backing and is being sold so that rules it out too.</p>
<p>MySQL ? Well that&#8217;s not free for commercial use . Plus i have also heard from multiple sources (mainly on Sourceforge), that the sources are a real mess and i know for a fact that till recently it did not have good SQL features like foreign integrity. Not too impressive ,I&#8217;m afraid.</p>
<p>HSQLDB is java based and introduces additional platform considerations. Not interested in that set of problems too.</p>
<p><strong>This leaves SQL server, SQL Lite and FireBird</strong></p>
<p>SQL Server is also heavy though not as heavy as PostGres. It comes to about 53 Mb in size for deployment and once deployed SQL server express behaves like a proper DB consuming lots of memory etc on the client machine.  But no, i would not want to deploy a DB server on my personal laptop just to keep my accounts.</p>
<p><strong>SQL Lite vs FireBird</strong></p>
<p>So it boils down to SQL Lite and FireBird. Between the both it boils down to IF we require the extra functionality offered by FireBird. SQL Lite is very small (230K) but lacks many SQL features like row/table locking and integrity constraints or stored procedures and such. BUT it supports seamless movement to a mobile environment if we require it.</p>
<p>FireBird is great but might not  be suitable for mobile environments. So the question i guess is will i require a mobile environment support, given my infatuation towards mobile development?</p>
<p><strong>Do we require Mobile Environment support?</strong></p>
<p>After some thought i decided to not muddle my development by imposing some arbitrary requirement that might not ever be required. I should develop for Mobile if i want to go Mobile and not ruin my desktop experience for the sake of some doubt-able future compatibility or requirement. I&#8217;m sure a better user experience can be developed instead if i can devote  the time saved in getting around SQL Lite&#8217;s limitations to the development of my application.</p>
<p><strong>Database = FireBird </strong><br />
So FireBird it is and hopefully it plays well with .NET (<a href="http://firebirdsql.org/dotnetfirebird/">http://firebirdsql.org/dotnetfirebird/</a>) else we shall have to move to to SQL Lite.</p>
<p><strong>What does FireBird have?<br />
</strong></p>
<p>Well it has .NET support, deployment size is 2 MB + has XCOPY deployment. It has row and table locking, integrity constraints, stored procedure support for faster data manipulation) and VStudio .NET Visual Design Support.  It also used to be developed by Borland and that speaks for an impressive past history however wrong i might be.</p>
<p>It has all the pluses is what i felt, not to mention a favorable review in the past from a friend who was doing the same kind of research. That was four or five years back. Things can only be better now.</p>
<p>So that&#8217;s it then i guess. The best tools for the job are decided and all it takes is the time to build one. I shall keep this space updated with how good or bad FireBird turns out to be, when we really start using it.</p>
<p>Cheers !!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/671/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/671/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/671/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/671/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/671/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/671/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/671/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/671/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/671/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/671/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/671/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/671/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/671/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/671/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=671&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2009/07/14/which-platform-to-use-for-a-new-application/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>

		<media:content url="http://computinglife.files.wordpress.com/2009/07/bad-apple.gif" medium="image">
			<media:title type="html">Bad apple</media:title>
		</media:content>

		<media:content url="http://computinglife.files.wordpress.com/2009/07/wpf-ui.jpg" medium="image">
			<media:title type="html">WPF UI</media:title>
		</media:content>
	</item>
		<item>
		<title>Abstract Oriented Obect Architecture &#8211; (rant)</title>
		<link>http://computinglife.wordpress.com/2009/07/10/abstract-oriented-obect-architecture-rant/</link>
		<comments>http://computinglife.wordpress.com/2009/07/10/abstract-oriented-obect-architecture-rant/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 07:16:02 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=667</guid>
		<description><![CDATA[ My first job was to program Windows GUI objects using MFC architecture. So i do &#8220;get&#8221; objects and OO terminology. However i was stumped to read the following explanation, of a .NET Data provider product (aka data source connectivity classes), that can talk to databases and provide integration with the new ORM (Object Relational Mapping) layer, that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=667&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p> My first job was to program Windows GUI objects using MFC architecture. So i do &#8220;get&#8221; objects and OO terminology.</p>
<p>However i was stumped to read the following explanation, of a .NET Data provider product (aka data source connectivity classes), that can talk to databases and provide integration with the new ORM (Object Relational Mapping) layer, that microsoft has come up with for .NET applications</p>
<p><em>&#8220;It equips Microsoft .NET based applications, development environments, and programming languages with conceptual entity-based access to native and heterogeneous data sources. &#8220;</em></p>
<div class="wp-caption aligncenter" style="width: 410px"><a href="http://www.thewitz.com/issue-no-1/12-mfa-thesis-paper-parts-i"><img title="Conceptual Entity" src="http://mocoloco.com/art/archives/pittman_three_nov_05.jpg" alt="Conceptual Entity" width="400" height="473" /></a><p class="wp-caption-text">Conceptual Entity</p></div>
<p>How soon can you say WTF?  I wonder why folks feel compelled to string so many heavy words together, when describing anything related to OO technology, in anything more than a  semi formal  setting. </p>
<p> I dont know if an architect / developer or a marketing personnel wrote that statement. In fact i did not find their site by searching on any of the weasel like words found in the description. In fact i searched for more practical stuff that i wanted my software to do, which thankfully was available on the <a href="http://wikis.openlinksw.com/dataspace/owiki/wiki/VirtuosoWikiWeb/VirtAdoNet35Provider" target="_blank">page</a> too.</p>
<p>This weaselization / complexfication of terminology seems to be a given fart to contend with, in the Java world and it makes me sick to see the cancer spreading to maybe the .NET / MSDN world too. Please, would anyone care to provider a linguistic inter mapping layer for conceptual to real word entities in the object oriented technology space?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/667/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=667&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2009/07/10/abstract-oriented-obect-architecture-rant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>

		<media:content url="http://mocoloco.com/art/archives/pittman_three_nov_05.jpg" medium="image">
			<media:title type="html">Conceptual Entity</media:title>
		</media:content>
	</item>
		<item>
		<title>Random Text Generation on Linux</title>
		<link>http://computinglife.wordpress.com/2009/04/20/random-text-generation-on-linux/</link>
		<comments>http://computinglife.wordpress.com/2009/04/20/random-text-generation-on-linux/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 07:04:30 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[pipe]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=653</guid>
		<description><![CDATA[I recently came across a requirement to dynamically generate a password on a Linux system. Being a password, it implied that the text had to be truly random, which is a tough order of requirement for any home-brew algorithm, once you really get an idea of  on why its hard to generate randomness The solution [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=653&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently came across a requirement to dynamically generate a password on a Linux system.</p>
<p>Being a password, it implied that the text had to be truly random, which is a tough order of requirement for any home-brew algorithm, once you really get an idea of  on <a href="http://stackoverflow.com/questions/632873/why-is-it-hard-for-a-program-to-generate-random-numbers" target="_blank">why its hard to generate</a> <a href="http://en.wikipedia.org/wiki/Information_entropy" target="_blank"> randomness</a></p>
<div class="wp-caption alignnone" style="width: 490px"><img src="http://web.archive.org/web/20011027002011/http://dilbert.com/comics/dilbert/archive/images/dilbert2001182781025.gif" alt="Radom is hard" width="480" height="169" /><p class="wp-caption-text">Radom is hard</p></div>
<p><strong>The solution = <a href="http://en.wikipedia.org/wiki/Urandom" target="_blank">/dev/random</a> . </strong></p>
<p>In theory /dev/random is a file you can read infinitely. However in practise you would find that reading this file would block every now and then until it has contents in it, generated randomly from device driver noise bits. So you might have to move your mouse or spin the disk etc to get some random bits into the /dev/random file.</p>
<p><strong>A More practical solution = <a href="http://lwn.net/Articles/261091/" target="_blank">/dev/urandom</a></strong></p>
<p>urandom can get random iput from from /dev/random, else it generates fairly randomized bytes for you, using a Random Number Generator Cryptographic algorithm, provided by a kernel module of the same name. AND, its never guaranteed to block. Talk about best of both worlds !!!</p>
<p><strong>My random Text Command</strong></p>
<p>Bytes read from random or urandom are not likely to be all ASCII and therefore requires to be filtered for ASCII, for which this was the chosen solution -</p>
<blockquote><p>tr -dc A-Za-z0-9 &lt;/dev/urandom |  head -c 14</p></blockquote>
<p><strong>The problem in the solution<br />
</strong></p>
<p>The only doubt that this simple solution envisaged in my rustic Unix mind was if this command line would exit after head had received the 14 characters it required.</p>
<p>If you do not know the answer, it is contained in my <a href="http://computinglife.wordpress.com/2009/04/17/unix-pipe-internals/" target="_blank">previous post on Unix shell pipes</a>.</p>
<p>Happy hacking !!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/653/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/653/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/653/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/653/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/653/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/653/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/653/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/653/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/653/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/653/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/653/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/653/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/653/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/653/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=653&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2009/04/20/random-text-generation-on-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>

		<media:content url="http://web.archive.org/web/20011027002011/http://dilbert.com/comics/dilbert/archive/images/dilbert2001182781025.gif" medium="image">
			<media:title type="html">Radom is hard</media:title>
		</media:content>
	</item>
		<item>
		<title>Unix pipe internals</title>
		<link>http://computinglife.wordpress.com/2009/04/17/unix-pipe-internals/</link>
		<comments>http://computinglife.wordpress.com/2009/04/17/unix-pipe-internals/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 16:51:22 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Operating system]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=635</guid>
		<description><![CDATA[Say you do this ls / -R &#124; head -2 The simple command line above, lists (ls) the entire directory structure starting from root in a recursive fashion. Its output is piped to head which will exit after it gets 2 lines of output. The problem Its clear that head will complete much before ls [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=635&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Say you do this</p>
<blockquote><p>ls / -R | head -2</p></blockquote>
<p>The simple command line above, lists (ls) the entire directory structure starting from root in a recursive fashion. Its output is piped to head which will exit after it gets 2 lines of output.</p>
<p><strong>The problem</strong></p>
<p>Its clear that head will complete much before ls will. This poses some interesting questions like</p>
<ol>
<li>Will ls run in the background after head exits?</li>
<li>Will the entire command keep running until ls is done or will you get the prompt as soon as head exits but ls will keep running to completion in the background?</li>
<li>Will head run only after ls has finishes giving its output, thus requiring ls to run to completion?</li>
</ol>
<p>I recently ran into these same set of questions about assumptions being made in an install script that was being written for a new reporting tool we where building. So what is the deal here ? Think for a minute before you read the answers.</p>
<p style="padding-left:150px;"><strong>Pipe Basics</strong></p>
<p>I knew that the way pipe worked was to redirect the output of one process (stdout) as the input (stdin) of the process that came next in line. But this did not quite give all the answers. Therefore googling the pipe process gave some more details which i shall describe below</p>
<p style="padding-left:180px;"><strong>The details</strong></p>
<p><img class="size-full wp-image-639" title="pipe-connection2" src="http://computinglife.files.wordpress.com/2009/04/pipe-connection2.jpg?w=510" alt="shell pipe setup"   /></p>
<div class="mceTemp mceIEcenter">
<dl class="wp-caption aligncenter">
<dd class="wp-caption-dd">shell pipe setup</dd>
</dl>
</div>
<p><strong>Poetry in design<br />
</strong></p>
<ol>
<li>The shell sets up the pipe. The running processes use stdin / stdout as they would normally have without knowing its a pipe rather than the terminal input / output.</li>
<li>A buffer exists  between the pipe descriptors, which is handled by the kernel. Writing process will block once this buffer is full and will be able to continue once the reading processes read off this buffer.</li>
<li>The process of exec and forking means that it is impossible to say which processes run first and is governed only by CPU scheduling.</li>
<li>All the processes are in the same hierarchical level and have the shell as their parent.</li>
<li>In Linux versions before 2.6.11, the capacity of a pipe was the same as the system page size (e.g., 4096 bytes on i386). Since Linux 2.6.11, the pipe capacity is 65536 bytes.</li>
</ol>
<p><strong>But what happens when one of the piped process exits? </strong></p>
<p>Unfortunately, most of the documentation only explained how the pipe was setup by the shell and kernel.  But what we required was an explanation of what happened if one the process exits.</p>
<p>To test this i ran a few tests. Here are my observations.</p>
<blockquote><p>ls / -R | head -2 | head -20000 (exits immediately)</p>
<p>ls / -R | head -20000 | head -2 (exits immediately)</p>
<p>cat small-file.txt | ls /-R (runs for a long time)</p></blockquote>
<p>Obviously, it is the processes that read input, which makes a difference in how the piped command line behaves. So what causes this behaviour?</p>
<p style="padding-left:90px;"><strong>Enter Unix Signals</strong></p>
<p>Signals are the IPC mechanisms akin to software interrupts used by Unix like operating systems to notify running processes of interesting events. This is possibly the only way an outside event can modify the behaviour of an otherwise normal process.</p>
<p>A process could recieve a signal for IO issues / child processes termination or plain Ctrl-C related interrupt signals.  Most of the default handlers (which you can change if requires) cause the process to exit.</p>
<p>My attention having turned to signals, i ended up walking through the <a href="http://en.wikipedia.org/wiki/Signal_(computing)" target="_blank">wikipedia</a> for the master list of UNIX signals, hoping to find anything related to pipe. This caused me to find an interesting entry &#8230;</p>
<p style="padding-left:150px;"><strong>SIGPIPE</strong></p>
<p>The <a href="http://en.wikipedia.org/wiki/SIGPIPE" target="_blank">wikipedia entry for SIGPIPE </a>says <em>&#8220;When a pipe is broken, <span style="color:#993300;"><strong>the process writing to it is sent the SIGPIPE signal</strong></span>. The default reaction to this signal for a process is to terminate&#8221;.</em></p>
<p><em>If attempt is made to read from a pipe whose write end has been closed, the reader receives an EOF, which causes the read program to close in an orderly fashion.<br />
</em></p>
<p>hmmmm &#8211; applying that knowledge to our pipe commands would show that this would cause the chain of processes to exit, if a listening process exits and thus breaks the pipe chain.</p>
<p>It would have been an extreme waste of resources had ls continued to run even after head exitted in the command line ls / -R | head -2 and shows how well the UNIX system has been thought out.</p>
<p>Even more importantly it is highly intuitive that ls / -R | head -2 to exit immediately after 2 lines have been output.  This is one of the cool things about Unix, that it behaves in the manner you expect it to, as if the commands understand the social niceties of human pysche or at least hacker psyche.</p>
<p>It is also highly interesting to note that the reader receives an EOF, because output finishing first is normal but the write receives a signal if the reader has already exit, since that is an abnormal situation. Very beautiful indeed.</p>
<p>It is no wonder that such clever hacks and excellence in design makes Unix the <a href="http://www.paulgraham.com/gh.html" target="_blank">hacker platform of choice</a>.</p>
<p>Happy hacking !!!!</p>
<p><em>ps : All this would have been clear had i chose to read the documentation of the pipe system call before the investigation was begun. It goes to show how much we ignore existing documentation at our own peril. </em></p>
<p><em></em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/635/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/635/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/635/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/635/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/635/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/635/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/635/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/635/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/635/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/635/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/635/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/635/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/635/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/635/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=635&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2009/04/17/unix-pipe-internals/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>

		<media:content url="http://computinglife.files.wordpress.com/2009/04/pipe-connection2.jpg" medium="image">
			<media:title type="html">pipe-connection2</media:title>
		</media:content>
	</item>
		<item>
		<title>Enforcing clean coding standards</title>
		<link>http://computinglife.wordpress.com/2009/03/20/enforcing-clean-coding-standards/</link>
		<comments>http://computinglife.wordpress.com/2009/03/20/enforcing-clean-coding-standards/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 03:01:50 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Cool-Stuff]]></category>
		<category><![CDATA[Management]]></category>
		<category><![CDATA[code management]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[coding standards]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=630</guid>
		<description><![CDATA[If you ever needed a reason to enforce clean code &#8211; here it is, right out of MIT and researched to the hilt. The video is extremely interesting from a behavioral standpoint and extremely educative. As highly recommended as the famous Steve Jobs video. I can vouch for what is being said because i have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=630&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you ever needed a reason to enforce clean code &#8211; here it is, right out of MIT and researched to the hilt. The video is extremely interesting from a behavioral standpoint and extremely educative. As highly recommended as the famous <a href="http://filmpasset.se/?p=27031" target="_blank">Steve Jobs video</a>.</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='510' height='317' src='http://www.youtube.com/embed/nUdsTizSxSI?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span>
<p>I can vouch for what is being said because i have seen this happening many times in development. The implied up shoot  ?</p>
<p><em>Clean code bases beget new code which is cleaner or clean enough. Dirty code bases attract more code which is at least just as dirty or usually even more so. </em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/630/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/630/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/630/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/630/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/630/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/630/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/630/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/630/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/630/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/630/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/630/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/630/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/630/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/630/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=630&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2009/03/20/enforcing-clean-coding-standards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>
	</item>
		<item>
		<title>Significant Update</title>
		<link>http://computinglife.wordpress.com/2009/02/27/significant-update/</link>
		<comments>http://computinglife.wordpress.com/2009/02/27/significant-update/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 06:10:58 +0000</pubDate>
		<dc:creator>computinglife</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[multiple consumer]]></category>
		<category><![CDATA[single producer]]></category>
		<category><![CDATA[synchronization]]></category>
		<category><![CDATA[Threading]]></category>

		<guid isPermaLink="false">http://computinglife.wordpress.com/?p=627</guid>
		<description><![CDATA[I had a chance to modify and extensively update an older post on multiple consumer, single producer problem after a reader request. Cheers !!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=627&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I had a chance to modify and extensively update <a href="http://computinglife.wordpress.com/2008/02/26/how-do-you-solve-a-multiple-consumer-single-producer-problem/" target="_blank">an older post on multiple consumer, single producer problem</a> after a reader request.</p>
<p><strong>Cheers !!<br />
</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computinglife.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computinglife.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computinglife.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computinglife.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computinglife.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computinglife.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computinglife.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computinglife.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computinglife.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computinglife.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computinglife.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computinglife.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computinglife.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computinglife.wordpress.com/627/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computinglife.wordpress.com&amp;blog=529624&amp;post=627&amp;subd=computinglife&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computinglife.wordpress.com/2009/02/27/significant-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">computinglife</media:title>
		</media:content>
	</item>
	</channel>
</rss>
