<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Libel</title>
	<atom:link href="http://ayaz.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ayaz.wordpress.com</link>
	<description>Linux enthusiast and Mac fan, ranting and raving about technical stuff!</description>
	<lastBuildDate>Thu, 26 Jan 2012 23:23:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ayaz.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Libel</title>
		<link>http://ayaz.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ayaz.wordpress.com/osd.xml" title="Libel" />
	<atom:link rel='hub' href='http://ayaz.wordpress.com/?pushpress=hub'/>
		<item>
		<title>iPad</title>
		<link>http://ayaz.wordpress.com/2012/01/15/ipad/</link>
		<comments>http://ayaz.wordpress.com/2012/01/15/ipad/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 12:54:16 +0000</pubDate>
		<dc:creator>ayaz</dc:creator>
				<category><![CDATA[Advice]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[Mobiles]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[Sony Ericsson]]></category>

		<guid isPermaLink="false">http://ayaz.wordpress.com/?p=483</guid>
		<description><![CDATA[I own a Nokia E72 mobile phone. While I have not owned mobile phones longer than five years, I have in that time span been through two mobile brands. My very first mobile phone, gifted to me by father when I was early on in the University, properly convinced that I didn&#8217;t need a mobile [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=483&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I own a Nokia E72 mobile phone. While I have not owned mobile phones longer than five years, I have in that time span been through two mobile brands. My very first mobile phone, gifted to me by father when I was early on in the University, properly convinced that I didn&#8217;t need a mobile phone, was a Sony Ericsson. It was a small mobile phone, the name of which escapes me now. I may still have it, somewhere, in some drawers, lost but not forgotten. I used it until it nearly died out. The engravings on the buttons grew muddled, colour on the handset faded out, the battery dead, replaced and dead again, etc. It would be safe to say, in hindsight, that I used it heavily.</p>
<p>My second mobile phone was another Sony Ericsson. It was the first mobile phone I bought. I was immensely excited the night I bought it, on way from work. The excitement of buying a new gadget is one that doesn&#8217;t ever diminish in its intensity, never goes away, no matter how many gadgets you buy. It is there right around the time you decide to buy a new gadget, and lasts well until after you&#8217;ve bought it. That was my second Sony Ericsson phone, and would be my last.</p>
<p>After I had made heavy use of it, I slowly moved away from it over to Nokia. I had a mammoth but reliable Nokia E61 lying around, which I was using for testing Symbian applications. Yes, this was roughly the time when I worked on Symbian application development. And that is all I am going to say of it.</p>
<p>My fourth and current mobile phone is a successor to E61: Nokia E72. I loved that phone when I bought it. I still love it in some ways. While E61 could be said to be too, E72 is what you would call a proper smart-phone. It features a lot of things that could help you do all sorts of things on the Internet, besides the usual functions of phone. It also has a full QWERTY keyboard. While I had owned an iPod Touch, I&#8217;d not been a big fan of touch screen and touch phones. I strongly believed that I could never be able to reliably use a phone with touch screen as the only form of input. This bias was in part due to my reliance on and affinity for physical QWERTY keyboards on phones.</p>
<p>Over the past couple of months, I was growing a little frustrated with my E72. While it worked as anyone would expect of it, I found that as far as applications that let me run wild on the Internet were concerned, it was severely limited. Sure, there were applications to do anything from using Facebook to Twitter to Foursquare. But I felt stifled. There were browsers but I didn&#8217;t feel the urge to browse anything on my mobile, unless it was an absolute emergency. I could post tweets on Twitter, but I didn&#8217;t enjoy interacting with others&#8217; tweets. The same could be said of my experiences with Facebook (as far as I can tell, there is no native, official application for Facebook from Facebook for Symbian S60) or Foursquare applications. It just wasn&#8217;t fun, or even comfortable.</p>
<p>So for the past couple of months, I had been strictly debating getting an iPhone. iPhone 4S was out by then and it made no sense to get anything below that model. Some friends suggested time and again to go for the iPad instead. Where I was almost convinced that iPhone 4S would be my fifth phone, the recommendations for iPad threw my mind back in a state of confusion. Naturally, I compared the pros and contrasted the cons of both devices. Of course, one is a phone, the other a tablet, but when I compared the iPhone to the iPad, I actually compared it with iPad and my E72. That is, if I were to get an iPad, I would continue to use my E72 for the phone needs. There was a big difference in price as well, with a factory unlocked iPhone 4S coming at an exorbitant 67k PKR locally, while an iPad2 with WiFi cost only 48k PKR.</p>
<p>I still remember clearly the night I was at the club on the courts, playing tennis with my partner. He had finally bought the iPhone 4 a day before, after having looked for the white one for under a week. That night, I came home, and finally made up my mind.</p>
<p>The next afternoon, I was at the Apple Store I regularly buy from, purchasing an iPad2 WiFi with 16GB disk space. I had decided it. As I would find out, it was one of the best decisions I had made in my life in a while.</p>
<p>Those familiar with the different iPad2 models available will know that there&#8217;s a WiFi + 3G one available. Apart from having to pay under 10k PKR more, the main reason why I decided against getting the 3G model was the unavailability of 3G in the country. I know that you don&#8217;t necessarily have to have 3G to be able to use the connection, because any type of data-plan from your provider, such as GPRS or EDGE, will work. However, as I will explain, iPad is a content consumption device. When I say that it is a content consumption device, I mean it in a massive way. It has been designed for consuming a lot of content, including in the form of video, audio, and text. When I decided to buy it, I imagined myself using the iPad like I do my laptop. And I can&#8217;t ever imagine using my laptop over EDGE/GPRS in a way that satisfies me. Similarly, I didn&#8217;t think the iPad would shine on an EDGE/GPRS connection.</p>
<p>In the next post, I will explain exactly how the arrival of iPad has changed my life, how it has affected it, how I use it, where and when I use it. I will also list down the wonderful apps I use frequently, and make an argument for iPad being an awesome device for reading books/content in particular.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ayaz.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ayaz.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ayaz.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ayaz.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ayaz.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ayaz.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ayaz.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ayaz.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ayaz.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ayaz.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ayaz.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ayaz.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ayaz.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ayaz.wordpress.com/483/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=483&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ayaz.wordpress.com/2012/01/15/ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/76f20b8617dae404a1fc420530da594c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ayaz</media:title>
		</media:content>
	</item>
		<item>
		<title>A look at the year that went by!</title>
		<link>http://ayaz.wordpress.com/2012/01/01/a-look-at-the-year-that-went-by/</link>
		<comments>http://ayaz.wordpress.com/2012/01/01/a-look-at-the-year-that-went-by/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 20:20:14 +0000</pubDate>
		<dc:creator>ayaz</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[2011]]></category>
		<category><![CDATA[New year]]></category>

		<guid isPermaLink="false">https://ayaz.wordpress.com/?p=481</guid>
		<description><![CDATA[There is little at least, if not a lot, to be gained from having an optimistic outlook towards life. I&#8217;ll be honest when I say I haven&#8217;t ever believed that entirely in my life. But from being pessimistic and negative for the most part, I&#8217;ve come to realise painfully the absence of optimism and how [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=481&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There is little at least, if not a lot, to be gained from having an optimistic outlook towards life. I&#8217;ll be honest when I say I haven&#8217;t ever believed that entirely in my life. But from being pessimistic and negative for the most part, I&#8217;ve come to realise painfully the absence of optimism and how much it has the potential to scar you emotionally. It would also be wrong to say that it doesn&#8217;t hurt to be optimistic. Disappointment from something you had strong hopes for, can hurt you in a very real way. But, that is a price you can usually afford to pay. </p>
<p>Lying in bed, trying to think of what if anything phenomenal I accomplished throughout the year that is no more I am forced to draw nothing. I can&#8217;t remember anything significant I did. That doesn&#8217;t mean I didn&#8217;t do anything worthwhile or significant to any extent. I just can&#8217;t remember. It&#8217;s probably due to the cracking headache I&#8217;m having. I don&#8217;t know.</p>
<p>The year passed by so quick, it&#8217;s hard to say where it went. I&#8217;m not the kind of person, as much as I try to be otherwise, who makes clear, real goals and lives by them. That doesn&#8217;t mean I&#8217;ve no goals. I do. I&#8217;m just not obsessed with the whole goal-setting thing. Although a lot of times I think that things around me simply unfold themselves, and I naturally flow through them. </p>
<p>Work wise, this was the year where I tackled many different projects, of varying complexities and sizes. I learned a lot of new things. Of import were my exercises in finding ways to deploy both Django and web.py Python frameworks on IIS on Windows. I went on to write a guide to deploying web.py on IIS which got accepted into the official cookbook documentation for the web.py project. </p>
<p>Insofar as tech gadgets are concerned, I was lucky enough to upgrade to the high-end Apple&#8217;s MacBook Pros, especially since my previous MacBook had developed several faults. Very late in the year I made what was perhaps the best decision in terms of buying anything when I bought the iPad2. It would be an understatement to say that it has had an impact on my life. The iPad has had a phenomenal impact on my life. If it is any testament to that statement, I&#8217;m writing this post on the Elements app on the iPad and will publish it using the WordPress app. I&#8217;m so glad I made the decision to buy it after much deliberation. </p>
<p>This year saw a lot by way of reading. I bought more books in paperback and committed myself to reading more. Not only that, I also forced myself to reading, daily, two dozen different interesting feeds. With the coming of the iPad, my reading saw an exponential increase, not only in the form of ebooks but many online feeds and content sources. A man must read, in order to survive. I believe strongly in that. </p>
<p>On the personal side, there were certain events that shook my life. It didn&#8217;t affect anyone&#8217;s but my own life, but they had a huge impact on me, and not sadly in positive ways. My emotional self took a battering. I also played a small part in helping save a friend&#8217;s life from half way across the globe. Thankfully, this year saw family bonds getting a little stronger, which I am very grateful for. </p>
<p>With regards to tennis, this was a great year for me. My game improved by leaps and bounds and I played some of the best tennis of my life. I have been more and more in love with tennis every passing day. Sometimes I think that that is the only true love left in my life.</p>
<p>All in all, I can&#8217;t say that the year was bad for me, nor would I want to say it was great. It was a balanced mix of both good and bad. Regardless, I&#8217;m thankful for everything and everything. I&#8217;ve been blessed beyond what I care to realise. You only need look at someone less fortunate than yourself to realise what you have been given. I do that almost everyday. And I feel bad about those severely less fortunate in particular. Yet I&#8217;m also guilty of forcing myself in a bubble at times that hides away the outside from me. I should always realise. I should always be grateful.</p>
<p>My best wishes to each and everyone of you. Please stay safe and be well! A very happy new year to you.</p>
<p>Thank you!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ayaz.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ayaz.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ayaz.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ayaz.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ayaz.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ayaz.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ayaz.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ayaz.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ayaz.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ayaz.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ayaz.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ayaz.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ayaz.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ayaz.wordpress.com/481/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=481&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ayaz.wordpress.com/2012/01/01/a-look-at-the-year-that-went-by/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/76f20b8617dae404a1fc420530da594c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ayaz</media:title>
		</media:content>
	</item>
		<item>
		<title>Batman Arkham City on XBox 360</title>
		<link>http://ayaz.wordpress.com/2011/12/29/batman-arkham-city-on-xbox-360/</link>
		<comments>http://ayaz.wordpress.com/2011/12/29/batman-arkham-city-on-xbox-360/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 14:41:14 +0000</pubDate>
		<dc:creator>ayaz</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Regrets]]></category>
		<category><![CDATA[Batman Arkham City]]></category>
		<category><![CDATA[xbox 360]]></category>

		<guid isPermaLink="false">http://ayaz.wordpress.com/?p=476</guid>
		<description><![CDATA[I&#8217;m what you can safely call a hardcore gamer. My stretch with gaming goes a long way, starting from a measly Atari computer dad bought me from abroad, migrating to PC gaming, and eventually shifting to the world of consoles leaving behind PC gaming forever. I have owned a little less than half a dozen [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=476&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m what you can safely call a hardcore gamer. My stretch with gaming goes a long way, starting from a measly Atari computer dad bought me from abroad, migrating to PC gaming, and eventually shifting to the world of consoles leaving behind PC gaming forever. I have owned a little less than half a dozen gaming consoles, played on others at friends&#8217; places. The most games I&#8217;ve ever played on a single console would have to be Sony&#8217;s PlayStation. It was the first PlayStation that came out. The sheer amount of games I played on it and clocked is just sheer. I couldn&#8217;t remember how many even if I forced myself to.</p>
<p>When younger brother sold our PlayStation 2 to buy an acoustic guitar to further his interest in music, my gaming world came to an abrupt halt. For a while after that, I didn&#8217;t really play games. It was well after I had started earning that I finally decided to revive my former, dormant self, and went out to buy the XBOX 360. To date, it is the console I have been happily playing games away. And I love it.</p>
<p>A week or so ago, I updated the firmware on the XBOX to the latest one available and got my hands to half a dozen games. Some that I&#8217;d care to name are: Batman Arkham City, Gears Of Wars 3, Skyrim, and Fifa 2012. Of particular interest to me was Batman Arkham City. It was one game I had been eagerly anticipating and looking forward to playing.</p>
<p>Half an hour into the game, I instantly fell in love with it. Everything about it. The gameplay in particular reminded me that of Assassin&#8217;s Creed 2, another game I thoroughly enjoyed playing. I was also very happy to learn that the game featured a very long story line. I saw myself having fun for a while with this game.</p>
<p>Until something hideous happened. It went on like this. I had the game installed on the hard-disk, so as to be able to preserve the lens on the XBOX. When I first ran the game, I decided to store saved game progress on the hard-disk as well. It all went fine. Until I had to take my XBOX over to a friend&#8217;s house for a game night. There we had to remove Batman from the hard-disk to make room for another game. I suspected deleting the game might also remove the saved progress on the disk, but on the assurances of friends, I took the bullet. The next day when I sat about playing Batman at home, I was taken aback to find that my saved progress on the game was gone. Zilch. Poof. There was nothing, as though there had never been anything. I felt incredibly sad. I blamed losing saved progress on the process on the deletion of the game from the disk&#8211;though, logically such a blame didn&#8217;t make sense.</p>
<p>Dejectedly, I sat about playing the game from the start, this time making sure to save progress on the memory card. I played over a couple of days, reached where I had left off, and moved ahed, happy with my progress.</p>
<p>This morning when I ran the game, I felt the exact same horror I did last week. The saved progress was gone again. It was nowhere to be found on the memory card. I searched everywhere, to no avail. I didn&#8217;t know what happened that could have caused it this time around. I yanked out the memory card and slid it into the second memory bay. Nothing. It was gone, without a trace. I felt betrayed. I let the game linger on the start screen, contemplating whether I should start over again. I couldn&#8217;t make up my mind.</p>
<p>And then on a whim, I ran a search on google to see if I could find any information on this erratic behaviour. Voila, I did. Many others on XBOX had reported similar issues as well as their resentment over them. <a href="http://t.co/DaLiWVc3">This is the search I ran</a>.</p>
<p>As far as I bothered to sift through piles of posts on forums and articles over the web, I couldn&#8217;t find any resolution for the problem. If anything it helped me come to a temporary decision: to hold off on playing the game again until a workable solution is found. Holding off isn&#8217;t something easy to do. It is such an awesome game, and I so much want to play it through the end. Oh well, off to play Skyrim!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ayaz.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ayaz.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ayaz.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ayaz.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ayaz.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ayaz.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ayaz.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ayaz.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ayaz.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ayaz.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ayaz.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ayaz.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ayaz.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ayaz.wordpress.com/476/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=476&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ayaz.wordpress.com/2011/12/29/batman-arkham-city-on-xbox-360/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/76f20b8617dae404a1fc420530da594c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ayaz</media:title>
		</media:content>
	</item>
		<item>
		<title>Mercurial: Merging changes from an untracked copy.</title>
		<link>http://ayaz.wordpress.com/2011/10/14/mercurial-merging-changes-from-an-untracked-copy/</link>
		<comments>http://ayaz.wordpress.com/2011/10/14/mercurial-merging-changes-from-an-untracked-copy/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 07:30:06 +0000</pubDate>
		<dc:creator>ayaz</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Mercurial]]></category>
		<category><![CDATA[BitBucket]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://ayaz.wordpress.com/?p=470</guid>
		<description><![CDATA[One of our project that is tracked using Mercurial and hosted remotely on BitBucket.org presented us with a version control conundrum we had not faced. This post is dedicated to describing the problem and one particular solution of it. The project in question is being tracked using Mercurial and has a history to it. By [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=470&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of our project that is tracked using Mercurial and hosted remotely on BitBucket.org presented us with a version control conundrum we had not faced. This post is dedicated to describing the problem and one particular solution of it.</p>
<p>The project in question is being tracked using Mercurial and has a history to it. By history, I refer to a set of change-sets (or commits, if you are a Git user not familiar with the use of change-sets to refer to commits). We had a user, let&#8217;s call them User A for the sake of clarity, who downloaded the source of the project at a particular change-set. Let&#8217;s call that change-set &#8216;Change-set X&#8217;. Note that User A didn&#8217;t clone the project repository and go back to Change-set X. They used the &#8216;get source&#8217; convenience feature on BitBucket which makes possible downloading only the source of the project as it looks at a particular change-set or the tip of the repository (by tip, I refer to the last change-set recorded by the project). So, this User A got the source on their local system, and made some changes to the source. They unfortunately did all this without actually tracking the source under Mercurial, or any other version contorl system, for that matter.</p>
<p>Let&#8217;s introduce User B. User B is another contributor on the project. However, they have a clone of the repository on their local machine, and contribute changes and additions through their tracked working copy. User B committed and pushed several changes since Change-set X. All these changes were visible on the remote repository on BitBucket for the project. Now is when the problem came to be about. Both User A and User B now wanted the changes User A made to their private, untracked copy to be merged and pushed to the remote repository, so that they were available to User B. How do they go about doing it?</p>
<p>The biggest hurdle here was that the copy User A had wasn&#8217;t tracked under Mercurial at all. That meant that it had no history, nothing of the sort. It just wasn&#8217;t being tracked.</p>
<p>I thought about this. After much thinking, I came to a plan that I thought would be worth giving a go at. The plan was like this. First of all, User A had to initialize a Mercurial repository on the local copy that they had made changes to. This would create a new repository. Next, they had to push the changes upstream to the remote repository on BitBucket. However, when they did that, Mercurial aborted, and complained about the local repository being unrelated to the remote repository. Having looked around for what that really meant, I found out that Mercurial complained in that tone whenever the root or base change-set on two repositories were missing or different. This was indeed the case here. However, reading the help page for the &#8220;hg push&#8221; command, I noticed the &#8220;&#8211;force, -f&#8221; switch, with a note that said that this could be used to force push to an unrelated repository. For what it&#8217;s worth, the forced push worked, in that, it was able to push the changes on to the remote repository. It did mess the history and the change-set time-line a bit, because the change-sets from User&#8217;s A copy had a different base and parent than those that were on the tip on the remote repository. As far as User B was concerned, when they pulled the latest changes from the repository, they had two dangling heads to deal with and had to merge. The merge resulted in a lot of unresolved files with marked conflicts. Since I wasn&#8217;t familiar with the changes in the project, I didn&#8217;t pursue User B (and User A) after this point.</p>
<p>While wondering what could be a better way to handle this situation, I posed the question on the #mercurial IRC channel on FreeNode. User &#8220;krigstask&#8221; was kind enough to provide a solution. His solution went like this. User A would clone the remote repository on their local machine.</p>
<pre>$ hg clone URL cloned-repo</pre>
<p>They would then jump back to Change-set X.</p>
<pre>$ cd cloned-repo
$ hg update -C change-setX</pre>
<p>They would copy recursively the changes from their local, untracked copy of the repo into their working copy.</p>
<pre>$ cp -r /path/to/local/untracked/repo/* .</pre>
<p>They would go through the diffs to ensure their changes are there.</p>
<pre>$ hg diff</pre>
<p>They would commit their changes.</p>
<pre>$ hg commit</pre>
<p>Finally, they would merge their commit with the tip of the repo.</p>
<pre>$ hg merge</pre>
<p>In hindsight, this is a cleaner approach that actually works. I wondered why it didn&#8217;t cross my mind when I was thinking about a solution. Many thanks to &#8220;krigstask&#8221; for taking the time out to explain this approach to me.</p>
<p>I hope I was able to provide something helpful for my version control readers in particular and everyone else in general.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ayaz.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ayaz.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ayaz.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ayaz.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ayaz.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ayaz.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ayaz.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ayaz.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ayaz.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ayaz.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ayaz.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ayaz.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ayaz.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ayaz.wordpress.com/470/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=470&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ayaz.wordpress.com/2011/10/14/mercurial-merging-changes-from-an-untracked-copy/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/76f20b8617dae404a1fc420530da594c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ayaz</media:title>
		</media:content>
	</item>
		<item>
		<title>There is more to life than &#8230;</title>
		<link>http://ayaz.wordpress.com/2011/08/12/there-is-more-to-life-than/</link>
		<comments>http://ayaz.wordpress.com/2011/08/12/there-is-more-to-life-than/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 07:16:36 +0000</pubDate>
		<dc:creator>ayaz</dc:creator>
				<category><![CDATA[Advice]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Rebuttals]]></category>
		<category><![CDATA[epiphany]]></category>
		<category><![CDATA[life]]></category>

		<guid isPermaLink="false">http://ayaz.wordpress.com/?p=464</guid>
		<description><![CDATA[I came across this short but extremely powerful post on the gapingvoid blog. It not only moved me but forced me to question myself, to ask myself what is it that I&#8217;ve done in my life. I thought it needed to be reproduced in full here, with proper attribution. To paraphrase Seneca, the tragedy isn’t [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=464&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I came across this short but extremely powerful <a href="http://gapingvoid.com/2011/08/05/more-to-life/">post</a> on the <a href="http://gapingvoid.com/">gapingvoid</a> blog. It not only moved me but forced me to question myself, to ask myself what is it that I&#8217;ve done in my life. I thought it needed to be reproduced in full here, with proper attribution.</p>
<blockquote><p>To paraphrase Seneca, the tragedy isn’t that life is short, the tragedy is that we waste so much of it.</p>
<p>The other types of tragedy, the more violent kind, never worry me too much, thankfully. I never lost much sleep, worrying about wars or serial killers or whatever.</p>
<p>But the thought of getting to the end of my life and realizing that I had wasted most of it, that froze my blood.</p>
<p>As it should…</p></blockquote>
<p>To this day, I remember that day in the summers of 2008 when I decided to pack and seal my laptop inside my cupboard, and board a one-way plane to Quetta to spend a month with relatives away from everything I did at home, far, far away from any form of technology. All I had when I reached the airport were a bag full of clothes, a book, and my cellphone (I decided to carry so that I could keep in touch with parents).</p>
<p>One month later when I returned, I had an incredibly painful realization dawn on me. I felt I had wasted an entire month of my life doing absolutely nothing. I thought of all the ways in which I could&#8217;ve spent that month that would&#8217;ve meant something meaningful to me, or of all the productive things I could&#8217;ve done that would&#8217;ve helped me and/or my never ending quest for knowledge and for doing things that matter. I couldn&#8217;t come to terms with the fact that I had wasted over thirty days, doing nothing more than resting, reading a book that was purely fiction, and socializing with limited relatives.</p>
<p>People take breaks, vacations, to cut themselves away from their hectic lives in order to refresh themselves, to revitalize themselves, to save themselves from the risk of burning out. When they come back to their lives after such breaks, they feel energized  and ready to again take on the mountains that lay before them.</p>
<p>I took a vacation, I took a break. I took rest, I cut myself away from technology, from the usual things that made up my hectic life. But when I came back, I didn&#8217;t feel energized. I didn&#8217;t feel revitalized. I felt regret. I felt slow and lethargic. I felt angry at myself for having wasted so much time doing nothing.</p>
<p>To this day, I live with that regret. I understand that regrets are harmful and best thrown away, but that&#8217;s one of those things that are easier said than done.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ayaz.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ayaz.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ayaz.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ayaz.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ayaz.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ayaz.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ayaz.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ayaz.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ayaz.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ayaz.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ayaz.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ayaz.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ayaz.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ayaz.wordpress.com/464/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=464&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ayaz.wordpress.com/2011/08/12/there-is-more-to-life-than/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/76f20b8617dae404a1fc420530da594c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ayaz</media:title>
		</media:content>
	</item>
		<item>
		<title>Guide: Deploying web.py on IIS7 using PyISAPIe</title>
		<link>http://ayaz.wordpress.com/2011/05/14/guide-deploying-web-py-on-iis7-using-pyisapie/</link>
		<comments>http://ayaz.wordpress.com/2011/05/14/guide-deploying-web-py-on-iis7-using-pyisapie/#comments</comments>
		<pubDate>Sat, 14 May 2011 13:16:42 +0000</pubDate>
		<dc:creator>ayaz</dc:creator>
				<category><![CDATA[django]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Rebuttals]]></category>
		<category><![CDATA[Regrets]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[IIS7]]></category>
		<category><![CDATA[PyISAPIe]]></category>
		<category><![CDATA[web.py]]></category>

		<guid isPermaLink="false">http://ayaz.wordpress.com/?p=446</guid>
		<description><![CDATA[I spent the last week travailing away, trying to painfully find a way to deploy a web.py based API on IIS7 using PyISAPIe. As frustrations had begun to mount up, I had nearly decided to give up. Being a die-hard Linux and Mac guy, I despise having to work on Windows. Here I was, not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=446&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I spent the last week travailing away, trying to painfully find a way to deploy a <a href="http://webpy.org/">web.py</a> based API on IIS7 using <a href="http://sourceforge.net/apps/trac/pyisapie">PyISAPIe</a>. As frustrations had begun to mount up, I had nearly decided to give up. Being a die-hard Linux and Mac guy, I despise having to work on Windows. Here I was, not only forced to work on Windows, but to find a solution for a problem that left no leaves unturned in its effort to drive me crazy. As if someone decided all this misery wasn&#8217;t quite enough, I had to work with a remote desktop session in order to research, tweak, bang my head, and get things to work. Eventually, I cut through massive frustration and despair, managing to find a satisfactory solution. I almost danced in excitment and relief, letting out all sorts of expletives directed at Windows in general and IIS in particular. </p>
<p>To get back to the important question of deploying a <code>web.py</code> script on IIS7 using PyISAPIe, I will make it such that this guide will list down various steps I took, including snippets of relevant code I changed, to tame the beast. I can only hope that what is below will help a poor, miserable soul looking for help as I did (and found none). </p>
<p>I worked with PyISAPIe because I had successfully deployed multiple Django websites on IIS7 on it. The script in question was going to be a part of another Django website (though acting independently). It only made sense to use PyISAPIe for it as well. </p>
<p>First and foremost, I had to install the <code>web.py</code> module on the system. Having had trouble before with IIS with <code>web.py</code> installed through <code>easy_install</code>, I decided to be safe and installed it from source.. Getting <code>web.py</code> to work with PyISAPIe required a small hack (I notice I may make it sound as though it all came down to me in a dream, but in reality, it took me days to figure it out, and clearly after much anguish and pain). In the file <code>Lib\site-packages\web\wsgi.py</code> lies the following function: </p>
<p><pre class="brush: python;">
def _is_dev_mode():
    # quick hack to check if the program is running in dev mode.
    if os.environ.has_key('SERVER_SOFTWARE') \
        or os.environ.has_key('PHP_FCGI_CHILDREN') \
        or 'fcgi' in sys.argv or 'fastcgi' in sys.argv \
        or 'mod_wsgi' in sys.argv:
            return False
    return True
</pre></p>
<p>In its pristine state, when <code>web.py</code> is imported from a source file through PyISAPIe, an exception is thrown. The exception, while I don&#8217;t have the exact message, is about it complaining about <code>sys.argv</code> not having an attribute <code>argv</code>, which reads fishy. Since the function <code>_is_dev_mode()</code> only checks whether <code>web.py</code> is being run in development mode, I thought I didn&#8217;t care about it since I wanted everything to run in production mode. I edited the function such that its body would be bypassed, while it returned a <code>False</code> boolean value. It looked like this (the important changes I made are highlighted):</p>
<p><pre class="brush: python; highlight: [2];">
def _is_dev_mode():
    return False
    # quick hack to check if the program is running in dev mode.
    if os.environ.has_key('SERVER_SOFTWARE') \
        or os.environ.has_key('PHP_FCGI_CHILDREN') \
        or 'fcgi' in sys.argv or 'fastcgi' in sys.argv \
        or 'mod_wsgi' in sys.argv:
            return False
    return True
</pre></p>
<p>This innocuous little addition did away with the exception.</p>
<p>Next up, I used default Hello World-esque example of <code>web.py</code> found on their site to test the deployment (of course, I went on to use my original API script, which was far too complex to trim down and fit into as an example). I called it <code>code.py</code> (I placed it inside the folder <code>C:\websites\myproject</code>). It looked like this:</p>
<p><pre class="brush: python; highlight: [8];">
  import web
  urls = (
      '/.*', 'hello',
      )
  class hello:
      def GET(self):
          return &quot;Hello, world.&quot;
  application = web.application(urls, globals()).wsgifunc()
</pre></p>
<p>It was pretty simple. You have to pay particular attention on the call to <code>web.application</code>. I called the <code>wsgifunc()</code> to return a WSGI-compatible function to boot the application. I prefer WSGI.  </p>
<p>I set up a website under IIS using the IIS Management Console. Since I was working on a 64-bit server edition of Windows and had chosen to use 32-bit version of Python and all modules, I made sure to enable 32-bit support for the application pool being used for the website. This was important. </p>
<p>I decided to keep the PyISAPIe folder inside the folder where <code>code.py</code> rested. This PyISAPIe folder contained, of import, the <code>PyISAPIe.dll</code> file, and the <code>Http</code> folder. Inside the <code>Http</code> folder, I placed the most important file of all: the <code>Isapi.py</code>. That file could be thought of as the starting point for each request that is made, what glues the Request to the proper Handler and code. I worked with the <code>Examples\WSGI\Isapi.py</code> available as part of PyISAPIe. I tweaked the file to look like this:</p>
<p><pre class="brush: python; highlight: [3,4,8,9,11,29];">
from Http.WSGI import RunWSGI
from Http import Env
#from md5 import md5
from hashlib import md5
import imp
import os
import sys
sys.path.append(r&quot;C:\websites\myproject&quot;)
from code import application
ScriptHandlers = {
	&quot;/api/&quot;: application,
}
def RunScript(Path):
  global ScriptHandlers
  try:
    # attempt to call an already-loaded request function.
    return ScriptHandlers[Path]()
  except KeyError:
    # uses the script path's md5 hash to ensure a unique
    # name - not the best way to do it, but it keeps
    # undesired characters out of the name that will
    # mess up the loading.
    Name = '__'+md5(Path).hexdigest().upper()
    ScriptHandlers[Path] = \
      imp.load_source(Name, Env.SCRIPT_TRANSLATED).Request
    return ScriptHandlers[Path]()
# URL prefixes to map to the roots of each application.
Apps = {
  &quot;/api/&quot; : lambda P: RunWSGI(application),
}
# The main request handler.
def Request():
  # Might be better to do some caching here?
  Name = Env.SCRIPT_NAME
  # Apps might be better off as a tuple-of-tuples,
  # but for the sake of representation I leave it
  # as a dict.
  for App, Handler in Apps.items():
    if Name.startswith(App):
      return Handler(Name)
  # Cause 500 error: there should be a 404 handler, eh?
  raise Exception, &quot;Handler not found.&quot;
</pre></p>
<p>The important bits to note in the above code are the following:</p>
<ul>
<li>I import <code>application</code> from my <code>code</code> module. I set the PATH to include the directory in which the file <code>code.py</code> is so that the <code>import</code> statement does not complain. (I&#8217;ve to admit that the idea of import <code>application</code> and feeding it into <code>RunWSGI</code> came to while I was in the loo.)</li>
<li>I defined a script handler which matches the URL prefix I want to associate with my <code>web.py</code> script. (In hindsight, this isn&#8217;t necessary, as the <code>RunScript()</code> is not being used in this example).</li>
<li>In the <code>Apps</code> dictionary, I again route the URL prefix to the <code>lambda</code> function which actually calls the `RunWSGI` function and feeds it <code>application</code>. </li>
<li>I also imported the <code>md5</code> function from the <code>hashlib</code> module instead of the <code>md5</code> module as originally defined in the file. This was because Python complained about <code>md5</code> module being deprecated and suggested instead of use <code>hashlib</code>. </li>
</ul>
<p>And that&#8217;s pretty much it. It worked. I couldn&#8217;t believe what I saw on the browser in front of me. I danced around my room (while hurling all kinds of expletives).</p>
<p>There&#8217;s a caveat though. If you have specific URLs in your <code>web.py</code> script, as I did in my API script, you will have to modify each of those URLs are add the <code>/api/</code> prefix to them (or whatever URL prefix you set in the <code>Isapi.py</code>. Without that, <code>web.py</code> will not match any URLs in the file.</p>
<p>What a nightmare! I hope this guide serves to help others. </p>
<p>Thank you for reading. Good bye!</p>
<p><i>PS: If you want to avoid using PyISAPIe, there is a simpler way of deploying web.py on IIS. It is documented crudely over <a href="http://forums.iis.net/t/1122937.aspx">here</a>.</i></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ayaz.wordpress.com/446/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ayaz.wordpress.com/446/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ayaz.wordpress.com/446/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ayaz.wordpress.com/446/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ayaz.wordpress.com/446/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ayaz.wordpress.com/446/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ayaz.wordpress.com/446/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ayaz.wordpress.com/446/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ayaz.wordpress.com/446/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ayaz.wordpress.com/446/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ayaz.wordpress.com/446/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ayaz.wordpress.com/446/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ayaz.wordpress.com/446/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ayaz.wordpress.com/446/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=446&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ayaz.wordpress.com/2011/05/14/guide-deploying-web-py-on-iis7-using-pyisapie/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/76f20b8617dae404a1fc420530da594c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ayaz</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting back inactive memory on Mac.</title>
		<link>http://ayaz.wordpress.com/2011/04/13/getting-back-inactive-memory-on-mac/</link>
		<comments>http://ayaz.wordpress.com/2011/04/13/getting-back-inactive-memory-on-mac/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 11:33:13 +0000</pubDate>
		<dc:creator>ayaz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Inactive memory]]></category>
		<category><![CDATA[purge]]></category>

		<guid isPermaLink="false">http://ayaz.wordpress.com/?p=440</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;OS X has the habit of keeping recently closed applications in memory so that if they are run again, they load quickly. The part of physical memory used for this purpose is called &#8220;Inactive memory&#8221;. The &#8220;System Memory&#8221; tab on the Activity Monitor application gives a break-down of the physical memory, including available free and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=440&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OS X has the habit of keeping recently closed applications in memory so that if they are run again, they load quickly. The part of physical memory used for this purpose is called &#8220;Inactive memory&#8221;. The &#8220;System Memory&#8221; tab on the Activity Monitor application gives a break-down of the physical memory, including available free and inactive memory. Because of the way OS X behaves, you may or may not notice your system running low on &#8220;free&#8221; memory every now and then. This discovery could perplex you, because despite being low on free memory, you can load applications and go about doing your work. This is possible because inactive memory can be released by the OS X kernel&#8217;s memory management subsystem on demand. If it finds that the system is running short on free memory, and the user has started an application that is not already loaded in inactive memory, it will gladly comply and release enough of inactive memory to be able to run the requested application.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I recently found a command line utility on OS X to release most of inactive memory. It is called, &#8220;purge&#8221;. The short description for &#8220;purge&#8221;, from its man page, states that its use forces the disk cache to be purged. The &#8220;disk  cache&#8221; actually refers to &#8220;inactive memory&#8221;. To run this command, you have to type &#8220;purge&#8221; on Terminal.app (or any other Terminal application that you use). For example:</p>
<p><code>(Ayaz@mbp) [0] [~]<br />
$ purge</code></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Before running the purge command, the memory breakdown on my system looked like: </p>
<p><img src="http://ayaz.files.wordpress.com/2011/04/screen-shot-2011-04-13-at-4-17-44-pm.png?w=594" alt="" /></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;After the purge command ran, inactive memory went from 858MB down to 270MB.</p>
<p><img src="http://ayaz.files.wordpress.com/2011/04/screen-shot-2011-04-13-at-4-17-59-pm1.png?w=594" alt="" /></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;You will notice that the system becomes a little unresponsive while purge is flushing the disk cache. That&#8217;s fine and nothing to worry about.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If you can&#8217;t find purge on your system, it could be because you have not installed XCode and accompanying development tools. These are available in one of the OS X installation discs. You can now also pay and download XCode from the Mac App Store. </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Have fun and be nice!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ayaz.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ayaz.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ayaz.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ayaz.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ayaz.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ayaz.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ayaz.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ayaz.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ayaz.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ayaz.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ayaz.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ayaz.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ayaz.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ayaz.wordpress.com/440/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=440&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ayaz.wordpress.com/2011/04/13/getting-back-inactive-memory-on-mac/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/76f20b8617dae404a1fc420530da594c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ayaz</media:title>
		</media:content>

		<media:content url="http://ayaz.files.wordpress.com/2011/04/screen-shot-2011-04-13-at-4-17-44-pm.png" medium="image" />

		<media:content url="http://ayaz.files.wordpress.com/2011/04/screen-shot-2011-04-13-at-4-17-59-pm1.png" medium="image" />
	</item>
		<item>
		<title>Get all public interface IPs on a system using Python</title>
		<link>http://ayaz.wordpress.com/2011/04/09/get-all-public-interface-ips-on-a-system-using-python/</link>
		<comments>http://ayaz.wordpress.com/2011/04/09/get-all-public-interface-ips-on-a-system-using-python/#comments</comments>
		<pubDate>Sat, 09 Apr 2011 06:19:37 +0000</pubDate>
		<dc:creator>ayaz</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[netaddr]]></category>
		<category><![CDATA[pyinetinfo]]></category>

		<guid isPermaLink="false">http://ayaz.wordpress.com/?p=431</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;I recently came across a requirement in a project where I had to, in Python, programmatically extract all available public IPs on available interfaces on the machine the code would run. I looked around and settled with the following snippet of code that uses the built-in, standard socket Python module: import socket ip_list = [ip [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=431&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I recently came across a requirement in a project where I had to, in Python, programmatically extract all available public IPs on available interfaces on the machine the code would run. I looked around and settled with the following snippet of code that uses the built-in, standard <code>socket</code> Python module:</p>
<p><code>import socket<br />
ip_list = [ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")]<br />
</code></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;While this piece of code does find a public IP listening on any of the available interfaces, its restriction lies in not being able to return all public IPs on interfaces: It gives back just one IP. </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This wasn&#8217;t clearly sufficient. I looked around again, and this time, found a third-party Python module called <a href="http://pypi.python.org/pypi/pynetinfo/">pynetinfo</a>. This module could make possible working with different network device settings.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I rearranged the code around <code>pynetinfo</code> and produced this:</p>
<p><code>def get_inet_ips():<br />
&nbsp;&nbsp;try:<br />
&nbsp;&nbsp;&nbsp;&nbsp;import netinfo<br />
&nbsp;&nbsp;except ImportError:<br />
&nbsp;&nbsp;&nbsp;&nbsp;return None<br />
&nbsp;&nbsp;else:<br />
&nbsp;&nbsp;&nbsp;&nbsp;inetIPs = []<br />
&nbsp;&nbsp;&nbsp;&nbsp;for interface in netinfo.list_active_devs():<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if not interface.startswith('lo'):<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ip = netinfo.get_ip(interface)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inetIPs.append(ip)<br />
&nbsp;&nbsp;&nbsp;&nbsp;return inetIPs<br />
</code></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The code above loops through all available and active interfaces on the system, fetching and storing their IP in a simple datastructure. That got me all of the IPs available to a machine, excluding the loopback one, which the code was set to discard.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;But that wasn&#8217;t it. There was a slight problem. Not all the active interfaces on the system had public IPs. Some had private, local LAN IPs in the <code>192.168.0.0/16</code> and <code>10.0.0.0/8</code> subnets. The code above was returning all the IPs it could find, including public and private ones. </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I then found the <a href="http://pypi.python.org/pypi/netaddr">netaddr</a> third-party Python module which provided a Pythonic means of manipulating network addresses. I modified my code to use the <code>netaddr</code> module and got the following to boot with:</p>
<p><code>def get_inet_ips():<br />
&nbsp;&nbsp;try:<br />
&nbsp;&nbsp;&nbsp;&nbsp;import netinfo<br />
&nbsp;&nbsp;&nbsp;&nbsp;from netaddr import IPAddress, AddrFormatError<br />
&nbsp;&nbsp;except ImportError:<br />
&nbsp;&nbsp;&nbsp;&nbsp;return None<br />
&nbsp;&nbsp;else:<br />
&nbsp;&nbsp;&nbsp;&nbsp;inetIPs = []<br />
&nbsp;&nbsp;&nbsp;&nbsp;for interface in netinfo.list_active_devs():<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if not interface.startswith('lo'):<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ip = netinfo.get_ip(interface)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ip_address = IPAddress(ip)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except AddrFormatError:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# If the IP is not private, use it.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if not ip_address.is_private():<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inetIPs.append(ip)<br />
&nbsp;&nbsp;&nbsp;&nbsp;return inetIPs<br />
</code></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The <code>netaddr.IPAddress.is_private()</code> method in the code above determines whether the given IP is part of any of the defined private networks. </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Admittedly, there is much room for improvement in the code above. I can only hope that if it doesn&#8217;t help, then at the very least it serves as an interesting read. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ayaz.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ayaz.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ayaz.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ayaz.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ayaz.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ayaz.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ayaz.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ayaz.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ayaz.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ayaz.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ayaz.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ayaz.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ayaz.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ayaz.wordpress.com/431/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=431&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ayaz.wordpress.com/2011/04/09/get-all-public-interface-ips-on-a-system-using-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/76f20b8617dae404a1fc420530da594c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ayaz</media:title>
		</media:content>
	</item>
		<item>
		<title>Converting a Git repo to Mercurial</title>
		<link>http://ayaz.wordpress.com/2011/02/10/converting-a-git-repo-to-mercurial/</link>
		<comments>http://ayaz.wordpress.com/2011/02/10/converting-a-git-repo-to-mercurial/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 07:33:57 +0000</pubDate>
		<dc:creator>ayaz</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Mercurial]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[BitBucket]]></category>
		<category><![CDATA[ConvertExtension]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[SCM]]></category>

		<guid isPermaLink="false">http://ayaz.wordpress.com/?p=426</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;Until today, we had most of the projects on Mercurial repositories hosted on a Windows box in-house. The Mercurial web interface was set up to provide a convenient read-only access to both contributors and non-contributors within. However, the box in question was unreliable, and so was the Internet link it was alive on. And, in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=426&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Until today, we had most of the projects on <a href="http://mercurial.selenic.com/">Mercurial</a> repositories hosted on a Windows box in-house. The Mercurial web interface was set up to provide a convenient read-only access to both contributors and non-contributors within. However, the box in question was unreliable, and so was the Internet link it was alive on. And, in this world, there are few things more troublesome than having your source control server unavailable due to an unexpected downtime. </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;What&#8217;s special about today is that we moved most of our Mercurial repositories to <a href="http://bitbucket.org/">BitBucket.org</a>.  While they will remain private, the contributors as well as the internal non-contributors will be given access to them. Aside from having the repositories on a central server that we can mostly always rely on, having a lovely Web interface to browse and control the repositories, we also get useful goodies like issue trackers, wiki pages, and an easy user management interface. It is a win-win situation for everyone.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;One of the projects I was working on had only been on a local <a href="http://git-scm.com/">Git</a> repository. I started work on it at a time when I found myself deeply in love with Git. Since BitBucket is a Mercurial repository warehouse, I had to find a way to convert or migrate the Git repository into a Mercurial one. </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I looked around on the Web and found a lot of people recommending the use of the <a href="http://hg-git.github.com/">HgGit</a> plugin. As I understood it, this plugin made possible, among other things, the workflow that involved working on a Git repository and pushing the changesets to a Mercurial counterpart. However, the process of setting it up seemed rather complex to me. Plus, I didn&#8217;t want to keep the Git repository lying around when I was done with the migration. I wanted to be able to migrate the Git repository to a Mercurial one, push it upstream to BitBucket and make any changes in future in the source code by cloning from the Mercurial repository. What HgGit did seemed rather overkill for my needs.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I then discovered the Mercurial <a href="http://mercurial.selenic.com/wiki/ConvertExtension">ConvertExtension</a>. This extension did just what I wanted: Convert repositories from a handful different SCMs into Mercurial. The process of converting a Git (or any other repository) to a Mercurial one through ConvertExtension is very straightforward.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;As a first step, you are required to edit your global <code>.hgrc</code> file to enable the extension thus:</p>
<p><code><br />
[extensions]<br />
hgext.convert=<br />
</code></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;You are then required to run the <code>hg convert</code> command on your target Git repository thus:</p>
<p><code><br />
$ hg convert /path/to/git/repo<br />
</code></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This will migrate the Git repository, and store it in the current directory inside a directory named <code>repo-hg</code>. <em>Once inside the newly created Mercurial repository (and this part is important), you have to run the following command to checkout all the changesets</em>:</p>
<p><code><br />
$ hg checkout<br />
</code></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;You may then push the repository with the usual <code>hg push</code> to BitBucket. </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:)</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>PS: This <a href="http://davidwinter.me/articles/2009/10/17/convert-git-repository-to-mercurial/">blog post</a> really helped get me going in the right direction.</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ayaz.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ayaz.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ayaz.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ayaz.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ayaz.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ayaz.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ayaz.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ayaz.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ayaz.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ayaz.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ayaz.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ayaz.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ayaz.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ayaz.wordpress.com/426/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=426&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ayaz.wordpress.com/2011/02/10/converting-a-git-repo-to-mercurial/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/76f20b8617dae404a1fc420530da594c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ayaz</media:title>
		</media:content>
	</item>
		<item>
		<title>Browsing on the BlackBerry simulator</title>
		<link>http://ayaz.wordpress.com/2010/12/26/browsing-on-the-blackberry-simulator/</link>
		<comments>http://ayaz.wordpress.com/2010/12/26/browsing-on-the-blackberry-simulator/#comments</comments>
		<pubDate>Sun, 26 Dec 2010 16:58:54 +0000</pubDate>
		<dc:creator>ayaz</dc:creator>
				<category><![CDATA[Mobiles]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Rebuttals]]></category>
		<category><![CDATA[Regrets]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[BlackBerry EDS]]></category>
		<category><![CDATA[BlackBerry MDS]]></category>
		<category><![CDATA[BlackBerry Simulators]]></category>

		<guid isPermaLink="false">http://ayaz.wordpress.com/?p=422</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;I am not a big fan of BlackBerry smart-phones. I realize that there are a lot of people who can&#8217;t seemingly exist without access to their emails virtually all the time, and for those lot, BlackBerry, with its prominent push email feature, is perhaps a better fit than any other smart-phone platforms out there. When [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=422&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I am not a big fan of BlackBerry smart-phones. I realize that there are a lot of people who can&#8217;t seemingly exist without access to their emails virtually all the time, and for those lot, BlackBerry, with its prominent push email feature, is perhaps a better fit than any other smart-phone platforms out there. When it comes to me and my smart-phone usage, I would not go so far as to say that I can&#8217;t live without my phone. I can. By every measure, I consider myself a hardcore geek, perhaps more hardcore than most others, but I am by no means a gadget freak. While it will be unfair to say that I absolutely abhor typing on small (semi-) keyboards, I don&#8217;t also quite enjoy the experience. When it comes down to typing, I would much rather prefer a full-fledged keyboard. That is why to me a compact laptop is many times more important than a fully equipped smart-phone. (<em>For the curious reader, I own a Nokia E72</em>.)</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For a recent mobile website project that I worked on, I had to face a complaint from the client where the layout of certain pages on the site didn&#8217;t look quite as expected on BlackBerry devices. Naturally, I didn&#8217;t have a BlackBerry handset nor an easy equivalent to test the issue for myself, so I did what anyone stuck in the same corner as I would do: I went over the BlackBerry developer portal online to look for <a href="http://docs.blackberry.com/en/developers/deliverables/5716/The_BB_Smrtphn_simulator_447179_11.jsp">BlackBerry simulators</a>. </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unlike the Epoch simulator for Symbian/Nokia phones and the iPhone simulator, the BlackBerry simulators were spread out such that for each possible BlackBerry smart-phone model in existence, there was a simulator available for it. And each one of the download was anywhere from 50 to 150 MB in size. </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I chose the simulator for one of the latest BlackBerry handsets, and downloaded it. Like the Epoch simulator, BlackBerry simulators are Windows-specific, in that, they are available in the form of Windows executable binaries. I didn&#8217;t have Windows anywhere in my study, so I had to set up a Windows guest inside VMware Fusion in order to set up the simulator. To cut a long, painful story short, I was able to install the simulator after tirelessly downloading a big Java SDK update, without which the installation wouldn&#8217;t continue. And then, I powered up the simulator. I was instantly reminded of the never-ending pain I had to suffer through the hands of the Epoch simulator in my previous life where I used to be a Symbian developer. The BlackBerry simulator took ages to start up. I almost cursed out loud because that fact alone opened up old, deep gashes that I had thought I had patched up for good. I was mistaken. Never in my dreams had I thought of having to deal with such monstrosity ever again. And, to my utter, absolute dismay, here I was.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Eventually, after what seemed to have been ages since I booted up the simulator, I was able to navigate my way to the BlackBerry browser. I let out a deep sigh and thought that I could now finally concentrate on the problem I set out to tackle. But, no! I couldn&#8217;t browse on the BlackBerry browser at all. No amount of fiddling with the 3G and WiFi settings all over the BlackBerry OS got browsing working. From what I could tell, both the 3G and WiFi networks were alive, but there was no traffic flowing through. I almost gave up.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;After groping on the Internet with a wince on my face, I was finally able to find out why. Apparently, by default, the BlackBerry simulator are unable to simulate network connections. In order to do this, you have to download and install an additional, supplementary BlackBerry simulator that is called the <a href="http://docs.blackberry.com/en/developers/deliverables/5716/The_BB_MDS_Simulator_447180_11.jsp">BlackBerry MDS Simulator</a>. Once this simulator is up and running, your actual BlackBerry simulator will be able to simulate network connections, browse, and do all sorts of network related functions. Who knew! </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;As an aside, there&#8217;s also the <a href="http://docs.blackberry.com/en/developers/deliverables/5716/The_BB_email_server_simulator_447281_11.jsp">BlackBerry Email Simulator</a> that simulates messaging functionality. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ayaz.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ayaz.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ayaz.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ayaz.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ayaz.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ayaz.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ayaz.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ayaz.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ayaz.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ayaz.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ayaz.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ayaz.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ayaz.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ayaz.wordpress.com/422/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ayaz.wordpress.com&amp;blog=162357&amp;post=422&amp;subd=ayaz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ayaz.wordpress.com/2010/12/26/browsing-on-the-blackberry-simulator/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/76f20b8617dae404a1fc420530da594c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ayaz</media:title>
		</media:content>
	</item>
	</channel>
</rss>
