<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>HRJ Blog Posts</title>
		<link>http://hrj.wikidot.com</link>
		<description>Welcome to my site. I am trained as a Software Engineer. I am interested in system-software, programming languages, computer graphics and AI.</description>
				<copyright></copyright>
		<lastBuildDate></lastBuildDate>
		
					<item>
				<guid>http://hrj.wikidot.com/blog:24</guid>
				<title>Trip</title>
				<link>http://hrj.wikidot.com/blog:24</link>
				<description>

&lt;p&gt;As trekkers, in what seems like another lifetime, my wife and I had been eager to go out on a trip/trek for the last 2 years. We were also eager to take our year-old kid along, and so we had to strike a good balance between fun, comfort &amp;amp; safety.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Sun, 18 Oct 2009 05:57:13 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>As trekkers, in what seems like another lifetime, my wife and I had been eager to go out on a trip/trek for the last 2 years. We were also eager to take our year-old kid along, and so we had to strike a good balance between fun, comfort &amp; safety.</p> <p>The sunny day started on a lazy note. We had planned to start at 7am, but the taxi arrived much later, and we waved our good-byes only at 8am. By this time we were feeling hungry and had to stop for breakfast. After nibbling on <em>Poori-bhaji</em>, <em>Upma</em> and <em>Idli-wada</em> in the The New Grand hotel, we steered into the Pune-Bangalore highway.</p> <p>Our first halt was at the <strong>Hidkal dam</strong>, constructed on the <strong>Ghataprabha</strong>, a tributary of the <strong>Krishna</strong>. The actual dam was not visible because of recent restrictions to visitors, but the view of the catchment area was nice. The circuit house has a largish 3D model of North Karnataka terrain, including <strong>Malaprabha</strong>, <strong>Ghataprabha</strong>, <strong>Krishna</strong> and the several dams constructed on them.</p> <p>We next went to <strong>Gokak falls</strong>. This was supposed to be the highlight of the trip, but the water flow wasn't at its heaviest. We did have some fun while crossing the hanging bridge on top of the falls and clambering down to the waterfall edge.</p> <p>The young one was enjoying the trip, but the heat had exhausted us and the music playing in the taxi had a mildly nauseating effect. We hadn't much hope left on our next destination, <strong>Hooli</strong>, a remote little village near Saundatti. This was a complete blind shot, based only on <a href="http://allaboutbelgaum.com/lifestyle/travel/hooli-a-village-of-temples/">Uday's blog post</a>.</p> <p>Given our weak spirits, the <strong>PanchlIngEshwara</strong> temple in Hooli was a pleasant surprise. It was pretty well maintained by the Archaeological department. The person in charge of maintenance told us that this site seemed like a former Jain-basathi which was converted into a Shiva temple by establishing 5 Shiva-lingams there. There was a shed in the temple premises which was used as a temporary godown for artefacts. Apparently, these were found in the site vicinity by villagers when they dug the ground for construction. There are many other ruins nearby but he advised us not to go there as they weren't being maintained as well as this one.</p> <p>Our next destination was the <strong>Kittur fort</strong>. The road from Hooli to Kittur was terrible, the driver was cursing and it was 7.30pm by the time we reached Kittur. The late time of our arrival turned out to be a boon in disguise; there were very few visitors there and we got a special favour from the museum maintainer. There was this new collection of antique armour and weaponry which had been brought to the museum, but wasn't on display yet. We got to not only look at them but also brandished the swords, maces, shields and other devices of violence. Some of the sculptures in the museum were dated circa 2AD and were enticing to watch.</p> <p>We couldn't see the actual fort because it was too dark to take the kid along.</p> <p>We took the highway back to Belgaum and were in time for dinner, after a day well spent.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:23</guid>
				<title>Launching Twinkler.in</title>
				<link>http://hrj.wikidot.com/blog:23</link>
				<description>

&lt;p&gt;If you are a Twitter user, do checkout &lt;a href=&quot;http://twinkler.in&quot;&gt;Twinkler.in&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Sat, 17 Oct 2009 04:27:05 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>If you are a Twitter user, do checkout <a href="http://twinkler.in">Twinkler.in</a></p> <p>It's my newest pet project, a dynamic visualisation of Twitter contacts. There also suggestions offered about new contacts which might be of interest to you.</p> <h4><span>Screenshot</span></h4> <img src="http://hrj.wikidot.com/local--files/blog:23/snapshot.png" alt="snapshot.png" class="image" /> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:22</guid>
				<title>Pythagoras Tree</title>
				<link>http://hrj.wikidot.com/blog:22</link>
				<description>

&lt;p&gt;While casually browsing the net I came across &lt;a href=&quot;http://fsharpnews.blogspot.com/2009/05/pythagoras-tree.html&quot;&gt;this&lt;/a&gt; implementation of Pythagoras tree in F#. Just for fun, I have recreated this in Scala.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Sun, 31 May 2009 14:25:09 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>While casually browsing the net I came across <a href="http://fsharpnews.blogspot.com/2009/05/pythagoras-tree.html">this</a> implementation of Pythagoras tree in F#. Just for fun, I have recreated this in Scala.</p> <p>The <a href="http://en.wikipedia.org/wiki/Pythagoras_tree">Pythagoras Tree</a> is a fractal constructed by geometric methods. It is rather easy to program since no substitution is involved. You can just pile on the newly created squares onto the existing ones, since they don't overlap immediately.</p> <h1><span>Eye candy</span></h1> <p>Here is the output of my Scala script:</p> <h2><span>Depth=10, No Skew</span></h2> <div class="image-container aligncenter"><img src="http://hrj.wikidot.com/local--files/blog:22/tree10.png" alt="tree10.png" class="image" /></div> <h2><span>Depth=14, Skew = 0.8</span></h2> <div class="image-container aligncenter"><img src="http://hrj.wikidot.com/local--files/blog:22/tree14.png" alt="tree14.png" class="image" /></div> <h1><span>The source code</span></h1> <div class="collapsible-block"> <div class="collapsible-block-folded"><a class="collapsible-block-link" href="javascript:;" >«&nbsp;Click&nbsp;here&nbsp;to&nbsp;see&nbsp;the&nbsp;Scala&nbsp;script&nbsp;»</a></div> <div class="collapsible-block-unfolded" style="display:none"> <div class="collapsible-block-unfolded-link"><a class="collapsible-block-link" href="javascript:;" >–&nbsp;hide&nbsp;block</a></div> <div class="collapsible-block-content"> <div class="code"> <div class="hl-main"> <pre> <span class="hl-reserved">import</span><span class="hl-code"> </span><span class="hl-identifier">java</span><span class="hl-code">.</span><span class="hl-identifier">lang</span><span class="hl-code">.</span><span class="hl-identifier">Math</span><span class="hl-code">.</span><span class="hl-brackets">{</span><span class="hl-identifier">hypot</span><span class="hl-code">, </span><span class="hl-identifier">atan</span><span class="hl-code">, </span><span class="hl-identifier">cos</span><span class="hl-code">, </span><span class="hl-identifier">sin</span><span class="hl-code">, </span><span class="hl-identifier">pow</span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-comment">// Attempt to make an abstract (generic) tree</span><span class="hl-code"> </span><span class="hl-reserved">abstract</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">Tree</span><span class="hl-brackets">[</span><span class="hl-code">+</span><span class="hl-identifier">T</span><span class="hl-brackets">]</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">def</span><span class="hl-code"> </span><span class="hl-identifier">forEach</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">f</span><span class="hl-code"> :</span><span class="hl-brackets">(</span><span class="hl-identifier">T</span><span class="hl-code">,</span><span class="hl-identifier">Int</span><span class="hl-brackets">)</span><span class="hl-code"> =&gt; </span><span class="hl-identifier">Unit</span><span class="hl-brackets">)</span><span class="hl-code">:</span><span class="hl-identifier">Unit</span><span class="hl-code"> = </span><span class="hl-identifier">forEach</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">f</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">def</span><span class="hl-code"> </span><span class="hl-identifier">forEach</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">f</span><span class="hl-code"> :</span><span class="hl-brackets">(</span><span class="hl-identifier">T</span><span class="hl-code">,</span><span class="hl-identifier">Int</span><span class="hl-brackets">)</span><span class="hl-code"> =&gt; </span><span class="hl-identifier">Unit</span><span class="hl-code">, </span><span class="hl-identifier">level</span><span class="hl-code">:</span><span class="hl-identifier">Int</span><span class="hl-brackets">)</span><span class="hl-code">:</span><span class="hl-identifier">Unit</span><span class="hl-code"> = </span><span class="hl-brackets">{}</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">case</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">TreeNode</span><span class="hl-brackets">[</span><span class="hl-code">+</span><span class="hl-identifier">T</span><span class="hl-brackets">]</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">value</span><span class="hl-code">:</span><span class="hl-identifier">T</span><span class="hl-code">, </span><span class="hl-identifier">left</span><span class="hl-code">:</span><span class="hl-identifier">Tree</span><span class="hl-brackets">[</span><span class="hl-identifier">T</span><span class="hl-brackets">]</span><span class="hl-code">, </span><span class="hl-identifier">right</span><span class="hl-code">:</span><span class="hl-identifier">Tree</span><span class="hl-brackets">[</span><span class="hl-identifier">T</span><span class="hl-brackets">])</span><span class="hl-code"> </span><span class="hl-reserved">extends</span><span class="hl-code"> </span><span class="hl-identifier">Tree</span><span class="hl-brackets">[</span><span class="hl-identifier">T</span><span class="hl-brackets">]</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">override</span><span class="hl-code"> </span><span class="hl-identifier">def</span><span class="hl-code"> </span><span class="hl-identifier">forEach</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">f</span><span class="hl-code"> : </span><span class="hl-brackets">(</span><span class="hl-identifier">T</span><span class="hl-code">,</span><span class="hl-identifier">Int</span><span class="hl-brackets">)</span><span class="hl-code"> =&gt; </span><span class="hl-identifier">Unit</span><span class="hl-code">, </span><span class="hl-identifier">level</span><span class="hl-code">:</span><span class="hl-identifier">Int</span><span class="hl-brackets">)</span><span class="hl-code"> = </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">f</span><span class="hl-brackets">(</span><span class="hl-identifier">value</span><span class="hl-code">, </span><span class="hl-identifier">level</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">left</span><span class="hl-code">.</span><span class="hl-identifier">forEach</span><span class="hl-brackets">(</span><span class="hl-identifier">f</span><span class="hl-code">, </span><span class="hl-identifier">level</span><span class="hl-code">+</span><span class="hl-number">1</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">right</span><span class="hl-code">.</span><span class="hl-identifier">forEach</span><span class="hl-brackets">(</span><span class="hl-identifier">f</span><span class="hl-code">, </span><span class="hl-identifier">level</span><span class="hl-code">+</span><span class="hl-number">1</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">case</span><span class="hl-code"> </span><span class="hl-identifier">object</span><span class="hl-code"> </span><span class="hl-identifier">EmptyTree</span><span class="hl-code"> </span><span class="hl-reserved">extends</span><span class="hl-code"> </span><span class="hl-identifier">Tree</span><span class="hl-brackets">[</span><span class="hl-identifier">Nothing</span><span class="hl-brackets">]</span><span class="hl-code"> </span><span class="hl-comment">////////////////</span><span class="hl-code"> </span><span class="hl-reserved">case</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">Point</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">x</span><span class="hl-code">:</span><span class="hl-identifier">Double</span><span class="hl-code">, </span><span class="hl-identifier">y</span><span class="hl-code">:</span><span class="hl-identifier">Double</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-reserved">case</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">Square</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">topLeft</span><span class="hl-code">:</span><span class="hl-identifier">Point</span><span class="hl-code">, </span><span class="hl-identifier">topRight</span><span class="hl-code">:</span><span class="hl-identifier">Point</span><span class="hl-code">, </span><span class="hl-identifier">bottomLeft</span><span class="hl-code">:</span><span class="hl-identifier">Point</span><span class="hl-code">, </span><span class="hl-identifier">bottomRight</span><span class="hl-code">:</span><span class="hl-identifier">Point</span><span class="hl-code">, </span><span class="hl-identifier">angle</span><span class="hl-code">:</span><span class="hl-identifier">Double</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">base</span><span class="hl-code"> = </span><span class="hl-identifier">Square</span><span class="hl-brackets">(</span><span class="hl-identifier">Point</span><span class="hl-brackets">(</span><span class="hl-number">0</span><span class="hl-code">,</span><span class="hl-number">0</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-identifier">Point</span><span class="hl-brackets">(</span><span class="hl-number">100</span><span class="hl-code">,</span><span class="hl-number">0</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-identifier">Point</span><span class="hl-brackets">(</span><span class="hl-number">0</span><span class="hl-code">,</span><span class="hl-number">100</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-identifier">Point</span><span class="hl-brackets">(</span><span class="hl-number">100</span><span class="hl-code">,</span><span class="hl-number">100</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">skew</span><span class="hl-code"> = </span><span class="hl-number">1</span><span class="hl-code"> </span><span class="hl-comment">// math constants</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">halfPi</span><span class="hl-code"> = </span><span class="hl-identifier">java</span><span class="hl-code">.</span><span class="hl-identifier">lang</span><span class="hl-code">.</span><span class="hl-identifier">Math</span><span class="hl-code">.</span><span class="hl-identifier">PI</span><span class="hl-code"> / </span><span class="hl-number">2</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">quarterPi</span><span class="hl-code"> = </span><span class="hl-identifier">java</span><span class="hl-code">.</span><span class="hl-identifier">lang</span><span class="hl-code">.</span><span class="hl-identifier">Math</span><span class="hl-code">.</span><span class="hl-identifier">PI</span><span class="hl-code"> / </span><span class="hl-number">4</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">sqrt2</span><span class="hl-code"> = </span><span class="hl-identifier">java</span><span class="hl-code">.</span><span class="hl-identifier">lang</span><span class="hl-code">.</span><span class="hl-identifier">Math</span><span class="hl-code">.</span><span class="hl-identifier">pow</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-number">0.5</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">def</span><span class="hl-code"> </span><span class="hl-identifier">makeTree</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">base</span><span class="hl-code">:</span><span class="hl-identifier">Square</span><span class="hl-code">, </span><span class="hl-identifier">goFor</span><span class="hl-code">:</span><span class="hl-identifier">Int</span><span class="hl-brackets">)</span><span class="hl-code">:</span><span class="hl-identifier">Tree</span><span class="hl-brackets">[</span><span class="hl-identifier">Square</span><span class="hl-brackets">]</span><span class="hl-code"> = </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">goFor</span><span class="hl-code"> &gt; </span><span class="hl-number">0</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">sideLength</span><span class="hl-code"> = </span><span class="hl-identifier">hypot</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">base</span><span class="hl-code">.</span><span class="hl-identifier">topLeft</span><span class="hl-code">.</span><span class="hl-identifier">x</span><span class="hl-code"> - </span><span class="hl-identifier">base</span><span class="hl-code">.</span><span class="hl-identifier">topRight</span><span class="hl-code">.</span><span class="hl-identifier">x</span><span class="hl-code">, </span><span class="hl-identifier">base</span><span class="hl-code">.</span><span class="hl-identifier">topLeft</span><span class="hl-code">.</span><span class="hl-identifier">y</span><span class="hl-code"> - </span><span class="hl-identifier">base</span><span class="hl-code">.</span><span class="hl-identifier">topRight</span><span class="hl-code">.</span><span class="hl-identifier">y</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">newSideLength</span><span class="hl-code"> = </span><span class="hl-brackets">(</span><span class="hl-identifier">sideLength</span><span class="hl-code"> / </span><span class="hl-identifier">sqrt2</span><span class="hl-brackets">)</span><span class="hl-code"> * </span><span class="hl-identifier">skew</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">otherSideLength</span><span class="hl-code"> = </span><span class="hl-identifier">pow</span><span class="hl-brackets">(</span><span class="hl-identifier">pow</span><span class="hl-brackets">(</span><span class="hl-identifier">sideLength</span><span class="hl-code">,</span><span class="hl-number">2</span><span class="hl-brackets">)</span><span class="hl-code"> - </span><span class="hl-identifier">pow</span><span class="hl-brackets">(</span><span class="hl-identifier">newSideLength</span><span class="hl-code">,</span><span class="hl-number">2</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">0.5</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">angle</span><span class="hl-code"> = </span><span class="hl-identifier">base</span><span class="hl-code">.</span><span class="hl-identifier">angle</span><span class="hl-code"> + </span><span class="hl-identifier">atan</span><span class="hl-brackets">(</span><span class="hl-identifier">otherSideLength</span><span class="hl-code">/</span><span class="hl-identifier">newSideLength</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">otherAngle</span><span class="hl-code"> = </span><span class="hl-identifier">angle</span><span class="hl-code"> - </span><span class="hl-identifier">halfPi</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">midPointX</span><span class="hl-code"> = </span><span class="hl-identifier">base</span><span class="hl-code">.</span><span class="hl-identifier">topLeft</span><span class="hl-code">.</span><span class="hl-identifier">x</span><span class="hl-code"> + </span><span class="hl-identifier">newSideLength</span><span class="hl-code"> * </span><span class="hl-identifier">cos</span><span class="hl-brackets">(</span><span class="hl-identifier">angle</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">midPointY</span><span class="hl-code"> = </span><span class="hl-identifier">base</span><span class="hl-code">.</span><span class="hl-identifier">topLeft</span><span class="hl-code">.</span><span class="hl-identifier">y</span><span class="hl-code"> - </span><span class="hl-identifier">newSideLength</span><span class="hl-code"> * </span><span class="hl-identifier">sin</span><span class="hl-brackets">(</span><span class="hl-identifier">angle</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">midPoint</span><span class="hl-code"> = </span><span class="hl-identifier">Point</span><span class="hl-brackets">(</span><span class="hl-identifier">midPointX</span><span class="hl-code">, </span><span class="hl-identifier">midPointY</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">TreeNode</span><span class="hl-brackets">(</span><span class="hl-identifier">base</span><span class="hl-code">, </span><span class="hl-identifier">makeSubTree</span><span class="hl-brackets">(</span><span class="hl-identifier">newSideLength</span><span class="hl-code">, </span><span class="hl-identifier">base</span><span class="hl-code">.</span><span class="hl-identifier">topLeft</span><span class="hl-code">, </span><span class="hl-identifier">midPoint</span><span class="hl-code">, </span><span class="hl-identifier">angle</span><span class="hl-code">, </span><span class="hl-identifier">goFor</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-identifier">makeSubTree</span><span class="hl-brackets">(</span><span class="hl-identifier">otherSideLength</span><span class="hl-code">, </span><span class="hl-identifier">midPoint</span><span class="hl-code">, </span><span class="hl-identifier">base</span><span class="hl-code">.</span><span class="hl-identifier">topRight</span><span class="hl-code">, </span><span class="hl-identifier">otherAngle</span><span class="hl-code">, </span><span class="hl-identifier">goFor</span><span class="hl-brackets">))</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">else</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">EmptyTree</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-identifier">def</span><span class="hl-code"> </span><span class="hl-identifier">makeSubTree</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">length</span><span class="hl-code">:</span><span class="hl-identifier">Double</span><span class="hl-code">, </span><span class="hl-identifier">start</span><span class="hl-code">:</span><span class="hl-identifier">Point</span><span class="hl-code">, </span><span class="hl-identifier">end</span><span class="hl-code">:</span><span class="hl-identifier">Point</span><span class="hl-code">, </span><span class="hl-identifier">angle</span><span class="hl-code">:</span><span class="hl-identifier">Double</span><span class="hl-code">, </span><span class="hl-identifier">goFor</span><span class="hl-code">:</span><span class="hl-identifier">Int</span><span class="hl-brackets">)</span><span class="hl-code">:</span><span class="hl-identifier">Tree</span><span class="hl-brackets">[</span><span class="hl-identifier">Square</span><span class="hl-brackets">]</span><span class="hl-code"> = </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">newSquare</span><span class="hl-code"> = </span><span class="hl-identifier">Square</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-code"> </span><span class="hl-identifier">Point</span><span class="hl-brackets">(</span><span class="hl-identifier">start</span><span class="hl-code">.</span><span class="hl-identifier">x</span><span class="hl-code"> - </span><span class="hl-identifier">length</span><span class="hl-code">*</span><span class="hl-identifier">sin</span><span class="hl-brackets">(</span><span class="hl-identifier">angle</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-identifier">start</span><span class="hl-code">.</span><span class="hl-identifier">y</span><span class="hl-code"> - </span><span class="hl-identifier">length</span><span class="hl-code"> * </span><span class="hl-identifier">cos</span><span class="hl-brackets">(</span><span class="hl-identifier">angle</span><span class="hl-brackets">))</span><span class="hl-code">, </span><span class="hl-identifier">Point</span><span class="hl-brackets">(</span><span class="hl-identifier">end</span><span class="hl-code">.</span><span class="hl-identifier">x</span><span class="hl-code"> - </span><span class="hl-identifier">length</span><span class="hl-code">*</span><span class="hl-identifier">sin</span><span class="hl-brackets">(</span><span class="hl-identifier">angle</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-identifier">end</span><span class="hl-code">.</span><span class="hl-identifier">y</span><span class="hl-code"> - </span><span class="hl-identifier">length</span><span class="hl-code"> * </span><span class="hl-identifier">cos</span><span class="hl-brackets">(</span><span class="hl-identifier">angle</span><span class="hl-brackets">))</span><span class="hl-code">, </span><span class="hl-identifier">start</span><span class="hl-code">, </span><span class="hl-identifier">end</span><span class="hl-code">, </span><span class="hl-identifier">angle</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">makeTree</span><span class="hl-brackets">(</span><span class="hl-identifier">newSquare</span><span class="hl-code">, </span><span class="hl-identifier">goFor</span><span class="hl-code">-</span><span class="hl-number">1</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">maxLevel</span><span class="hl-code"> = </span><span class="hl-number">10</span><span class="hl-code"> </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">newRoot</span><span class="hl-code"> = </span><span class="hl-identifier">makeTree</span><span class="hl-brackets">(</span><span class="hl-identifier">base</span><span class="hl-code">, </span><span class="hl-identifier">maxLevel</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-comment">// Output to SVG</span><span class="hl-code"> </span><span class="hl-identifier">var</span><span class="hl-code"> </span><span class="hl-identifier">count</span><span class="hl-code"> = </span><span class="hl-number">0</span><span class="hl-code"> </span><span class="hl-identifier">def</span><span class="hl-code"> </span><span class="hl-identifier">showLine</span><span class="hl-brackets">(</span><span class="hl-identifier">start</span><span class="hl-code">:</span><span class="hl-identifier">Point</span><span class="hl-code">, </span><span class="hl-identifier">end</span><span class="hl-code">:</span><span class="hl-identifier">Point</span><span class="hl-code">,</span><span class="hl-identifier">color</span><span class="hl-code">:</span><span class="hl-identifier">String</span><span class="hl-brackets">)</span><span class="hl-code"> = </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-quotes">"""</span><span class="hl-string">&lt;line id=</span><span class="hl-quotes">"</span><span class="hl-code">%</span><span class="hl-identifier">d</span><span class="hl-quotes">"</span><span class="hl-string"> style=</span><span class="hl-quotes">"</span><span class="hl-identifier">stroke</span><span class="hl-code">:</span><span class="hl-identifier">rgb</span><span class="hl-brackets">(</span><span class="hl-code">%</span><span class="hl-identifier">s</span><span class="hl-brackets">)</span><span class="hl-code">;</span><span class="hl-identifier">stroke</span><span class="hl-code">-</span><span class="hl-identifier">width</span><span class="hl-code">:</span><span class="hl-number">1</span><span class="hl-code">;</span><span class="hl-identifier">fill</span><span class="hl-code">:</span><span class="hl-identifier">none</span><span class="hl-code">;</span><span class="hl-quotes">"</span><span class="hl-string"> x1=</span><span class="hl-quotes">"</span><span class="hl-code">%</span><span class="hl-identifier">f</span><span class="hl-quotes">"</span><span class="hl-string"> y1=</span><span class="hl-quotes">"</span><span class="hl-code">%</span><span class="hl-identifier">f</span><span class="hl-quotes">"</span><span class="hl-string"> x2=</span><span class="hl-quotes">"</span><span class="hl-code">%</span><span class="hl-identifier">f</span><span class="hl-quotes">"</span><span class="hl-string"> y2=</span><span class="hl-quotes">"</span><span class="hl-code">%</span><span class="hl-identifier">f</span><span class="hl-quotes">"</span><span class="hl-string"> /&gt;</span><span class="hl-quotes">"""</span><span class="hl-code">.</span><span class="hl-identifier">format</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">count</span><span class="hl-code">, </span><span class="hl-identifier">color</span><span class="hl-code">, </span><span class="hl-identifier">start</span><span class="hl-code">.</span><span class="hl-identifier">x</span><span class="hl-code">+</span><span class="hl-number">300</span><span class="hl-code">, </span><span class="hl-identifier">start</span><span class="hl-code">.</span><span class="hl-identifier">y</span><span class="hl-code">+</span><span class="hl-number">300</span><span class="hl-code">, </span><span class="hl-identifier">end</span><span class="hl-code">.</span><span class="hl-identifier">x</span><span class="hl-code">+</span><span class="hl-number">300</span><span class="hl-code">, </span><span class="hl-identifier">end</span><span class="hl-code">.</span><span class="hl-identifier">y</span><span class="hl-code">+</span><span class="hl-number">300</span><span class="hl-brackets">))</span><span class="hl-code"> </span><span class="hl-identifier">count</span><span class="hl-code"> += </span><span class="hl-number">1</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-quotes">"""</span><span class="hl-string">&lt;svg x=</span><span class="hl-quotes">"</span><span class="hl-number">0</span><span class="hl-quotes">"</span><span class="hl-string"> y=</span><span class="hl-quotes">"</span><span class="hl-number">0</span><span class="hl-quotes">"</span><span class="hl-string"> width=</span><span class="hl-quotes">"</span><span class="hl-number">800</span><span class="hl-quotes">"</span><span class="hl-string"> height=</span><span class="hl-quotes">"</span><span class="hl-number">600</span><span class="hl-quotes">"</span><span class="hl-string">&gt;</span><span class="hl-quotes">"""</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">newRoot</span><span class="hl-code"> </span><span class="hl-identifier">forEach</span><span class="hl-code"> </span><span class="hl-brackets">{(</span><span class="hl-identifier">square</span><span class="hl-code">,</span><span class="hl-identifier">level</span><span class="hl-brackets">)</span><span class="hl-code"> =&gt; </span><span class="hl-identifier">val</span><span class="hl-code"> </span><span class="hl-identifier">color</span><span class="hl-code"> = </span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">level</span><span class="hl-code"> == </span><span class="hl-identifier">maxLevel</span><span class="hl-code"> - </span><span class="hl-number">1</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-quotes">"</span><span class="hl-string">255,0,255</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-reserved">else</span><span class="hl-code"> </span><span class="hl-quotes">"</span><span class="hl-string">0,0,128</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">showLine</span><span class="hl-brackets">(</span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">topLeft</span><span class="hl-code">, </span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">topRight</span><span class="hl-code">, </span><span class="hl-identifier">color</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">showLine</span><span class="hl-brackets">(</span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">topLeft</span><span class="hl-code">, </span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">bottomLeft</span><span class="hl-code">, </span><span class="hl-identifier">color</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">showLine</span><span class="hl-brackets">(</span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">bottomRight</span><span class="hl-code">, </span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">topRight</span><span class="hl-code">, </span><span class="hl-identifier">color</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">showLine</span><span class="hl-brackets">(</span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">bottomLeft</span><span class="hl-code">, </span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">bottomRight</span><span class="hl-code">, </span><span class="hl-identifier">color</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">&lt;/svg&gt;</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span> </pre></div> </div> </div> </div> </div> <h1><span>Conclusion</span></h1> <p>This script is a bit more configurable than the F# one linked above, and hence is a bit more lengthy. I was quite happy with the script and the end result.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:21</guid>
				<title>Launching UpRoot.in</title>
				<link>http://hrj.wikidot.com/blog:21</link>
				<description>

&lt;div class=&quot;image-container aligncenter&quot;&gt;&lt;img src=&quot;http://hrj.wikidot.com/local--files/blog:21/uprootinLogo.png&quot; alt=&quot;uprootinLogo.png&quot; class=&quot;image&quot; /&gt;&lt;/div&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Sun, 24 May 2009 18:01:12 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <div class="image-container aligncenter"><img src="http://hrj.wikidot.com/local--files/blog:21/uprootinLogo.png" alt="uprootinLogo.png" class="image" /></div> <p>After several weeks of development and alpha testing by friends and family, we are releasing a stable version of a website I have been working on recently.</p> <p>Ladies and gentlemen, please point your browsers to<br /> <strong><a href="http://uproot.in">http://uproot.in</a></strong></p> <h2><span>What is UpRoot.in ?</span></h2> <p>A simple website to post <strong>classifieds</strong> online for free. It has been exclusively created for <strong>Indian</strong> users, and covers all districts in the country (600+).</p> <p>Everything about the site is geared towards simplicity, including:</p> <ul> <li>the look — very few graphics + dynamic interface</li> <li>the operational model — zero intervention between seller and buyer is our policy.</li> </ul> <h2><span>What is it not ?</span></h2> <p>While making the site, one path we have <em>not</em> treaded (nor intend to tread) is social networking. We will likely add more features in the future to facilitate collaboration between groups of users. But we don't expect it to become a core feature of the site.</p> <p>The reason is — to keep things simple for everyone, especially novice internet users.</p> <h1><span>A brief walk-through of UpRoot.in</span></h1> <p>Here are some of the features of UpRoot.in</p> <h2><span>Categories</span></h2> <div class="image-container floatleft"><img src="http://hrj.wikidot.com/local--files/blog:21/category.png" alt="category.png" class="image" /></div> <p>Every Ad has to be given a category at creation. This helps viewers to easily find what they need.</p> <div style="clear:both; height: 0px; font-size: 1px"></div> <h2><span>Ads that offer and Ads that want</span></h2> <div class="image-container floatleft"><img src="http://hrj.wikidot.com/local--files/blog:21/adType.png" alt="adType.png" class="image" /></div> <p>Broadly speaking, every Ad has either something to offer to the viewer, or wants something from the viewer. This too is specified at creation time of the Ad, and helps viewers to find exactly what they need.</p> <div style="clear:both; height: 0px; font-size: 1px"></div> <h2><span>Specifying the location</span></h2> <div class="image-container floatleft"><img src="http://hrj.wikidot.com/local--files/blog:21/location.png" alt="location.png" class="image" /></div> <p>Viewers can choose to filter their Ads</p> <ul> <li>by city</li> <li>or by state</li> </ul> <p>They may also see results for All Locations in India.</p> <div style="clear:both; height: 0px; font-size: 1px"></div> <h2><span>Privacy</span></h2> <div class="image-container floatleft"><img src="http://hrj.wikidot.com/local--files/blog:21/reply.png" alt="reply.png" class="image" /></div> <p>We are very concerned about the privacy of users of our site.</p> <p>There is a built-in method to contact users, without needing to divulge either the seller's or buyer's contact information until each party voluntarily chooses to do so.</p> <div style="clear:both; height: 0px; font-size: 1px"></div> <h2><span>Membership</span></h2> <p>While viewing the website is possible for all, membership is needed to post a new Ad.</p> <p>Membership is <strong>free</strong>, and to become a member you just need to confirm your <strong>email address</strong> and choose a <strong>profile-name</strong>.</p> <h1><span>Stay tuned</span></h1> <p>Thanks for reading through!</p> <p>Please use the site whenever you need to buy / sell anything, and send us your feedback!</p> <p>We will stay tuned :)</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:20</guid>
				<title>[Howto] Redmine on Fedora with Postgresql DB</title>
				<link>http://hrj.wikidot.com/blog:20</link>
				<description>

&lt;h1&gt;&lt;span&gt;Motivation&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;I have been using &lt;a href=&quot;http://trac.edgewall.org/&quot;&gt;Trac&lt;/a&gt; for my last two projects. It works mostly as expected and the integration of Wiki+Ticketing+Subversion saves a lot of time. I have been fairly satisfied with it.&lt;/p&gt;
&lt;p&gt;Satisfied, that is, until now.&lt;/p&gt;
&lt;p&gt;As our projects started growing, it became tedious to install and use a different version of Trac for every new project.&lt;/p&gt;
&lt;p&gt;So, I decided to try out &lt;a href=&quot;http://www.redmine.org/&quot;&gt;Redmine&lt;/a&gt;, which is an application very similar to Trac, but boasts of several more features, prominent among them being:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Support for multiple projects&lt;/li&gt;
&lt;li&gt;Role based access system&lt;/li&gt;
&lt;li&gt;Project Scheduling (Gantt charts, etc)&lt;/li&gt;
&lt;li&gt;Ajax interface&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The catch: It is written in Ruby, and most distributions don&#039;t have ready-made bundles for it (Redmine).&lt;/p&gt;
&lt;p&gt;Nevertheless, I decided I would be brave and go where all wise men have been before. &lt;em&gt;To search on Google.com.&lt;/em&gt; The search yielded an &lt;a href=&quot;http://blog.itsmine.co.uk/2009/01/22/howto-install-subversion-and-redmine-on-centos5-rhel5/comment-page-1/#comment-23&quot;&gt;excellent tutorial&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;&lt;span&gt;The Howto&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;The Howto linked above was written for CentOs5 / RHEL5, but I found it equally valid on Fedora Core 10. Further, that Howto suggests the use of MySQL, but I altered some steps to make it work for Postgresql DB.&lt;/p&gt;
&lt;p&gt;Here is the modified version.&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Notes&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;This HOWTO is written for Fedora core 10 (might also work on CentOS and RHEL)&lt;/li&gt;
&lt;li&gt;Replace [FQDN] with either your IP address or the hostname (or FQDN) which you’ll be using to access the interface.&lt;/li&gt;
&lt;li&gt;Replace [user] with the username under whose home directory the Subversion repository database will be located. e.g. /home/[user]/svn-repos&lt;/li&gt;
&lt;li&gt;This HOWTO will make the following assumptions:
&lt;ul&gt;
&lt;li&gt;You already have the “httpd” (apache) package installed&lt;/li&gt;
&lt;li&gt;You will be running apache as the user ‘apache’&lt;/li&gt;
&lt;li&gt;The subversion repository root folder will be under /home/[user]/subversion/&lt;/li&gt;
&lt;li&gt;The vhost’s folder locationg will be /var/www/svn&lt;/li&gt;
&lt;li&gt;The subversion repository to be created will be called ‘example-repo’&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;span&gt;Install and setup Subversion&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Strictly speaking, this step is optional, since many features of Redmine don&#039;t require integration with an SCM. However, I am assuming that in most cases, users would want SCM integration.&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;yum install mod_dav_svn subversion&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Add the group [user] to the user apache and make the subversion base URL readable and writable…&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;usermod -aG [user] apache
chmod g+x /home/[user]
mkdir /home/[user]/subversion
chmod g+rwx /home/[user]/subversion
chown -R [user]:[user] /home/[user]/subversion&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Make the web directory:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;mkdir /var/www/svn
chown apache.apache /var/www/svn&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Put the following into /etc/httpd/conf.d/svn.conf (this is for a subversion repository called ‘example-repo’)&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;NameVirtualHost *:80
&amp;lt;VirtualHost *:80&amp;gt;
        DocumentRoot &quot;/var/www/svn&quot;
        ServerName [FQDN]
        &amp;lt;Location /example-repo&amp;gt;
                DAV svn
                SVNPath /home/[user]/subversion/example-repo
                AuthType Basic
                AuthName &quot;Subversion repo&quot;
                AuthUserFile /var/www/passwd
                Require valid-user
        &amp;lt;/Location&amp;gt;

        &amp;lt;Directory &quot;/var/www/svn&quot;&amp;gt;
        allow from all
        Options +Indexes
        &amp;lt;/Directory&amp;gt;
&amp;lt;/VirtualHost&amp;gt;&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Add an HTTP auth user…&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;htpasswd -cm /var/www/passwd [user]&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Create a proper SVN repository&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;cd /home/[user]/subversion
su [user] -c &quot;svnadmin create example-repo&quot;&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;(This creates a blank repository, which is enough for the purpose of this tutorial)&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Install Ruby on Rails&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Let’s get Ruby up and running first. The original Howto recommends disabling SELinux.&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;yum install httpd httpd-devel apr make gcc-c++ postgresql postgresql-server ruby-postgres ruby ruby-devel ruby-docs ruby-ri \
ruby-libs ruby-mode ruby-tcltk ruby-irb ruby-rdoc fcgi fcgi-devel mod_fcgid rubygems subversion-ruby&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now we’ll install passenger (aka mod_rails)&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;gem install passenger
passenger-install-apache2-module&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Create and insert this text into /etc/httpd/conf.d/rails.conf (or alternatively edit the existing svn.conf created when we set up subversion)&lt;/p&gt;
&lt;div class=&quot;wiki-note&quot;&gt;
&lt;p&gt;The below configuration is specific to the installation of redmine (hence the DocumentRoot)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so
   PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2
   PassengerRuby /usr/bin/ruby

NameVirtualHost *:80

   &amp;lt;VirtualHost *:80&amp;gt;
     ServerName 192.168.10.17
     DocumentRoot /var/www/rails/redmine/public
   &amp;lt;/VirtualHost&amp;gt;&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;&lt;span&gt;Now on to Redmine itself&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Get Redmine 0.8.x from &lt;a href=&quot;http://rubyforge.org/frs/?group_id=1850&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Assuming you downloaded the Redmine package into ~/Dowload/redmin-0.8.x.tar.gz&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;mkdir /var/www/rails/
cd /var/www/rails/
tar xzf ~/Download/redmine-0.8.x.tar.gz
mv redmine-0.8.x redmine
chown -R apache.apache redmine
cd redmine&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If this is the first time you have installed Postgresql, initialise the database:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;service postgresql initdb&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You should now setup the password for user &#039;postgres&#039;. The exact steps depend on how you want to setup authentication. I found this &lt;a href=&quot;http://docs.planetargon.com/PostgreSQL_Reset_Password&quot;&gt;link&lt;/a&gt; useful.&lt;/p&gt;
&lt;p&gt;Now start postgresql&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;service postgresql restart&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Before proceeding, check if you are able to login to postgres server with user-name=postgres and your chosen password.&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;psql -U postgres&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now, create a database for redmine:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;psql -U postgres
create database redmine;
create user redmine;
grant all on database redmine to redmine;
alter user redmine with password &#039;red&#039;;
\q&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Copy the example database file to the “live” location&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;cd /var/www/rails/redmine
cp config/database.yml.example config/database.yml&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Enter the appropriate settings for the [production] section ensuring that host is set to 127.0.0.1&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;vim /var/www/rails/redmine/config/database.yml&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Set up email&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;cd /var/www/rails/redmine
cp config/email.yml.example config/email.yml&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;br /&gt;
Enter the appropriate settings for the [production] section ensuring that “address” is set to the IP address of the SMTP host
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;vim /var/www/rails/redmine/config/email.yml&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Install rails and postgresql connector for redmine using gem…&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;cd /var/www/rails/redmine/app/
gem install -v=2.1.2 rails
gem install activerecord-postgresql-adapter&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Import the redmine database into the live database specified in the above config file&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;cd /var/www/rails/redmine/app/
rake db:migrate RAILS_ENV=&quot;production&quot;&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Install default configuration data in database (this is entirely optional, but recommended).&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;cd /var/www/rails/redmine/app/
rake redmine:load_default_data RAILS_ENV=&quot;production&quot;&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;br /&gt;
Bring up the testing webserver, once loaded check your config by browsing to &lt;a href=&quot;http://[FQDN]:3000&quot;&gt;http://[FQDN]:3000&lt;/a&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;cd /var/www/rails/redmine/
ruby script/server -e production&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Make sure your apache config file edits are ok and that the services will start at boot by doing:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;service httpd configtest
service httpd restart
chkconfig httpd on
chkconfig mysqld on&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;&lt;span&gt;Taking Backups (entirely optional)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Add the following to your crontab which will create a database backup in the /home/[user] directory&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;pg_dump -i -h 127.0.0.1 -p 5432 -U postgres --format=plain -C -D -v &quot;redmine&quot; | gzip &amp;gt; /home/[user]/redmine_`date +%y_%m_%d`.gz&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;&lt;span&gt;Email using Gmail and other secure servers&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Out of the box, Redmine doesn&#039;t support Gmail&#039;s SMTP server (or any other secure SMTP server with TLS).&lt;/p&gt;
&lt;p&gt;A workaround is &lt;a href=&quot;http://redmineblog.com/articles/setup-redmine-to-send-email-using-gmail&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I am paraphrasing those tips here.&lt;/p&gt;
&lt;h3&gt;&lt;span&gt;Install the action_mailer_optional_tls plugin&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;strong&gt;action_mailer_optional_tls_plugin&lt;/strong&gt; adds a TLS option to Redmine&#039;s emailing library, ActionMailer. TLS is a version of SSL which is required by GMail in order to send email.&lt;/p&gt;
&lt;p&gt;To install this plugin, use the script/plugin command in your Redmine directory:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;cd /var/www/rails/redmine/
ruby script/plugin install git://github.com/collectiveidea/action_mailer_optional_tls.git&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you don&#039;t have GIT, don&#039;t fret:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;cd /var/www/rails/redmine/
./script/plugin install http://svn.douglasfshearer.com/rails/plugins/action_mailer_optional_tls&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;&lt;span&gt;Configure your email.yml&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;It should now look something like this (note the tls and authentication options)&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;# File: config/email.yml
production:
  delivery_method: :smtp
  smtp_settings:
    tls: true
    address: &quot;smtp.gmail.com&quot;
    port: &#039;587&#039;
    domain: &quot;smtp.gmail.com&quot;
    authentication: :plain
    user_name: &quot;your_email@gmail.com&quot;
    password: &quot;your_password&quot;&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;wiki-note&quot;&gt;
&lt;p&gt;That&#039;s it. You are done. Congratulations!&lt;/p&gt;
&lt;p&gt;Do let me know via comments, how it worked for you.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Sun, 17 May 2009 09:54:41 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <h1><span>Motivation</span></h1> <p>I have been using <a href="http://trac.edgewall.org/">Trac</a> for my last two projects. It works mostly as expected and the integration of Wiki+Ticketing+Subversion saves a lot of time. I have been fairly satisfied with it.</p> <p>Satisfied, that is, until now.</p> <p>As our projects started growing, it became tedious to install and use a different version of Trac for every new project.</p> <p>So, I decided to try out <a href="http://www.redmine.org/">Redmine</a>, which is an application very similar to Trac, but boasts of several more features, prominent among them being:</p> <ul> <li>Support for multiple projects</li> <li>Role based access system</li> <li>Project Scheduling (Gantt charts, etc)</li> <li>Ajax interface</li> </ul> <p>The catch: It is written in Ruby, and most distributions don't have ready-made bundles for it (Redmine).</p> <p>Nevertheless, I decided I would be brave and go where all wise men have been before. <em>To search on Google.com.</em> The search yielded an <a href="http://blog.itsmine.co.uk/2009/01/22/howto-install-subversion-and-redmine-on-centos5-rhel5/comment-page-1/#comment-23">excellent tutorial</a></p> <h1><span>The Howto</span></h1> <p>The Howto linked above was written for CentOs5 / RHEL5, but I found it equally valid on Fedora Core 10. Further, that Howto suggests the use of MySQL, but I altered some steps to make it work for Postgresql DB.</p> <p>Here is the modified version.</p> <h2><span>Notes</span></h2> <ul> <li>This HOWTO is written for Fedora core 10 (might also work on CentOS and RHEL)</li> <li>Replace [FQDN] with either your IP address or the hostname (or FQDN) which you’ll be using to access the interface.</li> <li>Replace [user] with the username under whose home directory the Subversion repository database will be located. e.g. /home/[user]/svn-repos</li> <li>This HOWTO will make the following assumptions: <ul> <li>You already have the “httpd” (apache) package installed</li> <li>You will be running apache as the user ‘apache’</li> <li>The subversion repository root folder will be under /home/[user]/subversion/</li> <li>The vhost’s folder locationg will be /var/www/svn</li> <li>The subversion repository to be created will be called ‘example-repo’</li> </ul> </li> </ul> <h2><span>Install and setup Subversion</span></h2> <p>Strictly speaking, this step is optional, since many features of Redmine don't require integration with an SCM. However, I am assuming that in most cases, users would want SCM integration.</p> <div class="code"> <pre> <code>yum install mod_dav_svn subversion</code> </pre></div> <p>Add the group [user] to the user apache and make the subversion base URL readable and writable…</p> <div class="code"> <pre> <code>usermod -aG [user] apache chmod g+x /home/[user] mkdir /home/[user]/subversion chmod g+rwx /home/[user]/subversion chown -R [user]:[user] /home/[user]/subversion</code> </pre></div> <p>Make the web directory:</p> <div class="code"> <pre> <code>mkdir /var/www/svn chown apache.apache /var/www/svn</code> </pre></div> <p>Put the following into /etc/httpd/conf.d/svn.conf (this is for a subversion repository called ‘example-repo’)</p> <div class="code"> <pre> <code>NameVirtualHost *:80 &lt;VirtualHost *:80&gt; DocumentRoot "/var/www/svn" ServerName [FQDN] &lt;Location /example-repo&gt; DAV svn SVNPath /home/[user]/subversion/example-repo AuthType Basic AuthName "Subversion repo" AuthUserFile /var/www/passwd Require valid-user &lt;/Location&gt; &lt;Directory "/var/www/svn"&gt; allow from all Options +Indexes &lt;/Directory&gt; &lt;/VirtualHost&gt;</code> </pre></div> <p>Add an HTTP auth user…</p> <div class="code"> <pre> <code>htpasswd -cm /var/www/passwd [user]</code> </pre></div> <p>Create a proper SVN repository</p> <div class="code"> <pre> <code>cd /home/[user]/subversion su [user] -c "svnadmin create example-repo"</code> </pre></div> <p>(This creates a blank repository, which is enough for the purpose of this tutorial)</p> <h2><span>Install Ruby on Rails</span></h2> <p>Let’s get Ruby up and running first. The original Howto recommends disabling SELinux.</p> <div class="code"> <pre> <code>yum install httpd httpd-devel apr make gcc-c++ postgresql postgresql-server ruby-postgres ruby ruby-devel ruby-docs ruby-ri \ ruby-libs ruby-mode ruby-tcltk ruby-irb ruby-rdoc fcgi fcgi-devel mod_fcgid rubygems subversion-ruby</code> </pre></div> <p>Now we’ll install passenger (aka mod_rails)</p> <div class="code"> <pre> <code>gem install passenger passenger-install-apache2-module</code> </pre></div> <p>Create and insert this text into /etc/httpd/conf.d/rails.conf (or alternatively edit the existing svn.conf created when we set up subversion)</p> <div class="wiki-note"> <p>The below configuration is specific to the installation of redmine (hence the DocumentRoot)</p> </div> <div class="code"> <pre> <code>LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2 PassengerRuby /usr/bin/ruby NameVirtualHost *:80 &lt;VirtualHost *:80&gt; ServerName 192.168.10.17 DocumentRoot /var/www/rails/redmine/public &lt;/VirtualHost&gt;</code> </pre></div> <h2><span>Now on to Redmine itself</span></h2> <p>Get Redmine 0.8.x from <a href="http://rubyforge.org/frs/?group_id=1850">here</a></p> <p>Assuming you downloaded the Redmine package into ~/Dowload/redmin-0.8.x.tar.gz</p> <div class="code"> <pre> <code>mkdir /var/www/rails/ cd /var/www/rails/ tar xzf ~/Download/redmine-0.8.x.tar.gz mv redmine-0.8.x redmine chown -R apache.apache redmine cd redmine</code> </pre></div> <p>If this is the first time you have installed Postgresql, initialise the database:</p> <div class="code"> <pre> <code>service postgresql initdb</code> </pre></div> <p>You should now setup the password for user 'postgres'. The exact steps depend on how you want to setup authentication. I found this <a href="http://docs.planetargon.com/PostgreSQL_Reset_Password">link</a> useful.</p> <p>Now start postgresql</p> <div class="code"> <pre> <code>service postgresql restart</code> </pre></div> <p>Before proceeding, check if you are able to login to postgres server with user-name=postgres and your chosen password.</p> <div class="code"> <pre> <code>psql -U postgres</code> </pre></div> <p>Now, create a database for redmine:</p> <div class="code"> <pre> <code>psql -U postgres create database redmine; create user redmine; grant all on database redmine to redmine; alter user redmine with password 'red'; \q</code> </pre></div> <p>Copy the example database file to the “live” location</p> <div class="code"> <pre> <code>cd /var/www/rails/redmine cp config/database.yml.example config/database.yml</code> </pre></div> <p>Enter the appropriate settings for the [production] section ensuring that host is set to 127.0.0.1</p> <div class="code"> <pre> <code>vim /var/www/rails/redmine/config/database.yml</code> </pre></div> <p>Set up email</p> <div class="code"> <pre> <code>cd /var/www/rails/redmine cp config/email.yml.example config/email.yml</code> </pre></div> <br /> Enter the appropriate settings for the [production] section ensuring that “address” is set to the IP address of the SMTP host <div class="code"> <pre> <code>vim /var/www/rails/redmine/config/email.yml</code> </pre></div> <p>Install rails and postgresql connector for redmine using gem…</p> <div class="code"> <pre> <code>cd /var/www/rails/redmine/app/ gem install -v=2.1.2 rails gem install activerecord-postgresql-adapter</code> </pre></div> <p>Import the redmine database into the live database specified in the above config file</p> <div class="code"> <pre> <code>cd /var/www/rails/redmine/app/ rake db:migrate RAILS_ENV="production"</code> </pre></div> <p>Install default configuration data in database (this is entirely optional, but recommended).</p> <div class="code"> <pre> <code>cd /var/www/rails/redmine/app/ rake redmine:load_default_data RAILS_ENV="production"</code> </pre></div> <br /> Bring up the testing webserver, once loaded check your config by browsing to <a href="http://[FQDN]:3000">http://[FQDN]:3000</a> <div class="code"> <pre> <code>cd /var/www/rails/redmine/ ruby script/server -e production</code> </pre></div> <p>Make sure your apache config file edits are ok and that the services will start at boot by doing:</p> <div class="code"> <pre> <code>service httpd configtest service httpd restart chkconfig httpd on chkconfig mysqld on</code> </pre></div> <h2><span>Taking Backups (entirely optional)</span></h2> <p>Add the following to your crontab which will create a database backup in the /home/[user] directory</p> <div class="code"> <pre> <code>pg_dump -i -h 127.0.0.1 -p 5432 -U postgres --format=plain -C -D -v "redmine" | gzip &gt; /home/[user]/redmine_`date +%y_%m_%d`.gz</code> </pre></div> <h2><span>Email using Gmail and other secure servers</span></h2> <p>Out of the box, Redmine doesn't support Gmail's SMTP server (or any other secure SMTP server with TLS).</p> <p>A workaround is <a href="http://redmineblog.com/articles/setup-redmine-to-send-email-using-gmail">here</a>.</p> <p>I am paraphrasing those tips here.</p> <h3><span>Install the action_mailer_optional_tls plugin</span></h3> <p>The <strong>action_mailer_optional_tls_plugin</strong> adds a TLS option to Redmine's emailing library, ActionMailer. TLS is a version of SSL which is required by GMail in order to send email.</p> <p>To install this plugin, use the script/plugin command in your Redmine directory:</p> <div class="code"> <pre> <code>cd /var/www/rails/redmine/ ruby script/plugin install git://github.com/collectiveidea/action_mailer_optional_tls.git</code> </pre></div> <p>If you don't have GIT, don't fret:</p> <div class="code"> <pre> <code>cd /var/www/rails/redmine/ ./script/plugin install http://svn.douglasfshearer.com/rails/plugins/action_mailer_optional_tls</code> </pre></div> <h3><span>Configure your email.yml</span></h3> <p>It should now look something like this (note the tls and authentication options)</p> <div class="code"> <pre> <code># File: config/email.yml production: delivery_method: :smtp smtp_settings: tls: true address: "smtp.gmail.com" port: '587' domain: "smtp.gmail.com" authentication: :plain user_name: "your_email@gmail.com" password: "your_password"</code> </pre></div> <div class="wiki-note"> <p>That's it. You are done. Congratulations!</p> <p>Do let me know via comments, how it worked for you.</p> </div> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:19</guid>
				<title>Laptop Hard disks are (gonna be) seriously broken</title>
				<link>http://hrj.wikidot.com/blog:19</link>
				<description>

&lt;blockquote&gt;
&lt;p&gt;This is a rather technical post; non-techy readers can skip/skim. Also, my knowledge might be half-baked, since I haven&#039;t RTFC; just culled the info from mailing lists. You have been warned!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Thu, 23 Apr 2009 15:37:20 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <blockquote> <p>This is a rather technical post; non-techy readers can skip/skim. Also, my knowledge might be half-baked, since I haven't RTFC; just culled the info from mailing lists. You have been warned!</p> </blockquote> <h1><span>Power saving</span></h1> <p>It all started with a simple wish: to save power on a server system I am building, by spinning down the HDD when the server has a prolonged idle time.</p> <p>A quick googling revealed that "hdparm -S" was my friend. It helps set a timeout parameter for the disk to spin down and thus save power. So, I quickly setup a bootup script which does this, and that would have been the end of it, had it worked as expected.</p> <h1><span>Paradox</span></h1> <p>I observed that the option does work for very small timeouts (5 to 10 seconds). But beyond that there is always some activity happening in the system that prevents the disk from spinning down, which was evidently a software configuration problem.</p> <p>So, I started digging more on this topic, and figured a couple of tools to help pin down what are the exact applications that cause this background activity. (See for example, the Spinup Debugging section <a href="http://samwel.tk/laptop_mode/faq">here</a>)</p> <p>But that is a different story. The <strong>real</strong> story is that I learnt that frequent spinning down was actually bad for the disk, and it was happening by default, without user intervention, on most Linux (and possibly Windoze) systems, on most Hard Drives !!!</p> <h1><span>The problem</span></h1> <p>Frequent spin ups &amp; spin downs are bad because they cause wear &amp; tear of the disk head mechanism, which is more than the wear &amp; tear that happens while the disk is spinning.</p> <h1><span>Some numbers</span></h1> <p>To find out how many times the drives has been loaded (and hence spun up/down), use the smartctl command:</p> <div class="code"> <pre> <code>smartctl --all /dev/sda | grep Load_Cycle</code> </pre></div> <p>On my laptop the output was,</p> <div class="code"> <pre> <code>smartctl --all /dev/sda | grep Load_Cycle 193 Load_Cycle_Count 0x0012 066 066 000 Old_age Always - 343830</code> </pre></div> <p>The last number, 343830, gives the number of times my HDD was loaded, and that's a huge number given that it is only 1.5 years old. Typical maximum loads for a laptop HDD are about 600k.</p> <p>The power on time for my disk is</p> <div class="code"> <pre> <code>smartctl --all /dev/sda | grep Hour 9 Power_On_Hours 0x0012 093 093 000 Old_age Always - 3409</code> </pre></div> <h1><span>What gives..</span></h1> <p>The official answer is on the <a href="http://ata.wiki.kernel.org/index.php/Known_issues#Drives_which_perform_frequent_head_unloads_under_Linux">known issues</a> page of the Linux ATA driver website. But this is a rather conservative assessment, IMO.</p> <p>From my own experience and from what I have seen on various forums, there are many users with various different HDD makes, that are affected by this problem.</p> <p>The cause for this high number of disk loads, AFAICT, is that most laptop HDDs have factory defaults that maximise power savings (to give longer battery life times). The aggressive power saving settings, however, cause frequent spin downs. And most linux distributions (and perhaps Windozers) don't change the factory settings unless instructed (which is a wise decision IMO).</p> <p>The ways for avoiding this are also poorly documented.</p> <p>The end result is that, by default <em>most</em> laptop disks could wear out in about 3 years of regular use.</p> <h1><span>Possible Solution</span></h1> <p>One way to reduce the frequency of HDD loads is to use the "hdparm -B" option. A high number for the parameters value will tend to reduce the number of spin downs (and also consequently increase power consumption).</p> <p>The exact way to do this on your distribution may vary. On my Fedora Box, I modified "/etc/rc.local" and stuck in this:</p> <div class="code"> <pre> <code># prevent aggressive power management (-B 254) # set spin down timeout to 30 minutes of idle time (-S 241) hdparm -B 254 -S 241 /dev/sda</code> </pre></div> <p>This has certainly reduced the number of spin downs for me.</p> <p>Do let me know via comments if it works for you too.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:18</guid>
				<title>Firing up Focault</title>
				<link>http://hrj.wikidot.com/blog:18</link>
				<description>

&lt;p&gt;I finally got off my lazy hind and built a Focault tester.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Sun, 29 Mar 2009 06:23:36 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>I finally got off my lazy hind and built a Focault tester.</p> <p>The mirror holder was the only new thing I had to build. I had a slit and knife edge ready from a previous attempt.</p> <p>After gazing at the myriad plywood pieces lying around in my balcony, I hit upon an innovative design for the mirror holder. The triangle pieces cut-off for the Dobsonian cradle came in very handy.</p> <img src="http://hrj.wikidot.com/local--files/blog:18/29032009473.jpg" alt="29032009473.jpg" class="image" /><img src="http://hrj.wikidot.com/local--files/blog:18/25032009469.jpg" alt="25032009469.jpg" class="image" /> <p>The actual Focault test was fun too. Here is a view of the image, with the 50% region at null.</p> <div class="image-container aligncenter"><img src="http://hrj.wikidot.com/local--files/blog:18/focault_28March09.png" alt="focault_28March09.png" class="image" /></div> <p>With explanations:</p> <div class="image-container aligncenter"><img src="http://hrj.wikidot.com/local--files/blog:18/focault_28MarchExplain.png" alt="focault_28MarchExplain.png" class="image" /></div> <p>Both the turned-down edge and the central hill don't bother me too much. I have some mirron-on-top polishing to do which should even out those areas.</p> <p>What really bothers me is the number of scratch marks my mirror is accumulating due to prolonged polishing :(</p> <p>Anywho, the focault test is a good guide for knowing when to stop polishing!</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:17</guid>
				<title>lolcatz: Ish more coming?</title>
				<link>http://hrj.wikidot.com/blog:17</link>
				<description>

&lt;div class=&quot;image-container aligncenter&quot;&gt;&lt;img src=&quot;http://icanhascheezburger.wordpress.com/files/2008/08/funny-pictures-cat-will-kill-dog.jpg&quot; alt=&quot;funny-pictures-cat-will-kill-dog.jpg&quot; class=&quot;image&quot; /&gt;&lt;/div&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Tue, 03 Feb 2009 04:03:00 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <div class="image-container aligncenter"><img src="http://icanhascheezburger.wordpress.com/files/2008/08/funny-pictures-cat-will-kill-dog.jpg" alt="funny-pictures-cat-will-kill-dog.jpg" class="image" /></div> <p>'ve been tripping on <a href="http://en.wikipedia.org/wiki/Lolcats">lolcats</a> these last few days. <a href="http://icanhascheezburger.com/">I Can Has Cheezburger</a> is the perfect way to unwind after a tiring day.</p> <p>I wonder how this lolcatz movement originated. The wikipedia article doesn't pin it down; just describes it as a parody of internet grammar (or rather the lack of it).</p> <p>But I have seen something similar in Terry Pratchett's novels. For example, in <a href="http://www.amazon.com/Moving-Pictures-Terry-Pratchett/dp/006102063X">Moving Pictures</a> (1990) when a bunch of animals, who happen to be on the magical hills of 'Holy-Wood' suddenly start speaking English. The entire scene is gut-aching hillarious. And the cats speak exactly like these lolcatz!</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:16</guid>
				<title>Fun With Inkscape</title>
				<link>http://hrj.wikidot.com/blog:16</link>
				<description>

&lt;p&gt;A fun image done with &lt;a href=&quot;http://inkscape.org&quot;&gt;inkscape&lt;/a&gt;.&lt;br /&gt;
Squint your eyes or stand away from the screen (or simply remove your specs, if you are myopic like me) to see the author of this blog.&lt;/p&gt;
&lt;img src=&quot;http://hrj.wikidot.com/local--files/blog:16/fun.png&quot; alt=&quot;fun.png&quot; class=&quot;image&quot; /&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Wed, 14 Jan 2009 17:47:35 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>A fun image done with <a href="http://inkscape.org">inkscape</a>.<br /> Squint your eyes or stand away from the screen (or simply remove your specs, if you are myopic like me) to see the author of this blog.</p> <img src="http://hrj.wikidot.com/local--files/blog:16/fun.png" alt="fun.png" class="image" /> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:15</guid>
				<title>Winstone : A minimal servlet container</title>
				<link>http://hrj.wikidot.com/blog:15</link>
				<description>

&lt;p&gt;When I am learning something new, I like to start with basic, simple tools and ideas. When learning servlets, I was quite intimidated by the size of Tomcat and Jetty containers (both the download size and the number of configuration options).&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Mon, 12 Jan 2009 11:32:23 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>When I am learning something new, I like to start with basic, simple tools and ideas. When learning servlets, I was quite intimidated by the size of Tomcat and Jetty containers (both the download size and the number of configuration options).</p> <p>By contrast <a href="http://winstone.sourceforge.net/">Winstone</a>'s design goal is to be simple and minimal, and it lives up to its promise. The download is about <strong>150kb</strong> and I had configured and used it within a few seconds.</p> <p>Compare that with</p> <ul> <li>Tomcat <strong>7Mb</strong></li> <li>Jetty <strong>24Mb</strong></li> </ul> <p>Before you start using it, some caveats:</p> <ul> <li>Given Winstone's design goals, there are some limitations in its feature list, and they are listed very diligently on its homepage.</li> <li>The lastest release date is Jan 2008. That either means that the product has matured enough not to require updates, or that development has stalled.</li> </ul> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:14</guid>
				<title>Web programming in Scala: Choosing a framework</title>
				<link>http://hrj.wikidot.com/blog:14</link>
				<description>

&lt;p&gt;For the last few months I have been trying to build a web site. Months? You may wonder why it&#039;s taking so long. It&#039;s nothing very fancy; just a simple input screen for a project I am working on. But the idea is to learn the techniques involved, and try to build an infrastructure that I can use for .. you know.. the super duper mega project always lurking in the pipeline.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Mon, 05 Jan 2009 20:31:25 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>For the last few months I have been trying to build a web site. Months? You may wonder why it's taking so long. It's nothing very fancy; just a simple input screen for a project I am working on. But the idea is to learn the techniques involved, and try to build an infrastructure that I can use for .. you know.. the super duper mega project always lurking in the pipeline.</p> <p>A bit of my background. I have been a Systems Programmer (embedded systems, mostly) and my web programming skills shine at visual magnitude -20. A little bit of HTML, XML, Javascript and HTTP is fine with me, but I had a tough time staying afloat in the sea of buzzwords like JSP, JSF, Facelets, Servlets, Containers, EJBs, ORMs, ooh-my-blah-blah..</p> <p>One thing I was clear about: I wanted solutions only around the language I am most comfortable with… Scala (and hence around Java). Without that restriction, the sea would have been even deeper and wider, for a newbie web developer.</p> <h1><span>Lift Web</span></h1> <p>I started by checking out [<a href="http://liftweb.net/index.php/Main_Page">Lift Web</a>], a framework written in Scala, and one of the oft showcased Scala applications. Lift seems to be a comprehensive framework, still in evolution (I mean the evolution of paradigms not just the code). The mailing list is very active and responsive. There have been some recent documentation efforts, but I didn't have that convenience back when I started, and so I had a tough time getting the big picture (probably because I didn't know some web basics back then). I also had a struggle with Maven (the dependency manager from Apache) which is used by the Lift guys. The problem, I think, was that Maven was being used for both dependency management <em>and</em> building the code. My complaints about a lack of a build tool on the scala mailing list triggered the creation of a very nifty tool: [<a href="http://code.google.com/p/simple-build-tool/">SBT</a>] by Mark Harrah.</p> <p>Eventually, I was able to build what I wanted in Lift and it works fine. But I wished for a more light weight framework, so that I get to understand what is happening behind the scenes, and get a feeling of control.</p> <p>I prowled for alternatives.</p> <h1><span>Slinky and Sweet</span></h1> <p>[<a href="http://code.google.com/p/sweetscala/">Sweet</a>] is a much simpler framework than Lift and easy to get started with. There is clear documentation available on the project's wiki. The only problem (from my point of view) is that it is based on a third party templating language (freemarker). When I mentioned this on the Sweet mailing list, it was suggested that I could build my own View class, and it was while exploring this option that the penny dropped.</p> <p>I realized that this whole framework thingy is actually quite simple, once you understand Servlets and the HTTP request/response cycle. And what makes templating simple is Scala's support for XML. For example.</p> <div class="code"> <pre> <code>// This surrounds the given node with a standard template code. def surroundWithStd (node:scala.xml.Node, title:String) = { &lt;html&gt; &lt;head&gt; &lt;title&gt;{title}&lt;/title&gt; &lt;/head&gt; &lt;body bgcolor="#c0c0ff"&gt; {node} &lt;/body&gt; &lt;/html&gt; } // Sample usage private def userAdd = { surroundWithStd ( &lt;div&gt; &lt;h1&gt;User addition&lt;/h1&gt; &lt;form method="post"&gt; &lt;label for="nameField"&gt;Name&lt;/label&gt; &lt;input type="text" name="nameField" /&gt; &lt;input type="submit" value="Add" /&gt; &lt;/form&gt; &lt;/div&gt;, "user addition" ) }</code> </pre></div> <p>This should be faster than Lift's templating+snippet support (since the parsing of XML literals in Lift's case would have to be done at run-time) and more importantly doesn't require you to know anything more than Scala.</p> <p>Ofcourse, you could do away with the XML support and use Strings directly (like the examples given in Servlet tutorials), but with XML you get static checking for XML syntax by the Scala compiler! The disadvantage is that it is bit slower (About 4x slower on a simple benchmark that I wrote).</p> <p>This kind of down-to-basics approach is also being taken by the [<a href="http://code.google.com/p/slinky2/">Slinky</a>] framework. But that is still a nascent project and heavily depends on the scalaz package, which is a little too academic and under-documented for me.</p> <h1><span>Rolling my own framework</span></h1> <p>Not finding anything that readily matched my needs, I just sub-classed <strong>javax.servlet.http.HttpServlet</strong> and went from there. It was totally straight forward; about 100 lines of code for the "framework" which includes "get" and "post" handlers, extraction of parameters and session data, along with a way to handle URLs with regex pattern matching.</p> <p>You get the full advantage of a general purpose language at your disposal for the view layer. But that could also be a disadvantage for large projects, because the flexibility could snow-ball into complexity.</p> <p>For smaller projects, it is a boon, because the number of people who would contribute to the project would be smaller and hence the problem is more managed. Also, it is quite easy to slap-on a file-based view layer with limited inline scripting (something like JSP or Lift's templates) on top of this basic layer when the project grows.</p> <h1><span>Conclusion</span></h1> <p>It is a good learning exercise to cook stuff on your own. And I am now more aware of the relative strengths of the currently available alternatives. In the future if my needs grow, I will be comfortable in upgrading my framework, or tailoring others to my needs.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:13</guid>
				<title>why I hate java lib</title>
				<link>http://hrj.wikidot.com/blog:13</link>
				<description>

&lt;p&gt;It takes so many lines of cruft to load a simple image.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Thu, 25 Dec 2008 15:06:21 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>It takes so many lines of cruft to load a simple image.</p> <div class="code"> <pre> <code>import java.awt.* Image image = Toolkit.getDefaultToolkit().getImage(args[0]); MediaTracker mediaTracker = new MediaTracker(new Container()); mediaTracker.addImage(image, 0); mediaTracker.waitForID(0);</code> </pre></div> <p>…. when it could be as simple as</p> <div class="code"> <pre> <code>Image image = SomeClass.getImage(args[0]) image.waitToComplete</code> </pre></div> <p>I think, it's not a language problem. It is just the obsession with object oriented-ness!</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:12</guid>
				<title>alternate DNS servers to the rescue</title>
				<link>http://hrj.wikidot.com/blog:12</link>
				<description>

&lt;p&gt;For those burned by the latest &lt;a href=&quot;http://www.hindu.com/2008/12/21/stories/2008122155880100.htm&quot;&gt;internet carrier outage&lt;/a&gt;, try adding an alternate DNS server to your &lt;strong&gt;resolv.conf&lt;/strong&gt; (or its equivalent in other operating systems). This will solve problems faced by some ISP&#039;s DNS servers.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Sun, 21 Dec 2008 19:27:18 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>For those burned by the latest <a href="http://www.hindu.com/2008/12/21/stories/2008122155880100.htm">internet carrier outage</a>, try adding an alternate DNS server to your <strong>resolv.conf</strong> (or its equivalent in other operating systems). This will solve problems faced by some ISP's DNS servers.</p> <p>For example, <a href="https://www.opendns.com/">OpenDNS</a> provides a great free service. Their servers are:<br /> <strong>208.67.222.222</strong> and <strong>208.67.220.220</strong></p> <p>If you are using DHCP to populate resolv.conf, remember to update the <strong>dhclient.conf</strong> file. For example,</p> <div class="code"> <pre> <code>prepend domain-name-servers 208.67.220.220;</code> </pre></div> <p>Add this to the dhclient.conf file of the network interface you are using. For example, for eth0, the file will be <strong>/etc/dhclient-eth0.conf</strong></p> <p>While you are at it, consider running a local DNS caching server on your machine. This will result in a quicker network access for you, and also reduce the load on the public DNS servers. For example, dns-masq is a great and easy to use DNS caching server.</p> <p>To make sure your local DNS server is used, add another line to dhclient.conf as follows:</p> <div class="code"> <pre> <code>prepend domain-name-servers 208.67.220.220; prepend domain-name-servers 127.0.0.1;</code> </pre></div> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:11</guid>
				<title>What a feeling</title>
				<link>http://hrj.wikidot.com/blog:11</link>
				<description>

&lt;p&gt;As I saw &lt;a href=&quot;http://antwrp.gsfc.nasa.gov/apod/ap081202.html&quot;&gt;this photo&lt;/a&gt;, a song played in my mind.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Tue, 16 Dec 2008 14:21:27 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>As I saw <a href="http://antwrp.gsfc.nasa.gov/apod/ap081202.html">this photo</a>, a song played in my mind.</p> <blockquote> <p>What a feeling.<br /> Bein's believin'.<br /> I can have it all,<br /> now I'm dancing for my life.<br /> Take your passion<br /> And make it happen.<br /> Pictures come alive,<br /> you can dance right through your life.</p> </blockquote> <p>(Irene Cara - <em><a href="http://in.youtube.com/watch?v=Jcp7v0uoybc">What A Feeling</a></em> )</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:10</guid>
				<title>Moon, Venus, Geminids, Fireball - Observation report</title>
				<link>http://hrj.wikidot.com/blog:10</link>
				<description>

&lt;h2&gt;&lt;span&gt;Building the mount&lt;/span&gt;&lt;/h2&gt;
&lt;a href=&quot;http://hrj.wikidot.com/local--files/blog:10/09122008385_cropped.jpg&quot;&gt;&lt;img src=&quot;http://hrj.wikidot.com/local--resized-images/blog:10/09122008385_cropped.jpg/thumbnail.jpg&quot; alt=&quot;09122008385_cropped.jpg&quot; class=&quot;image&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://hrj.wikidot.com/local--files/blog:10/10122008387.jpg&quot;&gt;&lt;img src=&quot;http://hrj.wikidot.com/local--resized-images/blog:10/10122008387.jpg/thumbnail.jpg&quot; alt=&quot;10122008387.jpg&quot; class=&quot;image&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
After the successful &quot;first light&quot; through the telescope, I spent last week in frantically building the mount. It was an interesting exercise to calculate the height of the mount and then to purchase the plywood of the right thickness and size. I had to make so many iterations while drilling, fixing, aligning the wooden pieces that it&#039;s a big surprise that I did not suffer a major emotional breakdown.
&lt;p&gt;But, it has all paid off. The mount is functional, though, I admit, it is a bit rough to operate and intensely fugly to look at. It can only be operated by me, but hey, even the world&#039;s best observatories have a dedicated operator ;)&lt;br /&gt;
&lt;a href=&quot;http://hrj.wikidot.com/local--files/blog:10/11122008391.jpg&quot;&gt;&lt;img src=&quot;http://hrj.wikidot.com/local--resized-images/blog:10/11122008391.jpg/thumbnail.jpg&quot; alt=&quot;11122008391.jpg&quot; class=&quot;image&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Dec 14th&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;With the telescope mostly functional I called up my ex-colleagues from Vayavya for a quick observation session. I called them up at 10.30pm and PS, Madhu and Gobi turned up instantaneously. The full moon would have been the bane of a regular observation session, but since my mirror is not coated yet, it was the only object I could aspire to, and it didn&#039;t fail us.&lt;/p&gt;
&lt;p&gt;We took our turns admiring the moon, the telescope and the mount, in that order, and since all of them were first time observers, I got to give them a lot of &lt;em&gt;goli&lt;/em&gt;s (facts based on a fast lapsing memory).&lt;/p&gt;
&lt;p&gt;We enjoyed looking at the Geminids which were quite frequent, even with the Moon sitting squarely inside Gemini.&lt;/p&gt;
&lt;p&gt;At some point, I brought out my 10x50 binoculars, and we had a peek at the Orion Nebula. All else was hopelessly lost in the Moon + street light haze.&lt;/p&gt;
&lt;p&gt;They left at around 12.30am, and it was then that an idea struck me; could I actually try some photography? All I had was a 3.2 megapixel mobile camera and a slow, uncoated mirror. But the results weren&#039;t all that bad:&lt;br /&gt;
&lt;a href=&quot;http://hrj.wikidot.com/local--files/blog:10/resized14122008399.jpg&quot;&gt;&lt;img src=&quot;http://hrj.wikidot.com/local--resized-images/blog:10/resized14122008399.jpg/small.jpg&quot; alt=&quot;resized14122008399.jpg&quot; class=&quot;image&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://hrj.wikidot.com/local--files/blog:10/resized14122008404.jpg&quot;&gt;&lt;img src=&quot;http://hrj.wikidot.com/local--resized-images/blog:10/resized14122008404.jpg/small.jpg&quot; alt=&quot;resized14122008404.jpg&quot; class=&quot;image&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Dec 15th&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;The next day evening I tried pointing the scope at Jupiter, and I had a rude shock. All I could see was an extremely distorted shape without any hint of any moons, and I spent quite some time in rechecking the focus and alignment. I was almost beginning to feel disheartened with the quality of the mirror, when I suddenly realized that I had been mistaking Venus for Jupiter. I quickly cross checked with KStars, and confirmed it. And then, it all made sense. I was looking at a very bright and crescent face of Venus and it looked great! (The real jupiter was almost setting on the horizon)&lt;/p&gt;
&lt;p&gt;As if to share my cheer, a bright fireball appeared directly overhead and was visible for about 3-4 seconds.&lt;/p&gt;
&lt;p&gt;All in all, these were great observation sessions! I can hardly wait to get the mirror coated and begin some serious observations.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Mon, 15 Dec 2008 14:47:58 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <h2><span>Building the mount</span></h2> <a href="http://hrj.wikidot.com/local--files/blog:10/09122008385_cropped.jpg"><img src="http://hrj.wikidot.com/local--resized-images/blog:10/09122008385_cropped.jpg/thumbnail.jpg" alt="09122008385_cropped.jpg" class="image" /></a><a href="http://hrj.wikidot.com/local--files/blog:10/10122008387.jpg"><img src="http://hrj.wikidot.com/local--resized-images/blog:10/10122008387.jpg/thumbnail.jpg" alt="10122008387.jpg" class="image" /></a><br /> After the successful "first light" through the telescope, I spent last week in frantically building the mount. It was an interesting exercise to calculate the height of the mount and then to purchase the plywood of the right thickness and size. I had to make so many iterations while drilling, fixing, aligning the wooden pieces that it's a big surprise that I did not suffer a major emotional breakdown. <p>But, it has all paid off. The mount is functional, though, I admit, it is a bit rough to operate and intensely fugly to look at. It can only be operated by me, but hey, even the world's best observatories have a dedicated operator ;)<br /> <a href="http://hrj.wikidot.com/local--files/blog:10/11122008391.jpg"><img src="http://hrj.wikidot.com/local--resized-images/blog:10/11122008391.jpg/thumbnail.jpg" alt="11122008391.jpg" class="image" /></a></p> <h2><span>Dec 14th</span></h2> <p>With the telescope mostly functional I called up my ex-colleagues from Vayavya for a quick observation session. I called them up at 10.30pm and PS, Madhu and Gobi turned up instantaneously. The full moon would have been the bane of a regular observation session, but since my mirror is not coated yet, it was the only object I could aspire to, and it didn't fail us.</p> <p>We took our turns admiring the moon, the telescope and the mount, in that order, and since all of them were first time observers, I got to give them a lot of <em>goli</em>s (facts based on a fast lapsing memory).</p> <p>We enjoyed looking at the Geminids which were quite frequent, even with the Moon sitting squarely inside Gemini.</p> <p>At some point, I brought out my 10x50 binoculars, and we had a peek at the Orion Nebula. All else was hopelessly lost in the Moon + street light haze.</p> <p>They left at around 12.30am, and it was then that an idea struck me; could I actually try some photography? All I had was a 3.2 megapixel mobile camera and a slow, uncoated mirror. But the results weren't all that bad:<br /> <a href="http://hrj.wikidot.com/local--files/blog:10/resized14122008399.jpg"><img src="http://hrj.wikidot.com/local--resized-images/blog:10/resized14122008399.jpg/small.jpg" alt="resized14122008399.jpg" class="image" /></a><br /> <a href="http://hrj.wikidot.com/local--files/blog:10/resized14122008404.jpg"><img src="http://hrj.wikidot.com/local--resized-images/blog:10/resized14122008404.jpg/small.jpg" alt="resized14122008404.jpg" class="image" /></a></p> <h2><span>Dec 15th</span></h2> <p>The next day evening I tried pointing the scope at Jupiter, and I had a rude shock. All I could see was an extremely distorted shape without any hint of any moons, and I spent quite some time in rechecking the focus and alignment. I was almost beginning to feel disheartened with the quality of the mirror, when I suddenly realized that I had been mistaking Venus for Jupiter. I quickly cross checked with KStars, and confirmed it. And then, it all made sense. I was looking at a very bright and crescent face of Venus and it looked great! (The real jupiter was almost setting on the horizon)</p> <p>As if to share my cheer, a bright fireball appeared directly overhead and was visible for about 3-4 seconds.</p> <p>All in all, these were great observation sessions! I can hardly wait to get the mirror coated and begin some serious observations.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:9</guid>
				<title>Wikipedia contributor : inductiveLoad</title>
				<link>http://hrj.wikidot.com/blog:9</link>
				<description>

&lt;p&gt;It&#039;s amazing how much of their time people devote to contributing to open-source software and information.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Sun, 14 Dec 2008 16:26:12 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>It's amazing how much of their time people devote to contributing to open-source software and information.</p> <p>I happened to see this superbly done <a href="http://en.wikipedia.org/wiki/File:Nearby_Stars_(14ly_Radius).svg">map of our stellar neighbourhood</a>, by inductiveLoad. It's a novel way to accurately represent 3d space. (novel to me, for sure)</p> <p>Browsing over to <a href="http://commons.wikimedia.org/wiki/User:Inductiveload">his wikipedia profile</a>, shows the immense amount of effort he has put in to this cause.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:8</guid>
				<title>First Light</title>
				<link>http://hrj.wikidot.com/blog:8</link>
				<description>

&lt;p&gt;&lt;strong&gt;Woooooooooooooohooooooooooooooooooo!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Fri, 28 Nov 2008 09:11:09 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p><strong>Woooooooooooooohooooooooooooooooooo!</strong></p> <p>Saw the first sight through my telescope, and it was brilliant!</p> <p>I was able to get a working assembly of my scope late yesterday evening. But the weather yesterday was too bad and I couldn't see a thing.</p> <p>This morning I got up early and did a quick test. At first I couldn't see a thing, but then realized that the collimation was really bad. After some quick adjustments I was able to get a decently good collimation, and then I pointed the scope around the neighbourhood, and boy! I was stunned by the quality of the result.</p> <p>I could see a thin wire in the field of view, and it took me some moments to realise that this was an object in somebody's balcony in a far-away apartment!</p> <p>Boy! Two years of grinding, polishing, planning, gashing, more planning, trips to SP road (in Bangalore), crying, planning, buying, sawing, phone-calls, visits to hardware stores, waiting, waiting…</p> <p>And at last… the first view! I am feeling really triumphant today.</p> <p>A lot of people to remember who helped me along the way, directly / indirectly:</p> <ul> <li>Pavan. We started the grinding together</li> <li>Vinay, who lended me some Red Rouge</li> <li>Hemanth, for lending me a Sam Brown and a Robert something</li> <li>Pratap, for the discussions on the mirror cell</li> <li>Brahma, many more discussions on the mirror cell. We almost made one, but then I decided to buy this off the shelf.</li> <li>ATM Group India (yahoo group)</li> <li>ATM Orkut community</li> <li>and finally <a href="http://bas.org.in">BAS</a> (for the inspiration)</li> </ul> <p>Some details about the current configuration<br /> 8.5" diameter, uncoated mirror<br /> 72" focal length<br /> 25mm Ramsden eye piece, which gives me about 72x zoom<br /> Badly collimated, precariously attached elliptical mirror.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:7</guid>
				<title>The halting problem in verse form</title>
				<link>http://hrj.wikidot.com/blog:7</link>
				<description>

&lt;p&gt;Undecidability of the halting problem..&lt;br /&gt;
.. in verse form&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://ling.ed.ac.uk/~gpullum/loopsnoop.pdf&quot;&gt;LoopSnoop.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think this is worth learning by-heart and should be taught to every Computer-science student.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Sat, 22 Nov 2008 08:19:18 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>Undecidability of the halting problem..<br /> .. in verse form</p> <p><a href="http://ling.ed.ac.uk/~gpullum/loopsnoop.pdf">LoopSnoop.pdf</a></p> <p>I think this is worth learning by-heart and should be taught to every Computer-science student.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:6</guid>
				<title>Defcon</title>
				<link>http://hrj.wikidot.com/blog:6</link>
				<description>

&lt;p&gt;One of the best linux games I have played in recent times:&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Tue, 04 Nov 2008 18:03:55 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>One of the best linux games I have played in recent times:</p> <p><a href="http://www.introversion.co.uk/defcon/">Defcon</a></p> <p>Gameplay is nice. Graphics are simple but nicely polished.</p> <p>If you find graphics to be very slow, disable the "Smooth Lines" option, and you will be fine, without an appreciable loss in quality.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://hrj.wikidot.com/blog:5</guid>
				<title>Mirror making: some joy some rage</title>
				<link>http://hrj.wikidot.com/blog:5</link>
				<description>

&lt;p&gt;The mirror I am making for my telescope is almost done. But it is the last mile which is the most trying.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=77199)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/77/77199/a16.png&quot; alt=&quot;hrj&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/hrj&quot;  &gt;hrj&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Sun, 26 Oct 2008 13:01:29 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>The mirror I am making for my telescope is almost done. But it is the last mile which is the most trying.</p> <p>I am in the polishing stages of the mirror and two events happened today:</p> <p>First the good news. Looks like the focal length of my mirror is much lesser than I had believed until now. It seems to be about 68 to 72 inches, instead of the 85 inches I thought it was.</p> <p>Which means my scope's length will probably be a whole feet shorter, which is great!</p> <p>The bad news is, I did a round of polishing yesterday night which has caused scratches to appear on the mirror. There are 3 of them. Not too deep; but gives me jitters. Either my workspace is too dusty, or the polishing agent is contaminated.</p> <p>I can't take a risk now. So, I will stop using this polishing agent and wait for a new batch to arrive.</p> <p>Update:<br /> More good news. I just built a Focault tester, and my mirror appears to be perfectly spherical!! Woohooo!</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/hrj" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/77/77199/a16.png" alt="hrj" style="background-image:url(http://www.wikidot.com/userkarma.php?u=77199)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/77/77199/a16.png" alt="hrj" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=77199,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/hrj" >hrj</a></span></p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>