<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Engwar</title>
	<atom:link href="http://engwar.com/feed" rel="self" type="application/rss+xml" />
	<link>http://engwar.com</link>
	<description>Chintana Wilamuna's weblog</description>
	<pubDate>Sun, 05 Oct 2008 05:19:40 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Nokia N78</title>
		<link>http://engwar.com/post/57</link>
		<comments>http://engwar.com/post/57#comments</comments>
		<pubDate>Sun, 05 Oct 2008 05:19:40 +0000</pubDate>
		<dc:creator>Chintana</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[n78]]></category>

		<category><![CDATA[nokia]]></category>

		<category><![CDATA[review]]></category>

		<category><![CDATA[s60]]></category>

		<category><![CDATA[symbian]]></category>

		<guid isPermaLink="false">http://engwar.com/?p=57</guid>
		<description><![CDATA[I&#8217;ve been using a Nokia N78 for couple of days now and it feels great. The biggest barrier in the very first couple of days was the lack of touch screen. I&#8217;ve been touching the icons and wondering why nothing happened, almost restarted the phone  This will be like a mini review about the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using a Nokia N78 for couple of days now and it feels great. The biggest barrier in the very first couple of days was the lack of touch screen. I&#8217;ve been touching the icons and wondering why nothing happened, almost restarted the phone <img src='http://engwar.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> This will be like a mini review about the phone. Please bare with me for the references to HTC Touch &#8216;cos that&#8217;s what I&#8217;ve been using for quite sometime.</p>
<p><strong>Form factor</strong>. First of all, given the width and height of the phone I quite liked the candy-bar form factor. No fugly qwerty maps. Relief. Feel comfortable in the hand too, unlike the N95, which IMO is a bit bulky. In the back there&#8217;s no protective cover in the housing over the camera. This has been the case with HTC Touch as well but they have a nice cover to put the phone on. Likewise, you might not wanna use this phone without a pouch unless you&#8217;re ok with scratches. </p>
<p><strong>Keypad</strong>. Housing doesn&#8217;t feel great compared to other models, specially given my previous HTC Touch experience. For example it&#8217;s not easy to press the end key. Even if you do manage to press this, sometimes it has pressed the right selection key instead. This can get annoying. Ditto for left selection key and the call key.  Rest of the keys are ok, but compared with the keypad designs in N95, it&#8217;s doesn&#8217;t feel natural when composing a text message/email.</p>
<p><strong>Camera</strong>. N78 comes with a 3.2 megapixel camera which gives quite decent picture quality. Heck, my old digital camera is a 3.2 megapixel one. The phone has 3G so you it does have 2 cameras. Install <a href="http://wwigo.com/">vigo</a> and you can transform your phone as a wireless web cam.</p>
<p><strong>GPS</strong>. Phone comes with integrated GPS which you could use to do all that GPS jazz with maps etc&#8230; Also it has <a href="http://en.wikipedia.org/wiki/AGPS">A-GPS</a> support which gives you more accurate results.</p>
<p><strong>Radio</strong>. It&#8217;s nice to have a radio on the phone so that you could tune into house music on local radio channels when you&#8217;re in a situation where you can hear horrendous music in the background <img src='http://engwar.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> In addition to the visual radio, you could listen to a large number of online radio stations.</p>
<p><strong>FM transmitter</strong>. One cool feature of N78 is the built-in FM transmitter. You could play a song and then transmit on a frequency of your choice. Didn&#8217;t quite check the exact distance but the receiver was able to play quite nicely when the phone is about 10 meters away. No more burning of podcasts into CDs to listen while you&#8217;re driving. Just tune in and listen to stuff playing on your phone!</p>
<p><strong>Storage</strong>. Comes with 90MB of RAM, 76MB of phone memory and a 2GB microSD card. Quite enough for the podcasts, indie music plus some techno.</p>
<p><strong>WiFi</strong>. I&#8217;m really happy that the device has wireless. So there&#8217;s the option of being always connected without having to run your mobile phone bill sky high. Works seemlessly with access points with WEP+hidden ESSID.</p>
<p><strong>3.5G</strong>. You can enjoy HSDPA speeds upto 3.6Mbps with Nokia N78. I just enabled dual mode, and enjoying 3.5G HSDPA with my Dialog connection. Armed with the webkit based browser, life cannot get any better <img src='http://engwar.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Message reader</strong>. I was pleasantly surprised to find out that there&#8217;s message reader. Which reads out your SMSes and emails at a surprising rate of accuracy. It was nice to hear it reading xyz LKR as xyz Sri Lankan Rupees.</p>
<p><strong>Navi Wheel</strong>. This is another really cool feature where you could scroll by touching the outset of the ok button in clockwise/anti-clockwise direction. This doesn&#8217;t work for all the menus though.</p>
<p>Apologies for not having any screenshots. For the life of me, I can&#8217;t seem to get either <a href="http://www.smartphoneware.com/screen_snap-for-s60-3rd-edition-product.php">Best Screen Snap</a> or <a href="http://www.antonypranata.com/screenshot">Screenshot</a> to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://engwar.com/post/57/feed</wfw:commentRss>
		</item>
		<item>
		<title>Windows mobile: the good and &#8230;</title>
		<link>http://engwar.com/post/56</link>
		<comments>http://engwar.com/post/56#comments</comments>
		<pubDate>Fri, 03 Oct 2008 18:26:34 +0000</pubDate>
		<dc:creator>Chintana</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[htc touch]]></category>

		<category><![CDATA[mobile]]></category>

		<category><![CDATA[windows mobile]]></category>

		<category><![CDATA[wm6]]></category>

		<guid isPermaLink="false">http://engwar.com/?p=56</guid>
		<description><![CDATA[&#8230; the good. Surprise! IMHO, one of the best and stable products Microsoft has put out is Windows Mobile. 6.0 to be more specific because that&#8217;s what I use. I&#8217;ve been using an HTC Touch for more than a year and (surprisingly?) haven&#8217;t had a single problem with the phone or the Windows Mobile 6.0 [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230; the good. Surprise! IMHO, one of the best and stable products Microsoft has put out is Windows Mobile. 6.0 to be more specific because that&#8217;s what I use. I&#8217;ve been using an HTC Touch for more than a year and (surprisingly?) haven&#8217;t had a single problem with the phone or the Windows Mobile 6.0 software. Although I haven&#8217;t flashed ROMs I&#8217;ve been heavily using some 3rd party apps and have done some UI customizations. Nothing critical though, just installing a fraction of all the free apps out there. There was never a single moment where I had to restart the device due to a software bug or OS crash.</p>
<p>I&#8217;ve got HTC Home Customizer which adds 6 tabs instead of the boring 3 tab default layout in the home screen. This also allowed installing the vista icon set which is quite nice. HTC Touch doesn&#8217;t have 3G nor GPS but the device is quite functional and does have WiFi. Also, get PointUI installed if you like smooth animation effects like in an iphone.</p>
<p>Task scheduling functions which comes by default in WM6 is superb. You could schedule a task, which repeats from say, Monday to Thursday or which ever days you could pick and set reminders etc&#8230; The flexibility it provides for this is just fabulous and the interface is really easy to use.</p>
<p>The only minor annoyance I could think of is inability to use headphones when the phone is plugged into the charger or to the USB. Default on screen keyboard might be best used with the stylus. It&#8217;s not easy writing a text message with your thumb. There are plenty of free on sceen keyboards which makes writing with your thumb an easy task. PocketCM and TouchPal comes to mind. You have the word/excel/power point set but I haven&#8217;t used any of these. I&#8217;m not a big fan of wordpressors myself so that might be the reason for the lack of usage, then again other than reading a doc file that doesn&#8217;t have any fancy formatting it&#8217;s really hard to imagine someone doing their useful wordprocessing tasks using these. Adobe PDF viewer which comes with it is pointless. Why? when you zoom the text in a PDF to a readable level you&#8217;ll find yourself constantly having to scroll horizontally to read a sentence. This is the case with Adobe PDF viewer in almost all the mobile phones with a limited screen size.</p>
<p>Will rant about the current mobile device later.</p>
]]></content:encoded>
			<wfw:commentRss>http://engwar.com/post/56/feed</wfw:commentRss>
		</item>
		<item>
		<title>Who are you?!</title>
		<link>http://engwar.com/post/54</link>
		<comments>http://engwar.com/post/54#comments</comments>
		<pubDate>Wed, 24 Sep 2008 18:08:32 +0000</pubDate>
		<dc:creator>Chintana</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[life]]></category>

		<guid isPermaLink="false">http://engwar.com/?p=54</guid>
		<description><![CDATA[I started my first blog in February 2004, it was called gnulog.blogspot.com and I quickly got addicted to writing. The problem with words is that the reader can interpret things you say in billion different ways. This also vary according to the mood the reader, in that particular moment. Many months later, when the blog [...]]]></description>
			<content:encoded><![CDATA[<p>I started my first blog in February 2004, it was called gnulog.blogspot.com and I quickly got addicted to writing. The problem with words is that the reader can interpret things you say in billion different ways. This also vary according to the mood the reader, in that particular moment. Many months later, when the blog got somewhat know within my social circle all hell started to break loose. &#8220;Oh, I recently saw your blog, what on earth are you writing?!&#8221;, &#8220;I didn&#8217;t knew you had blah blah type of view about blah blah &#8230; you must be like a [psychopath/mentally ill/weirdo/disturbed, take your pick] to write that shit&#8221;. Although I don&#8217;t recall them word to word, feedback was not very different. After sometime I went anonymous, got a pseudonym and started writing. So my main blog was gathering rust. Then there was yet another set of people who read your archives and try to make conclusions about yourself. Views you had on a particular thing 10 months ago might not be the same right now. So I started getting &#8220;you have said like this in the past and now you&#8217;re telling this, ha! double standards&#8221; sort of comments.</p>
<p>Then I migrated to wordpress and started to blog under chintana.wordpress.com. By this time I had about 5 - 6 different blogs where I wrote with various pseudonyms. I imported my blogger archives to wordpress and continued to blog under my real name. When I felt the need to write about whatever that comes to my mind I would resort to do that anonymously. After some time, for a reason that I cannot recall I decided to get rid of the wordpress blog. Although I blogged anonymously I thought I should write with my real name also and then got trevet.blogspot.com. I&#8217;ve completely forgotten the time period I had this.</p>
<p>Anonymous blogging does have the freedom of writing whatever you want and not be associated with a gross misinterpretation from some dolt later. You could write your opinions about terrorism, human trafficking, donkey porn <img src='http://engwar.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> etc&#8230; It doesn&#8217;t matter. People don&#8217;t know who is at the other end. The moment people know who&#8217;s writing, they stupidly and incorrectly starts to form your character by stuff you write. I&#8217;ve been bitten by this numerous times. Freedom to write whatever I wish without getting it associated to how I am in real life, is too much to ask, apparently. This is why I&#8217;ve been writing anonymously and getting rid of all the archives on my previous blogs. Now, I don&#8217;t have an anonymous blog, don&#8217;t plan to get one either.</p>
<p>After a similar confrontation recently, it made me realize that these compulsive judgemental cretins are not worth bothering about.</p>
]]></content:encoded>
			<wfw:commentRss>http://engwar.com/post/54/feed</wfw:commentRss>
		</item>
		<item>
		<title>Enterprise PHP</title>
		<link>http://engwar.com/post/53</link>
		<comments>http://engwar.com/post/53#comments</comments>
		<pubDate>Mon, 22 Sep 2008 03:39:44 +0000</pubDate>
		<dc:creator>Chintana</dc:creator>
		
		<category><![CDATA[eai]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[soa]]></category>

		<category><![CDATA[web services]]></category>

		<category><![CDATA[wsf/php]]></category>

		<guid isPermaLink="false">http://engwar.com/?p=53</guid>
		<description><![CDATA[Samisa has written a nice post about using PHP in the enterprise. A commenter there argues that he don&#8217;t use PHP because it&#8217;s a dynamically typed language. It&#8217;s somewhat true that if you&#8217;re coming from a statically typed language background you&#8217;re stormed with so many questions and wonder possible nightmares of using one. Once you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://samisa-abeysinghe.blogspot.com/2008/09/php-for-enterprise.html">Samisa has written a nice post about using PHP in the enterprise</a>. A commenter there argues that he don&#8217;t use PHP because it&#8217;s a dynamically typed language. It&#8217;s somewhat true that if you&#8217;re coming from a statically typed language background you&#8217;re stormed with so many questions and wonder possible nightmares of using one. Once you start learning a language and understand how programs are suppose to be written in that language most of these problems go away.</p>
<p>For all these years, it has only been Java/.Net programmers who has been enjoying the luxury of service oriented architectures. These folks understand the value of building a business functionality as a service or exposing an existing functionality as a service. PHP programmers have been building their web based programs happily without having to know what services mean. People in the PHP community has tried to bring Web services into the language with varying degrees of success. These are very courages and thoughtful efforts. But if you analyze them objectively you&#8217;ll see that many of these libraries doesn&#8217;t contain that much of features in order to build/integrate an application with an existing enterprise app.</p>
<p>What <a href="http://wso2.org/projects/wsf/php">WSF/PHP</a> has done is lower the bar of building PHP applications that can fit with existing applications in an enterprise written in Java/.Net or whatever the language that might be. Also, it has enabled ability to integrate existing PHP applications to your other enterprise applications.</p>
<p>One strong reason companies have embraced developing applications in Java is that so their data will not be isolated from rest of the enterprise data. In the past having a PHP application inside your company might have been frowned upon because it doesn&#8217;t make sense to have information which is isolated from all the other applications in the company. This is why most organizations invest in an ERP for example. But now, this has become a non issue. If you&#8217;re using open standards inside your enterprise to communicate/integrate applications, using WSF/PHP, you can integrate or extend services seamlessly with rest of your enterprise services.</p>
]]></content:encoded>
			<wfw:commentRss>http://engwar.com/post/53/feed</wfw:commentRss>
		</item>
		<item>
		<title>LBR-LBO DR and BC</title>
		<link>http://engwar.com/post/52</link>
		<comments>http://engwar.com/post/52#comments</comments>
		<pubDate>Wed, 10 Sep 2008 19:02:06 +0000</pubDate>
		<dc:creator>Chintana</dc:creator>
		
		<category><![CDATA[business continuity]]></category>

		<category><![CDATA[disaster recovery]]></category>

		<category><![CDATA[lbo]]></category>

		<category><![CDATA[lbr]]></category>

		<guid isPermaLink="false">http://engwar.com/?p=52</guid>
		<description><![CDATA[The LBR-LBO CIO forum was an insightful event where it was discussed how local enterprises should think about disaster recovery and business continuity. The forum was moderated by Peter D&#8217;Almeda and there were some very interesting thoughts from the panellists as well as the audience.
Peter was interested in knowing why most corporations block services like [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://lbo.lk/fullstory.php?nid=1021691605">LBR-LBO CIO forum</a> was an insightful event where it was discussed how local enterprises should think about disaster recovery and business continuity. The forum was moderated by Peter D&#8217;Almeda and there were some very interesting thoughts from the panellists as well as the audience.</p>
<p>Peter was interested in knowing why most corporations block services like skype and point out that those can be utilized in a disastrous situation. Also, it was noted that most organizations that employ a disaster recovery site never bother to actually test it. Resistance to such testing was said to be disruption to day-to-day activities. Regardless, it&#8217;s of utmost importance that you test your DR setup before an actual disaster strike. </p>
<p>One member of the audience asked how you could go about handling the human element when it comes to a disastrous situation as they&#8217;ve covered all the other scenarios and replicated all replicable resources. This, however was not well answered by the panel.</p>
<p>In order to justify the cost that&#8217;s involved having an online DR site, utilizing a percentage of the DR site to daily operations was suggested. </p>
<p>I wanted to ask if the companies represented by the panellists were considering cloud computing as a possible solution for their DR planning as it&#8217;s becoming much more cost effective compared to having a separate physical site with expensive hardware. Then again thought this would be a bit technical compared to the crowd there and direction the discussion was going, so didn&#8217;t ask that.  Still, it would be an interesting thing to know, and if anyone is not considering going into cloud computing knowing that is even more interesting given the fact that <a href="http://www.techcrunch.com/2008/04/21/who-are-the-biggest-users-of-amazon-web-services-its-not-startups/">biggest AWS users are banks and drug companies</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://engwar.com/post/52/feed</wfw:commentRss>
		</item>
		<item>
		<title>Chrome</title>
		<link>http://engwar.com/post/51</link>
		<comments>http://engwar.com/post/51#comments</comments>
		<pubDate>Wed, 03 Sep 2008 14:05:11 +0000</pubDate>
		<dc:creator>Chintana</dc:creator>
		
		<category><![CDATA[browser]]></category>

		<category><![CDATA[chrome]]></category>

		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://engwar.com/?p=51</guid>
		<description><![CDATA[So, yeah, google browser. For me the most compelling UI change is the tabs on top of addressbar. Had some tabs open and after switching between each other I&#8217;m feeling almost tired of the way it&#8217;s in Firefox/Opera/IE. That&#8217;s brilliance. The other brilliant idea is processes. It&#8217;s one of those simple things which make you [...]]]></description>
			<content:encoded><![CDATA[<p>So, yeah, google browser. For me the most compelling UI change is the tabs on top of addressbar. Had some tabs open and after switching between each other I&#8217;m feeling almost tired of the way it&#8217;s in Firefox/Opera/IE. That&#8217;s brilliance. The other brilliant idea is processes. It&#8217;s one of those simple things which make you realize, duh, now why didn&#8217;t I think of that before. If you look at some of the brilliant ideas for problems people came up in the past you&#8217;ll see that those are things which have been known previously but people have overlooked until someone come along, pick it up and wave it in front of their faces, hey, you can do it like this.</p>
<p>Javascript devs will still be at home with Chrome&#8217;s inbuilt javascript debugger. That&#8217;s another smart move. For me the Resources option takes a bit of time, but that&#8217;s okay. Incognito mode seems to be a bit redundant given the fact that you have the option of clearing the browser history.</p>
<p>The browser, IMHO, is not much of a bigger deal these days. True, you have to have a solid architecture and all that but nowadays, cost of Firefox crashing is negligible. Restart, and you&#8217;ll be where you were before the crash (most of the time). The rich ecosystem of browser extensions is more important. Now, it has become the case where I can&#8217;t use any other browser without Adblock, Noscript, Taboo and a few other extensions. I tried getting adblocking plus noscript behaviour with Opera without much success. There might be a way, but for me Noscript make the task dead simple. </p>
<p>It&#8217;ll be interesting to watch how things will develop in time to come. I&#8217;m still happy with Firefox even if Chrome had a Linux version. For me, extensions I&#8217;m using are more important.</p>
]]></content:encoded>
			<wfw:commentRss>http://engwar.com/post/51/feed</wfw:commentRss>
		</item>
		<item>
		<title>Pissing people off</title>
		<link>http://engwar.com/post/50</link>
		<comments>http://engwar.com/post/50#comments</comments>
		<pubDate>Tue, 26 Aug 2008 18:02:49 +0000</pubDate>
		<dc:creator>Chintana</dc:creator>
		
		<category><![CDATA[python]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[wsf/perl]]></category>

		<category><![CDATA[wsf/ruby]]></category>

		<guid isPermaLink="false">http://engwar.com/?p=50</guid>
		<description><![CDATA[From time to time, if you feel the need to piss someone off for their own good, let me assure you that it&#8217;s a perfectly natural thing. If you see someone living their lives without getting pissed off even for few minutes, do them a favour by pissing them off, at least once. Just like [...]]]></description>
			<content:encoded><![CDATA[<p>From time to time, if you feel the need to piss someone off for their own good, let me assure you that it&#8217;s a perfectly natural thing. If you see someone living their lives without getting pissed off even for few minutes, do them a favour by pissing them off, at least once. Just like <a href="http://en.wikipedia.org/wiki/Eustress">eustress</a> people need eupiss for a long healthy life. Besides, it shakes things a little bit which helps people to bring some variety to their monotonous existence. So, if the conventional wisdom has shown you that pissing people off is bad, well, it&#8217;s because it&#8217;s conventional. Make a note on your todo lists, or your <a href="http://en.wikipedia.org/wiki/Getting_Things_Done">GTD</a> system and make it an items that you could do in less than 2 minutes. Then do it. After all it&#8217;s for their own good.</p>
<p>Now, let me show you a very easy method to piss someone off. This works extremely well if the pissee is a tech guy. More specifically a programmer. It&#8217;s a well tested and trustworthy method which people used in mailing lists from time to time to start holy wars. This method is most successful if the pissee uses a <a href="http://java.sun.com/">big stupid</a> language and actually LIKE it. All you have to do is utter &#8220;my language is better than you one&#8221; phrase in a slightly offensive tone and throw an example on their face. It&#8217;s that simple. Lemme give you one example.</p>
<p>Artificial examples on blogs sucks. So let me take some code which I was playing with today and explain.</p>
<p>I was writing some Ruby code this afternoon with <a href="http://wso2.org/projects/wsf/ruby">WSF/Ruby</a>. In order to talk to an SSL endpoint you need to supply the CA cert to the client as an option. <a href="http://ws.apache.org/rampart/c/">Rampart</a> expects you give the cert with the certificate delimiters removed (first and the last line of a certificate). <a href="http://wso2.org/projects/wsf/perl">WSF/Perl</a> will read the certificate for you and do the right thing when you pass the filename. But not WSF/Ruby (note to self: make this part of the lib).</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">client = WSClient.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span> 
  <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;to&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;/your/end/point&quot;</span>,
    <span style="color:#996600;">&quot;ca_cert&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;cert content as a string&quot;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>, logfile <span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>The beauty of the language you&#8217;re using spring up in situations like this. Without further ado, here&#8217;s the one liner to get the cert content as a string with certificate delimiters removed,</p>

<div class="wp_syntax"><div class="code"><pre class="ruby"><span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'server.cert'</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#CC0066; font-weight:bold;">readlines</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">1</span>..<span style="color:#006666;">-2</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">join</span>.<span style="color:#CC0066; font-weight:bold;">gsub</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span>\n<span style="color:#006600; font-weight:bold;">/</span>, <span style="color:#996600;">''</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>You got to appreciate the beauty of the above line. Although I&#8217;m quite fond of it I prefer the Python version over it. Here&#8217;s one way to do it,</p>

<div class="wp_syntax"><div class="code"><pre class="python"><span style="color: #483d8b;">&quot;&quot;</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span>line.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">for</span> line <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;server.cert&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span>:<span style="color: #ff4500;">-2</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Yes, the list comprehension beats it all. It&#8217;s simple and elegant. Most importantly beautiful and pleasing to look at. My first exposure to list comprehension has been via <a href="http://erlang.org/">Erlang</a>. Purely due to the fact that I started reading about it before Python.</p>
<p>Anyhoo, all you have to do now is find someone who uses a big stupid language and throw an example like above to their face and tell them to beat it. See if they can write it more elegantly using their language. The beauty of the trick is that there&#8217;s no way in this world that&#8217;s gonna happen. So, you&#8217;ve already won. One word of caution though. When taking an example take something slightly more complex than a single function call. Like opening a file. In both Ruby and Python it&#8217;s one function call. DON&#8217;T take this type of examples. Why? Because there&#8217;s a very high probability that the other person, yes, the one who&#8217;s using a big stupid language, will get so angry and beat you up. You don&#8217;t want this. So, avoid at all costs.</p>
<p>There you go. Do some good to the world by pissing off few people with this technique. It&#8217;s good for your karma too. Happy pissing!</p>
<p><strong>Update:</strong> Ok, I admit that I got a bit carried away with that example which made it artificial, hence sucked. When you write an SSL client using WSF/Ruby you only have to give the filename of the certificate, none of the certificate delimiter removal plus newline removal is necessary. But, I&#8217;ll keep the examples to keep the central theme in alignment. BTW, here&#8217;s the correct SSL client example with WSF/Ruby,</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">client = WSClient.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>
  <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;to&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span>  <span style="color:#996600;">&quot;/your/end/point&quot;</span>,
    <span style="color:#996600;">&quot;ca_cert&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;server.cert&quot;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>, logfile <span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p><strong>Update 2</strong>: Before it gets a bit out of hand, let me reiterate if it was not evident from the first reading. This whole thing was meant to be a joke. Don&#8217;t take it too seriously, have a laugh and return to you editors, grow some sense of humour for chrissake. Oh, one more thing, I&#8217;m no Erlang wiz. I&#8217;m just started to grok the Erlang landscape.</p>
]]></content:encoded>
			<wfw:commentRss>http://engwar.com/post/50/feed</wfw:commentRss>
		</item>
		<item>
		<title>Twiddle</title>
		<link>http://engwar.com/post/49</link>
		<comments>http://engwar.com/post/49#comments</comments>
		<pubDate>Mon, 25 Aug 2008 20:53:22 +0000</pubDate>
		<dc:creator>Chintana</dc:creator>
		
		<category><![CDATA[life]]></category>

		<guid isPermaLink="false">http://engwar.com/?p=49</guid>
		<description><![CDATA[Grimness of the sound was just not giving in to the hot and gruesome night outside. Continuous screeches reassured that there were no one else but those little wanderers keeping everyone else company. Certainly a time when no like minded homo sapien step in. It was a definite cry for improvement, but no one would [...]]]></description>
			<content:encoded><![CDATA[<p>Grimness of the sound was just not giving in to the hot and gruesome night outside. Continuous screeches reassured that there were no one else but those little wanderers keeping everyone else company. Certainly a time when no like minded homo sapien step in. It was a definite cry for improvement, but no one would dare to walk up any alternative. As they know that&#8217;ll lead them no where but madness. Madness. Regaining conciousness for the n<sup>th</sup> time would open the doors for another exhilarating adventure. Adventures that sometimes frown upon on certain banalities.</p>
<p>Letting another big pale blue pattern to swing at its free will might not have been in the initial plan. Being grateful to the one who restrain is on the edge of its mind, certain not to be uttered; too afraid of seeing it shot down as a fallacy.</p>
]]></content:encoded>
			<wfw:commentRss>http://engwar.com/post/49/feed</wfw:commentRss>
		</item>
		<item>
		<title>Blue-pencil syndrome</title>
		<link>http://engwar.com/post/48</link>
		<comments>http://engwar.com/post/48#comments</comments>
		<pubDate>Sun, 24 Aug 2008 10:15:48 +0000</pubDate>
		<dc:creator>Chintana</dc:creator>
		
		<category><![CDATA[anonymity]]></category>

		<category><![CDATA[censorship]]></category>

		<category><![CDATA[jondo]]></category>

		<category><![CDATA[privoxy]]></category>

		<category><![CDATA[tor]]></category>

		<guid isPermaLink="false">http://engwar.com/?p=48</guid>
		<description><![CDATA[The length and breadth of the discussions about Internet anonymity could easily be found if you spend some time with google (&#8221;search&#8221;, as some folks would say). IMHO, it&#8217;s going to increase if the content that&#8217;s delivered to the doorsteps gets the blue-pencil treatment.
As the Steisand effect goes, anything that&#8217;s going to be censored on [...]]]></description>
			<content:encoded><![CDATA[<p>The length and breadth of the discussions about Internet anonymity could easily be found if you spend some time with google (&#8221;search&#8221;, as <a href="http://blogs.law.harvard.edu/doc/2008/08/18/is-yahoo-a-better-search-engine-than-google/">some folks would say</a>). IMHO, it&#8217;s going to increase if the content that&#8217;s delivered to the doorsteps gets the blue-pencil treatment.</p>
<p>As the <a href="http://en.wikipedia.org/wiki/Streisand_effect">Steisand effect</a> goes, anything that&#8217;s going to be censored on the intrawebs is going to get end up being more popular than it was. Blocking a website is so hard to do because there are multiple paths you can follow to get to it. With the addition of various censoring rules in different parts of the world, the number of anonymous proxies has also been increased. You could easily go through a chain of HTTP proxies without making any special alteration/configuration. You could do it in a few keystrokes using your browser. <a href="http://opennet.net/">An initiative</a> has been started to document worldwide censoring incidents and discuss the issues to great lengths.</p>
<p>With these censorships, the number of traffic anonymizing services has also been increased and they&#8217;re getting easier to use by the day. Speed of these services is also getting better as more people start using them to get through various censoring schemes and to be anonymous on the tubes. Good thing about these services is that even your ISP can&#8217;t tell what the hell you&#8217;re looking at. Bringing DNS blocking to its knees.</p>
<p>One such famous service is <a href="http://www.torproject.org/">TOR</a>. Apart from <a href="http://web.mit.edu/tabbott/www/papers/tor.pdf">some issues</a> TOR is having, it&#8217;s very popular and easy to use. Another service of similar nature is <a href="https://www.jondos.de/en/jondonym">JonDo</a>. Like TOR/<a href="http://www.privoxy.org/">Privoxy</a> it also relies on a separate proxy which runs on your machine which then encrypt and send all the data. Do use these services if you want to be anonymous or bypass Internet censorships but <a href="http://www.infoworld.com/article/07/09/10/Security-researcher-intercepts-embassy-passwords_1.html">make sure you do NOT send private/sensitive data off of it</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://engwar.com/post/48/feed</wfw:commentRss>
		</item>
		<item>
		<title>Drupal, amelioratory management</title>
		<link>http://engwar.com/post/47</link>
		<comments>http://engwar.com/post/47#comments</comments>
		<pubDate>Sat, 23 Aug 2008 03:48:05 +0000</pubDate>
		<dc:creator>Chintana</dc:creator>
		
		<category><![CDATA[drupal]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://engwar.com/?p=47</guid>
		<description><![CDATA[I&#8217;m going to take Drupal as an example during this post and outline some of the challenges of working on it with a loosely knit team.  One major problem with PHP based content management systems is that it&#8217;s PHP.  So, anyone who have taken the time to stare at some code snippets could [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to take <a href="http://drupal.org/">Drupal</a> as an example during this post and outline some of the challenges of working on it with a loosely knit team.  One major problem with PHP based content management systems is that it&#8217;s PHP.  So, anyone who have taken the time to stare at some code snippets could modify, say, the user module (in Drupal) and get his changes displayed (assuming that&#8217;s what he wanted in the first place).  As a side note, <a href="http://www.php.net/manual/en/">PHP Manual</a> is all you need to learn about PHP.  This was a much criticized fact for Ruby, lack of freely accessible up-to-date documentation.  Although situation is improving as the <a href="http://ruby-doc.org/">ruby-doc</a> project gained more momentum. Any &#8220;teach yourself how to clean dog poop in 24 hours&#8221; guides are useless because it&#8217;ll take <a href="http://www.norvig.com/21-days.html">10 years to learn howto program</a> effectively.</p>
<p>Coming back to Drupal, this issue of having the freedom to modify anything &#8216;cos it&#8217;s all PHP should really not be an issue but experience suggest otherwise.  Having restricted access to Drupal core files is also of limited success. Remember, I&#8217;m not talking from an outsiders perspective where you worry about world readable files and whatnot, this is from the developer perspective who has full control over making a code level change. A set of people maintaining the site doing continuous modifications.</p>
<p>If you&#8217;re just running Drupal as a blog and you&#8217;re the only one who makes changes to it, then there are no issues. In a team environment sometimes you assume that something like a change to a core file should not be done unless you have 1) googled 2) RTFM (thrice) and there&#8217;s no other way to do it, but surprisingly people overlook this fact and do change the stuff that should not be changed. Usually these kind of shit happens when you cut your software engineering lectures and go collecting meadow muffins on perfectly bright and sunny days. </p>
<p>Close examination suggest legitimate reasons such as,</p>
<ol>
<li>It&#8217;s easy to customize, say, <code>include/common.inc</code> rather than reading the API doc, which is comparatively harder and takes more time</li>
<li>Naming conventions. <code>common.inc</code>. &#8220;I need to display the top most blah blah blah nodes on these set of pages, it&#8217;s a common feature to all these so <code>common.inc</code> is the right place to do it&#8221;.</li>
<li>You do need to get something displayed, quickly, you know it&#8217;s not the right way to do it but since time is more important you decide to change a line in a core module which is trivial.</li>
</ol>
<p>All goes well for a couple of years until someone else takes over and use the universal language to communicate with your entire genealogy.</p>
<p>Those 10 second hack jobs will stack up with time and by the time shit hits the fan, no amount of version control could save you. Problems arise when you have to update your CMS. Files such as <code>common.inc</code> belongs to the Drupal core and will be updated. So if you have modifications in those files you now have to get those to the system. If you&#8217;re really unlucky and the API has changed now you have to substitute the new functions. This will become tedious when you have to go through each and every file to see what has been added/modified. Things get more vexing if you have nodes embedded with PHP code. These are nodes with Input type PHP.  If the API has changed now you have to go through those pages and see what breaks.</p>
<p>So what are the possible solutions for this mussed up state of affairs?</p>
<ol>
<li>Making it hard to modify the core files which will be replaced during an upgrade.</li>
<li>Enforce an internal policy regarding the modifications so that changes happen in either the theme used or in a separate module.</li>
</ol>
<p>Making everyone aware of the extension mechanisms available and doing changes in a disciplined manner will save you when you have to upgrade. Also this will make the life of the <a href="http://c2.com/cgi/wiki?MaintenanceProgrammer">maintenance programmer</a> easier. This does have one drawback. Turnaround times for features/changes will now take a bit more time than earlier but the big upside is the whole thing could be rapidly updated (if there&#8217;s a security vulnerability or a newer version have a killer feature, makes it faster etc&#8230;) and someone else could take over without much effort.</p>
]]></content:encoded>
			<wfw:commentRss>http://engwar.com/post/47/feed</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.845 seconds -->
<!-- Cached page served by WP-Cache -->
