<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-15818703</id><updated>2012-01-25T05:45:35.500+05:30</updated><category term='C++'/><category term='CLI'/><category term='terminology'/><category term='C Powershot Intermediate'/><category term='STL'/><category term='tips'/><category term='Windows Command-line Tips'/><category term='programming'/><category term='perl'/><category term='notes'/><title type='text'>oOzone</title><subtitle type='html'>Thoughts on Computers, Programming and OO Design.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>70</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-15818703.post-3027247774722661015</id><published>2010-06-09T01:24:00.003+05:30</published><updated>2010-06-09T01:27:11.465+05:30</updated><title type='text'>C++ casts Demystified</title><content type='html'>Hope the following code sample clarifies the differences between the various C++ casts. const_cast is left as a trivial case.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;strong&gt;class&lt;/strong&gt; &lt;font color="#2040a0"&gt;V&lt;/font&gt; &lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;strong&gt;public&lt;/strong&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;strong&gt;virtual&lt;/strong&gt; ~&lt;font color="#2040a0"&gt;V&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;font color="#444444"&gt;//Virtual Base Class&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;class&lt;/strong&gt; &lt;font color="#2040a0"&gt;G&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;strong&gt;virtual&lt;/strong&gt; &lt;strong&gt;public&lt;/strong&gt; &lt;font color="#2040a0"&gt;V&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;font color="#444444"&gt;//Common ancestor for base classes&lt;/font&gt;&lt;br /&gt;&lt;strong&gt;class&lt;/strong&gt; &lt;font color="#2040a0"&gt;B1&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;strong&gt;public&lt;/strong&gt; &lt;font color="#2040a0"&gt;G&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;class&lt;/strong&gt; &lt;font color="#2040a0"&gt;B2&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;font color="#444444"&gt;//Non-polymorphic class&lt;/font&gt;&lt;br /&gt;&lt;strong&gt;class&lt;/strong&gt; &lt;font color="#2040a0"&gt;B3&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;strong&gt;public&lt;/strong&gt; &lt;font color="#2040a0"&gt;G&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;class&lt;/strong&gt; &lt;font color="#2040a0"&gt;D&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;strong&gt;public&lt;/strong&gt; &lt;font color="#2040a0"&gt;B1&lt;/font&gt;, &lt;strong&gt;public&lt;/strong&gt; &lt;font color="#2040a0"&gt;B2&lt;/font&gt;, &lt;strong&gt;public&lt;/strong&gt; &lt;font color="#2040a0"&gt;B3&lt;/font&gt; &lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;class&lt;/strong&gt; &lt;font color="#2040a0"&gt;I&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt; &lt;strong&gt;public&lt;/strong&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;strong&gt;virtual&lt;/strong&gt; ~&lt;font color="#2040a0"&gt;I&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;font color="#444444"&gt;//Independent, unrelated Class&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;int&lt;/strong&gt; &lt;font color="#2040a0"&gt;main&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;strong&gt;int&lt;/strong&gt; &lt;font color="#2040a0"&gt;argc&lt;/font&gt;, &lt;strong&gt;char&lt;/strong&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;argv&lt;/font&gt;&lt;font color="4444FF"&gt;[&lt;/font&gt;&lt;font color="4444FF"&gt;]&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;br /&gt; &lt;font color="#2040a0"&gt;D&lt;/font&gt; &lt;font color="#2040a0"&gt;d&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br /&gt; &lt;font color="#2040a0"&gt;D&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;  &lt;font color="#2040a0"&gt;pdd&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="#2040a0"&gt;d&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;br /&gt; &lt;font color="#2040a0"&gt;B1&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;pb1d&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="#2040a0"&gt;d&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;font color="#444444"&gt;//No casts needed&lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#2040a0"&gt;B2&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;pb2d&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="#2040a0"&gt;d&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;br /&gt; &lt;font color="#2040a0"&gt;B3&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;pb3d&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="#2040a0"&gt;d&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;br /&gt; &lt;font color="#2040a0"&gt;V&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;  &lt;font color="#2040a0"&gt;pvd&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="#2040a0"&gt;d&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#444444"&gt;//G*  pgd=&amp;amp;d; //Compile-error, ambiguous&lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#444444"&gt;// I* pi1d=&amp;amp;d; //Cast needed. Compile error.&lt;/font&gt;&lt;br /&gt; &lt;font color="#2040a0"&gt;I&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;pi1d&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;I&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="#2040a0"&gt;d&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;font color="#444444"&gt;//No compile error, but semantically wrong. Address gets assigned.&lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#444444"&gt;//I* pi1d=static_cast&amp;lt;I*&amp;gt;(&amp;amp;d); //Compile error&lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#444444"&gt;//Upcasting&lt;/font&gt;&lt;br /&gt; &lt;font color="#2040a0"&gt;B1&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;pb1&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;strong&gt;dynamic_cast&lt;/strong&gt;&lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#2040a0"&gt;B1&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;pdd&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;font color="#444444"&gt;// = pb1d &lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#2040a0"&gt;B2&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;pb2&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;strong&gt;dynamic_cast&lt;/strong&gt;&lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#2040a0"&gt;B2&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;pdd&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;font color="#444444"&gt;// = pb2d&lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#2040a0"&gt;B3&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;pb3&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;strong&gt;dynamic_cast&lt;/strong&gt;&lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#2040a0"&gt;B3&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;pdd&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;font color="#444444"&gt;// = pb3d&lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#2040a0"&gt;G&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;  &lt;font color="#2040a0"&gt;g1&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;strong&gt;dynamic_cast&lt;/strong&gt;&lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#2040a0"&gt;G&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;pdd&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;font color="#444444"&gt;//No compile-error, but null because ambiguous&lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#2040a0"&gt;G&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;  &lt;font color="#2040a0"&gt;g2&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;strong&gt;reinterpret_cast&lt;/strong&gt;&lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#2040a0"&gt;G&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;pdd&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;font color="#444444"&gt;//No compile-error, nothing&lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#444444"&gt;//G*  g3 = static_cast&amp;lt;G*&amp;gt;(pdd); //Compile-error, but null because ambiguous&lt;/font&gt;&lt;br /&gt; &lt;br /&gt; &lt;font color="#444444"&gt;//Downcasting&lt;/font&gt;&lt;br /&gt; &lt;font color="#2040a0"&gt;D&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;pdd1&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;strong&gt;dynamic_cast&lt;/strong&gt;&lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#2040a0"&gt;D&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;pb1d&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;font color="#444444"&gt;//downcast, B1 must be polymorphic&lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#444444"&gt;//D* pdd = dynamic_cast&amp;lt;D*&amp;gt;(pb2d); //downcast, B2 not polymorphic. Compile error.&lt;/font&gt;&lt;br /&gt; &lt;font color="#2040a0"&gt;G&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;g3&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;strong&gt;dynamic_cast&lt;/strong&gt;&lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#2040a0"&gt;G&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;pvd&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;font color="#444444"&gt;//ambiguous downcast, = null, compiles in C++ not in Comeau&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#444444"&gt;// G* g4= static_cast&amp;lt;G*&amp;gt;(pvd); //ambiguous downcast, = null&lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#444444"&gt;//Crosscasting&lt;/font&gt;&lt;br /&gt; &lt;font color="#2040a0"&gt;I&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;pi&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;strong&gt;dynamic_cast&lt;/strong&gt;&lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#2040a0"&gt;I&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;pdd&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;font color="#444444"&gt;//pi will be null&lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#2040a0"&gt;I&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;pi2&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;strong&gt;reinterpret_cast&lt;/strong&gt;&lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#2040a0"&gt;I&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;pdd&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt; &lt;font color="#444444"&gt;//pi2 will be equal to pdd&lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#444444"&gt;//I&amp;amp; ri= dynamic_cast&amp;lt;I&amp;amp;&amp;gt;(*pd); //throws an exception&lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#2040a0"&gt;B3&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;pb31&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;strong&gt;dynamic_cast&lt;/strong&gt;&lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#2040a0"&gt;B3&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;pb1d&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;strong&gt;return&lt;/strong&gt; &lt;font color="#FF0000"&gt;0&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-3027247774722661015?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/3027247774722661015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=3027247774722661015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/3027247774722661015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/3027247774722661015'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2010/06/c-casts-demystified.html' title='C++ casts Demystified'/><author><name>Sonof</name><uri>http://www.blogger.com/profile/07623912851798051774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-3104018469178649131</id><published>2010-05-29T01:27:00.002+05:30</published><updated>2010-06-09T01:31:36.620+05:30</updated><title type='text'>Rethink About Reuse</title><content type='html'>Was listening to C++ Stylistics&lt;br /&gt;&lt;br /&gt;   1.  Three pillars of OO&lt;br /&gt;         1.  inheritance&lt;br /&gt;         2.  encapsulation&lt;br /&gt;         3.  polymorphism&lt;br /&gt;               1.  overload&lt;br /&gt;               2.  coercion&lt;br /&gt;               3.  parametric&lt;br /&gt;               4.  runtime inclusion&lt;br /&gt;   2.   object oriented styles&lt;br /&gt;         1.  prototype-based&lt;br /&gt;         2.  object-based&lt;br /&gt;         3.  dynamically typed&lt;br /&gt;         4.  statically typed&lt;br /&gt;   3.   object destruction policy&lt;br /&gt;         1.  scope-nound&lt;br /&gt;         2.  explicit&lt;br /&gt;         3.  reference-based&lt;br /&gt;         4.  GC&lt;br /&gt;&lt;br /&gt;   4.  reuse is actually use!&lt;br /&gt;   5.  use chairs to make a bed is reuse&lt;br /&gt;   6.  using it again to sit is just use&lt;br /&gt;   7.  inheritance-based&lt;br /&gt;   8.  interface-based&lt;br /&gt;   9.  challenge is to organize code&lt;br /&gt;  10.  if you are not doing much, you become uncomfortable&lt;br /&gt;  11.  "Adaptation"?&lt;br /&gt;  12.  you cannot have virtual template functions&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-3104018469178649131?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/3104018469178649131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=3104018469178649131' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/3104018469178649131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/3104018469178649131'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2010/05/rethink-about-reuse.html' title='Rethink About Reuse'/><author><name>Sonof</name><uri>http://www.blogger.com/profile/07623912851798051774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-552732657964286833</id><published>2010-02-20T18:31:00.003+05:30</published><updated>2010-02-22T19:20:36.041+05:30</updated><title type='text'>PAPPADOM Framework</title><content type='html'>I have been working on a class of browser-based applications which don't require a server.&lt;br /&gt;Calling it PAPPADOM = Portable Application Providing Persistence Atop DOM (Document Object Model)&lt;br /&gt;&lt;br /&gt;PAPPADOM is a package consisting of&lt;br /&gt;* Prototype Javascript framework&lt;br /&gt;* Miscellaneous UI components - menubars, menu etc&lt;br /&gt;* Persistence - save stuff&lt;br /&gt;&lt;br /&gt;Advantages&lt;br /&gt;* Portable - web-browsers supporting Javascript is all you need&lt;br /&gt;* Open Data - data is stored within the HTML file and hence is accessible.&lt;br /&gt;&lt;br /&gt;Examples:&lt;br /&gt;Neptuner UBoat: &lt;a href="http://neptuner.googlecode.com/files/demo_uboat_neptuner_0_20.zip"&gt;http://neptuner.googlecode.com/files/demo_uboat_neptuner_0_20.zip&lt;/a&gt;&lt;br /&gt;Memonaut: &lt;a href="http://memonaut.googlecode.com/"&gt;http://memonaut.googlecode.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Just a fancy name...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-552732657964286833?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/552732657964286833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=552732657964286833' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/552732657964286833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/552732657964286833'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2010/02/pappadom-framework.html' title='PAPPADOM Framework'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-4979636297766334339</id><published>2010-02-12T09:19:00.006+05:30</published><updated>2010-03-11T11:30:30.389+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='STL'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Command-line Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Containers: Stick to basic types initially</title><content type='html'>STL containers may impose a few requirements on your class (say for example, class Student) before they can contain them: like comparison operators, copy-constructors and a whole bunch of other things. This can be rather daunting (not to mention irritating) for the programmer, if his class is not containment-ready just yet and there is no example/documentation at hand: the error-messages are not friendly!&lt;br /&gt;&lt;br /&gt;There might be quite a bit of boiler-plate code to add to the class Student before you can use STL containers to contain Student objects. Rather than getting your program’s core functionality up, you may find yourself just plugging in mundane code into your data-types, not to talk about all those strange-looking and mostly unreadable error-messages.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Example&lt;/b&gt;: &lt;div&gt;Say you want to make a grade-report for a group of students. It’s as simple as putting all your student records in an std::multimap, with Grade as key and iterating through the filled in multi-map (which groups the records according to the key).&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;strong&gt;class&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;Student&lt;/span&gt;&lt;br /&gt;&lt;span style="color:4444FF;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2040a0;"&gt;string&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;m_sName&lt;/span&gt;&lt;span style="color:4444FF;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#2040a0;"&gt;RollNumber&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;m_xID&lt;/span&gt;&lt;span style="color:4444FF;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2040a0;"&gt;Grade&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;m_xGrade&lt;/span&gt;&lt;span style="color:4444FF;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:4444FF;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Tip 1&lt;/b&gt;: &lt;i&gt;Work with pointers to your class&lt;/i&gt;. The use of the pointer also makes for better efficiency: no copies of your objects!&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 13px; white-space: pre; "&gt;&lt;span style="color:#2040a0;"&gt;multimap&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;Grade&lt;/span&gt;, &lt;span style="color:#2040a0;"&gt;Student&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;*&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;gaGradeReport&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Again depending on the contents of the class Grade, the compiler may squeal! It needs a comparison type LessThan before it can work…which brings me to Tip 2…&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Tip 2&lt;/b&gt;: Use basic data-types for your key in associative containers like std::set, std::map etc. The easiest way to do it is to provide a conversion operator to a basic type for your key class.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color:#2040a0;"&gt;multimap&lt;/span&gt;&lt;span style="color:4444FF;"&gt;&amp;lt;&lt;/span&gt;&lt;strong&gt;short&lt;/strong&gt;, &lt;span style="color:#2040a0;"&gt;Student&lt;/span&gt;&lt;span style="color:4444FF;"&gt;*&lt;/span&gt;&lt;span style="color:4444FF;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;gaGradeReport&lt;/span&gt;&lt;span style="color:4444FF;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#444444;"&gt;//After providing conversion to short&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;class&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;Grade&lt;/span&gt;&lt;span style="color:4444FF;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;... &lt;strong&gt;operator&lt;/strong&gt; &lt;strong&gt;short&lt;/strong&gt;&lt;span style="color:4444FF;"&gt;(&lt;/span&gt;&lt;span style="color:4444FF;"&gt;)&lt;/span&gt; &lt;span style="color:4444FF;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;...&lt;span style="color:4444FF;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:4444FF;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, serif; white-space: normal; font-size: 16px; "&gt;Implement your program on these lines, get it working and then do the boiler-plate stuff.&lt;/span&gt;&lt;/pre&gt;&lt;b&gt;Solution&lt;/b&gt;:&lt;br /&gt;Here’s how you may do the grade-report task:&lt;div&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 13px; color: rgb(68, 68, 68); white-space: pre; "&gt;//Add the student info&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;strong&gt;for&lt;/strong&gt;&lt;span style="color:4444FF;"&gt;(&lt;/span&gt;..&lt;span style="color:4444FF;"&gt;)&lt;/span&gt;&lt;span style="color:#444444;"&gt;//Iterate through the student objects one by one&lt;/span&gt;&lt;br /&gt;&lt;span style="color:4444FF;"&gt;(&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color:#444444;"&gt;//Get the address of student record in pxStudent &lt;/span&gt;&lt;br /&gt; &lt;span style="color:#2040a0;"&gt;gaGradeReport&lt;/span&gt;.&lt;span style="color:#2040a0;"&gt;insert&lt;/span&gt;&lt;span style="color:4444FF;"&gt;(&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;pair&lt;/span&gt;&lt;span style="color:4444FF;"&gt;&amp;lt;&lt;/span&gt;&lt;strong&gt;short&lt;/strong&gt;, &lt;span style="color:#2040a0;"&gt;Student&lt;/span&gt;&lt;span style="color:4444FF;"&gt;*&lt;/span&gt;&lt;span style="color:4444FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:4444FF;"&gt;(&lt;/span&gt;&lt;strong&gt;short&lt;/strong&gt;&lt;span style="color:4444FF;"&gt;(&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;pxStudent&lt;/span&gt;&lt;span style="color:4444FF;"&gt;-&lt;/span&gt;&lt;span style="color:4444FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;m_xGrade&lt;/span&gt;&lt;span style="color:4444FF;"&gt;)&lt;/span&gt;,&lt;span style="color:#2040a0;"&gt;pxStudent&lt;/span&gt;&lt;span style="color:4444FF;"&gt;)&lt;/span&gt;&lt;span style="color:4444FF;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:4444FF;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#444444;"&gt;//Print the GradeReport multimap&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;for&lt;/strong&gt;&lt;span style="color:4444FF;"&gt;(&lt;/span&gt;..&lt;span style="color:#444444;"&gt;//each grade)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:4444FF;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;  &lt;strong&gt;for&lt;/strong&gt;&lt;span style="color:4444FF;"&gt;(&lt;/span&gt;..&lt;span style="color:#444444;"&gt;//each record in range)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style="color:4444FF;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#444444;"&gt;//print the record}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:4444FF;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;b&gt;Summary&lt;/b&gt;:&lt;br /&gt;Work with basic data-types (pointers are basic data-types) for STL containers for more rapid development. Plug in the boiler-plate later.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-4979636297766334339?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/4979636297766334339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=4979636297766334339' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/4979636297766334339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/4979636297766334339'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2010/02/containers-stick-to-basic-types.html' title='Containers: Stick to basic types initially'/><author><name>Sonof</name><uri>http://www.blogger.com/profile/07623912851798051774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-5078004407974941549</id><published>2010-01-28T15:11:00.004+05:30</published><updated>2010-01-28T15:19:10.853+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='CLI'/><title type='text'>Schedule Task, View Dependencies</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On Win2K+, schedule commands to run&lt;/div&gt;&lt;div&gt;## at &lt;time&gt; "command"&lt;/div&gt;&lt;div&gt;Eg: at 07:45 "shutdown -s"&lt;/div&gt;&lt;div&gt;Shuts down the PC at 7:45 am. &lt;/div&gt;&lt;div&gt;You can view these tasks in Control Panel as well. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;On *nix, view shared library dependencies of an executable. &lt;div&gt;## ldd &lt;name&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-5078004407974941549?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/5078004407974941549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=5078004407974941549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/5078004407974941549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/5078004407974941549'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2010/01/schedule-task-view-dependencies.html' title='Schedule Task, View Dependencies'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-340155559532268623</id><published>2010-01-17T12:56:00.003+05:30</published><updated>2010-03-13T01:46:49.231+05:30</updated><title type='text'>Make It Fast!</title><content type='html'>Sharing a template for an easy to use make file system.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Self-maintaining: No need for manually adding files.&lt;/li&gt;&lt;li&gt;Quick-and-dirty: Get started fast!&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;strong&gt;Here goes&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color:#2040a0;"&gt;SOURCE_FILES=&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;$(wildcard *.cpp)&lt;/span&gt; ../../commando/sonar/Sonar.cpp&lt;br /&gt;&lt;span style="color:#444444;"&gt;# Automatically gets the file-list from the directory!&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#444444;"&gt;# Add extra files from other dirs at the end if needed (Sonar.cpp above)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#2040a0;"&gt;OBJS=&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;$(patsubst %.cpp, %.o,$(SOURCE_FILES)&lt;/span&gt;)&lt;br /&gt;&lt;span style="color:#444444;"&gt;# Rule for specifying object file list&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="color: rgb(68, 68, 68); "&gt;# The rest of this is standard make-file stuff   &lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color:#2040a0;"&gt;COMPILER=&lt;/span&gt;g++&lt;br /&gt;&lt;span style="color:#2040a0;"&gt;CFLAGS=&lt;/span&gt; -W -g -O0 -fexceptions -finline-functions -D_THREAD_SAFE -fpack-struct=4&lt;br /&gt;&lt;span style="color:#444444;"&gt;#Compiler options  &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2040a0;"&gt;LIBS=&lt;/span&gt; -lboost_filesystem&lt;br /&gt;&lt;span style="color:#444444;"&gt;#Libraries to link to  &lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;SEARCHDIRS =&lt;/span&gt; -I../inc -L../lib&lt;/pre&gt;&lt;pre&gt;&lt;span style="color:#444444;"&gt;#Include and library directories  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#2040a0;"&gt;TARGET=&lt;/span&gt; ../../homebase/linux/nuboat&lt;br /&gt;&lt;span style="color:#444444;"&gt;# Output file  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="color:#444444;"&gt;&lt;/span&gt;&lt;span style="color:#8b2252;"&gt;&lt;strong&gt;.PHONY&lt;/strong&gt;:&lt;/span&gt;all&lt;br /&gt;&lt;span style="color:#8b2252;"&gt;&lt;strong&gt;all&lt;/strong&gt;:&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;$(TARGET)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#8b2252;"&gt;&lt;strong&gt;$(TARGET)&lt;/strong&gt;:&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;$(OBJS)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2040a0;"&gt;$(COMPILER)&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;$(CFLAGS)&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;$(SEARCHDIRS)&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;$(GLOBALS)&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;$(OBJS)&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;$(LIBS)&lt;/span&gt; -o &lt;span style="color:#2040a0;"&gt;$(TARGET)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#8b2252;"&gt;&lt;strong&gt;%.o&lt;/strong&gt;:&lt;/span&gt; %.cpp&lt;br /&gt;&lt;span style="color:#2040a0;"&gt;$(COMPILER)&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;$(CFLAGS)&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;$(SEARCHDIRS)&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;$(GLOBALS)&lt;/span&gt; -o &lt;span style="color:#4080ff;"&gt;$@&lt;/span&gt; -c &lt;span style="color:#4080ff;"&gt;$&amp;lt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#8b2252;"&gt;&lt;br /&gt;&lt;strong&gt;.PHONY&lt;/strong&gt;:&lt;/span&gt;clean&lt;br /&gt;&lt;span style="color:#8b2252;"&gt;&lt;strong&gt;clean&lt;/strong&gt;:&lt;/span&gt;&lt;br /&gt;-rm -f &lt;span style="color:#2040a0;"&gt;$(OBJS)&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;$(TARGET)&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can use this so long as you don't have source files floating around in the Makefile's directory, which should not be included in the build.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-340155559532268623?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/340155559532268623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=340155559532268623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/340155559532268623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/340155559532268623'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2010/01/make-it-fast.html' title='Make It Fast!'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-2308304533698809805</id><published>2009-12-13T01:12:00.000+05:30</published><updated>2010-03-11T01:15:22.419+05:30</updated><title type='text'>Neptuner Coding Guidelines</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; "&gt;&lt;div id="maincol" style="margin-top: 3px; padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; "&gt;&lt;div class="expand"&gt;&lt;div class="fc" style="padding-top: 1em; position: relative; width: 1238px; min-height: 30em; "&gt;&lt;table class="opened" id="review_comment_area" style="border-collapse: collapse; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;tbody style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;tr style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td id="lines" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; vertical-align: top; "&gt;&lt;pre class="prettyprint " style="font-size: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(204, 204, 204); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; "&gt;&lt;table style="border-collapse: collapse; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;tbody style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;tr id="sl_svn386_1" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;==========================&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_2" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;NEPTUNER Coding Guidelines&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_3" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;- sonofdelphi&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_4" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;2009-12-13&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_5" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;2008-12-16&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_6" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;==========================&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_7" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_8" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* To enable faster coding with an IDE&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_9" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* To enable better debugging, no guessing what a variable is!&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_10" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_11" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;Variable naming&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_12" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;================&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_13" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_14" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;Variables are named as:&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_15" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;&lt;scope&gt;&lt;indirection&gt;&lt;aggregation&gt;&lt;usage&gt;&lt;nameintitlecase&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_16" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_17" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;Scope Modifier&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_18" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* Member variables start with m_&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_19" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* Global variables start with g_&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_20" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* Function Parameters start with "in_"&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_21" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* Local variables don't have a scope modifier&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_22" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_23" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;Indirection Modifier&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_24" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* Pointer variables start with p&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_25" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* Reference variables start with r&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_26" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* Other variables don't have an indirection modifier&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_27" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_28" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;Aggregation Modifier&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_29" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* a - aggregates (arrays, vectors, lists etc)&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_30" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* Plain variables don't have an aggregation modifier&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_31" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_32" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;Usage Modifier&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_33" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* n - used for counting&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_34" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* s - used as string&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_35" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* c - character&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_36" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* b - used as boolean&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_37" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* f - used as a function. Deprecated though.&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_38" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* e - enumeration types&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_39" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* x - other structs, x = Complex = non-simple&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_40" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* Other types (what are they?:-) don't have a usage modifier.&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_41" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_42" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;Indentation&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_43" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;=============&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_44" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* Use a single indent for every {} block.&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_45" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_46" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* { and } should be on new lines, at the same indentation level as the conditional.&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_47" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;Eg:&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_48" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;if(someCondition)&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_49" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;{&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_50" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt; statement1;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_51" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt; statement2;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_52" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;}&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_53" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_54" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* Single line conditionals need not have {} marking.&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_55" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;  But make sure you indent the single statement.&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_56" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_57" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;Type naming&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_58" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;=============&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_59" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* Follow TitleCasing for user-defined types - classes, structs, enums.&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_60" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;Eg:&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_61" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;class Student&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_62" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;{&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_63" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt; string m_sName;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_64" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt; int    m_nMarks;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_65" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;};&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_66" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_67" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;Function naming&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_68" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;================&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_69" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* Functions should follow camelCase.&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_70" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* The first word of a function should be a verb.&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_71" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;Eg: doSomeThing()&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_72" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_73" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;Pseudoclass functions&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_74" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;======================&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_75" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;* For C-style module functions, name as ModuleName_&lt;camelcasefunctionname&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_76" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;Eg: Neptuner_addStuff&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr id="sl_svn386_77" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td class="source" style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; white-space: pre; vertical-align: top; "&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="font-size: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(204, 204, 204); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; "&gt;&lt;table width="100%" style="border-collapse: collapse; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;tbody style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;tr class="cursor_stop cursor_hidden" style="background-color: white; height: 2px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: white; height: 2px; vertical-align: top; "&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div id="log" style="position: absolute; top: 2px; right: 0px; width: 28em; "&gt;&lt;div style="text-align: right; "&gt;&lt;a class="ifExpand" href="http://code.google.com/p/neptuner/source/browse/codebase/trunk/coding.txt#" onclick="_toggleMeta('', 'p', 'neptuner', this)" style="color: rgb(0, 0, 204); "&gt;Hide details&lt;/a&gt;&lt;/div&gt;&lt;div class="ifExpand"&gt;&lt;div class="pmeta_bubble_bg" style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(229, 236, 249); margin-bottom: 0.6em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: white; border-right-color: white; border-bottom-color: white; border-left-color: white; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;div class="round4" style="border-left-width: 4px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 4px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;div class="round2" style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 2px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;div class="round1" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;div class="box-inner" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 13px; "&gt;&lt;div id="changelog"&gt;&lt;p style="font-size: 16px; margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;Change log&lt;/p&gt;&lt;div&gt;&lt;a href="http://code.google.com/p/neptuner/source/detail?spec=svn392&amp;amp;r=386" style="color: rgb(0, 0, 204); "&gt;r386&lt;/a&gt; by sonofdelphi on Jan 26, 2010   &lt;a href="http://code.google.com/p/neptuner/source/diff?spec=svn392&amp;amp;r=386&amp;amp;format=side&amp;amp;path=/codebase/trunk/coding.txt&amp;amp;old_path=/codebase/trunk/coding.txt&amp;amp;old=378" style="color: rgb(0, 0, 204); "&gt;Diff&lt;/a&gt;&lt;/div&gt;&lt;pre style="font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0.3em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;dos2unix lineendings&lt;/pre&gt;&lt;/div&gt;&lt;div id="review_nav" style="border-top-width: 3px; border-top-style: solid; border-top-color: white; padding-top: 6px; margin-top: 1em; "&gt;&lt;table style="border-collapse: collapse; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;tbody style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;tr style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;td style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; vertical-align: middle; "&gt;Go to: &lt;/td&gt;&lt;td style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; vertical-align: middle; "&gt;&lt;select name="files_in_rev" onchange="window.location=this.value" style="font-family: arial, sans-serif; margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/Readme.txt?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/Readme.txt&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Argument.h?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Argument.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Ark.cpp?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Ark.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Ark.h?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Ark.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Complexity.cpp?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Complexity.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Complexity.h?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Complexity.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Location.h?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Location.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Makefile?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Makefile&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Method.h?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Method.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Module.h?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Module.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Neptuner.cpp?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Neptuner.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Neptuner.h?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Neptuner.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Radar.cpp?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Radar.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Radar.h?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Radar.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Return.h?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Return.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/SourceUnit.cpp?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/SourceUnit.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/SourceUnit.h?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/SourceUnit.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Symbol.cpp?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Symbol.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/Symbol.h?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/Symbol.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/SymbolTable.cpp?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/SymbolTable.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/ark/SymbolTable.h?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/ark/SymbolTable.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/backpack/ammo/StreamOps.cpp?r=386&amp;amp;spec=svn392"&gt;...runk/backpack/ammo/StreamOps.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/backpack/ammo/StringOps.cpp?r=386&amp;amp;spec=svn392"&gt;...runk/backpack/ammo/StringOps.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/backpack/ammo/StringOps.h?r=386&amp;amp;spec=svn392"&gt;.../trunk/backpack/ammo/StringOps.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/backpack/ammo/Timer.h?r=386&amp;amp;spec=svn392"&gt;...base/trunk/backpack/ammo/Timer.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/backpack/blanks/NJFIND.c?r=386&amp;amp;spec=svn392"&gt;...e/trunk/backpack/blanks/NJFIND.c&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/backpack/blanks/odoDB.c?r=386&amp;amp;spec=svn392"&gt;...se/trunk/backpack/blanks/odoDB.c&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/backpack/turbo/ScopePrinter.cpp?r=386&amp;amp;spec=svn392"&gt;.../backpack/turbo/ScopePrinter.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/backpack/turbo/ScopePrinter.h?r=386&amp;amp;spec=svn392"&gt;...nk/backpack/turbo/ScopePrinter.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/changelog.txt?r=386&amp;amp;spec=svn392"&gt;/codebase/trunk/changelog.txt&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/coding.txt?r=386&amp;amp;spec=svn392" selected="selected"&gt;/codebase/trunk/coding.txt&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/minesweeper/Datalyzer.cpp?r=386&amp;amp;spec=svn392"&gt;...mmando/minesweeper/Datalyzer.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/minesweeper/Datalyzer.h?r=386&amp;amp;spec=svn392"&gt;...commando/minesweeper/Datalyzer.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/minesweeper/Makefile?r=386&amp;amp;spec=svn392"&gt;...nk/commando/minesweeper/Makefile&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/minesweeper/info.txt?r=386&amp;amp;spec=svn392"&gt;...nk/commando/minesweeper/info.txt&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/minesweeper/nminesweeper.cpp?r=386&amp;amp;spec=svn392"&gt;...ndo/minesweeper/nminesweeper.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/periscope/HTMLizer.cpp?r=386&amp;amp;spec=svn392"&gt;.../commando/periscope/HTMLizer.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/periscope/HTMLizer.h?r=386&amp;amp;spec=svn392"&gt;...nk/commando/periscope/HTMLizer.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/periscope/Makefile?r=386&amp;amp;spec=svn392"&gt;...runk/commando/periscope/Makefile&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/periscope/info.txt?r=386&amp;amp;spec=svn392"&gt;...runk/commando/periscope/info.txt&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/periscope/nperiscope.cpp?r=386&amp;amp;spec=svn392"&gt;...ommando/periscope/nperiscope.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/sapper/Makefile?r=386&amp;amp;spec=svn392"&gt;...e/trunk/commando/sapper/Makefile&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/sapper/Sapper.cpp?r=386&amp;amp;spec=svn392"&gt;...trunk/commando/sapper/Sapper.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/sapper/Sapper.h?r=386&amp;amp;spec=svn392"&gt;...e/trunk/commando/sapper/Sapper.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/sapper/info.txt?r=386&amp;amp;spec=svn392"&gt;...e/trunk/commando/sapper/info.txt&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/sapper/nsapper.cpp?r=386&amp;amp;spec=svn392"&gt;...runk/commando/sapper/nsapper.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/sonar/Makefile?r=386&amp;amp;spec=svn392"&gt;...se/trunk/commando/sonar/Makefile&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/sonar/Sonar.cpp?r=386&amp;amp;spec=svn392"&gt;...e/trunk/commando/sonar/Sonar.cpp&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/sonar/Sonar.h?r=386&amp;amp;spec=svn392"&gt;...ase/trunk/commando/sonar/Sonar.h&lt;/option&gt;    &lt;option value="/p/neptuner/source/browse/codebase/trunk/commando/sonar/info.txt?r=386&amp;amp;spec=svn392"&gt;...se/trunk/commando/sonar/info.txt&lt;/option&gt;    &lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div id="review_instr" class="closed"&gt;&lt;div class="ifClosed"&gt;Double click a line to add a comment&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="round1" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;div class="round2" style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 2px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;div class="round4" style="border-left-width: 4px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 4px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="pmeta_bubble_bg" style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(229, 236, 249); margin-bottom: 0.6em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: white; border-right-color: white; border-bottom-color: white; border-left-color: white; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;div class="round4" style="border-left-width: 4px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 4px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;div class="round2" style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 2px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;div class="round1" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;div class="box-inner" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 13px; "&gt;&lt;div id="older_bubble"&gt;&lt;p style="font-size: 16px; margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;Older revisions&lt;/p&gt;&lt;div class="closed" style="margin-bottom: 3px; "&gt;&lt;img class="ifClosed" onclick="_toggleHidden(this)" src="http://www.gstatic.com/codesite/ph/images/plus.gif" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /&gt; &lt;a href="http://code.google.com/p/neptuner/source/detail?spec=svn392&amp;amp;r=378" style="color: rgb(0, 0, 204); "&gt;r378&lt;/a&gt; by sonofdelphi on Dec 20, 2009   &lt;a href="http://code.google.com/p/neptuner/source/diff?spec=svn392&amp;amp;r=378&amp;amp;format=side&amp;amp;path=/codebase/trunk/coding.txt&amp;amp;old_path=/codebase/trunk/coding.txt&amp;amp;old=181" style="color: rgb(0, 0, 204); "&gt;Diff&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="closed" style="margin-bottom: 3px; "&gt;&lt;img class="ifClosed" onclick="_toggleHidden(this)" src="http://www.gstatic.com/codesite/ph/images/plus.gif" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /&gt; &lt;a href="http://code.google.com/p/neptuner/source/detail?spec=svn392&amp;amp;r=181" style="color: rgb(0, 0, 204); "&gt;r181&lt;/a&gt; by sonofdelphi on Oct 10, 2009   &lt;a href="http://code.google.com/p/neptuner/source/diff?spec=svn392&amp;amp;r=181&amp;amp;format=side&amp;amp;path=/codebase/trunk/coding.txt&amp;amp;old_path=/codebase/trunk/coding.txt&amp;amp;old=161" style="color: rgb(0, 0, 204); "&gt;Diff&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="closed" style="margin-bottom: 3px; "&gt;&lt;img class="ifClosed" onclick="_toggleHidden(this)" src="http://www.gstatic.com/codesite/ph/images/plus.gif" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /&gt; &lt;a href="http://code.google.com/p/neptuner/source/detail?spec=svn392&amp;amp;r=161" style="color: rgb(0, 0, 204); "&gt;r161&lt;/a&gt; by sonofdelphi on Oct 09, 2009   &lt;a href="http://code.google.com/p/neptuner/source/diff?spec=svn392&amp;amp;r=161&amp;amp;format=side&amp;amp;path=/codebase/trunk/coding.txt&amp;amp;old_path=/codebase/trunk/coding.txt&amp;amp;old=6" style="color: rgb(0, 0, 204); "&gt;Diff&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://code.google.com/p/neptuner/source/list?path=/codebase/trunk/coding.txt&amp;amp;start=386" style="color: rgb(0, 0, 204); "&gt;All revisions of this file&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="round1" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;div class="round2" style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 2px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;div class="round4" style="border-left-width: 4px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 4px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="pmeta_bubble_bg" style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(229, 236, 249); margin-bottom: 0.6em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: white; border-right-color: white; border-bottom-color: white; border-left-color: white; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;div class="round4" style="border-left-width: 4px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 4px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;div class="round2" style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 2px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;div class="round1" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;div class="box-inner" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 13px; padding-bottom: 0px; padding-left: 13px; "&gt;&lt;div id="fileinfo_bubble"&gt;&lt;p style="font-size: 16px; margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;File info&lt;/p&gt;&lt;div&gt;Size: 1790 bytes, 77 lines&lt;/div&gt;&lt;div&gt;&lt;a href="http://neptuner.googlecode.com/svn/codebase/trunk/coding.txt"&gt;View raw file&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="round1" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;div class="round2" style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 2px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;div class="round4" style="border-left-width: 4px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-right-width: 4px; border-right-style: solid; border-right-color: rgb(255, 255, 255); font-size: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 1px; "&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="footer" dir="ltr" style="clear: both; text-align: center; margin-top: 3.5em; margin-bottom: 1em; height: 53px; background-position: 0% 50%; background-repeat: no-repeat no-repeat; "&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-2308304533698809805?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/2308304533698809805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=2308304533698809805' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2308304533698809805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2308304533698809805'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2009/12/neptuner-coding-guidelines.html' title='Neptuner Coding Guidelines'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-8585637948828334696</id><published>2009-09-16T11:04:00.002+05:30</published><updated>2010-03-09T18:44:46.668+05:30</updated><title type='text'>I Could Have Done It Too</title><content type='html'>With application development, the question is not whether you could have done it; it's whether you did it at all.  &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Do you believe in your idea enough to invest the time and the effort it takes to do it?&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-8585637948828334696?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/8585637948828334696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=8585637948828334696' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/8585637948828334696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/8585637948828334696'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2009/09/i-could-have-done-it-too.html' title='I Could Have Done It Too'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-553987742233402490</id><published>2009-06-29T20:58:00.007+05:30</published><updated>2009-06-30T15:45:41.804+05:30</updated><title type='text'>Thomanujan Number - 1229</title><content type='html'>INVALID POST&lt;br /&gt;Thanks to Jeswin for pointing out bug in code.&lt;br /&gt;:S :( Sheepish smile&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-553987742233402490?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/553987742233402490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=553987742233402490' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/553987742233402490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/553987742233402490'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2009/06/thomanujan-number-1229.html' title='Thomanujan Number - 1229'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-8852264049744775498</id><published>2009-05-27T13:17:00.003+05:30</published><updated>2010-03-11T11:39:28.234+05:30</updated><title type='text'>Baseline Semantics</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"   style="font-family:Arial, sans-serif;font-size:100%;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="Apple-style-span"   style="font-family:Arial, sans-serif;font-size:100%;"&gt;&lt;p class="MsoNormal"&gt;The term &lt;b&gt;Baseline &lt;/b&gt;can often be a source of confusion.&lt;/p&gt;&lt;p class="MsoNormal"&gt;In my experience with Configuration Management and other tools (Microsoft Project etc), a baseline is anything “that can serve as a basis for comparison” – this may or may not be approved. SVN, in fact, skirts this baseline issue by defining the alternate terminology “tag” for the same thing!&lt;/p&gt;&lt;p class="MsoNormal"&gt;I believe our problems stem from the–&lt;/p&gt;&lt;p class="MsoNormal"&gt;1) Informal use of baseline as a verb, with the meaning ‘to approve’.&lt;/p&gt;&lt;p class="MsoNormal"&gt;2) Lack of formalization of what type of baseline (and there are many kinds, refer below!) we refer to when we generically use the term baseline&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b&gt;References&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;i&gt;Dictionary definition:&lt;/i&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Noun: baseline&lt;/p&gt;&lt;p class="MsoNormal"&gt;1. An imaginary line or standard by which things are measured or compared&lt;/p&gt;&lt;p class="MsoNormal"&gt;(&lt;b&gt;TJ&lt;/b&gt;: Other meanings for sake of completeness, also note “imaginary” J in 1)&lt;/p&gt;&lt;p class="MsoNormal"&gt;2. The back line bounding each end of a tennis or handball court; when serving the server must not step over this line&lt;/p&gt;&lt;p class="MsoNormal"&gt;3. The lines a baseball player must follow while running the bases&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;i&gt;Wikipedia mentions:&lt;/i&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Generally, a baseline may be a single work product, or set of work products that can be used as a logical basis for comparison. A baseline may also be established (whose work products meet certain criteria) as the basis for subsequent select activities. Such activities may be attributed with formal approval.&lt;/p&gt;&lt;p class="MsoNormal"&gt;There are different kinds of baselines (from Wikipedia).&lt;/p&gt;&lt;p class="MsoNormal"&gt;Functional Baseline: initial specifications established; contract, etc. Allocated Baseline: state of work products once requirements are approved &lt;/p&gt;&lt;p class="MsoNormal"&gt;Developmental Baseline: state of work products amid development&lt;/p&gt;&lt;p class="MsoNormal"&gt;Product Baseline: contains the releasable contents of the project&lt;/p&gt;&lt;p class="MsoNormal"&gt;Others, based upon proprietary business practices&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;i&gt;CMMi itself defines it multiply as (from CMMi-DEV 1.2 &lt;/i&gt;)&lt;/p&gt;&lt;p class="MsoNormal"&gt;A baseline is a set of specifications or work products that has been formally reviewed and agreed on, that thereafter serves as the basis for further development or delivery, and that can be changed only through change control procedures. A baseline represents the assignment of an identifier to a configuration item or a collection of configuration items and associated entities. As a product evolves, several baselines may be used to control its development and testing.&lt;/p&gt;&lt;p class="MsoNormal"&gt;For Systems Engineering&lt;/p&gt;&lt;p class="MsoNormal"&gt;One common set of baselines includes the system-level requirements, system-element-level design requirements, and the product definition at the end of development/beginning of production. These are typically referred to as the “functional baseline,” “allocated baseline,” and “product baseline.”&lt;/p&gt;&lt;p class="MsoNormal"&gt;For Software Engineering&lt;/p&gt;&lt;p class="MsoNormal"&gt;A software baseline can be a set of requirements, design, source code files and the associated executable code, build files, and user documentation (associated entities) that have been assigned a unique identifier.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b&gt;TJ&lt;/b&gt;:&lt;/p&gt;&lt;p class="MsoNormal"&gt;In my opinion, attaching extra, “holy” meanings to an-already polymorphic word would not be appropriate. It would be a classic case of jargon-clash and would lead to inter-personal communication problems and possibly conflict!&lt;/p&gt;&lt;p class="MsoNormal"&gt;It would also mean an incurrence of training (un-training) overhead and would be the proverbial seed for discontent in a new adopter.&lt;/p&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"   style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-ansi-language:EN-USfont-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-8852264049744775498?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/8852264049744775498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=8852264049744775498' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/8852264049744775498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/8852264049744775498'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2009/05/baseline-semantics.html' title='Baseline Semantics'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-7596470417030028030</id><published>2009-01-01T21:51:00.000+05:30</published><updated>2009-06-10T21:54:59.804+05:30</updated><title type='text'>INTEGRATE – 2008 - Changes done for 2K9</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span style="font-family:Wingdings;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Wingdings;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Arial;"&gt;0 error(s), &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Wingdings;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Wingdings;"&gt;0&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Arial;"&gt; warning(s), 1  greeting(s)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;color:navy;"&gt;&lt;span style="font-weight: bold; font-size: 10pt; color: navy; font-family: Arial;"&gt;Wish  you a Happy New Year! &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Arial;"&gt;Log  attached.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-7596470417030028030?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/7596470417030028030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=7596470417030028030' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/7596470417030028030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/7596470417030028030'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2009/01/integrate-2008-changes-done-for-2k9.html' title='INTEGRATE – 2008 - Changes done for 2K9'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-884163685562001183</id><published>2008-12-14T11:18:00.001+05:30</published><updated>2009-05-19T12:17:21.490+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Command-line Tips'/><title type='text'>Recipe - Do Something To Each File In Directory</title><content type='html'>This one is a real life-saver!&lt;br /&gt;&lt;br /&gt;To do the same operation on each file, in Windows, you can use the for command.&lt;br /&gt;for /F %i in ('dir *.dbg /s/b ') do @del %i&lt;br /&gt;&lt;br /&gt;The above example deletes all *.dbg files under the current directory&lt;br /&gt;&lt;br /&gt;Explanation&lt;br /&gt;for /F %i ......... for each %i&lt;br /&gt;in('dir *.dbg /s/b ') ..... in the list returned by the command. dir /s specifies a recursive search, /b causes it to to output just a list, without the file details&lt;br /&gt;do @del %i ...... del %i is the command to delete the file. @ suppresses the display of the command&lt;br /&gt;&lt;br /&gt;Recipe Syntax&lt;br /&gt;for /F {%var} in ('{list-builder-command}&lt;list-builder-command&gt;')  do {action-command} &lt;action&gt;&lt;/action&gt;&lt;/list-builder-command&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-884163685562001183?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/884163685562001183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=884163685562001183' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/884163685562001183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/884163685562001183'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2008/12/recipe-do-something-to-each-file-in.html' title='Recipe - Do Something To Each File In Directory'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-5052897289950759283</id><published>2008-11-11T10:07:00.000+05:30</published><updated>2008-11-30T10:10:59.880+05:30</updated><title type='text'>Digital Peer</title><content type='html'>Found a really cool and useful site while browsing around&lt;br /&gt;&lt;a href="http://www.digitalpeer.com"&gt;http://www.digitalpeer.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There are tips, tutorials and articles here.&lt;br /&gt;&lt;br /&gt;Hope it stays online!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-5052897289950759283?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/5052897289950759283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=5052897289950759283' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/5052897289950759283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/5052897289950759283'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2008/11/digital-peer.html' title='Digital Peer'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-8840531639077291549</id><published>2008-07-26T03:46:00.000+05:30</published><updated>2008-07-26T03:47:48.848+05:30</updated><title type='text'>On Reviews</title><content type='html'>Reviews are like makeup; they can't make you beautiful, only less ugly.&lt;br /&gt;- TJ&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-8840531639077291549?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/8840531639077291549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=8840531639077291549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/8840531639077291549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/8840531639077291549'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2008/07/on-reviews.html' title='On Reviews'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-1391788748262701702</id><published>2008-01-28T09:57:00.004+05:30</published><updated>2010-03-11T09:14:09.045+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Perly Gates</title><content type='html'>&lt;b&gt;Tip 1:&lt;br /&gt;Replacing string content with another string when both could contain backslashes.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;Basically, you have to use \Q to escape. Otherwise, the contents of the strings (search &amp;amp; replace strings) will be interpreted as escape sequences.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Example&lt;/i&gt;:&lt;br /&gt;The following is an extract from a script to get the relative path of a file with respect to a base-directory.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color:#444444;"&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;$BASE&lt;/span&gt; = &lt;span style="color:#008000;"&gt;"d:&lt;span style="color:#77dd77;"&gt;\s&lt;/span&gt;ource&lt;span style="color:#77dd77;"&gt;\"&lt;/span&gt;;&lt;br /&gt;print "&lt;/span&gt;Base : &lt;span style="color:#2040a0;"&gt;$BASE&lt;/span&gt;\n&lt;span style="color:#008000;"&gt;";&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#2040a0;"&gt;$TARGET&lt;/span&gt; = "&lt;/span&gt;d:\source\temp\test.txt&lt;span style="color:#008000;"&gt;";&lt;br /&gt;print "&lt;/span&gt;Original : &lt;span style="color:#2040a0;"&gt;$TARGET&lt;/span&gt;\n&lt;span style="color:#008000;"&gt;";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#2040a0;"&gt;$TARGET&lt;/span&gt; =~ s/&lt;span style="color:#77dd77;"&gt;\Q&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;$BASE&lt;/span&gt;//;&lt;br /&gt;#Replacing with null string&lt;br /&gt;#syntax for replace:&lt;br /&gt;#TargetString =~ is s/SearchString/ReplaceString/&lt;br /&gt;&lt;br /&gt;print "&lt;/span&gt;Modified : &lt;span style="color:#2040a0;"&gt;$TARGET&lt;/span&gt;\n&lt;span style="color:#008000;"&gt;";&lt;br /&gt;#Target becomes "&lt;/span&gt;temp\test.txt"&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Tip 2:&lt;br /&gt;Replace backslashes with forward slash.&lt;/b&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;If you do this the regular way, the regex you write will likely look like a squiggly drawing :) Something like /\/\\/ ;), which is a pain to read or debug.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color:#444444;"&gt;#!/usr/bin/perl&lt;br /&gt;# In Perl, any character can be used to delimit the regex! Here, using @ as separator&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;$STRING&lt;/span&gt; =~&lt;span style="color:#b000d0;"&gt; s@\\@/@g&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Yeah, it's still ugly and we need to escape the backslash as \\, but that's they way it goes. Use this tip whenever you need to replace&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Tip 3:&lt;br /&gt;Get command line output into a variable&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Here's a function to do this. Takes two parameters, the command-string to execute and a boolean option for showing the output on the display.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;strong&gt;sub&lt;font color="#ff0000"&gt; getCommandOutput&lt;/font&gt;&lt;br /&gt;{&lt;/strong&gt;&lt;br /&gt; &lt;strong&gt;my&lt;/strong&gt; &lt;font color="#4444ff"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/font&gt;&lt;font color="#2040a0"&gt;$COMMAND&lt;/font&gt;, &lt;font color="#2040a0"&gt;$DISPLAYOUTPUT&lt;/font&gt;&lt;font color="#4444ff"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/font&gt; = &lt;font color="#2040a0"&gt;@_&lt;/font&gt;;&lt;br /&gt; &lt;br /&gt; &lt;font color="#a52a2a"&gt;&lt;strong&gt;open&lt;/strong&gt;&lt;/font&gt;&lt;font color="#4444ff"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/font&gt;COMMAND_OUTPUT, &lt;font color="#008000"&gt;"&lt;font color="#2040a0"&gt;$COMMAND&lt;/font&gt; 2 &amp;gt;&amp;amp;1 |"&lt;/font&gt;&lt;font color="#4444ff"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/font&gt;;&lt;br /&gt; &lt;strong&gt;my&lt;/strong&gt; &lt;font color="#2040a0"&gt;@OUTPUTLINES&lt;/font&gt; = &amp;lt;COMMAND_OUTPUT&amp;gt;;&lt;br /&gt; &lt;font color="#a52a2a"&gt;&lt;strong&gt;chomp&lt;/strong&gt;&lt;/font&gt;&lt;font color="#4444ff"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/font&gt;&lt;font color="#2040a0"&gt;@OUTPUTLINES&lt;/font&gt;&lt;font color="#4444ff"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/font&gt;;&lt;br /&gt; &lt;font color="#a52a2a"&gt;&lt;strong&gt;close&lt;/strong&gt;&lt;/font&gt;&lt;font color="#4444ff"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/font&gt;COMMAND_OUTPUT&lt;font color="#4444ff"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/font&gt;;&lt;br /&gt;&lt;br /&gt; &lt;strong&gt;foreach&lt;/strong&gt; &lt;font color="#2040a0"&gt;$OUTPUTLINE&lt;/font&gt;&lt;font color="#4444ff"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/font&gt;&lt;font color="#2040a0"&gt;@OUTPUTLINES&lt;/font&gt;&lt;font color="#4444ff"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/font&gt;&lt;font color="#4444ff"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;  &lt;font color="#a52a2a"&gt;&lt;strong&gt;print&lt;/strong&gt;&lt;/font&gt; &lt;font color="#008000"&gt;"&lt;font color="#77dd77"&gt;\n&lt;/font&gt;&lt;font color="#2040a0"&gt;$OUTPUTLINE&lt;/font&gt;"&lt;/font&gt; &lt;strong&gt;if&lt;/strong&gt; &lt;font color="#2040a0"&gt;$DISPLAYOUTPUT&lt;/font&gt;;&lt;br /&gt; &lt;font color="#4444ff"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt; &lt;font color="#a52a2a"&gt;&lt;strong&gt;print&lt;/strong&gt;&lt;/font&gt;&lt;font color="#4444ff"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/font&gt;&lt;font color="#008000"&gt;"&lt;font color="#77dd77"&gt;\n&lt;/font&gt;"&lt;/font&gt;&lt;font color="#4444ff"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/font&gt; &lt;strong&gt;if&lt;/strong&gt; &lt;font color="#4444ff"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/font&gt;&lt;font color="#2040a0"&gt;$DISPLAYOUTPUT&lt;/font&gt;&lt;font color="#4444ff"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/font&gt;;&lt;br /&gt; &lt;strong&gt;return&lt;/strong&gt; &lt;font color="#2040a0"&gt;@OUTPUTLINES&lt;/font&gt;;&lt;br /&gt;&lt;br /&gt;&lt;font color="#4444ff"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;# TODO You may want to capture the error stream separately&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The function returns the output of the command as an array which you can store into a variable.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-1391788748262701702?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/1391788748262701702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=1391788748262701702' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/1391788748262701702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/1391788748262701702'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2008/01/perly-gates.html' title='Perly Gates'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-4335005248651861440</id><published>2007-12-13T23:58:00.000+05:30</published><updated>2007-12-14T00:43:43.734+05:30</updated><title type='text'>Commentstipation</title><content type='html'>When it comes to commenting the code, the cat gets the typing fingers of even creative and knowledgeable programmers. Often we are focused on just getting the code working &lt;span style="font-style: italic;"&gt;(We'll comment later! The code has to work first!)&lt;/span&gt; and then we forget (&lt;span style="font-style: italic;"&gt;what was that again? it's obvious, also time to go home...&lt;/span&gt;)!&lt;br /&gt;&lt;br /&gt;Code should be self-explanatory and hence self-commenting, as far as possible. But this definitely does not mean that there should be no comments.&lt;br /&gt;&lt;br /&gt;Good comments are hard to come by because of - &lt;br /&gt;a) I-Am-A-Programmer-Not-A-Writer attitude&lt;br /&gt;Well, &lt;a href="http://oozone.blogspot.com/2007/09/code-is-prose.html"&gt;you are a writer too&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;b) "I don't know English that well" excuse&lt;br /&gt;Grammatical errors are fine, spelling mistakes are also OK. Write in your native tongue and translate it, if need be. And, if what the code does is that tough to explain, then it's also the more reason to document it, it probably &lt;span style="font-style: italic;"&gt;needs &lt;/span&gt;to be documented!&lt;br /&gt;&lt;br /&gt;Remember the programming adage: Documentation is like sex, something is better than nothing! ;-) But, it must be said, inaccurate documentation is worse than no documentation. An addition to the adage is perhaps needed...&lt;span style="font-weight: bold;"&gt;having it the wrong way is probably worse than not having it at all!&lt;/span&gt; ;-)&lt;br /&gt;&lt;br /&gt;TIPS&lt;br /&gt;--------&lt;br /&gt;* A comment should, at the very least, explain and focus on what is special in the block of code. A very good comment also explain why it is being done.&lt;br /&gt;&lt;br /&gt;* The best comments explain the what &lt;span style="font-style: italic;"&gt;and &lt;/span&gt;the why succinctly.&lt;br /&gt;&lt;br /&gt;* How to comment&lt;br /&gt;1. Ask yourself "What?"&lt;br /&gt;2. Ask yourself "Why?"&lt;br /&gt;3. Write what you would say to someone so that he could do what you have done. Use simple language. (This point intentionally abstruse, to serve as a memory-aid)&lt;br /&gt;4. Review and edit what you have written, the best you can.&lt;br /&gt;&lt;br /&gt;* Do not state the obvious! But also remember that what is obvious to you may not be obvious to another person. It's a thin line between advising and preaching.&lt;br /&gt;Code like:&lt;br /&gt;x=0; // Assigning the value 0 to the variable x&lt;br /&gt;is a big no-no. Do not insult the intelligence of the reader. Plus, you'll have to scroll more while editing the code!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-4335005248651861440?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/4335005248651861440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=4335005248651861440' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/4335005248651861440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/4335005248651861440'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/12/commentstipation.html' title='Commentstipation'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-7564832106991570582</id><published>2007-12-10T01:37:00.000+05:30</published><updated>2007-12-14T01:39:04.890+05:30</updated><title type='text'>Coding Nirvana - Cryptic Mystic Droppings</title><content type='html'>&lt;span style="font-weight: bold;"&gt;CRYPTIC MYSTIC&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; DROPPINGS&lt;br /&gt;FROM THE ELEVATED STATE&lt;br /&gt;OF &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;CODING NIRVANA&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;1. Code is just symbols.&lt;br /&gt;&lt;br /&gt;2. Code needs a Thread of Life to achieve its Purpose.&lt;br /&gt;&lt;br /&gt;3. It's all about the data.&lt;br /&gt;&lt;br /&gt;4. It's all virtual. It can be faked but it doesn't really matter; it isn't really matter anyway.&lt;br /&gt;&lt;br /&gt;More on each of these droppings (shit!) later.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-7564832106991570582?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/7564832106991570582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=7564832106991570582' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/7564832106991570582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/7564832106991570582'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/12/coding-nirvana-cryptic-mystic-droppings.html' title='Coding Nirvana - Cryptic Mystic Droppings'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-5974940273675418836</id><published>2007-12-08T00:45:00.000+05:30</published><updated>2007-12-14T01:40:55.645+05:30</updated><title type='text'>Coding Nirvana - Four Noble Truths</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;CRYPTIC MYSTIC&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; DROPPINGS&lt;br /&gt;FROM THE ELEVATED STATE&lt;br /&gt;OF &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;CODING NIRVANA&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-----------------------------------------------------------&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;FOUR NOBLE TRUTHS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-----------------------------------------------------------&lt;/span&gt;&lt;br /&gt;1. There is suffering&lt;br /&gt;2. There is a cause of suffering. The cause is "Copy-paste"&lt;br /&gt;3. There is the cessation of suffering - "Abstraction Of Commonality"&lt;br /&gt;4. There is a way leading to the cessation of suffering — the Noble Eightfold Path&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;"&lt;/span&gt;&lt;span style="font-style: italic;"&gt;Copy-paste is the root cause of all programming suffering. Copy-paste is evil. The Eternal Conflict is between copy-paste and the Abstraction of Commonality."&lt;br /&gt;- The Virtual Mystic&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-5974940273675418836?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/5974940273675418836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=5974940273675418836' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/5974940273675418836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/5974940273675418836'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/12/coding-nirvana-four-noble-truths.html' title='Coding Nirvana - Four Noble Truths'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-2386454753355645339</id><published>2007-11-25T01:26:00.000+05:30</published><updated>2007-11-28T09:22:48.615+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Powershot Intermediate'/><title type='text'>C Powershot - Pointers</title><content type='html'>&lt;span style="font-weight: bold;"&gt;INTRO&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;---------&lt;/span&gt;&lt;br /&gt;How should one interpret the following lines of C?&lt;br /&gt;&lt;br /&gt;int *p;&lt;br /&gt;"easy! p is an integer pointer!"&lt;br /&gt;&lt;br /&gt;int **p;&lt;br /&gt;"p is a pointer to an integer pointer" or perhaps you might say "p is a double pointer to an integer"&lt;br /&gt;&lt;br /&gt;int ***p;&lt;br /&gt;"hmm...er..ahem..why would anybody use such a thing! *@#$ ?"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;POWERSHOTS - Interpreting a pointer declaration&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;The interpretations given i n the preceding section, even if somewhat correct, do not scale and could inhibit our ability to understand alien (written by other people) code. The words influence the way we think, so it's necessary that we choose the right abstractions.  For example, if a pointer is 4 bytes, why shouldn't a double pointer be 8 bytes? :-) The right abstraction would not even allow us to stray down such lines of thought!&lt;br /&gt;&lt;br /&gt;Here's a better way to interpret pointers.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SNN1.1&lt;/span&gt; Pointers are variables which can hold the address of a memory location, usually the address of a variable.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Pointer Part&lt;/span&gt;&lt;br /&gt;Consider the statement&lt;br /&gt;int *p;&lt;br /&gt;What the "*p;" portion of the statement says is only this : p is a pointer variable&lt;br /&gt;&lt;br /&gt;Let's call the "* p" portion here the &lt;span style="font-weight: bold;"&gt;pointer part&lt;/span&gt; of the pointer declaration. It tells us this much p is a pointer and * operation can be applied on it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;CPS1.1 &lt;/span&gt;Whatever follows the * symbol is the pointer variable.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SNN1.2&lt;/span&gt; Pointer variables in C have the * operation (fancier name: dereference) defined on them.&lt;br /&gt;&lt;br /&gt;The deference operation gets the contents of the memory location held in the pointer. That is, if you dereference a pointer, you get what the pointer points to.&lt;br /&gt;&lt;br /&gt;****&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Type Part&lt;br /&gt;&lt;/span&gt;Consider, again, the statement:&lt;br /&gt;int *p;&lt;br /&gt;What the "int " part means is this: when you apply the * operator on p, what you get will be interpreted as an integer. It can be used as an integer.&lt;br /&gt;&lt;br /&gt;Let's call the "int " portion here the &lt;span style="font-weight: bold;"&gt;type part &lt;/span&gt;of the pointer declaration.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;CPS1.2&lt;/span&gt; Whatever remains in the statement after you blank out the pointer portion will be the type of what you get when you dereference the pointer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;FINGER-HIDING TECHNIQUE:&lt;/span&gt; Just hide the *p section with your finger, what remains is the type part. This finger-hiding technique can come in handy in other situations as well. It's nifty and mighty useful. It is an application of what I call the typedef principle, we will come to that in a later episode.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;Summary&lt;/span&gt;:&lt;br /&gt;Pointer declaration = pointer part + type part.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;To reiterate, int *p means: p is a pointer, which will be dereferenced as "int"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;EXAMPLES&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;---------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;EX1&lt;/span&gt;&lt;br /&gt;int **p;&lt;br /&gt;Pointer part: *p ====&gt; p is a pointer&lt;br /&gt;Type part: int * ====&gt; when you dereference p, what you get should be interpreted as"int *".&lt;br /&gt;You already know what int * means according to the power-shots! This has to be done repeatedly.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;EX2&lt;/span&gt;&lt;br /&gt;int *p[6][6];&lt;br /&gt;Pointer part: *p =====&gt; p is a pointer&lt;br /&gt;Type part: int __ [6][6] ====&gt; when you dereference p, what you get should be interpreted as "int [6][6]".&lt;br /&gt;This is an array of integers with 6 rows and 6 columns. int&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;EX3&lt;/span&gt;&lt;br /&gt;int (*p)(int i, int j);&lt;br /&gt;Pointer part: *p =====&gt; p is a pointer.  The parentheses are required because otherwise due to precedence rule, the * would be associated with int and not p.&lt;br /&gt;Type part: int __ (int i, int j) ==&gt;when you dereference p, the type of data you'll get is "int (int i, int j) ".&lt;br /&gt;This is an integer function which takes two parameters.&lt;br /&gt;Yup, p is a function pointer. (But you do know better now, right? p is just a pointer, when you dereference it you will get something that can be used as a function)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;EX4&lt;/span&gt;&lt;br /&gt;int (*p(int a)) (int *b);  &lt;a href="http://www.gotw.ca/gotw/046.htm"&gt;&lt;/a&gt;&lt;br /&gt;Pointer-part: *p ====&gt; p is a pointer&lt;br /&gt;Type-part:  ( __ (int a)) ==&gt; *p is a function.&lt;br /&gt;So, p is a pointer to a function.&lt;br /&gt;The remaining part is the type of the function.&lt;br /&gt;Finally, p is a pointer to a function, which takes an integer, and returns a function which takes an int* parameter and returns an int!&lt;br /&gt;&lt;br /&gt;Aside: Actually, the type part of the declaration is what is within the parentheses enclosing the pointer-part, but that would have confused you; also, this is not needed in the vast majority of cases. Parentheses always rule and dictate, as you should have guessed from the previous example as well!&lt;br /&gt;&lt;br /&gt;You'd be much better off using typedefs for complex declarations like this one. But that does not mean that one should not know how exactly it is being interpreted. :-) More on typedefs later. For the time being, referring you to &lt;a href="http://www.gotw.ca/gotw/046.htm"&gt;http://www.gotw.ca/gotw/046.htm&lt;/a&gt; where this particular example was taken from.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;POSSIBLE GOTCHAS &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-----------------------------------------&lt;/span&gt;&lt;br /&gt;1. Function-pointers can, on some architectures, require more space than normal pointers. If code memory uses a different addressing size/scheme, for instance. Have not encountered this though.&lt;br /&gt;2.   Please use   parentheses liberally(but judiciously!) inside declarations and the * operator while dereferencing the pointer. These are often skipped and lead to confusing (nah, 'misinterpretable') code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-2386454753355645339?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/2386454753355645339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=2386454753355645339' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2386454753355645339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2386454753355645339'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/11/c-powershot-pointers.html' title='C Powershot - Pointers'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-4107740329232565957</id><published>2007-10-03T14:20:00.000+05:30</published><updated>2007-12-14T01:43:03.233+05:30</updated><title type='text'>Looking For A Function</title><content type='html'>I am looking for a function&lt;br /&gt;y = f(x1,x2...,xn)&lt;br /&gt;such that given y and n, it would be possible to uniquely determine each of the x-factors.&lt;br /&gt;&lt;br /&gt;1) It's OK for n to have an upper bound k, if k&gt;=10 or so.&lt;br /&gt;2) It is also essential that y be small&lt;br /&gt;&lt;br /&gt;Any pointers would be welcome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-4107740329232565957?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/4107740329232565957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=4107740329232565957' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/4107740329232565957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/4107740329232565957'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/10/looking-for-function.html' title='Looking For A Function'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-2216514062896230212</id><published>2007-09-26T11:53:00.000+05:30</published><updated>2007-10-04T20:05:13.924+05:30</updated><title type='text'>Code Is Prose</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Coding is a form of expression. We can draw many parallels between coding and writing; we &lt;span style="font-style: italic;"&gt;write &lt;/span&gt;code, we are the &lt;span style="font-style: italic;"&gt;authors &lt;/span&gt;of the code. When we code, we are actually translating our ideas and understandings into the the programming language. By that line of reasoning, a program is a user manual (or essay or poem, take your pick) that we write in a programming language.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Code is for reading&lt;br /&gt;(and execution too)&lt;br /&gt;&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;-----------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;The computer doesn't care how we write the code as long as it works - no indentation is fine, cryptic lines are fine. We should try to get as close to natural language as possible. Do not go overboard though! Code like checkWhetherTheQueueIsEmpty() are no-no's though! Advise, but do not condescend.&lt;br /&gt;&lt;br /&gt;Code is read many more times than it is written; code is WORM (Write Once Read Many). Debugging will be done on the code that you write more times than you write actual functionality into it. The code-maintainer will curse you less (he will curse anyway!) if the code you wrote, even if it is wrong, is easily understood. So code with meaning and gain some good karma!&lt;br /&gt;&lt;br /&gt;But the clincher argument would be that we would have less of those pesky comments to write!&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;"Programs must be written for people to read, and only incidentally for machines to execute." &lt;/span&gt;- Abelson &amp;amp; Sussman, SICP&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;N COMMANDMENTS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;----------------------------&lt;/span&gt;&lt;br /&gt;* Avoid meaningless names.&lt;br /&gt;&lt;br /&gt;* The meaning   should not be ambiguous.&lt;br /&gt;&lt;br /&gt;* Do not ever use a name that will not occur naturally to a person debugging the code.&lt;br /&gt;&lt;br /&gt;* Do not abbreviate unnecessarily. Even if the abbreviation is logical to you, it might not be to another person.&lt;br /&gt;&lt;br /&gt;* Vowel-swallowing is not desirable, nt_dsrbl at all.&lt;br /&gt;&lt;br /&gt;* Be consistent. If you use underscores in your names to separate words, please don't use camel-case elsewhere and vice versa.&lt;br /&gt;a) Capitalization -&lt;br /&gt;b) Abbreviations - If you have to abbreviate (more often than not, this is a case of "I like to, hence I will") , then at least abbreviate consistently.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Recommended reading&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; -----------------------------&lt;/span&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Literate_programming"&gt;Literate programming&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.geocities.com/mdetting/unmaintainable.html"&gt;Writing Unmaintainable code (original)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.web-hits.org/txt/codingunmaintainable.html"&gt; Writing Unmaintainable code(expanded)&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-2216514062896230212?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/2216514062896230212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=2216514062896230212' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2216514062896230212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2216514062896230212'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/09/code-is-prose.html' title='Code Is Prose'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-2671667345932701538</id><published>2007-08-29T09:22:00.000+05:30</published><updated>2007-08-29T14:08:19.202+05:30</updated><title type='text'>Saved By A Unit Test</title><content type='html'>Consider a function called &lt;span style="font-style: italic;"&gt;openCDTray( )&lt;/span&gt;  which ejects a CD from the drive.&lt;br /&gt;&lt;br /&gt;This function should be operated only when the CD tray is closed. The function also has the following constraint(for effect). Attempting to open the tray when it is already open could result in the tray falling off and reattaching the tray is a cumbersome activity! :-)&lt;br /&gt;&lt;br /&gt;The system maintains the status of the tray in a global variable/object called &lt;span style="font-style: italic;"&gt;gCDStatus&lt;/span&gt;.  &lt;span style="font-style: italic;"&gt;openCDTray( )&lt;/span&gt;  should check the status and then only attempt to eject; otherwise all hell would break loose.  But does the function implementation take care of this? Maybe the developer thought that nobody in their right mind would do such a thing and omitted the check. &lt;span style="font-style: italic;"&gt;It's so obvious! &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A unit test-case to check the response of the function in such a scenario could simply do the following:&lt;br /&gt;1. Set &lt;span style="font-style: italic;"&gt;gCDStatus &lt;/span&gt;to &lt;span style="font-style: italic;"&gt;TRAY_IS_OPEN&lt;/span&gt;.&lt;br /&gt;2. Call the function.&lt;br /&gt;3. Check the result. The function should not have succeeded.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;But our developers would never skip such basic checks! &lt;/span&gt;&lt;span&gt;B&lt;/span&gt;ut even in such cases, unit-test can catch errors that could be missed in a cursory inspection of the code.&lt;br /&gt;1.  Typos in the assertion-check.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;if ( gCDStatus = TRAY_IS_OPEN) throw ExceptionAlreadyOpen;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;or if you consider that to be improbable too&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;if( gCDStatus = CD_EJECTED) throw ExceptionAlreadyOpen&lt;/span&gt;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt; where &lt;span style="font-style: italic;"&gt;CD_EJECTED&lt;/span&gt; is a similar-looking, but different valid value for &lt;span style="font-style: italic;"&gt;gCDStatus&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. The &lt;span style="font-style: italic;"&gt;openCDTray( )&lt;/span&gt;  function might have been modified (copy-paste!) and the programmer inadvertently does something that causes a change of the &lt;span style="font-style: italic;"&gt;gCDStatus &lt;/span&gt;value.&lt;br /&gt;&lt;br /&gt;The unit-test also helps to find out whether the assertion-check has in fact been skipped. This becomes crucial during integration and has to be guaranteed before functional testing starts.&lt;br /&gt;1. The user of the function may not be aware of all the preconditions and hence may not ensure all of them before calling the function.&lt;br /&gt;2. The definition of another part of the system may have changed.&lt;br /&gt;&lt;br /&gt;In the example of &lt;span style="font-style: italic;"&gt;openCDTray( )&lt;/span&gt; ,  we would be saved a trip to the CD repair shop by the unit-test!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-2671667345932701538?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/2671667345932701538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=2671667345932701538' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2671667345932701538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2671667345932701538'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/08/saved-by-unit-test.html' title='Saved By A Unit Test'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-2060587006981912259</id><published>2007-08-19T12:05:00.000+05:30</published><updated>2007-09-11T12:23:14.695+05:30</updated><title type='text'>Unit Test Scripts</title><content type='html'>A unit-test function correspoding to each unit-test case broadly consists of the following sections.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1) Precondition Tweaking (Prologue)&lt;/span&gt;&lt;br /&gt;Prepare the conditions necessary for the function to execute. Do this for all preconditions not mandated by the test-case; not supplying precondition(s) to see if the function fails may be the test-case.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2) Invocation (Test)&lt;/span&gt;&lt;br /&gt;Call the function.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3) Post-condition Verification (Epilogue)&lt;/span&gt;&lt;br /&gt;Check whether all the post-conditions have been enforced by the function. Check whether the result tallies with the expected result of the unit-test case.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4) Logging&lt;/span&gt;&lt;br /&gt;This may be part of the unit-testing framework itself, if you are using one.&lt;br /&gt;&lt;br /&gt;Link the test-function with the test-harness and the unit to be tested. Call these test-functions from a driver program to see how your unit copes!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-2060587006981912259?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/2060587006981912259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=2060587006981912259' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2060587006981912259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2060587006981912259'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/08/unit-test-scripts.html' title='Unit Test Scripts'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-2509070556952349852</id><published>2007-08-17T12:04:00.000+05:30</published><updated>2007-09-11T12:05:37.582+05:30</updated><title type='text'>Unit Test Environment</title><content type='html'>A Unit Test Suite consists of code which verifies and validates the unit within the unit-testing environment. It consists of -&lt;br /&gt;1) &lt;span style="font-weight: bold;"&gt;Test Script&lt;/span&gt; - Code which calls different functions of the unit under different conditions.&lt;br /&gt;2) &lt;span style="font-weight: bold;"&gt;Test Harness&lt;/span&gt; - In order to achieve its functionality, the unit under test might need the help of other modules. Substitute all such external functions with dummy versions, stripped to the bare minimum.&lt;br /&gt;&lt;br /&gt;The&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;unit&lt;span style="font-weight: bold;"&gt;&lt;/span&gt; under test should be run under this unit-testing environment. For the unit of a complex, heterogeneous system, it is more practical and useful to have a unit-testing environment which is much simpler than the actual deployment environment.&lt;br /&gt;&lt;br /&gt;Aside: It is tempting to make the unit-test environment "&lt;span style="font-style: italic;"&gt;more real, just to see if it works too; anyway I am testing, so why not?&lt;/span&gt;". So if you do this, you will end up doing something that's neither unit- nor functional-testing, and you won't get the possible benefits of either!&lt;br /&gt;&lt;br /&gt;More about test-scripts and test-harnesses later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-2509070556952349852?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/2509070556952349852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=2509070556952349852' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2509070556952349852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2509070556952349852'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/08/unit-test-environment.html' title='Unit Test Environment'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-2723009579932912388</id><published>2007-08-15T12:02:00.000+05:30</published><updated>2007-09-11T12:03:02.514+05:30</updated><title type='text'>Limits Of Unit Diagnosis</title><content type='html'>Unit-testing can uncover many kinds of deficiencies, gaps and faults. It is not the responsibility of a unit test to verify whether the function actually works or not, that is the domain of functionality-tests. Indeed, &lt;span style="font-style: italic;"&gt;a unit may be successfully tested by the unit-test suite and still not work!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1) &lt;span style="font-weight: bold;"&gt;Inaccurate definitions &lt;/span&gt;- If the function succeeds even if some preconditions deemed necessary are not fulfilled, then probably the designer has made an error in the specification.&lt;br /&gt;2) &lt;span style="font-weight: bold;"&gt;Unaddressed requirements&lt;/span&gt; - That lengthy switch-case might be missing a few cases!&lt;br /&gt;3) &lt;span style="font-weight: bold;"&gt;Certain kinds of bugs&lt;/span&gt; - Typos in parts of the code that affect the post-condition enforcement can be caught.&lt;br /&gt;4) &lt;span style="font-weight: bold;"&gt;Programmer indiscipline&lt;/span&gt; - Perhaps that developer might be missing a few basic but essential checks?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;If nothing, it provides a way of ensuring complete coverage and execution of the developed code, an objective that would be difficult or time-consuming to achieve otherwise.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-2723009579932912388?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/2723009579932912388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=2723009579932912388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2723009579932912388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2723009579932912388'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/08/limits-of-unit-diagnosis.html' title='Limits Of Unit Diagnosis'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-4243859225794659210</id><published>2007-08-13T11:57:00.000+05:30</published><updated>2007-09-11T11:59:11.840+05:30</updated><title type='text'>Unit Testing As Claim Validation</title><content type='html'>&lt;span style="font-weight: bold;"&gt;"Give me a lever long enough and a fulcrum on which to place it, and I shall move the world."&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;- &lt;span style="font-style: italic;"&gt;Archimedes &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;(Mathematician and inventor of ancient Greece, 280-211BC)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;A function is much like Archimedes's lever, a block of code that claims that it will do something if some things have already been done. A unit test should ensure that the function can actually do exactly what it claims to, when all its conditions are met.&lt;br /&gt;&lt;br /&gt;The definition of a function, no matter how complex it is, can be decomposed as&lt;br /&gt;1) &lt;span style="font-weight: bold;"&gt;Preconditions&lt;/span&gt; (Conditions/Environment)- Things which must be done or conditions which must prevail when the function is called. These might include constraints on the input parameters and global state variables.&lt;br /&gt;2) &lt;span style="font-weight: bold;"&gt;Body&lt;/span&gt; (Action) - The main block of code which achieves the functionality.&lt;br /&gt;3) &lt;span style="font-weight: bold;"&gt;Postconditions&lt;/span&gt; (Side-effects)- Things that the function will ensure by the time the body of the function finishes executing. These can be the function's return value or the modification of the state of the system.&lt;br /&gt;&lt;br /&gt;Unit-tests should determine whether all the postconditions are fulfilled when all the preconditions are fulfilled by the caller of the function. It is important to remember that unit-tests are &lt;span style="font-style: italic;"&gt;more like mathematical verification of the function-model&lt;/span&gt;; they check whether the code conforms to the definition of the functions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-4243859225794659210?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/4243859225794659210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=4243859225794659210' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/4243859225794659210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/4243859225794659210'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/08/unit-testing-as-claim-validation.html' title='Unit Testing As Claim Validation'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-2303322909171855404</id><published>2007-08-11T19:05:00.000+05:30</published><updated>2007-09-26T12:38:23.656+05:30</updated><title type='text'>Unit Testing Primer</title><content type='html'>&lt;span&gt;(Breaking this article into smaller, more readable fragments. Blog-style!)&lt;br /&gt;&lt;br /&gt;Unit-testing deals with the verification of what an unit can achieve on its own, without help from other units. In other words, assuming all the other modules required by the unit are available, can the unit achieve what it claims to do? This is the question that unit-testing seeks to answer.&lt;br /&gt;&lt;br /&gt;I started off a skeptic, regarding the usefulness of having unit tests, seemed to be such a waste of time. What won me over? Simply put, it helps us to avoid stupid, elementary mistakes. But god knows (as do we!)  how common those are, especially during bug-fixes!&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;My primary motivation to write this series of articles is to-&lt;br /&gt;1) define the scope of a unit-test - There seems to be misconceptions about what unit-testing is all about, what a unit-test should and should not do,&lt;br /&gt;2) list the benefits of unit-testing - there's more to it than meets the eye at first sight. All love is not at first-sight!&lt;br /&gt;3) share my understanding(s) - I had great fun exploring unit-testing, especially regarding what could be achieved with dummy or mock versions of external functions (Harnesses)&lt;br /&gt;&lt;span&gt;&lt;br /&gt;Here goes...&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://oozone.blogspot.com/2007/08/unit-testing-as-claim-validation.html"&gt;&lt;span style="font-weight: bold;"&gt;Unit testing = Claim Validation&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;a href="http://oozone.blogspot.com/2007/08/limits-of-unit-diagnosis.html"&gt;Diagnosis Limits&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://oozone.blogspot.com/2007/08/unit-test-environment.html"&gt;&lt;span style="font-weight: bold;"&gt;Unit Testing Environment&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;a href="http://oozone.blogspot.com/2007/08/unit-test-scripts.html"&gt;Test Scripts&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Test Harnesses&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a style="font-weight: bold;" href="http://oozone.blogspot.com/2007/08/saved-by-unit-test.html"&gt;Example&lt;/a&gt; (Read this first if you will!)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Unit-Testing Frameworks&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Run the unit-test suite frequently and regularly, especially at integration-points to ensure that development is proceeding in the right direction. Unit-testing can go a long way in -&lt;br /&gt;1) making your team's code bullet-proof and,&lt;br /&gt;2) importantly, avoiding last-minute-release-time-chaos-induced bloopers.&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I must also add here that I am not a fan (yet?) of test-driven development. I would recommend unit-testing for finding errors that could easily escape visual checks or code walk-throughs..&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;- Thomas Jay Cubb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Please also read &lt;a href="http://pragmaticprogrammer.com/articles/stqe-01-2002.pdf"&gt;Learning To Love Unit Testing.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;TODO - Diagrams&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-2303322909171855404?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/2303322909171855404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=2303322909171855404' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2303322909171855404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2303322909171855404'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/08/unit-testing.html' title='Unit Testing Primer'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-6118064844900813563</id><published>2007-07-25T18:44:00.000+05:30</published><updated>2007-08-11T18:46:45.079+05:30</updated><title type='text'>Draw The Line</title><content type='html'>While coding within code-frameworks, we will be required to insert functionality into boilerplate code. There might be lots of TODOs marked in the framework code. When doing so,if what you are doing would be long-term, call hook functions to your own non-framework code rather than coding the functionality in-place.&lt;br /&gt;&lt;br /&gt;Call your designed functions through a "hook" function and don't code the functionality within the generated code. Draw the line!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Advantages&lt;/span&gt;:&lt;br /&gt;1. It will be easier to move to another framework. Otherwise, there'll be lots of last-minute copy-pasting and hence errors introduced.&lt;br /&gt;2. Better visibility. When something goes wrong, you know who to blame!&lt;br /&gt;3. More room for experimentation. You might want to tweak the framework's configuration and generate new code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-6118064844900813563?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/6118064844900813563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=6118064844900813563' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/6118064844900813563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/6118064844900813563'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/07/draw-line.html' title='Draw The Line'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-3179168311901647972</id><published>2007-07-03T12:42:00.000+05:30</published><updated>2007-09-11T14:10:43.206+05:30</updated><title type='text'>Principles Of Codeline Management</title><content type='html'>Might seem like common-sense, but learnt the hard way!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1 Build Inequality&lt;/span&gt;&lt;br /&gt;a) What is working on one build might not work on another. We must retain information regarding important working builds to facilitate later investigation!&lt;br /&gt;b) Some codelines are important than others. 10 units of work on a build close to the mainline is probably worth more than 20 units of work on a distant line.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2 Fix Early&lt;/span&gt;&lt;br /&gt;Find errors and fix problems at the earliest. Yes, getting things working your build is very important.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3 Merge Early&lt;/span&gt;&lt;br /&gt;Get close to the mainline, at the earliest possible stabilization point.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4 Merge And Fix Early&lt;/span&gt;&lt;br /&gt;Find errors and fix problems on a build that is as close to the mainline as possible. To paraphrase a proverb, “Early to merge and early to fix makes the release smooth and nice!” ?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5 Useful Artifacts&lt;/span&gt;&lt;br /&gt;If an artifact is worth keeping, save it. If it is not worth keeping or it is not likely to be used, remove it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6 Docubits&lt;/span&gt;&lt;br /&gt;Documentation: every bit helps, and a little bit of documentation at every step doesn’t hurt!&lt;br /&gt;&lt;br /&gt;Hopefully I will be writing more on each of these points later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-3179168311901647972?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/3179168311901647972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=3179168311901647972' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/3179168311901647972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/3179168311901647972'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/06/principles-of-codeline-management.html' title='Principles Of Codeline Management'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-2716453098359695923</id><published>2007-06-20T12:55:00.000+05:30</published><updated>2007-08-29T13:08:08.335+05:30</updated><title type='text'>CM Synergy Crash Course</title><content type='html'>Bits and pieces of CM Synergy info picked up. Hope this supplements the sparse Synergy documentation. Also posted at the &lt;a href="http://confluence.public.thoughtworks.org/display/CC/CM+Synergy+Crash+Course"&gt;CruiseControl website&lt;/a&gt;&lt;br /&gt;&lt;h1&gt;Introduction&lt;/h1&gt;  &lt;p&gt;CM Synergy aka Telelogic Synergy is, "a task-based configuration management system".  But the philosophy of the tool is radically different from other version control systems around. These differences sometimes add up and hit you hard; especially if you have prior experience with any of those other tools!&lt;/p&gt;  &lt;h1&gt;&lt;a name="CMSynergyCrashCourse-Synergyese(Essential)"&gt;&lt;/a&gt;&lt;b&gt;Synergy-ese (Essential)&lt;/b&gt;&lt;/h1&gt;  &lt;p&gt;CM Synergy uses different terminology from other CM tools. Some of these "new" terms are ill-chosen and may take some getting used to. If you are moving to CM Synergy from another tool or are forced to adapt (new job etc), then these rough translations may help you get to speed faster.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Task&lt;/b&gt; (almost)= objects&lt;br /&gt;A task is just a collection of versioned objects.  Synergy adds the idea that these objects are grouped together for a purpose and hence it is a "task".&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Check-out&lt;/b&gt;&lt;br /&gt;You check out objects and make changes to them. Synergy recommends that the checkouts must be made against a task. When you check out an object is that it gets added to the task. In effect, you are making the task as you work. When you check out stuff, it becomes a modifiable "working" copy on your hard disk.&lt;/p&gt;   &lt;p&gt;&lt;b&gt;Check-in&lt;/b&gt;&lt;br /&gt;After you make those changes, you check them in. You can check in the task, Synergy tracks the objects associated with the task and checks in each of those objects. Alternatively, you can also check in objects individually.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Folder&lt;/b&gt; = Label, Tag (Do not draw the "directory" parallel!)&lt;br /&gt;Tasks are put in folders. Since a task is a collection of objects, the folder will, effectively, contain the objects that make up those tasks.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Reconfigure&lt;/b&gt; = Update&lt;br /&gt;Reconfigure is how you get files from the repository. A set of folders would have been allotted to you within Synergy; when you reconfigure, you would be getting the contents of those folders. The fancy Synergy-ese term for what you get when you reconfigure is the not-for-mortals-sounding "reconfigure template".&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Project&lt;/b&gt;&lt;br /&gt;A project is a list of the versions of all the files (objects) being used by you.&lt;/p&gt;   &lt;h1&gt;&lt;a name="CMSynergyCrashCourse-FindingSynergy"&gt;&lt;/a&gt;Finding Synergy&lt;/h1&gt;   &lt;p&gt;(TODO) &lt;/p&gt;  &lt;h1&gt;&lt;a name="CMSynergyCrashCourse-AdvancedSynergyese(Nonessential)"&gt;&lt;/a&gt;Advanced Synergy-ese (Non essential)&lt;/h1&gt;  &lt;p&gt; (TODO)&lt;/p&gt;  &lt;p&gt;Sync&lt;/p&gt;  &lt;p&gt;Reconcile &lt;br /&gt;&lt;/p&gt;  &lt;h1&gt;&lt;a name="CMSynergyCrashCourse-GetOutOfJailFree\!"&gt;&lt;/a&gt;Get Out Of Jail Free!&lt;/h1&gt;  &lt;p&gt; (TODO)&lt;/p&gt;  &lt;h1&gt;&lt;a name="CMSynergyCrashCourse-Conclusion?"&gt;&lt;/a&gt;Conclusion?&lt;/h1&gt;  &lt;p&gt;(TODO) &lt;/p&gt;  &lt;p&gt;&lt;b&gt;- Thomas Jay Cubb&lt;/b&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-2716453098359695923?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/2716453098359695923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=2716453098359695923' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2716453098359695923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/2716453098359695923'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/06/cm-synergy-crash-course.html' title='CM Synergy Crash Course'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-4197356674353651920</id><published>2007-04-23T11:06:00.000+05:30</published><updated>2007-08-29T12:21:09.564+05:30</updated><title type='text'>Root Or Fruit?</title><content type='html'>As far as bug-fixes are concerned, there are broadly two ways to go:&lt;br /&gt;1) Remove the cause (Solution!)&lt;br /&gt;2) Mask the effect (Hacks!)&lt;br /&gt;&lt;br /&gt;For complex systems, before we can possibly arrive at a complete solution, we will need to work at the problem both ways. Attack the root or attack the fruit? Though it is obvious that fixing the root is the ideal solution, often we have to make do with a combination of the two.&lt;br /&gt;&lt;br /&gt;Attacking the cause straightaway may not be such a great idea.&lt;br /&gt;1) Incomplete understanding of the system - You might be familiar only with a part of the system.&lt;br /&gt;2) Time-pressure- How many lines of code can you possibly go through before the deadline?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Magnify the effect!&lt;/span&gt; Change the effect into something more drastic. This will trigger new lines of thinking.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Remove the effect!&lt;/span&gt; Bugs are caused by code; remove the code!&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Take breaks.&lt;/span&gt; The a-ha moment will often emerge when you are away!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-4197356674353651920?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/4197356674353651920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=4197356674353651920' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/4197356674353651920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/4197356674353651920'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/04/root-or-fruit.html' title='Root Or Fruit?'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-6447598988229044746</id><published>2006-12-15T14:23:00.000+05:30</published><updated>2007-08-29T14:00:19.369+05:30</updated><title type='text'>Biller  - Design Of A Receipt Generator</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span class="Heading1Char"&gt;&lt;span style="font-size:14;"&gt;Problem Specification: SALES TAXES&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;br /&gt;Basic sales tax is applicable at a rate of 10% on all goods, except books, food, and medical products that are exempt. Import duty is an additional sales tax applicable on all imported goods at a rate of 5%, with no exemptions.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;br /&gt;When I purchase items I receive a receipt which lists the name of all the items and their price (including tax), finishing with the total cost of the items, and the total amounts of sales taxes paid.  The rounding rules for sales tax are that for a tax rate of n%, a shelf price of p contains (np/100 rounded up to the nearest 0.05) amount of sales tax.&lt;/p&gt;  &lt;h1&gt;Design&lt;/h1&gt;  &lt;h2&gt;Receipt&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;A receipt can be viewed as a collection of sold items (hereinafter referred to as receipt-items) which contribute to the receipt’s characteristics like the total amount and the total amount of sales-tax.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: center; page-break-after: avoid;" align="center"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;  &lt;v:stroke joinstyle="miter"&gt;  &lt;v:formulas&gt;   &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;   &lt;v:f eqn="sum @0 1 0"&gt;   &lt;v:f eqn="sum 0 0 @1"&gt;   &lt;v:f eqn="prod @2 1 2"&gt;   &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;   &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @0 0 1"&gt;   &lt;v:f eqn="prod @6 1 2"&gt;   &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;   &lt;v:f eqn="sum @8 21600 0"&gt;   &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @10 21600 0"&gt;  &lt;/v:formulas&gt;  &lt;v:path extrusionok="f" gradientshapeok="t" connecttype="rect"&gt;  &lt;o:lock ext="edit" aspectratio="t"&gt; &lt;/v:shapetype&gt;&lt;v:shape id="_x0000_i1025" type="#_x0000_t75" style="'width:186.75pt;"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\0446\LOCALS~1\Temp\msohtml1\01\clip_image001.jpg" title="Receipt%20Organization"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/0446/LOCALS%7E1/Temp/msohtml1/01/clip_image001.jpg" shapes="_x0000_i1025" height="319" width="249" /&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p class="MsoCaption" style="text-align: center;" align="center"&gt;Figure &lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-begin'"&gt;&lt;/span&gt;&lt;span style="'mso-spacerun:yes'"&gt; &lt;/span&gt;SEQ Figure \* ARABIC &lt;span style="'mso-element:"&gt;&lt;/span&gt;&lt;![endif]--&gt;&lt;span style=""&gt;1&lt;/span&gt;&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-end'"&gt;&lt;/span&gt;&lt;![endif]--&gt; – Receipt: Collection Of Receipt-Items&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h2&gt;Application&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;In the application, a receipt has to be generated and displayed. The steps involved would be:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Create      a receipt-item.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Add it      to the receipt.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Repeat      1 and 2 for all items to be added to receipt.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Display      the receipt.&lt;/li&gt;&lt;/ol&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The required attributes of the receipt (from the problem-specification) are an item-listing, total amount and total sales tax. All these are dependent on the individual receipt-items and hence must be characteristics of receipt-items.&lt;/p&gt;  &lt;h2&gt;Receipt-Item&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;A receipt-item must provide the following information:&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Description&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Cost&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Quantity&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Sales      Tax (varies according to sales-tax policy)&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Price      (The shelf-price depends on the sales-tax)&lt;/li&gt;&lt;/ol&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: center; page-break-after: avoid;" align="center"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1026" type="#_x0000_t75" style="'width:122.25pt;height:110.25pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\0446\LOCALS~1\Temp\msohtml1\01\clip_image002.jpg" title="ReceiptItem"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/0446/LOCALS%7E1/Temp/msohtml1/01/clip_image002.jpg" shapes="_x0000_i1026" height="147" width="163" /&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p class="MsoCaption" style="text-align: center;" align="center"&gt;Figure &lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-begin'"&gt;&lt;/span&gt;&lt;span style="'mso-spacerun:yes'"&gt; &lt;/span&gt;SEQ Figure \* ARABIC &lt;span style="'mso-element:"&gt;&lt;/span&gt;&lt;![endif]--&gt;&lt;span style=""&gt;2&lt;/span&gt;&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-end'"&gt;&lt;/span&gt;&lt;![endif]--&gt; - Receipt Item&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Since Sales-Tax and Price are dependent on extrinsic factors, we implement them as methods (the exact implementation-strategy will be detailed in the following sections). Items 1 to 3 may be implemented as attributes of the Receipt-Item abstraction.&lt;/p&gt;  &lt;h2&gt;Sales-Taxes&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;There are two types of sales-tax defined in the problem– Import Sales Tax and Standard Sales Tax - any or both or none of these may be applicable on an item. But essentially both imply an amount to be added as tax.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: center; page-break-after: avoid;" align="center"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1027" type="#_x0000_t75" style="'width:217.5pt;height:142.5pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\0446\LOCALS~1\Temp\msohtml1\01\clip_image003.jpg" title="Sales%20Taxes"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/0446/LOCALS%7E1/Temp/msohtml1/01/clip_image003.jpg" shapes="_x0000_i1027" height="190" width="290" /&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p class="MsoCaption" style="text-align: center;" align="center"&gt;Figure &lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-begin'"&gt;&lt;/span&gt;&lt;span style="'mso-spacerun:yes'"&gt; &lt;/span&gt;SEQ Figure \* ARABIC &lt;span style="'mso-element:"&gt;&lt;/span&gt;&lt;![endif]--&gt;&lt;span style=""&gt;3&lt;/span&gt;&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-end'"&gt;&lt;/span&gt;&lt;![endif]--&gt; - Sales Taxes&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Both these types of sales-tax have to be rounded up to the nearest 0.05, but at a rate defined by the specific type of sales-tax.&lt;span style=""&gt;  &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h2&gt;Computing the Price of a Receipt-Item&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Essentially, the Price of a Receipt-Item = Cost + Sales-Tax(es)&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The price of a receipt-item will depend on the sales-taxes applicable on it. But the tax-policy can vary widely (and wildly!). &lt;span style=""&gt; &lt;/span&gt;The implementation of a receipt-item should, ideally, not vary based on such an obviously extrinsic factor, if it can be avoided. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Hence we delegate the responsibility of calculating tax to Sales-Tax entities. And since the number of sales-taxes to be applied may vary from none to many, this entity needs to be a list that could vary. This can be achieved by having the Sales-Tax entity point to the next Sales-Tax entity (if any) and so on. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: center; page-break-after: avoid;" align="center"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1028" type="#_x0000_t75" style="'width:318pt;height:183.75pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\0446\LOCALS~1\Temp\msohtml1\01\clip_image004.jpg" title="For%20Sales%20Tax%20Computation"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/0446/LOCALS%7E1/Temp/msohtml1/01/clip_image004.jpg" shapes="_x0000_i1028" height="245" width="424" /&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p class="MsoCaption" style="text-align: center;" align="center"&gt;Figure &lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-begin'"&gt;&lt;/span&gt;&lt;span style="'mso-spacerun:yes'"&gt; &lt;/span&gt;SEQ Figure \* ARABIC &lt;span style="'mso-element:"&gt;&lt;/span&gt;&lt;![endif]--&gt;&lt;span style=""&gt;4&lt;/span&gt;&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-end'"&gt;&lt;/span&gt;&lt;![endif]--&gt; - Sales Tax Computation: Chain of Responsibility&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The price of a receipt-item can be easily determined after sales-tax computation. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Thus, the receipt-item would be able to provide information about both its price and its sales-tax.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h2&gt;Receipt-Item Creation: Sales-tax policy isolation&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;As mentioned earlier, the sales-tax could vary from time to time. &lt;span style=""&gt; &lt;/span&gt;It would be beneficial if we could abstract it from the receipt-generation application.&lt;span style=""&gt;  &lt;/span&gt;&lt;i style=""&gt;Indeed, why need a cashier be required to know the intricacies of taxation and idiosyncrasies of politicians? &lt;/i&gt;&lt;i style=""&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;J&lt;/span&gt;&lt;/span&gt; &lt;/i&gt;The application shouldn’t change each time the policy does!&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;What this means in the context of our arrived-at design, where each Receipt-Item will be equipped with a Sales-Tax entity, is that we will need to fit it with different kinds of Sales-Tax entities based on the taxation-policy. &lt;span style=""&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;We move such taxation-policy dependent logic/functionality into a separate class (&lt;b style=""&gt;Receipt-Item-Creator&lt;/b&gt;) which can create an appropriately built Receipt-Item, once it is given basic intrinsic characteristics of the item being sold. (Surely, it is reasonable to expect the cashier to know things like whether an item is imported, whether it is a food-item, its cost etc.)&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: center; page-break-after: avoid;" align="center"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1029" type="#_x0000_t75" style="'width:372pt;height:259.5pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\0446\LOCALS~1\Temp\msohtml1\01\clip_image005.jpg" title="Receipt%20Item%20Generation"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img style="width: 496px; height: 346px;" src="file:///C:/DOCUME%7E1/0446/LOCALS%7E1/Temp/msohtml1/01/clip_image005.jpg" shapes="_x0000_i1029" height="346" width="496" /&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p class="MsoCaption" style="text-align: center;" align="center"&gt;Figure &lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-begin'"&gt;&lt;/span&gt;&lt;span style="'mso-spacerun:yes'"&gt; &lt;/span&gt;SEQ Figure \* ARABIC &lt;span style="'mso-element:"&gt;&lt;/span&gt;&lt;![endif]--&gt;&lt;span style=""&gt;5&lt;/span&gt;&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-end'"&gt;&lt;/span&gt;&lt;![endif]--&gt; - Receipt Item Generation: Builder&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h2&gt;Displaying the receipt&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;We can have a function in the application to display (say, displayReceipt) a receipt. This function is not made a part of Receipt itself because having it so would tie the Receipt class to the Application mechanism (console/window/printer for starters). &lt;/p&gt;  &lt;h2&gt;Conclusion&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;We are now capable of implementing the steps of the application to demonstrate receipt-generation.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Create      a receipt-item === ReceiptItemCreator.create&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Add it      to the receipt. === Receipt.add&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Repeat      1 and 2 for all items to be added to receipt. &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Display      the receipt. === Function in the application === Receipt.*, &lt;/li&gt;&lt;/ol&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The consolidated class-diagram for the system is given on the following page. Please note that it does not comprehensively list all the methods and attributes in each of the classes.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: center; page-break-after: avoid;" align="center"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1030" type="#_x0000_t75" style="'width:411pt;height:312pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\0446\LOCALS~1\Temp\msohtml1\01\clip_image006.jpg" title="Biller%20System%20Class%20Overview"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/0446/LOCALS%7E1/Temp/msohtml1/01/clip_image006.jpg" shapes="_x0000_i1030" height="416" width="548" /&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p class="MsoCaption" style="text-align: center;" align="center"&gt;Figure &lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-begin'"&gt;&lt;/span&gt;&lt;span style="'mso-spacerun:yes'"&gt; &lt;/span&gt;SEQ Figure \* ARABIC &lt;span style="'mso-element:"&gt;&lt;/span&gt;&lt;![endif]--&gt;&lt;span style=""&gt;6&lt;/span&gt;&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-end'"&gt;&lt;/span&gt;&lt;![endif]--&gt; - Biller System Class Overview&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h1&gt;Design Assumptions and Choices&lt;/h1&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="square"&gt;&lt;li class="MsoNormal" style=""&gt;The      primary objective of the system is sales-tax computation. &lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="square"&gt;&lt;li class="MsoNormal" style=""&gt;Sales-tax      is calculated per item. In the case where the quantity of the item is more      than 1, this makes a difference, whether the sales-tax is applicable on      the total cost or on the cost of each item individually. The data in the problem-definition      is insufficient to come to a conclusion. Choosing to go with per-item      sales-tax.&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="square"&gt;&lt;li class="MsoNormal" style=""&gt;Items      have not been classified as Taxable and Non-Taxable. Instead, we choose to      embed a suitable Sales-Tax entity via the Receipt-Item-Creator. &lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="square"&gt;&lt;li class="MsoNormal" style=""&gt;A      similar strategy for modifying the description of the item was also      considered. But such modification would have been complex (“Imported box      of chocolates” or “Box of imported chocolates”?). For the same reason,      “imported” was not chosen as a modifier which would append “imported” to      the description and Imported-Tax to the Sales-Tax.&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="square"&gt;&lt;li class="MsoNormal" style=""&gt;It was      possible to have a separate class for each Receipt-Item type. The      resulting “class-explosion” would not have added much value to the system      since we are primarily interested only in sales-tax. In the context of the      system, there was not enough difference in the treatment of items based on      such type to justify separate classes. The only drawback is that we lose      the type (whether it was a book or food etc) in the Receipt.&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="square"&gt;&lt;li class="MsoNormal" style=""&gt;The      operation of the system, as mentioned in the algorithm, is simple enough that      sequence diagrams are not needed.&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h1&gt;Extensibility&lt;/h1&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="square"&gt;&lt;li class="MsoNormal" style=""&gt;New      types of taxes may be applied by sub-classing Sales-Tax.&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="square"&gt;&lt;li class="MsoNormal" style=""&gt;Major      changes in taxation-policy can be handled by sub-classing      Receipt-Item-Creator. Slight variations in the taxation-policy can be      accommodated by modifying it.&lt;span style=""&gt;  &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="square"&gt;&lt;li class="MsoNormal" style=""&gt;If the      type of the item (book/medicine/other) becomes of interest, the behavior      can be added to the system by sub-classing Receipt-Item.&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="square"&gt;&lt;li class="MsoNormal" style=""&gt;Changes      will be localized to Receipt-Item-Creator. The application can remain      mostly unchanged.&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-6447598988229044746?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/6447598988229044746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=6447598988229044746' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/6447598988229044746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/6447598988229044746'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/11/biller-design-of-receipt.html' title='Biller  - Design Of A Receipt Generator'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-1369080318326822422</id><published>2006-11-23T14:02:00.000+05:30</published><updated>2006-11-23T14:58:31.953+05:30</updated><title type='text'>Rounding To The Nearest</title><content type='html'>Programming languages and spreadsheets usually have a function to round to the nearest integer. But the task of rounding to the nearest something else comes up every now and again. Rounding up to lowest higher multiple of n, rounding down to the highest lower multiple of n , rounding to the closest n....&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Algorithm roundToNearest&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-------------------------------------&lt;/span&gt;&lt;br /&gt;1. Multiply the amount by the reciprocal of the rounding base (N) you want to round to.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;number = number * (1 / roundingBase)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. Round the result using the built-in function.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;number =  roundToInteger(number)&lt;/span&gt;,&lt;br /&gt;where roundToInteger is whatever rounding function you want to use.&lt;br /&gt;In case there is no such function available, you can simulate it. roundUp = integerPart of (number + 1), roundDown = integerPart of (number - 1), roundToClosest= integerPart of (number + 0.5) etc.&lt;br /&gt;&lt;br /&gt;3. Multiply the resulting amount by the rounding base itself.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;number =  number * roundingBase&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;4. The resulting number is the original number rounded to the nearest rounding base. &lt;br /&gt;result = number&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example 1&lt;/span&gt; - Rounding 123.68 (up) to the next highest multiple of 40&lt;br /&gt;Step 1: 123.68*(1/40) = 3.092&lt;br /&gt;Step 2: 3.092 + 1 = 4.092, integer part is 4. (Did integerCeiling(3.092) )&lt;br /&gt;Step 3: 4 * 40 = 160&lt;br /&gt;Result: 160 is the answer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example 2&lt;/span&gt; - Rounding 46.27 to the closest 0.06&lt;br /&gt;Step 1: 46.27  * (1/0.06) = 771.16666666666666666666666666667&lt;br /&gt;Step 2: Integer part of 771.16666666666666666666666666667 + 0.03, 771&lt;br /&gt;Step 3: 771 * 0.06 = 46.26&lt;br /&gt;Result: 46.26 is the answer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Generalization (Compulsory Philosophical Reflection)&lt;/span&gt;&lt;br /&gt;Often, what we have with us may not be exactly what our tool requires or expects. Adjust, make do and un-adjust! More technically, transform whatever is incompatible into a compatible form, do the required operation, apply the exact reverse transform.  This is a strategy that is often needed in problem solving and. generally. it works!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-1369080318326822422?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/1369080318326822422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=1369080318326822422' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/1369080318326822422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/1369080318326822422'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/11/rounding-to-nearest.html' title='Rounding To The Nearest'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-3943403786418128767</id><published>2006-11-15T17:20:00.000+05:30</published><updated>2006-11-15T17:24:24.767+05:30</updated><title type='text'>U3D - Diagramming &amp; Standardization</title><content type='html'># Importance Of Diagramming&lt;br /&gt;    * Complexity&lt;br /&gt;          o Inadequacy of tables and text&lt;br /&gt;          o Things become clearer visually&lt;br /&gt;    * Communication&lt;br /&gt;          o Bigger projects, Bigger teams&lt;br /&gt;          o Typing Speed x Time != LoC&lt;br /&gt;          o Not enough that we know it&lt;br /&gt;                + House plan&lt;br /&gt;&lt;br /&gt;# Importance of Standardization&lt;br /&gt;    * My diagrams are the best!&lt;br /&gt;          o Time and effort&lt;br /&gt;          o Hard to be consistent&lt;br /&gt;          o Reinventing the wheel&lt;br /&gt;          o Onus is on us to do the explanation&lt;br /&gt;    * UML = "The" Unified Modeling Language&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-3943403786418128767?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/3943403786418128767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=3943403786418128767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/3943403786418128767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/3943403786418128767'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/11/u3d-diagramming-standardization.html' title='U3D - Diagramming &amp; Standardization'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-116195462734490809</id><published>2006-10-27T18:16:00.000+05:30</published><updated>2006-10-31T11:13:54.343+05:30</updated><title type='text'>UML Triple Distilled</title><content type='html'>A few months back I had given some training in (the) UML for my colleagues. The course was named UML Triple Distilled (a la vodka and Martin Fowler's classic UML Distilled).&lt;br /&gt;&lt;br /&gt;The objective of the session was to present the UML from a non object-oriented perspective, as a communication and diagramming tool. People won't often say this, but, really, you don't necessarily have to be an OO guru to benefit from the UML.&lt;br /&gt;&lt;br /&gt;In the coming days, I will be putting up slides from the session over here along with some reflections on the slides. Here's the introductory slide.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/3446/1467/1600/UnderstandingUMLDiagrams.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/3446/1467/320/UnderstandingUMLDiagrams.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-116195462734490809?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/116195462734490809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=116195462734490809' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/116195462734490809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/116195462734490809'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/10/uml-triple-distilled.html' title='UML Triple Distilled'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-1217780892048624683</id><published>2006-10-04T19:45:00.000+05:30</published><updated>2007-10-04T20:07:26.020+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='notes'/><category scheme='http://www.blogger.com/atom/ns#' term='terminology'/><title type='text'>SFINAE</title><content type='html'>Function templates participate in name resolution for overloaded functions, but the rules are different. For a template to be considered in overload resolution, the type has to match exactly. If the types do not match exactly, the conversions are not considered and the template is simply dropped from the set of viable functions. That's what is known as "SFINAE" — Substitution Failure Is Not An Error.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-1217780892048624683?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/1217780892048624683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=1217780892048624683' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/1217780892048624683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/1217780892048624683'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/10/sfinae.html' title='SFINAE'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-5999920199280750941</id><published>2006-09-11T11:06:00.000+05:30</published><updated>2007-09-11T11:46:19.184+05:30</updated><title type='text'>Subversion - What can be in a name?</title><content type='html'>Subversion is the configuration management tool that aims to be a replacement for CVS, the older *NIX . It's pretty decent, although it is not all that sophisticated. Just as well, because the project's purpose-statement does not position it as a do-it-all, suitable-for-all-users thing. It just does what it claims to, versioning and does it pretty well.&lt;br /&gt;&lt;br /&gt;But what I love about the tool, more than its features and even though the lack of certain features sometimes irritates, is the name: Subversion. I think the name is just charming, to say the least.&lt;br /&gt;&lt;br /&gt;First of all, the word "version" is present in the name and versioning is what it does. You could even think of it as a tool that helps manage "sub-versions" of an object. Think "sub-version" instead of version.&lt;br /&gt;&lt;br /&gt;If you think the "sub-version" line of reason is juvenile, then take this. "sub-" as a prefix could mean "Under, lower, below, secondary, inferior". Choose the "under" meaning and lo, sub-version takes the "under version (control)" meaning. :-)&lt;br /&gt;&lt;br /&gt;But there's more to it The meaning of the word "subversion" is&lt;br /&gt;1. Destroying someone's (or some group's) honesty or loyalty; undermining moral integrity&lt;br /&gt;2. The act of subverting; as overthrowing or destroying a legally constituted government&lt;br /&gt;This refers to Subersion's aim to be a complete replacement for CVS, that of underming the CVS ethos entrenched in *NIX culture.&lt;br /&gt;&lt;br /&gt;Thus the name not only describes what the tool does, but it also embeds within it allusions to its history, culture and ultimate goal... and what's more, the mischief is hidden within the multiple possible interpretations.&lt;br /&gt;&lt;br /&gt;What's in a name, anyone?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-5999920199280750941?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/5999920199280750941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=5999920199280750941' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/5999920199280750941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/5999920199280750941'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/09/subversion-what-can-be-in-name.html' title='Subversion - What can be in a name?'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-115078781693213759</id><published>2006-06-19T12:36:00.000+05:30</published><updated>2006-10-31T11:13:54.279+05:30</updated><title type='text'>Freeware UML Tool</title><content type='html'>Have found an open-source and freeware tool for making UML diagrams.&lt;br /&gt;It's called StarUML.  You can download it from the &lt;a href="http://www.staruml.com/"&gt;StarUML.com&lt;/a&gt; website.&lt;br /&gt;&lt;br /&gt;I used it for sometime and found it to be rather stable and usable.  It most definitely is not crippleware. Can't say the same about Poseidon or the other community-edition tools like Visual Paradigm or UMLStudio.&lt;br /&gt;&lt;br /&gt;StarUML is definitely recommended, though it is not without its share of glitches.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-115078781693213759?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/115078781693213759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=115078781693213759' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/115078781693213759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/115078781693213759'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/06/freeware-uml-tool.html' title='Freeware UML Tool'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-8561858777629112649</id><published>2006-05-29T19:47:00.000+05:30</published><updated>2007-10-04T19:48:26.609+05:30</updated><title type='text'>Degenerate Classes</title><content type='html'>A degenerate class is one that has no methods at all. &lt;br /&gt;In C++ it would have a pure virtual destructor.&lt;br /&gt;In java such classes are called “Marker Interfaces”.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-8561858777629112649?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/8561858777629112649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=8561858777629112649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/8561858777629112649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/8561858777629112649'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/05/degenerate-classes.html' title='Degenerate Classes'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-114896847529878971</id><published>2006-05-29T11:15:00.000+05:30</published><updated>2006-10-31T11:13:54.216+05:30</updated><title type='text'>Decorator Pattern</title><content type='html'>An example to demonstrate the Decorator design pattern which  I had contributed to Wikipedia a few months back. It has since been improved and changed over there but thought maybe I should maintain a copy... Read the latest version from &lt;a href="http://en.wikipedia.org/wiki/Decorator_pattern"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This Java example uses the Window/Scrolling scenario&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class Window {&lt;br /&gt;    &lt;br /&gt;      public void draw() {&lt;br /&gt;              // Draw window&lt;br /&gt;      }&lt;br /&gt;      public void setSize(int height, int width) {&lt;br /&gt;              // Set window size&lt;br /&gt;      }&lt;br /&gt;    &lt;br /&gt;      // Other Window methods&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;The decorator is given the same interface as the component it decorates. The decorator must be explicitly mentioned as supporting the Window interface for it to be useful in a real scenario; it must have the same type.&lt;br /&gt;&lt;br /&gt;Typically, the decorator's methods will only pass requests to the underlying decorated component, but it can also perform operations before and after the call. Then the decorator defines extra methods (decorations) to extend the decorated component's functionality.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class VerticalScroller extends Window {&lt;br /&gt;&lt;br /&gt;      private Window myWindow;&lt;br /&gt;    &lt;br /&gt;      public VerticalScroller (Window baseWindow){&lt;br /&gt;              myWindow = baseWindow; // Save the reference, which we will use&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      public void draw() {&lt;br /&gt;              //draw the vertical scroller&lt;br /&gt;              myWindow.draw();&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      public void setSize(int height, int width) {&lt;br /&gt;              //implement vertical scroller-specific functionality&lt;br /&gt;              myWindow.setSize(height, width);&lt;br /&gt;      }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class HorizontalScroller extends Window {&lt;br /&gt;&lt;br /&gt;      private Window myWindow;&lt;br /&gt;&lt;br /&gt;      public HorizontalScroller (Window baseWindow){&lt;br /&gt;              myWindow = baseWindow; // Save the reference, which we will use&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      public void draw() {&lt;br /&gt;              //draw the horizontal scroller&lt;br /&gt;              myWindow.draw();&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      public void setSize(int height, int width) {&lt;br /&gt;              //implement horizontal scroller-specific functionality&lt;br /&gt;              myWindow.setSize(height, width);&lt;br /&gt;      }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Using the decorator:&lt;br /&gt;&lt;br /&gt;We can add a VerticalScroller decorator to a Window, say, theWindow, by saying&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;      theWindow = new VerticalScroller (theWindow);&lt;br /&gt;      //A vertical scroller gets added to theWindow&lt;br /&gt;      //Constructor internally saves a reference to the old undecorated theWindow&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The object, theWindow, will have vertical scrolling functionality after this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-114896847529878971?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/114896847529878971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=114896847529878971' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/114896847529878971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/114896847529878971'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/05/decorator-pattern.html' title='Decorator Pattern'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-114655445584925727</id><published>2006-04-17T12:44:00.000+05:30</published><updated>2006-10-31T11:13:54.024+05:30</updated><title type='text'>IsDerivedFrom</title><content type='html'>From &lt;a href="http://www.gotw.ca/gotw/071.htm"&gt;GotW&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;// Example 3(a): An IsDerivedFrom helper&lt;br /&gt;//&lt;br /&gt;template&lt;class&gt;&lt;br /&gt;class IsDerivedFrom&lt;br /&gt;{&lt;br /&gt;private:&lt;br /&gt;  class Yes { char a[1]; };&lt;br /&gt;  class No { char a[10]; };&lt;br /&gt;&lt;br /&gt;  static Yes Test( B* ); // undefined&lt;br /&gt;  static No Test( ... ); // undefined&lt;br /&gt;&lt;br /&gt;public:&lt;br /&gt;  enum { Is = sizeof(Test(static_cast&lt;d*&gt;(0))) == sizeof(Yes) ? 1 : 0 };&lt;br /&gt;};&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-114655445584925727?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/114655445584925727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=114655445584925727' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/114655445584925727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/114655445584925727'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/04/isderivedfrom.html' title='IsDerivedFrom'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-114112713992913230</id><published>2006-03-15T17:12:00.000+05:30</published><updated>2006-10-31T11:13:53.836+05:30</updated><title type='text'>Jargon Clash</title><content type='html'>&lt;span style="font-weight: bold;"&gt;=====================&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;JARGON CLASH&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;(C) 2006 Thomas Jacob&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;=====================&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Introduction&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;------------------&lt;/span&gt;&lt;br /&gt;The construction of a system is a progression from one stage of clarity to the next.&lt;br /&gt;&lt;br /&gt;1. We start with hazy requirements - &lt;span style="font-style: italic;"&gt;It's a three-line requirement doc!&lt;/span&gt;&lt;br /&gt;2. We try to gather more details - &lt;span style="font-style: italic;"&gt;Now, what could &lt;span style="font-weight: bold;"&gt;this &lt;/span&gt;be?&lt;/span&gt;&lt;br /&gt;3. We feel we have achieved enough clarity - &lt;span style="font-style: italic;"&gt;Oh, &lt;span style="font-weight: bold;"&gt;that&lt;/span&gt;'s what he meant!&lt;/span&gt;&lt;br /&gt;4. We start to implement the system. - &lt;span style="font-style: italic;"&gt;What could go wrong? It's clear and easy.&lt;/span&gt;&lt;br /&gt;5. ...and yet, in the final count, the system fails to match the user's expectations/requirements.&lt;br /&gt;&lt;br /&gt;Often, the problem lies in the inaccurate representation of facts and requirements. In this article, we explore one of the causes for this.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Quest For The Holy Grail&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-----------------------------------------&lt;/span&gt;&lt;br /&gt;The importance of capturing the requirements correctly (as a "&lt;span style="font-weight: bold;"&gt;Requirement-Model&lt;/span&gt;")  cannot be overemphasized.  After all, &lt;span style="font-weight: bold;"&gt;the system is built to satisfy the requirements of the users&lt;/span&gt;. If we understand the requirements incorrectly, we have an inaccurate Requirement-Model, and the system (which is based on it) will not, cannot be successful.&lt;br /&gt;&lt;br /&gt;A major obstacle in our quest for the perfect Requirement-Model is the &lt;span style="font-weight: bold;"&gt;lack of in-depth knowledge about the field&lt;/span&gt; in which the system will be used. This is &lt;span style="font-weight: bold;"&gt;unavoidable&lt;/span&gt; as one cannot be an expert in everything. And that's just as well because what's required of a maker of a paintbrush is that he  should be able to make the paintbrush well, not that he should be able to paint well!  There is no need for the designer of a CD-player to be a composer as well (though of course, it helps the cause if he "understands" music). It's horse for courses and that's why &lt;span style="font-style: italic;"&gt;you &lt;/span&gt;have been chosen to develop the system and not the user.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Drinking From The Poisoned Cup!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-------------------------------------------&lt;/span&gt;&lt;br /&gt;We need to close the gap in our understanding of the requirements (&lt;span style="font-style: italic;"&gt;The system needs to be built, right?&lt;/span&gt;) by asking the users for further details. The users might explain things in a seemingly familiar language, but the words could mean something entirely different than the meaning you got. &lt;span style="font-weight: bold;"&gt;Beware of Jargon-Clash&lt;/span&gt;!  The user and you, both are experts, and experts, almost as if by definition, tend to use jargon.  What you hear and get may not be what they mean!&lt;br /&gt;&lt;br /&gt;A trivial, stupid(?) and impossible(?) &lt;span style="font-weight: bold;"&gt;example&lt;/span&gt;: You are implementing a distributed system for a retailing chain. The user says that the client needs to retain the bill. You could very well take thisthis down and, justifiably, note that the bill information needs to be stored at the client-side and go &lt;span style="font-style: italic;"&gt;"Wow! &lt;span style="font-weight: bold;"&gt;Finally&lt;/span&gt;...I get to do distributed databases!"&lt;/span&gt;. Probably all the user would have meant was the the customer (client for the user) needed to be given a printed bill!&lt;br /&gt;&lt;br /&gt;Another, closer-to-reality example. The term "ATM" would mean "Automated Teller Machine" (the cash-dispensing type) to the "normal" user but  to a networking professional, ATM would mean "Asynchronous Transfer Mode", a technology for networking.&lt;span style="font-style: italic;"&gt; What then would an ATM network be?&lt;/span&gt; And &lt;span style="font-style: italic;"&gt;couldn't there be ATM networks which use ATM technology for the network?&lt;/span&gt; Think about the very-many ambiguous conversations possible!&lt;br /&gt;&lt;br /&gt;The Jargon-Clash isn't limited to the "unsavvy user, savvy developer" system-construction scenario either. In fact, the more similar the jargon of the user and the jargon of the developer, the higher the probability and impact of Jargon-Clash is. What's worse is that the Jargon-Clash will be less obvious. The effects may become evident only at an advanced stage of the project.&lt;br /&gt;Example: Computer networking and telecom are closely related, especially in this age of Internet telephony. But the term TCP, for a network programmer, would refer to the TCP/IP communication protocol and to the telecom profession would mean a Trunk Control Program.&lt;br /&gt;&lt;br /&gt;It also helps if the user too could be made aware of Jargon-Clash. Jargon-Clash could lead to destruction of mutual respect between the user and the developer. &lt;span style="font-style: italic;"&gt;But surely, everybody knows what pinging is! How can he be so stupid? &lt;/span&gt;The situation now would be, as Strother Martin's character wryly observed in the film Cool Hand Luke, "What we've got here is failure to communicate." Every concern, every requirement is not conveyed and the accuracy of the Requirement-Model is affected.&lt;br /&gt;&lt;br /&gt;For want of a nail, a kingdom can be lost and for lack of an accurate Requirement-Model, a system will be doomed to fail.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Poison Is The Cure&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-------------------------&lt;/span&gt;&lt;br /&gt;Pass everything the user says through the filter of Jargon-Clash awareness.&lt;br /&gt;&lt;br /&gt;Try to agree upon a common vocabulary and clearly define each term of relevance. Make a glossary or a project-specific dictionary. It is very important to disambiguate, not only for the accurate elicitation of requirements from user, but also for the ease of implementation.&lt;br /&gt;&lt;br /&gt;Construct new terms (a new jargon) if needed, if doing so would -&lt;br /&gt;a) make things less ambiguous, and&lt;br /&gt;b) improve the effectiveness of communication.&lt;br /&gt;Alternate styles of capitalization or the merging of words would suffice in many cases to remind the reader/user that we are using the term in a special meaning.&lt;br /&gt;&lt;br /&gt;It bugs readers no end to see repeating groups of words. Think "documentation of user-requirements" instead of Requirement-Model or "the problems caused by the common terms in the user's and developer's jargon" instead of Jargon-Clash. Abbreviate effectively, but do not make things too abstruse.&lt;br /&gt;&lt;br /&gt;Validate your Requirement-Model with the user if possible, and then, using the mutually-agreed-upon non-ambiguous vocabulary. If properly validated, the Requirement-Model would simplify the onerous task of system-development considerably.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Summary&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;------------&lt;/span&gt;&lt;br /&gt;Ambiguous terms corrupt the Requirement-Model.&lt;br /&gt;Equivocal Requirement Model = A Failed System.&lt;br /&gt;The corruption propagates and gets magnified.&lt;br /&gt;The developed system turns out to be different from what is required.&lt;br /&gt;Users ditch the system. Wasted time, wasted effort.&lt;br /&gt;&lt;br /&gt;Beware of Jargon-Clash.&lt;br /&gt;Disambiguate, at any cost.&lt;br /&gt;Even by inventing a new jargon!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;- Thomas Jacob&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;=================================================================&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-114112713992913230?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/114112713992913230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=114112713992913230' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/114112713992913230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/114112713992913230'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/03/jargon-clash.html' title='Jargon Clash'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-7685854145501862042</id><published>2006-03-04T19:55:00.000+05:30</published><updated>2007-10-04T19:56:35.949+05:30</updated><title type='text'>Advice for language designers</title><content type='html'>I strongly felt then, as I still do, that there is no one right way of writing every program, and a language designer has no business trying to force programmers to use a particular style.  - Stroustrup&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-7685854145501862042?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/7685854145501862042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=7685854145501862042' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/7685854145501862042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/7685854145501862042'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/03/advice-for-language-designers.html' title='Advice for language designers'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-5116772935548599599</id><published>2006-03-04T19:53:00.000+05:30</published><updated>2007-10-04T20:09:25.145+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='notes'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>dynamic_cast prerequisite</title><content type='html'>A dynamic cast is performed run-time. A prerequisite for using the dynamic cast  operator is the existence of at least one virtual member function in the base class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-5116772935548599599?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/5116772935548599599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=5116772935548599599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/5116772935548599599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/5116772935548599599'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/03/dynamiccast-prerequisite.html' title='dynamic_cast prerequisite'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-114112693950217486</id><published>2006-02-28T17:09:00.001+05:30</published><updated>2009-09-17T00:31:08.942+05:30</updated><title type='text'>On The Naming Away - I</title><content type='html'>The importance of the names that we give variables and functions cannot be overemphasized. I would even go so far as to say that, at times, proper naming is more important than the functionality being coded itself! Sadly, in the mad rush to get things working, this aspect of coding is often neglected. :-(&lt;br /&gt;&lt;br /&gt;Remember: code is also for reading!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-114112693950217486?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/114112693950217486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=114112693950217486' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/114112693950217486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/114112693950217486'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/02/on-naming-away.html' title='On The Naming Away - I'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-8676525116667710075</id><published>2006-02-19T19:31:00.000+05:30</published><updated>2007-10-04T19:40:33.228+05:30</updated><title type='text'>Template Friend Functions</title><content type='html'>code snippet picked up from the net. don't remember where.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#include&lt;iostream&gt;&lt;br /&gt;using namespace std;&lt;br /&gt;template&lt;class T&gt;&lt;br /&gt;class SomeClass{&lt;br /&gt;   private:&lt;br /&gt;       T member;&lt;br /&gt;   public:&lt;br /&gt;...&lt;br /&gt;   friend ostream&amp; operator&lt;&lt;(ostream &amp;,SomeClass &lt;T&gt;&amp;);&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;template &lt;typename T&gt;&lt;br /&gt;ostream&amp; operator&lt;&lt;(ostream &amp;os, const SomeClass&lt;T&gt;&amp;some){&lt;br /&gt;          os&lt;&lt;"( " &lt;&lt; some.member &lt;&lt;") ";&lt;br /&gt;          return os;&lt;br /&gt;}    &lt;br /&gt;&lt;br /&gt;int main(int argc, char* argv[])&lt;br /&gt;{&lt;br /&gt;SomeClass sc(5);&lt;br /&gt;cout &lt;&lt; sc; // Problem????&lt;br /&gt;return 0;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It reported that operator &lt;&lt; was not found.&lt;br /&gt;&lt;br /&gt;The problem is that in the class definition, a friend was declared as a function, not a template function. To make the code link properly, the friend declaration should be changed to:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; friend ostream&amp; operator&lt;&lt; &lt;&gt;(ostream &amp;,SomeClass &lt;T&gt;&amp;);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Just another little C++ twist.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-8676525116667710075?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/8676525116667710075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=8676525116667710075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/8676525116667710075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/8676525116667710075'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/02/template-friend-functions.html' title='Template Friend Functions'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-113887108310896364</id><published>2006-02-02T14:04:00.000+05:30</published><updated>2006-10-31T11:13:53.646+05:30</updated><title type='text'>Attack Of The Clones</title><content type='html'>&lt;i&gt;Presque vu&lt;/i&gt;: is a French term which means "almost seen".  It is the feeling of very nearly,  but not quite, remembering something.&lt;br /&gt;&lt;br /&gt;Here are three operating system projects that attempt to recreate or provide the look-and-feel and user-experience of other operating systems. They are driven by fervent nostalgia, but could they, will they, ever be "even better than the real thing?&lt;br /&gt;&lt;br /&gt;1. ReactOS - Aims to provide an implementation of a Windows® compatible OS&lt;br /&gt;&lt;a href="http://www.reactos.org/" target="_blank"&gt;ReactOS homepage&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. Haiku - Aims at the re-creation of the Be Operating System.&lt;br /&gt;&lt;a href="http://haiku-os.org/" target="_blank"&gt;Haiku OS homepage"&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3. CoLinux - port of the Linux kernel that allows it to run alongside another operating system on a computer.  Run Linux on Windows® 2000/XP.&lt;br /&gt;&lt;a href="http://www.colinux.org/" target="_blank"&gt;Cooperative Linux Homepage&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-113887108310896364?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/113887108310896364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=113887108310896364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113887108310896364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113887108310896364'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/02/attack-of-clones.html' title='Attack Of The Clones'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-113801973873572571</id><published>2006-01-23T18:04:00.000+05:30</published><updated>2006-10-31T11:13:53.583+05:30</updated><title type='text'>Indirection Is Flexibility</title><content type='html'>&lt;div style="text-align: right;"&gt;Indirection (n)&lt;br /&gt;1. "indirect procedure or action".&lt;br /&gt;2. "deceitful action that is not straightforward"&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Indirection in system design is when instead of explicitly specifying how exactly something is done, we delegate the responsibility to another person/entity. We buy belts that are looser than needed, just in case we get fatter, don't we?&lt;br /&gt;&lt;br /&gt;Let's say somebody who's new in town asks us what he should do to start a bank account. We could -&lt;br /&gt;a) tell him to go to the bank and meet the manager there.&lt;br /&gt;b) give him the exact list of required documents, the order in which to submit them and to whom.&lt;br /&gt;&lt;br /&gt;Take into account the always-changing laws and the idosyncrasies of different banks, and the advantages of the first approach are self-evident! That's indirection for you. We would of course give him the address of the bank and possibly also the title of the official (manager, if he is a life-newbie as well).&lt;br /&gt;&lt;br /&gt;Indirection helps us surmount change. In programming, we achieve indirection through the use of pointers and references instead of actual objects. Indirection is closely related to the concept of abstraction.&lt;br /&gt;&lt;br /&gt;OO perspective: Instead of specifying the exact type of the implementor, we just mention that it will be of a certain type,say, Base . This is the foundation on which most design patterns are constructed. We can later on replace this reference with a more specialized object (derived from Base), if needed, to provide extra/changed functionality.&lt;br /&gt;&lt;br /&gt;Other examples:&lt;br /&gt;The use of virtual machines like .NET's CLR or Java's JVM instead of the actual processor gives us portability as a useful side-effect.&lt;br /&gt;The use of pointers in C/C++ gives us space-efficiency.&lt;br /&gt;&lt;br /&gt;There ain't no such thing as a free lunch. Indirection gives us flexibility at the expense of performance. No matter how trivial the cost is, there is a price to be paid. You can't have your cake and eat it too!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-113801973873572571?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/113801973873572571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=113801973873572571' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113801973873572571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113801973873572571'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2006/01/indirection-is-flexibility.html' title='Indirection Is Flexibility'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-8784368941543738243</id><published>2006-01-08T19:25:00.000+05:30</published><updated>2007-10-04T19:31:31.815+05:30</updated><title type='text'>OS Development Resources</title><content type='html'>A new year's present for the wannabe OS developer&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.osdever.net/tutorials.php?cat=0&amp;amp;sort=1"&gt;http://www.osdever.net/tutorials.php?cat=0&amp;amp;sort=1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;May you not fail for the lack of guidance!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-8784368941543738243?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/8784368941543738243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=8784368941543738243' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/8784368941543738243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/8784368941543738243'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/01/os-development-tutorial.html' title='OS Development Resources'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-113393340664703202</id><published>2005-12-07T10:27:00.000+05:30</published><updated>2006-10-31T11:13:53.519+05:30</updated><title type='text'>T&amp;L - Not Made For Each Other?</title><content type='html'>&lt;div align="left"&gt;&lt;span style="font-weight: bold;"&gt;---------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;THREADS AND LIBRARIES&lt;br /&gt;NOT MADE FOR EACH OTHER?&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---------------------------------&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;1 INTRODUCTION&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Threading libraries hide very little of the complexity involved in the use of threads. Often, the focus and the major obstacles in implementing a multithreaded system are the low-level details of threading, rather than the problems that the system is designed to solve.&lt;br /&gt;&lt;br /&gt;Objects can be said to model reality, thereby providing good abstraction. However, a crucial part of reality that is &lt;em&gt;not represented adequately&lt;/em&gt; in an object is &lt;em&gt;a sense of time&lt;/em&gt;. Objects exist in time and space, and interact with other objects; they have "life". A mechanism for intuitively expressing such &lt;em&gt;Live Objects&lt;/em&gt; (or Active Objects), where an object has its own thread, is missing from the threading libraries in (libraries of) object-oriented languages today. &lt;/div&gt;&lt;div align="left"&gt; &lt;/div&gt;&lt;div align="center"&gt;Spatial representation OK. &lt;/div&gt;&lt;div align="center"&gt;Temporal representation, not OK.&lt;/div&gt;&lt;div align="left"&gt; &lt;/div&gt;&lt;div align="left"&gt;&lt;strong&gt;2 CURRENT THREADING MECHANISMS&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Presently to use threads, we create a thread and give it sections of code (from the object) for it to do. For example,&lt;br /&gt;&lt;br /&gt;&lt;em&gt;threadHandle=CreateThread(&lt;strong&gt;StuffToDo , &lt;/strong&gt;OS/LibraryParameters)&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;is how threads of control are created from the program. The code (StuffToDo) is then executed in the newly created thread.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2.1 Observations&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In the present library implementations,&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2a Threads use objects. &lt;/strong&gt;&lt;br /&gt;The thread executes a function, possibly a function or method of an object. In the example, StuffToDo could be the method of an object.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2b&lt;/strong&gt; &lt;strong&gt;Threads are to functions what objects are to classes. &lt;/strong&gt;&lt;br /&gt;Or, threads are objects. &lt;em&gt;The thread object instantiates a function&lt;/em&gt;, brings into execution-space so to say, executing it. The implementation forces the thread to become a first-class "object" in the program-space. It has a handle, threadHandle, that can be used to refer to it.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2c Threads are almost equivalent to operating system threads.&lt;/strong&gt;&lt;br /&gt;Most of what can be done with an operating system thread can be done with library threads also - one can suspend a thread, resume it, abort it etc&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3 '&lt;em&gt;OBJECT'&lt;/em&gt;IONS - CRITIQUE&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In the real world, entities use their time and their resources to do things. A thread can be viewed as a flow of time for practical purposes. In the library-model, threads use objects (&lt;strong&gt;2a&lt;/strong&gt;) whereas &lt;strong&gt;in reality, objects use threads&lt;/strong&gt;. This unnatural modeling contributes to the difficulties of conceptualizing and implementing threaded systems. &lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="center"&gt;It should be "Objects use threads", &lt;/div&gt;&lt;div align="center"&gt;not "Threads use objects". &lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;An object oriented program/system is an exchange of messages between objects resulting in side-effects useful towards the solution of the problem at hand.  Thread objects (&lt;strong&gt;2b&lt;/strong&gt;) are only an implementation mechanism, a way of calling a function; they do not help to manage complexity. Instead, thread object interactions add complexity and intrude on the main logic of the program. &lt;/div&gt;&lt;div align="left"&gt; &lt;/div&gt;&lt;div align="left"&gt;In the scenario of single-threaded program development, come to think of it, the programmer plays the role of the thread object during coding- deciding which functions to call and in what order. Sadly though, this does not scale - which is why multithreaded programs are so challengingly complex.&lt;/div&gt;&lt;div align="left"&gt; &lt;/div&gt;&lt;div align="left"&gt;&lt;em&gt;Why have thread objects at all in programs?&lt;/em&gt; Threads are, very much, operating system entities (&lt;strong&gt;2c&lt;/strong&gt;) . If we have the thread object in the program, it is only natural that they have methods similar to the real-world (albeit on the OS-side) entities that they model, with some high-level constructs thrown in for good measure. If we have thread objects, the complexity of threading cannot be hidden from the programmer.&lt;/div&gt;&lt;div align="left"&gt; &lt;/div&gt;&lt;div align="left"&gt;For operating systems, threads are expensive to manage. The objection to live objects that is raised all too often is: "&lt;span style="font-style: italic;"&gt;What! If I have a 1000 live objects, it would mean 1000 threads too? You must be out of your mind...&lt;/span&gt;" This mental block must be removed. The programming language back-end (the popular idiom of the runtime) can possibly be adapted to meet the external implementation constraints.&lt;/div&gt;&lt;div align="left"&gt; &lt;/div&gt;&lt;div align="center"&gt;Hide the complexity of threads from the programmer, effectively.&lt;/div&gt;&lt;div align="left"&gt;&lt;strong&gt;&lt;/strong&gt; &lt;/div&gt;&lt;div align="left"&gt;&lt;strong&gt;4 OOTOPIA&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt; &lt;/div&gt;&lt;div align="left"&gt;Ideally, after the definition of live objects, one would be able to program like a classroom interaction like this:&lt;/div&gt;&lt;div align="left"&gt; &lt;/div&gt;&lt;div align="left"&gt;void main()&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt; TeacherLiveObject theProf;&lt;/div&gt;&lt;div align="left"&gt; StudentLiveObject theStudents[30];&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt; &lt;/div&gt;&lt;div align="left"&gt;That would be it?&lt;/div&gt;&lt;div align="left"&gt; &lt;/div&gt;&lt;div align="left"&gt;&lt;strong&gt;5 CONCLUSION &lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;A LOOP (Live Object Oriented Programming) language is the need of the hour.  Such a language would help people to take their minds off low-level threading details and focus on more domain-relevant issues at hand, enabling the construction of more useful programs.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;- Thomas Jay Cubb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;External links&lt;br /&gt;1 &lt;a href="http://www.gotw.ca/publications/concurrency-ddj.htm" target="_blank"&gt;The Free Lunch Is Over&lt;/a&gt;&lt;br /&gt;2 &lt;a href="http://acmqueue.com/modules.php?name=Content&amp;pa=showpage&amp;amp;pid=332%3E" target="_blank"&gt;Software and the Concurrency Revolution&lt;/a&gt;&lt;br /&gt;3 &lt;a href="http://thread.gmane.org/gmane.comp.python.devel/71708" target="_blank"&gt;Discussion on Active Objects In Python&lt;/a&gt;&lt;br /&gt;4 &lt;a href="http://domino.research.ibm.com/comm/research_projects.nsf/pages/x10.index.html" target="_blank"&gt;IBM Research- The X10 Programming Language&lt;/a&gt; - A LOOP language?&lt;br /&gt;5 &lt;a href="http://research.microsoft.com/%7Enick/polyphony/" tarrget="_blank"&gt;Polyphonic C# in Cw&lt;/a&gt; - Another LOOP language?&lt;/div&gt;&lt;div align="left"&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-113393340664703202?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/113393340664703202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=113393340664703202' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113393340664703202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113393340664703202'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/12/tl-not-made-for-each-other.html' title='T&amp;L - Not Made For Each Other?'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-5228258703783435916</id><published>2005-12-06T19:18:00.000+05:30</published><updated>2007-10-04T19:33:04.115+05:30</updated><title type='text'>Cline's Commandments</title><content type='html'>* A class Fred's assignment operator should return *this as a Fred&amp;amp; (allows&lt;br /&gt;  chaining of assignments)&lt;br /&gt;* A class with any virtual[20] functions ought to have a virtual&lt;br /&gt;  destructor[20.4]&lt;br /&gt;* A class with any of {destructor, assignment operator, copy constructor}&lt;br /&gt;  generally needs all 3&lt;br /&gt;* A class Fred's copy constructor and assignment operator should have const in&lt;br /&gt;  the parameter: respectively Fred::Fred(const Fred&amp;amp;) and&lt;br /&gt;  Fred&amp;amp; Fred::operator= (const Fred&amp;amp;)&lt;br /&gt;* When initializing an object's member objects in the constructor, always use&lt;br /&gt;  initialization lists rather than assignment.  The performance difference for&lt;br /&gt;  user-defined classes can be substantial (3x!)&lt;br /&gt;* Assignment operators should make sure that self assignment[12.1] does&lt;br /&gt;  nothing, otherwise you may have a disaster[12.2].  In some cases, this may&lt;br /&gt;  require you to add an explicit test to your assignment operators[12.3].&lt;br /&gt;* In classes that define both += and +, a += b and a = a + b should generally&lt;br /&gt;  do the same thing; ditto for the other identities of built-in types (e.g.,&lt;br /&gt;  a += 1 and ++a; p[i] and *(p+i); etc).  This can be enforced by writing the&lt;br /&gt;  binary operations using the op= forms.  E.g.,&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;      Fred operator+ (const Fred&amp;amp; a, const Fred&amp;amp; b)&lt;br /&gt;      {&lt;br /&gt;        Fred ans = a;&lt;br /&gt;        ans += b;&lt;br /&gt;        return ans;&lt;br /&gt;      }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  This way the "constructive" binary operators don't even need to be&lt;br /&gt;friends[14].  But it is sometimes possible to more efficiently implement common&lt;br /&gt;operations (e.g., if class Fred is actually String, and += has to&lt;br /&gt;reallocate/copy string memory, it may be better to know the eventual length&lt;br /&gt;from the beginning).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-5228258703783435916?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/5228258703783435916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=5228258703783435916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/5228258703783435916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/5228258703783435916'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2007/12/clines-commandments.html' title='Cline&apos;s Commandments'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-3310538517492944163</id><published>2005-12-04T19:49:00.000+05:30</published><updated>2007-10-04T19:50:10.293+05:30</updated><title type='text'>ISO C++ updates</title><content type='html'>A static const integer member is the one instance in C++ in which a class member can be initialized explicitly within the class definition, thereby making the value available to other constructs within the class, such as the dimension size of m_buffer. Without this construct, the use of an enumerator as a symbolic constant was a common workaround.&lt;br /&gt;&lt;br /&gt;There is now covariant return type support in the definition of virtual functions. This is great news for those who write class hierarchies.&lt;br /&gt;&lt;br /&gt;There is support for the implicit return of 0 within main.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-3310538517492944163?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/3310538517492944163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=3310538517492944163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/3310538517492944163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/3310538517492944163'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/12/iso-c-updates.html' title='ISO C++ updates'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-113324634707866264</id><published>2005-11-29T11:55:00.000+05:30</published><updated>2006-10-31T11:13:53.456+05:30</updated><title type='text'>Heart For The GNU</title><content type='html'>This short poem tries to encapsulate some Linux history.&lt;br /&gt;&lt;br /&gt;Linus Torvalds wanted to modify Andrew Tenenbaum's MINIX operating system initially. But Tanenbaum did not give him permission, so he set about writing his own operating system. This became the kernel for the GNU project which aimed at making a free operating system.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;--------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A HEART FOR THE GNU&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;--------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Tanenbaum forbade,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Linus obeyed.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Fiat Linux!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Freedom redux.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;- Thomas Jay Cubb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Notes&lt;br /&gt;--------&lt;br /&gt;1. "Fiat Lux" is a Latin phrase meaning "let there be light" from the Bible's Genesis book which relates God's creation of the world. Linus, the Creator! So, Fiat Linux.&lt;br /&gt;2. redux = Brought back. The GNU OS project was losing steam and face, for the lack of a suitable kernel for its operating system. The Linux kernel, so to say, resurrected it. (GNU/Linux)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You may also be interested in reading &lt;a href="http://oozone.blogspot.com/2005/09/punnix-version-120.html"&gt;Punnix&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-113324634707866264?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/113324634707866264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=113324634707866264' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113324634707866264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113324634707866264'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/11/heart-for-gnu.html' title='Heart For The GNU'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-113317953804874768</id><published>2005-11-28T17:24:00.000+05:30</published><updated>2006-10-31T11:13:53.399+05:30</updated><title type='text'>On The Hacked Track</title><content type='html'>&lt;span style="font-weight: bold;"&gt;1. Viewing the dependencies of a binary&lt;/span&gt;&lt;br /&gt;ldd  gives you the dynamic libraries that a file depends on.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;$ ldd binaryfile&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;binaryfile style="font-weight: bold;"&gt;2. &lt;/binaryfile&gt;&lt;span style="font-weight: bold;"&gt;Viewing the symbols in a file&lt;/span&gt;&lt;br /&gt;nm gives you the list of symbols in the file. Functions that are exported by the library will be present as symbols. Many files are stripped of symbols before they are released, though.&lt;binaryfile&gt;&lt;binaryfile&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;$ nm binaryfile/libraryfile&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. Interposing&lt;/span&gt;&lt;br /&gt;On many *NIX variants, you can set a dynamic library of your choice to be searched first when dynamic library calls are made. &lt;/binaryfile&gt;&lt;/binaryfile&gt; Set the value of LD_PRELOAD to the full path of the library file you want to be executed in preference to other libraries.&lt;br /&gt;&lt;binaryfile&gt;&lt;binaryfile&gt;&lt;br /&gt;Take an executable and determine its dependencies. View the symbols in those library-files. Make your own library-file with implementations for the symbols that seem to be of relevance to you. Set the LD_PRELOAD variable to the name of your library file. Run the executable.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/binaryfile&gt;&lt;/binaryfile&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-113317953804874768?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/113317953804874768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=113317953804874768' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113317953804874768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113317953804874768'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/11/on-hacked-track.html' title='On The Hacked Track'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-113265114733391264</id><published>2005-11-22T14:37:00.000+05:30</published><updated>2006-10-31T11:13:53.280+05:30</updated><title type='text'>Data Polymorphism</title><content type='html'>&lt;h2&gt;INTRODUCTION&lt;br /&gt;----------------------------&lt;/h2&gt; &lt;p&gt;Languages that support polymorphism seem to require functions to model polymorphic requirements. This suffices in most cases, but there are cases in which it is only the data that is polymorphic - what takes a different form in a different context.&lt;/p&gt; &lt;p&gt;While modeling data polymorphism is possible through the use of templates (will be discussed in a later post), this article makes a case for the language to allow interfaces to have abstract data members, whose types are unknown in the base class and will be meaningful only in the derived context. &lt;/p&gt; &lt;p&gt;Interfaces (and Abstract Base Classes) are an expressive notation for mandating the implementation of required functions in derived classes. Why not utilize the same notation to accommodate data as well?&lt;/p&gt; &lt;p&gt;In a nutshell, the following is possible :- &lt;/p&gt;&lt;pre&gt;&lt;span class="cpp-keyword"&gt;class&lt;/span&gt; Abstract&lt;br /&gt;{&lt;br /&gt;&lt;span class="cpp-keyword"&gt;virtual&lt;/span&gt; &lt;span class="cpp-keyword"&gt;void&lt;/span&gt; pureVirtualFunction()=&lt;span class="cpp-literal"&gt;0&lt;/span&gt;; &lt;span class="cpp-comment"&gt;//Unknown behaviour, specifiable&lt;/span&gt;&lt;br /&gt;&lt;span class="cpp-keyword"&gt;void&lt;/span&gt; concreteFunction()&lt;br /&gt;{&lt;br /&gt; pureVirtualFunction(); &lt;span class="cpp-comment"&gt;// We can call the undefined function&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;But the following is not :- &lt;/p&gt;&lt;pre&gt;&lt;span class="cpp-keyword"&gt;class&lt;/span&gt; Abstract&lt;br /&gt;{&lt;br /&gt;&lt;span class="cpp-keyword"&gt;virtual&lt;/span&gt; pureVirtualData; &lt;span class="cpp-comment"&gt;//Unknown data, Not allowed&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="cpp-keyword"&gt;void&lt;/span&gt; concreteFunction&lt;br /&gt;{ &lt;br /&gt;  print pureVirtualData.Count; &lt;span class="cpp-comment"&gt;// We know how to use the data though&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;What does this imply? Could there be cases where such a feature would help?&lt;/p&gt; &lt;p&gt;Some months back, I encountered a requirement which, I thought, really called out for more direct support for data polymorphism in the language. I explain the problem in a generalized way, leaving out some domain-specific details. &lt;/p&gt; &lt;p&gt;Please do let me know if more details are needed to understand the problem and why the limitations mentioned are significant.&lt;/p&gt; &lt;h2&gt;THE REQUIREMENT&lt;br /&gt;--------------------------------&lt;/h2&gt; &lt;p&gt;An algorithm needs to be implemented on the transmissions of an existing client-server system to improve its performance. Broadly, the algorithm transparently intercepts the packets, applies some transforms based on the packet and relays them.&lt;br /&gt;&lt;br /&gt;In order to implement the algorithm, components should be deployed at both the server and the client. The algorithm depends on the functionality in a packet and a factor which is determined by whether the component is at the server or at the client.&lt;/p&gt; &lt;h2&gt;DESIGN WITH BEHAVIOURAL POLYMORPHISM&lt;br /&gt;----------------------------------------------------------------------&lt;/h2&gt; &lt;p&gt;Packet is a concrete class which provides a buffer-storage area and some domain-specific functionality.&lt;/p&gt;&lt;pre&gt;&lt;span class="cpp-keyword"&gt;class&lt;/span&gt; Packet&lt;br /&gt;{&lt;br /&gt;Byte Buffer[];&lt;br /&gt;&lt;br /&gt;&lt;span class="cpp-keyword"&gt;virtual&lt;/span&gt; &lt;span class="cpp-keyword"&gt;double&lt;/span&gt; toDouble();&lt;br /&gt;&lt;span class="cpp-keyword"&gt;virtual&lt;/span&gt; &lt;span class="cpp-keyword"&gt;int&lt;/span&gt; toInteger();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="cpp-keyword"&gt;void&lt;/span&gt; applyXXXToPacket()&lt;br /&gt;...&lt;span class="cpp-comment"&gt;//Other domain-specific functions&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;The algorithm depends on Packet functions to transform the packets with a factor which is based on Packet::toDouble() and on Packet::toInteger(). Both these conversions are to be done slightly differently from the implementations in the Packet class and, also, differently at client- and server- sides.&lt;br /&gt;&lt;br /&gt;We have the inheritance,&lt;br /&gt;ServerPacket: public Packet, and we reimplement toInteger and toDouble for server&lt;br /&gt;ClientPacket: public Packet, and we reimplement toInteger and toDouble for client&lt;br /&gt;&lt;br /&gt;Algorithm components only need to apply some transforms on Packets. We generalize to the abstraction,&lt;br /&gt;&lt;pre&gt;&lt;span class="cpp-keyword"&gt;class&lt;/span&gt; AlgorithmComponent&lt;br /&gt;{&lt;br /&gt;Packet&amp; p; &lt;span class="cpp-comment"&gt;//Reference type required to achieve behavioural polymorphism&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="cpp-keyword"&gt;void&lt;/span&gt; ProcessPacketXXX();&lt;br /&gt;... &lt;span class="cpp-comment"&gt;//Functions which use Packet::functions&lt;/span&gt;&lt;br /&gt;... &lt;span class="cpp-comment"&gt;//&lt;/span&gt;&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;The component implementing the algorithm only differs slightly on the server and client sides. But they do differ and so we have the specializations,&lt;br /&gt;&lt;br /&gt;ServerComponent: public AlgorithmComponent&lt;br /&gt;ClientComponent: public AlgorithmComponent&lt;/p&gt; &lt;p&gt;It worked! But...&lt;/p&gt; &lt;h2&gt;PERFORMANCE ISSUES...&lt;br /&gt;--------------------------------------&lt;/h2&gt; &lt;p&gt;It turned out that both the required conversion functions were very expensive, leading to erratic performance. All that was really required was a one-time computation of the conversion, which could be done in the constructors of the specialized Packets. &lt;strong&gt;Saving these in a member variable would solve the performance issues.&lt;/strong&gt;The ClientComponent and the ServerComponent could then use this saved value directly. &lt;/p&gt; &lt;p&gt;But it is not possible to for the generalized AlgorithmComponent to access a data member of the generalized Packet class through a Packet reference and get the implementations of the derived classes. &lt;/p&gt; &lt;p&gt;Consider the code snippet below.&lt;/p&gt;&lt;pre&gt;&lt;span class="cpp-keyword"&gt;class&lt;/span&gt; Base{&lt;br /&gt;&lt;span class="cpp-keyword"&gt;public&lt;/span&gt;:&lt;br /&gt; &lt;span class="cpp-keyword"&gt;int&lt;/span&gt; i;&lt;br /&gt; Base(){i=&lt;span class="cpp-literal"&gt;2&lt;/span&gt;;} &lt;span class="cpp-comment"&gt;//In B, i is 2&lt;br /&gt;};&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="cpp-keyword"&gt;class&lt;/span&gt; Derived:  &lt;span class="cpp-keyword"&gt;public&lt;/span&gt; Base&lt;br /&gt;{&lt;br /&gt;&lt;span class="cpp-keyword"&gt;public&lt;/span&gt;:&lt;br /&gt; &lt;span class="cpp-keyword"&gt;int&lt;/span&gt; i;&lt;br /&gt; Derived(){i=&lt;span class="cpp-literal"&gt;5&lt;/span&gt;;} &lt;span class="cpp-comment"&gt;//In D, i is 5&lt;br /&gt;&lt;br /&gt;};&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;span class="cpp-keyword"&gt;void&lt;/span&gt; main()&lt;br /&gt;{&lt;br /&gt; Derived d;&lt;br /&gt; Base&amp; b=d;&lt;br /&gt; cout &lt;&lt; class="cpp-comment"&gt;//Prints 2, not 5. No polymorphism for data access. :-(&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;&lt;strong&gt;This means that the abstraction of AlgorithmComponent would collapse - breaking the class hierarchy&lt;/strong&gt;. &lt;/p&gt; &lt;h2&gt;...AND A TRIVIAL(?) VIOLATION OF A DESIGN CONSTRAINT&lt;br /&gt;------------------------------------------------------------------------&lt;/h2&gt; &lt;p&gt;An AlgorithmComponent necessarily has to be either server-side or client-side. It was just an abstraction of design which accurately summarized the operation of the algorithm. AlgorithmComponent should not be instantiable, it is an abstract base class by nature.&lt;br /&gt;&lt;br /&gt;Implementing this particular design constraint is possible if we make the functions which depend on Packet pure virtual. Technically, for AlgorithmComponent to be abstract, we need to make only one of the ProcessPacketXXX()s pure virtual. But that would not accurately model the dependency on Packet for the other functions. &lt;/p&gt; &lt;p&gt;Functions that depend on Packet can be completely specified. We could avoid code duplication if we code it in the base class itself. &lt;strong&gt;The abstractness of AlgorithmComponent is because of its dependency on Packet.&lt;/strong&gt; So, Packet is what should be pure virtual really. &lt;/p&gt; &lt;p&gt;What we should have had was an AlgorithmComponent with completely specified functions but with an unspecified Packet that had to be compulsorily supplied by the derived class.&lt;/p&gt; &lt;h2&gt;CONCLUSION&lt;br /&gt;----------------------&lt;/h2&gt; &lt;p&gt;What if, in the discussed example, ServerComponent depended on a double/class Foo and ClientComponent depended on an int/class Bar? Shouldn't abstract base classes be allowed to have undefined data members? Or equivalently, why not allow data members in interfaces? &lt;/p&gt; &lt;p&gt;Workarounds to these do exist -&lt;br /&gt;1) with templates (the discussion stopped just short of it, don't you think?) - but it would be a compile-time solution. Will be discussed in a later post.&lt;br /&gt;2) with composition instead of inheritance (which is how we chose to implement it finally) -but lacks the simplicity and elegance of the explained design - with code duplication and what not.&lt;/p&gt; &lt;p&gt;Would it not be simpler and cleaner to express such a design if the language just allowed the data also to be truly polymorphic? &lt;/p&gt; &lt;p&gt;&lt;b&gt;- Thomas Jay Cubb&lt;/b&gt; &lt;/p&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-113265114733391264?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/113265114733391264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=113265114733391264' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113265114733391264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113265114733391264'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/11/data-polymorphism.html' title='Data Polymorphism'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-113256969076445364</id><published>2005-11-21T15:37:00.000+05:30</published><updated>2006-10-31T11:13:53.215+05:30</updated><title type='text'>Everything Changes</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt; &lt;div style="text-align: left; font-weight: bold;"&gt;-------------------------------&lt;br /&gt;EVERYTHING CHANGES&lt;br /&gt;-------------------------------&lt;br /&gt;&lt;/div&gt; &lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;Systems are built to satisfy the requirements of users. Successful systems -&lt;br /&gt;a)  meet those requirements and,&lt;br /&gt;b)  will continue to be used by the users, who would prefer it to any other.&lt;br /&gt;&lt;br /&gt;It is possible for a system to succeed even if it is not flexibly designed. &lt;span style="font-style: italic;"&gt; My system does &lt;/span&gt;&lt;span style="font-style: italic;"&gt;the job and they like it&lt;/span&gt;&lt;span style="font-style: italic;"&gt;! &lt;span style="font-weight: bold;"&gt;These &lt;/span&gt;are the requirements, my system is designed for &lt;span style="font-weight: bold;"&gt;that&lt;/span&gt;!&lt;/span&gt;&lt;span style="font-style: italic;"&gt; Who cares that it is not flexible! I have done the requirement-collection to perfection. There's nothing more they could possibly want!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;Now who wouldn't want his system to be successful? In fact, most people would want their creation to be indispensable! But with great power, comes great responsibility. Good design is all the more essential if your system has even the remotest chance of being successful - if you want to be a star, not just a shooting star.&lt;br /&gt;&lt;br /&gt;Successful systems &lt;span style="font-style: italic;"&gt;will be &lt;/span&gt;&lt;span style="font-style: italic;"&gt;used &lt;/span&gt;by the users and,&lt;span style="font-style: italic;"&gt; over a long period&lt;/span&gt; of time. Any successful system will, in the course of its lifetime, be required to accommodate changes. No matter how well you did the requirement-collection, over time, the set of users will change and by extension, the requirements too! All of a sudden your "successful" systems becomes a failure. Users choose to switch from the system&lt;br /&gt;&lt;br /&gt;We must be able to adapt and quickly at that. Accommodating new requirements or changing the behaviour should not become an unnecessarily complex or time-consuming chore - requiring the complete revalidation of the system. Resilience to change is one of the hallmarks of a good design.&lt;br /&gt;&lt;br /&gt;Changes in a system may be required because -&lt;br /&gt;a) The users of the system have new requirements. &lt;span style="font-style: italic;"&gt;Wouldn't it be cool if this thing could do &lt;span style="font-weight: bold;"&gt;that &lt;/span&gt;as well?... I want to use my credit-card to pay..... or ... I want this bus to fly!&lt;/span&gt;&lt;br /&gt;b) Better, more suitable ways of doing things may emerge only after the system is deployed. &lt;span style="font-style: italic;"&gt;Would it not be better and simpler to do it like &lt;span style="font-weight: bold;"&gt;this&lt;/span&gt;?...&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;span style="font-style: italic;"&gt;I want the system to start when I press the end button&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;...&lt;/span&gt;&lt;br /&gt;c) There were slight errors in our understanding of the requirement. Largely unavoidable. Because only hindsight is 20/20. &lt;span style="font-style: italic;"&gt; Oh, was that the order in which you wanted things to happen?... The person should be given the receipt &lt;span style="font-weight: bold;"&gt;before &lt;/span&gt;he pays....&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;While bus-to-airbus scenarios are well-nigh impossible to design for, with a little bit of thoughtful design, the other two can be designed for more easily. What's more, often you will find that many of the seemingly bus-to-airbus requirement-changes could have been handled in less cumbersome ways, if only you had thought about possible changes during design.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-Thomas Jay Cubb&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-113256969076445364?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/113256969076445364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=113256969076445364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113256969076445364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113256969076445364'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/11/everything-changes.html' title='Everything Changes'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-7197468409851880523</id><published>2005-11-16T14:37:00.000+05:30</published><updated>2007-10-04T19:07:39.282+05:30</updated><title type='text'>SunOS vs Solaris</title><content type='html'>What's the difference between SunOS and Solaris?&lt;br /&gt;&lt;br /&gt;SunOS refers to the actual operating system that underlies the Solaris OE (operating environment). SunOS is often used to refer to the old SunOS 4.x, a BSD-like operating system with some SVR4 features and OpenWindows.&lt;br /&gt;&lt;br /&gt;Solaris is typically used to refer to SunOS 5.x releases of the operating system and environment from Sun Microsystems. The version of Solaris can be derived from the SunOS 5.x designation by dropping the leading 5. e.g., Solaris 7 is SunOS 5.7. However, some earlier verions of Solaris were numbered as 2.5.1 with a SunOS release of 5.5.1.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-7197468409851880523?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/7197468409851880523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=7197468409851880523' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/7197468409851880523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/7197468409851880523'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/11/sunos-vs-solaris.html' title='SunOS vs Solaris'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-113221202944462309</id><published>2005-11-14T12:45:00.000+05:30</published><updated>2006-10-31T11:13:53.155+05:30</updated><title type='text'>Peter Deutsch's Eight Fallacies</title><content type='html'>&lt;a href="http://digg.com/programming/The_eigt_fallacies_of_distributed_computing"&gt; Picked this up from digg.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-----------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The eight fallacies of distributed computing&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;By Peter Deutsch&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-----------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Essentially everyone, when they first build a distributed application, makes this eight assumptions.&lt;br /&gt;All prove to be false in the long run and all cause big trouble and painful learning experiences.&lt;br /&gt;&lt;br /&gt;1. The network is reliable&lt;br /&gt;2. Latency is zero&lt;br /&gt;3. Bandwidth is infinite&lt;br /&gt;4. The network is secure&lt;br /&gt;5. Topology doesn't change&lt;br /&gt;6. There is one administrator&lt;br /&gt;7. Transport cost is zero&lt;br /&gt;8. The network is homogeneous&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-113221202944462309?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/113221202944462309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=113221202944462309' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113221202944462309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113221202944462309'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/11/peter-deutschs-eight-fallacies.html' title='Peter Deutsch&apos;s Eight Fallacies'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-113162656762325406</id><published>2005-11-10T18:04:00.000+05:30</published><updated>2006-10-31T11:13:53.090+05:30</updated><title type='text'>Finding Bliss - UNIX find Introduction</title><content type='html'>&lt;span style="font-weight: bold;"&gt;----------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;FIND-ING BLISS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;----------------------&lt;/span&gt;&lt;br /&gt;The UNIX &lt;span style="font-style: italic;"&gt;find&lt;/span&gt; command is, in my book, one of the most powerful time-saving utilities ever. I would even go so far as to say that you have not appreciated the power of UNIX utilities fully unless you have used, and can habitually use, the &lt;span style="font-style: italic;"&gt;find &lt;/span&gt;command.&lt;br /&gt;&lt;br /&gt;What's more, it it offers great flexibility and power. Not only does it allow you to find stuff, but it also allows you to invoke a command you specify, on each item it finds.&lt;br /&gt;&lt;br /&gt;STEP-BY-STEP EXAMPLES&lt;br /&gt;-------------------------------&lt;br /&gt;1. Finding stuff&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;find&lt;/span&gt; /&lt;br /&gt;gives you a list of everything that's under the / directory. And that, as far as your system is concerned is everything under the sun. You can replace / with any other directory of your choice.&lt;br /&gt;&lt;br /&gt;2. Finding a file based on name&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;find / -name foo&lt;/span&gt;&lt;br /&gt;finds all items (files and directories) named foo, on your system. You can specify wildcards if you wish but remember to escape shell expansion for the wildcard by using quotes.&lt;br /&gt;&lt;br /&gt;3. Getting a list of all directories on your system&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;find / -type d&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;4. Executing a command on what &lt;span style="font-style: italic;"&gt;find &lt;/span&gt;found&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;find / -exec ls -l '{}'  \;&lt;/span&gt;&lt;br /&gt;generates a detailed &lt;span style="font-style: italic;"&gt;ls &lt;/span&gt;listing of each item found in the system&lt;br /&gt;&lt;br /&gt;This needs a little bit of explanation -&lt;br /&gt;&lt;span style="font-style: italic;"&gt;-exec&lt;/span&gt; specifies that what follows is a command&lt;br /&gt;&lt;span style="font-style: italic;"&gt;\; &lt;/span&gt;denotes the end of the command&lt;br /&gt;'{}' is where the current item gets substituted in the command for each item.&lt;br /&gt;You can give any command you want instead of ls, of course.&lt;br /&gt;&lt;br /&gt;NOTES&lt;br /&gt;---------&lt;br /&gt;1.&lt;span style="font-style: italic;"&gt; -name&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;-type&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;-exec&lt;/span&gt; are like extensions to the basic find utility, which builds a list of everything under a directory. It spiders the subdirectory structure and builds a list.&lt;br /&gt;&lt;br /&gt;2. Think of &lt;span style="font-style: italic;"&gt;-name&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;-type&lt;/span&gt; as filter conditions for cutting the list down to just what we need. For example, -type f means files and -type d means directories.&lt;br /&gt;&lt;br /&gt;3. &lt;span style="font-style: italic;"&gt;-exec&lt;/span&gt; specifies the action to invoke on each item - whatever is between exec and \; gets taken by find as the command.&lt;br /&gt;&lt;br /&gt;4. There are many more modifiers. Please refer to the man pages on your system. These only serve as quick but useful intros.&lt;br /&gt;&lt;br /&gt;PUTTING IT ALL TOGETHER&lt;br /&gt;----------------------------------&lt;br /&gt;Let's say you want to view and edit all readme files under a directory, say, /home using an editor, say vi.  Think about it.&lt;br /&gt;&lt;br /&gt;You can accomplish this in one line with the find command.&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;find /home -type f -name readme.txt -exec vi '{}' \;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So much less troublesome, less strenuous and less time-consuming than getting a list of the files and clicking on them one by one. All in a line's work!&lt;br /&gt;&lt;br /&gt;ON THE DESIGN&lt;br /&gt;(external view)&lt;br /&gt;---------------------&lt;br /&gt;&lt;span style="font-style: italic;"&gt;find&lt;/span&gt; allows you to iterate over a filtered collection invoking a specified action. Call it... I'm-making-it-up....the Moulding Iterator design pattern if you will. I have found that this is an extremely common problem, it deserves a name, so forgive me!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;find &lt;/span&gt;epitomizes the engine-addon idiom. At its heart, it is a list generator which has the capability of spidering directory structures. The list generator has unobtrusive facilities for filter conditions, to be used if needed and specifying the action to , if needed. Unobtrusive: if you want the feature, you can use it; if you don't care about it, no need to bother even knowing about it.&lt;br /&gt;&lt;br /&gt;Flexibility=Good design. &lt;span style="font-style: italic;"&gt;find &lt;/span&gt;has its limits, yes, but considering the fact that it was designed when it was, it's very, very good indeed. &lt;span style="font-style: italic;"&gt;find &lt;/span&gt;out for yourself!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;- Thomas Jay Cubb&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-113162656762325406?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/113162656762325406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=113162656762325406' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113162656762325406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113162656762325406'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/11/finding-bliss-unix-find-introduction.html' title='Finding Bliss - UNIX find Introduction'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-113126227353792546</id><published>2005-11-06T13:01:00.000+05:30</published><updated>2006-10-31T11:13:53.029+05:30</updated><title type='text'>Printing  Call-Stack Tracebacks</title><content type='html'>pstack on Solaris gives you a stack dump for all active threads. But this might be too heavy for some applications.&lt;br /&gt;&lt;br /&gt;libunwind is a Linux library that provides stack unwinding routines.&lt;br /&gt;&lt;br /&gt;The link below gives a method of doing it with functions on Solaris.&lt;br /&gt;&lt;a href="http://technopark02.blogspot.com/2005/05/cc-printing-stack-trace-with.html#comments"&gt;techno's scratchpad: C/C  : Printing Stack Trace with printstack() on Solaris&lt;/a&gt;&lt;br /&gt;But this works only for Solaris 9 onwards...&lt;br /&gt;&lt;br /&gt;Check this for some Linux info&lt;br /&gt;&lt;a href="http://www.codecomments.com/archive286-2004-7-236422.html"&gt;http://www.codecomments.com/archive286-2004-7-236422.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For Windows information&lt;br /&gt;&lt;a href="http://www.codeproject.com/threads/StackWalker.asp"&gt;http://www.codeproject.com/threads/StackWalker.asp&lt;/a&gt;&lt;br /&gt;Homepage&lt;a href="http://blog.kalmbachnet.de/" target="_blank" class="smalltext"&gt;http://blog.kalmbachnet.de&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-113126227353792546?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/113126227353792546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=113126227353792546' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113126227353792546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/113126227353792546'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/11/printing-call-stack-tracebacks.html' title='Printing  Call-Stack Tracebacks'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-5990288510964431125</id><published>2005-10-22T19:13:00.000+05:30</published><updated>2007-10-04T19:20:35.683+05:30</updated><title type='text'>Abstract Class</title><content type='html'>&lt;pre&gt;&lt;br /&gt;class AbstractClass  &lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt; void bar();&lt;br /&gt; virtual void foo() = 0; //function not defined&lt;br /&gt; AbstractClass();&lt;br /&gt; virtual ~AbstractClass();&lt;br /&gt;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;void AbstractClass::bar()&lt;br /&gt;{ &lt;br /&gt; foo(); //calling the undefined function&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This code will compile.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-5990288510964431125?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/5990288510964431125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=5990288510964431125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/5990288510964431125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/5990288510964431125'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/11/abstract-class.html' title='Abstract Class'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-112926306002815027</id><published>2005-10-14T09:28:00.000+05:30</published><updated>2006-10-31T11:13:52.966+05:30</updated><title type='text'>Why not CON?</title><content type='html'>Received a forward today.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&gt;An Indian discovered  that nobody can create a folder anywhere named as  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&gt;"con "&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&gt;This is something pretty cool...and unbelievable... At Microsoft the whole &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&gt;team, including Bill Gates, couldn't answer why this happened! Try it out &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&gt;yourself...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first part of the excerpt is true. But the second is probably (I hope) an exaggeration!&lt;br /&gt;&lt;br /&gt;The reason for the restriction is that &lt;span style="font-weight: bold;"&gt;CON&lt;/span&gt; is the special name for the computer-console in DOS and the command-shell. CON is a device name; to create a file from the command-line, we would say &lt;span style="font-weight: bold;"&gt;COPY CON filename &lt;filename&gt;&lt;/filename&gt;&lt;/span&gt;and then type the contents of the file, stoppping with a Ctrl-Z (the DOS end of file indicator) and pressing ENTER. And because filenames are case-insensitive, no variant of CON will be allowed.&lt;br /&gt;&lt;br /&gt;Other names not allowed as file/folder-names include: PRN, LPTx, COMx - all device-names.&lt;br /&gt;But interestingly for COMx, even if you have 4 COM ports,  COM5, COM6 etc aren't allowed!!! So, does this mean Windows won't allow more than 9 COM ports??? Why not? That would be the real restriction!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-112926306002815027?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/112926306002815027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=112926306002815027' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/112926306002815027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/112926306002815027'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/10/why-not-con.html' title='Why not CON?'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-4016315795290995459</id><published>2005-10-04T19:42:00.000+05:30</published><updated>2007-10-04T19:44:31.605+05:30</updated><title type='text'>Finding the space gobblers</title><content type='html'>Find out top 10 directories eating up your disk space:&lt;br /&gt;du -cksh * | sort -rn | head -10&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-4016315795290995459?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/4016315795290995459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=4016315795290995459' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/4016315795290995459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/4016315795290995459'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/10/finding-space-gobblers.html' title='Finding the space gobblers'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-112842544849197895</id><published>2005-10-04T16:28:00.000+05:30</published><updated>2006-10-31T11:13:52.908+05:30</updated><title type='text'>Google And The Truth</title><content type='html'>"Google first, think later. " is the mantra that everybody, especially the software professional, lives by.&lt;br /&gt;&lt;br /&gt;1. There is a problem.&lt;br /&gt;2. Nothing new under the sun.&lt;br /&gt;3. It must have been faced by someone else too.&lt;br /&gt;4. Somebody must have solved it back then.&lt;br /&gt;5. Why reinvent the wheel?&lt;br /&gt;6. Let's get it solved. ... fast.&lt;br /&gt;&lt;br /&gt;In this age of instant karma and instant nirvana, the top search result is what becomes the objective truth for the vast majority..&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What cannot be found might as well not exist. - TJ&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-112842544849197895?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/112842544849197895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=112842544849197895' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/112842544849197895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/112842544849197895'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/10/google-and-truth.html' title='Google And The Truth'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-112719718543977215</id><published>2005-09-20T10:59:00.000+05:30</published><updated>2006-10-31T11:13:52.845+05:30</updated><title type='text'>Punnix Version 1.2.0</title><content type='html'>&lt;span style="font-weight: bold;"&gt;--------------------------------------------------------------------&lt;br /&gt;PUNNIX Version 1.2.0, or a song of Linux&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-Thomas Jay Cubb &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note: &lt;/span&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;All&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; puns are intended, but may not be        indented!&lt;/span&gt;&lt;br /&gt;-------------------------------------------------------------------&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Trapped behind closed gates, windows&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;I was looking for a way out&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Of the morass of proprietary property.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;‘Cos I was buried by the hefty software bills.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;I wondered, why should I&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;be a slave to that GUI ?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: right;"&gt;&lt;div style="text-align: right;"&gt; &lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;Proprietary software and operating systems place restrictions on your use of them. You might have bought it but it's still not yours! You are not &lt;span style="font-style: italic;"&gt;free &lt;/span&gt;to use it &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;like you would want to o&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;r tailor it to your requirements.&lt;br /&gt;GUI, usually pronounced as “gooey”, is to be pronounced as “guy” here for both rhyme and meaning.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;span style="font-size:78%;"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;And then in an epiphany,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The flightless angel Tux,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;(Or perhaps it was a friendly gnome?)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;He showed me the way to a universe&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Of Enlightenment,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Home of users (e)X-Windows.&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: right;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;GNOME&lt;/span&gt;, which stands for GNU Network Object Model Environment, is a desktop environment usually bundled with Linux. A &lt;span style="font-style: italic;"&gt;gnome &lt;/span&gt;is also a magical being that guards treasure (how true!!).&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Epiphany &lt;/span&gt;is a web-browser for GNOME.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;Tux &lt;/span&gt;is the name of the Linux mascot – that cute penguin.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;`The &lt;span style="font-style: italic;"&gt;X&lt;/span&gt; Window System’, commonly referred to as just `&lt;span style="font-style: italic;"&gt;X&lt;/span&gt;’, is (generally) the graphical environment for Linux.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;Enlightenment &lt;/span&gt;is a window-manager for X.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt; The magic-mantra&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;say perforce&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Floss! Open Source!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Lilo! Behold&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A free GNU world unfold.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A la Ali Baba&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;I could not but gawk&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;At the unhidden treasures&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;That I now could mount!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How blind I had been&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Not to have before these perls seen.&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: right;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;With &lt;span style="font-style: italic;"&gt;Open Source&lt;/span&gt; software, the source code is open for you to use and modify.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;FLOSS &lt;/span&gt;(Free/Libre/Open Source Software) is a term that covers both open source and free software. The author urges you to &lt;span style="font-style: italic;"&gt;floss &lt;/span&gt;your PC!&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;LILO &lt;/span&gt;(LInux Loader), is a boot-loader that loads Linux for you. &lt;span style="font-style: italic;"&gt;LILO &lt;/span&gt;has pretty much been replaced by &lt;span style="font-style: italic;"&gt;GRUB &lt;/span&gt;(GRand Unified Boot-loader).&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;GNU &lt;/span&gt;stands for “GNU’s Not Unix”. Such acronyms are called recronyms.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;gawk &lt;/span&gt;is a pattern-scanning tool.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;mount&lt;/span&gt;ing is how you access resources in Linux. You &lt;span style="font-style: italic;"&gt;mount &lt;/span&gt;things, use them, and unmount them.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;perl &lt;/span&gt;(Practical Extraction and Reporting Language) is a powerful scripting language that comes along with Linux.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt; &lt;span style="font-size:78%;"&gt;&lt;span style="font-size:78%;"&gt; &lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;It was as if&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;I was Bourne again.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;No more rodent-fatigue that lingers&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;I have discovered use for my fingers!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;etc.&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;div style="text-align: right;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;bash &lt;/span&gt;(Bourne Again SHell) is a command-shell, the command-line prompt of which is where you enter commands. Oh yes, there used to be a &lt;span style="font-style: italic;"&gt;Bourne &lt;/span&gt;shell too!&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;/etc is the directory where configuration details are usually stored.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;***ROOT ALMIGHTY***&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;When I’m at the command line&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Computer, obey the command mine.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;For I am the Mandrake root,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;I’ll slash all I want&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Or backslash as is wont.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;I might be mad as a Red Hatter&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;But in my kernel is a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A smouldering Caldera&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Of raw, unbridled power. &lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: right;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Mandrake&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;Red Hat&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;Caldera&lt;/span&gt; are distributions of Linux.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;root &lt;/span&gt;is the name of the super-user (user with administrative privileges) in Linux.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;Mandrake-root&lt;/span&gt; is a narcotic/hallucinogen supposed to have magical powers. Indeed, Mandrake-root can make you mad as a hatter!&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;Slash (‘/’) and backslash(‘\’) are important keyboard characters for a command-line user.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;The kernel is the heart of the operating system – that pumps life-blood into your PC, so to speak.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;A &lt;span style="font-style: italic;"&gt;caldera &lt;/span&gt;is a large crater at the top of a volcano.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;I am Root Almighty,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;God of the process-tree.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The world of demons, I am init.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Full control,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;no holds barred.&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: right;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;To say that the &lt;span style="font-style: italic;"&gt;root &lt;/span&gt;or super user is accorded God-status in Linux is by no means an exaggeration. If you are &lt;span style="font-style: italic;"&gt;root&lt;/span&gt;, then you are all-powerful.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;Processes &lt;/span&gt;are programs which are being run. Linux organizes the processes as a &lt;span style="font-style: italic;"&gt;tree&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;daemons &lt;/span&gt;are processes that operate in the background and provide services.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;init &lt;/span&gt;is the very first process that is started when Linux boots. &lt;span style="font-style: italic;"&gt;init &lt;/span&gt;starts the rest of the processes, including &lt;span style="font-style: italic;"&gt;daemons&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt; &lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;I will tweak,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;As is my custom,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;till they squeak.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;I wave the two-pronged fork&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Children brought by the fabled stork&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Ampersand when I kill&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Become orphans or zombies.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: right;"&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;Processes &lt;/span&gt;have a life of their own. &lt;span style="font-style: italic;"&gt;fork&lt;/span&gt;ing is the method by which new processes are created, nay, born.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;The new processes are called &lt;span style="font-style: italic;"&gt;child&lt;/span&gt;-processes of the &lt;span style="font-style: italic;"&gt;parent&lt;/span&gt;-process (what else!)&lt;br /&gt;According to an old wives’ tale, storks bring children.&lt;br /&gt;You can make any process run in the background by adding an &lt;span style="font-style: italic;"&gt;ampersand &lt;/span&gt;(‘&amp;’) when calling it. You can &lt;span style="font-style: italic;"&gt;kill &lt;/span&gt;a process too. What is born must die! Orphans are child-processes whose parents have been killed and &lt;span style="font-style: italic;"&gt;zombies &lt;/span&gt;are processes that are undead. Creepy?!&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt; *** END OF ROOT ALMIGHTY***&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Welcome to the free world!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Where you will no longer be told where to start.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Or commanded to issue the salute three-fingered&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Even when it’s the OS that erred.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;No longer be treated like minnows&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Get to know more than that best Win knows.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;No need for that software toss&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Head or tail&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;More or less&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;I have made my choice.&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: right;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;The &lt;span style="font-style: italic;"&gt;three-fingered salute&lt;/span&gt; is the dreaded Ctrl-Alt-Del key combination that one is forced to press in order to reboot a PC. Also called the `&lt;span style="font-style: italic;"&gt;Vulcan nerve pinch&lt;/span&gt;’.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;head &lt;/span&gt;is a program that shows the beginning of a file while &lt;span style="font-style: italic;"&gt;tail &lt;/span&gt;shows the ending of a file.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:85%;"&gt; &lt;span style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;more &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;less &lt;/span&gt;are programs that display a file one screen at a time. They are more or less the same. Except that &lt;span style="font-style: italic;"&gt;less &lt;/span&gt;has more functionality!!! Yeah, you read that right.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;If you have drunk the milk of the GNU&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;You will crave nothing Moo!&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;div style="text-align: right;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;A &lt;span style="font-style: italic;"&gt;gnu &lt;/span&gt;is also a large African antelope with a head resembling that of an ox. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;- Thomas Jay Cubb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;span style=";font-family:verdana;font-size:78%;"  &gt;&lt;span style="font-weight: bold;"&gt;CHANGE HISTORY&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Version 1.2.0&lt;br /&gt;1.Integrated man-pages inside the poem.&lt;br /&gt;2.Added "floss!" line in poem&lt;br /&gt;3.Changed and added some documentation&lt;br /&gt;4.Moved "tweaking" para into "Root Almighty" section&lt;br /&gt;5.Obfuscated proprietary-software bashing.&lt;br /&gt;&lt;br /&gt;Version 1.1.0&lt;br /&gt;1.Documentation "Punnix man-pages" added.&lt;br /&gt;2.Line 3, Proprietary `propriety’ changed to Proprietary `property’&lt;br /&gt;3.Line 5, ‘I wondered’ added&lt;br /&gt;4.Line 17, Free ‘new’ world changed to Free ‘GNU’ world.&lt;br /&gt;5.Line 22, how ‘stupid’ changed to how `blind’&lt;br /&gt;6.Line 23, Not to have this before seen changed to ‘Not to have before these perls seen’&lt;br /&gt;7.Line 24, `I’ changed to `It’ Had been a typo.&lt;br /&gt;8.Couple of lines deleted (“I have…the key”)&lt;br /&gt;&lt;br /&gt;Version 1.0.0&lt;br /&gt;1.Initial version&lt;/span&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;LICENSE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You may freely distribute copies of this post. But please retain this license message and do not modify the contents of the post. Please feel free to quote this in full or in part, anywhere you will. The author reserves the right to be identified as the creator of this poem and any part of it thereof. You can contribute to the evolution of this work by writing in with comments. Please do so!&lt;br /&gt;&lt;br /&gt;-Thomas Jay Cubb,&lt;br /&gt;Author&lt;/span&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-112719718543977215?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/112719718543977215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=112719718543977215' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/112719718543977215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/112719718543977215'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/09/punnix-version-120.html' title='Punnix Version 1.2.0'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-112600089158970145</id><published>2005-09-06T15:24:00.000+05:30</published><updated>2006-10-31T11:13:52.785+05:30</updated><title type='text'>C++ Name Origin</title><content type='html'>Rick Mascitti was the person who coined the term "C++". Before he did so, C++ was called C With Classes by Bjarne Stroustrup.&lt;br /&gt;&lt;br /&gt;Some interesting quips can be found at&lt;br /&gt;http://en.wikipedia.org/wiki/List_of_computer_term_etymologies#C and&lt;br /&gt;http://en.wikipedia.org/wiki/C_Plus_Plus#History_of_the_name_.22C.2B.2B.22&lt;br /&gt;&lt;br /&gt;I've also heard rumours that Java was called (likely in a lighter vein) "C++ --" !!&lt;br /&gt;:-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-112600089158970145?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/112600089158970145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=112600089158970145' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/112600089158970145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/112600089158970145'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/09/c-name-origin.html' title='C++ Name Origin'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-112531958368199814</id><published>2005-08-29T17:52:00.000+05:30</published><updated>2006-10-31T11:13:52.725+05:30</updated><title type='text'>Copy-Paste and x-Handedness</title><content type='html'>The de facto key-combination for copy-pasting, the programmer's butter-knife, for most people is Ctrl-C (for Copy), Ctrl-V (for Paste).  In fact, it is possible that you are conditioned to hear Ctrl-C, Ctrl-V as "Copy, Paste".  This is the combination advertised on most Edit menus nowadays (along with Ctrl-X for Cut).&lt;br /&gt;&lt;br /&gt;However, coming from a DOS/Unix shell background, I used to find it difficult to press Ctrl-C for Copy because it had negative connotations for me. It used to be (and still is) the keys to press to cancel a running command in a console.&lt;br /&gt;&lt;br /&gt;FYI, the same things can be done using&lt;br /&gt;Ctrl-Insert = Copy&lt;br /&gt;Shift-Insert = Paste&lt;br /&gt;Shift-Delete = Cut&lt;br /&gt;&lt;br /&gt;I thought this made good sense.&lt;br /&gt;Copy? okay, it's a control insert with no display-change.&lt;br /&gt;Cut? shift into the buffer after deleting it from the display&lt;br /&gt;Paste? Shift out the thing in the buffer and insert it here&lt;br /&gt;&lt;br /&gt;Ergonomically, this is in fact better if you do a lot of selecting with the shift-cursor key combinations. You could do everything with your right hand.&lt;br /&gt;&lt;br /&gt;So why should it have changed? In this age of GUIs, most people do their selecting with the mouse (with their right hand) and could do the copying/cutting and pasting with their left hand! Personally, I am against selecting stuff with the mouse coz it's more strenuous.&lt;br /&gt;&lt;br /&gt;Why Ctrl-C,X,V then? Physical proximity is the only rationale, no logic as in the former case. C for Copy, so get the others nearby.&lt;br /&gt;&lt;br /&gt;Or was it because "X" looks like a scissors and you use it to cut! So get the others nearby?&lt;br /&gt;&lt;br /&gt;You wish!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-112531958368199814?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/112531958368199814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=112531958368199814' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/112531958368199814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/112531958368199814'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/08/copy-paste-and-x-handedness.html' title='Copy-Paste and x-Handedness'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-112504880505565290</id><published>2005-08-26T14:53:00.000+05:30</published><updated>2006-10-31T11:13:52.666+05:30</updated><title type='text'>Dream Word</title><content type='html'>This one is from my archives. Written in July 1997,  this article is about what I felt (then) would have been cool features to have in a word-processor. Many have since been implemented and are standard features now. Many of the points are still valid though.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;O, LORD PC! COULD I WRITE A LETTER ON YOU? . . .  PLEASE!&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Auto-Scroller tab&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;User keeps his mouse on the tab and the document keeps scrolling automatically. User can suspend by moving the mouse away or by pressing, say, Ctrl-V. It is very important to have an alternate key. Pressing another key, say PgUp or PgDn while in auto-scroller could bring another function.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Advanced OLE : Drag and select&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;User should be able to choose objects and text with a special drag. Maybe the concept of a right-button drag should be introduced.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Make-It-Fit!&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Selected text or advanced OLE could be made to fit in a specified number of pages or a region created by special dragging.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Fonts&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Super-scripting and sub-scripting should be available easily. Say by       pressing a special key combination, say, Ctrl-Alt-F&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Toolbars&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Rather than themewise arrangement, a global toolbar with most universally and commonly used options should also be there. Themewise arrangement should also be there. Switching of toolbars must be simpler. Also, the program should keep a log of menu-items most used by the user and automatically place them on the toolbar.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;Typo-Quikorrect!&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Interchanging of letters to form words which do not exist can be easily identified. So why not correct it as well? But before correcting, program should go through the proper authorization channels. Flash it on the status bar whereupon the user can press a key to confirm. If the user does not press the key, he must be allowed to continue typing. No alarm-bells ringing! If the program is so particular that its message be heard, keep it in the error-bin, the user at the end of his session may or may not click the error-bin, a dialog box should open with various errors highlighted. User can then edit out unwanted corrections, press a confirmation key and lo, everything set right.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Equation format&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;All the word-processors can have a common format for scripting the equation. Type the numbers with codes, like, say, `^= for `raised to= etc. Drag it, block it and presto, encryption disappears and you have a well written equation on your hands. Neat! Wonder why it has not been implemented as of yet.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Menus&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Arrangement of menu items should be more coherent and uniform. As far as possible, items common to all the word-processors must be grouped under menus with same or equivalent names.AUniformity by itself is no good.@ Jot it down! It=s a quote and what=s more, it is quotable! The logical arrangement of menu-items is a must-must.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;WOFIWOG experience: Eh, what's that?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;All in all, a WOFIWOG (What yOu Feel Is What yOu Get) experience is what all of us are searching for. Currently, what we are getting seems to be more of WIFIWYG.You guessed it right! Yes, a What I Feel Is What You Get experience, the I in the acronym standing for the PC and the You for you of course! (Who else? Did I really need to tell you that?) Got that Bill? Thank you!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-112504880505565290?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/112504880505565290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=112504880505565290' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/112504880505565290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/112504880505565290'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/08/dream-word.html' title='Dream Word'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-112504812336637483</id><published>2005-08-26T14:44:00.000+05:30</published><updated>2006-10-31T11:13:52.610+05:30</updated><title type='text'>Heron - Born Flightless?</title><content type='html'>The Heron Language is being developed by Christopher Diggins. Heavily influenced by C++. In search of a killer-app...&lt;br /&gt;&lt;a href="http://www.heron-language.com/"&gt;http://www.heron-language.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Some interesting concepts, but syntax seems to be somewhat cryptic with lots of `?' s in the code.  The designer's site is at &lt;a href="http://www.cdiggins.com/"&gt;http://www.cdiggins.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-112504812336637483?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/112504812336637483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=112504812336637483' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/112504812336637483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/112504812336637483'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/08/heron-born-flightless.html' title='Heron - Born Flightless?'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15818703.post-4671849203373372355</id><published>2005-08-09T19:08:00.000+05:30</published><updated>2007-10-04T19:11:34.303+05:30</updated><title type='text'>Behaviour of typeid</title><content type='html'>code snippet to illustrate behaviour of typeid&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   struct&lt;br /&gt;   {&lt;br /&gt;         int side;&lt;br /&gt;   }square1;&lt;br /&gt;&lt;br /&gt;   struct&lt;br /&gt;   {&lt;br /&gt;         int side;&lt;br /&gt;   }square2;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   int main(int argc, char *argv[])&lt;br /&gt;   {&lt;br /&gt;       if(typeid(square1)==typeid(square2))&lt;br /&gt;                        printf("Same.");&lt;br /&gt;       else&lt;br /&gt;       printf("Different.");&lt;br /&gt;   }&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15818703-4671849203373372355?l=oozone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oozone.blogspot.com/feeds/4671849203373372355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15818703&amp;postID=4671849203373372355' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/4671849203373372355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15818703/posts/default/4671849203373372355'/><link rel='alternate' type='text/html' href='http://oozone.blogspot.com/2005/08/behaviour-of-typeid.html' title='Behaviour of typeid'/><author><name>Thomas Jay Cubb</name><uri>http://www.blogger.com/profile/16533481679523391980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://images3.orkut.com/images/medium/443/2656443.jpg'/></author><thr:total>0</thr:total></entry></feed>
