<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Reflections of a scattered Mind !!</title>
	
	<link>http://blog.saionline.co.in</link>
	<description>"Not all scattered pieces are of broken glass"</description>
	<lastBuildDate>Mon, 14 Nov 2011 20:56:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<cloud domain="blog.saionline.co.in" port="80" path="/?rsscloud=notify" registerProcedure="" protocol="http-post" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/saich" /><feedburner:info uri="saich" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Learning Android : Why I moved away from Eclipse</title>
		<link>http://feedproxy.google.com/~r/saich/~3/zd4e2b8Sv-M/</link>
		<comments>http://blog.saionline.co.in/2011/11/learning-android-why-i-moved-away-from-eclipse/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 20:55:40 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[IntelliJ IDEA]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=388</guid>
		<description><![CDATA[So, after a very long break, I started back with getting familiar with Android development&#8230; Felt happy seeing that Google has made a lot of improvements / features in the ADT. But, everything evaporated when I tried to debug an app on my machine, and got this error: &#8220;Android Packaging Problem:  [...]]]></description>
			<content:encoded><![CDATA[<p>So, after a very long break, I started back with getting familiar with Android development&#8230; Felt happy seeing that Google has made a lot of improvements / features in the ADT. But, everything evaporated when I tried to debug an app on my machine, and got this error: &#8220;Android Packaging Problem: resources.ap_ does not exist&#8221;. I tried cleaning the project, restarted Eclipse, and re-creating the Eclipse project and this error didn&#8217;t go away&#8230; Googling it also didn&#8217;t help much&#8230; Then, I went to sleep&#8230;.</p>
<p>The next day, to my surprise, there was no error and I was able to debug my app, at last&#8230; But, it didn&#8217;t last long&#8230; After 3 hours, the same error is back&#8230;. It looked like this ADT solves everything else (Resource Editors, WYSIWYG Editor etc.) but the basic task it is supposed to do (Basic compiling / packaging / debugging)&#8230;</p>
<p>Now that perfect mood is set to go hunting for a new and *reliable* IDE, I searched in <a href="http://www.stackoverflow.com" target="_blank">stackoverflow.com</a> for answers&#8230; Found some thread saying <a href="http://www.jetbrains.com/idea/features/google_android.html" target="_blank">IntelliJ IDEA</a> is good&#8230;. So, downloaded it, downloaded its dependencies (JSDK 1.6) and installed them&#8230; And there is no turning back&#8230; I don&#8217;t miss the resource.ap_ error at all&#8230;</p>
<p><strong>The Pros of IDEA:</strong></p>
<ol>
<li><strong></strong>Reliable (unlike ADT for Eclipse) at compiling and packaging&#8230;</li>
<li>Supports the Android &#8220;Library&#8221; projects also&#8230; (Tried it with <a href="https://github.com/cyrilmottier/GreenDroid" target="_blank">GreenDroid</a>, and worked without a glitch)</li>
<li>Import Eclipse projects directly&#8230;</li>
<li>Integrated github support (and a few more Version Controls)</li>
<li>Decent enough features, for Refactoring, Imports optimization, Code completion etc.</li>
</ol>
<p><strong>The Cons:</strong></p>
<p>This could become a big list, but the reliability when compared to Eclipse beats everything in the below list combined..at least for me&#8230;</p>
<ol>
<li>Page Scrolling &#8211; Cannot use the Mouse Scroll.. Need to click on scrollbar and scroll it down.. <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </li>
<li>Logcat sucks!! The one in Eclipse is hell lot better.. Seriously needs Filter by Application, Colored text based on log level, and saved searches.. A simple textarea doesn&#8217;t justify such an important feature..</li>
<li>The keyboard shortcuts are completely different from Eclipse.. Why doesn&#8217;t IDEs come with keyboard binding set of other IDEs that user can choose to use? <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </li>
<li>Memory hogger, seems to be more than Eclipse.. Could it be because of Swing &amp; Java?</li>
<li>Basic XML Editor &#8211; There are no Android Resource Editors&#8230;. I prefer to write XML files by hand, though&#8230;</li>
<li>Some code warnings may misguide you.. It keeps telling me that <a href="http://developer.android.com/reference/android/database/Cursor.html" target="_blank">Cursor</a> cannot be NULL, though I have personally seen cases where it will be&#8230;</li>
</ol>
<p>In simpler words, IDEA may not be as good as Eclipse in general, but for Android development, it is certainly a better choice&#8230; at least for now..</p>
<p>Atleast, you&#8217;ll know you are frustrated not because of IDE&#8230; (Trust me, frustration because of an IDE, instead of logic/code isn&#8217;t even worth trying to know.. )</p>
<img src="http://feeds.feedburner.com/~r/saich/~4/zd4e2b8Sv-M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2011/11/learning-android-why-i-moved-away-from-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.saionline.co.in/2011/11/learning-android-why-i-moved-away-from-eclipse/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=learning-android-why-i-moved-away-from-eclipse</feedburner:origLink></item>
		<item>
		<title>Square One</title>
		<link>http://feedproxy.google.com/~r/saich/~3/zt1pznwSEDI/</link>
		<comments>http://blog.saionline.co.in/2011/10/square-one/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 09:49:26 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[My Experiences]]></category>
		<category><![CDATA[TimePass]]></category>
		<category><![CDATA[squareone]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=372</guid>
		<description><![CDATA[You begin at the Square One, you go forward with hopes and dreams, and most importantly with no idea what the future holds for you. You go non-stop until that day comes when completely unexpected happens, and you&#8217;ll be just thrown out back on to Square One.
You get dejected, depressed and lose all  [...]]]></description>
			<content:encoded><![CDATA[<p>You begin at the Square One, you go forward with hopes and dreams, and most importantly with no idea what the future holds for you. You go non-stop until that day comes when completely unexpected happens, and you&#8217;ll be just thrown out back on to Square One.</p>
<p>You get dejected, depressed and lose all your hopes that everything got ruined. You live in darkness of the past, until one day you say to yourself &#8220;Enough! You got to get moving&#8221;&#8230; And, you start moving into that unknown future, with fear still in your mind&#8230;. You try to take one step at a time, but you haven&#8217;t gotten over your prior experiences. Yet, when you start getting over past and start moving forward with confidence, it happens again! You&#8217;ll land in the Square One again, now with no knowledge on how, when and why&#8230;.</p>
<p>This time, you begin your journey again into those unknown lands, but instead of fear, this time you have that strange confidence &#8211; &#8220;Not to fear&#8230; I can get over even if the worse happens again!&#8221;</p>
<img src="http://feeds.feedburner.com/~r/saich/~4/zt1pznwSEDI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2011/10/square-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.saionline.co.in/2011/10/square-one/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=square-one</feedburner:origLink></item>
		<item>
		<title>Geeks are awesome!</title>
		<link>http://feedproxy.google.com/~r/saich/~3/oEoz4bOMagE/</link>
		<comments>http://blog.saionline.co.in/2011/09/geeks-are-awesome/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 06:41:38 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[TimePass]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[geek]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=368</guid>
		<description><![CDATA[You got to love the geeks! For their unique talent &#38; ability to transform any topic (including philosophy) into a discussion topic of bytes, pointers, stacks, exceptions etc&#8230;. They can convert every topic in this world to their area of expertise..  
&#160;
Dedicated to the geeks Shrey Banga &#38; Sharad  [...]]]></description>
			<content:encoded><![CDATA[<p>You got to love the geeks! For their unique talent &amp; ability to transform any topic (including philosophy) into a discussion topic of bytes, pointers, stacks, exceptions etc&#8230;. They can convert every topic in this world to their area of expertise.. <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<div id="attachment_384" class="wp-caption aligncenter" style="width: 690px"><a href="http://blog.saionline.co.in/wp-content/uploads/2011/09/geeky.png"><img class="size-full wp-image-384" title="A small GeekTalk" src="http://blog.saionline.co.in/wp-content/uploads/2011/09/Untitled.png" alt="" width="680" height="527" /></a><p class="wp-caption-text">A small geeky conversation from my wall on Facebook</p></div>
<p>&nbsp;</p>
<p title="Shrey Bange on Facebook">Dedicated to the geeks <a title="Shrey Banga on Facebook" href="https://www.facebook.com/banga.shrey" target="_blank">Shrey Banga</a> &amp; <a title="Sharad Banka on Facebook" href="https://www.facebook.com/sharad.banka" target="_blank">Sharad Banka</a> <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p title="Shrey Bange on Facebook"><strong>Update (11 September, 2011):</strong> Updated the image to include a missing comment (missed earlier since the account was then in deactivated state..)</p>
<img src="http://feeds.feedburner.com/~r/saich/~4/oEoz4bOMagE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2011/09/geeks-are-awesome/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.saionline.co.in/2011/09/geeks-are-awesome/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=geeks-are-awesome</feedburner:origLink></item>
		<item>
		<title>Browser Wars: Learning from each other</title>
		<link>http://feedproxy.google.com/~r/saich/~3/8iGHZQ8LpBU/</link>
		<comments>http://blog.saionline.co.in/2011/06/browser-wars-learning-from-each-other/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 09:20:42 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=347</guid>
		<description><![CDATA[The most popular browsers from the country I come from (where Mac is rare) are Google Chrome, Mozilla Firefox &#38; Microsoft Internet Explorer. Like any other browser, these all have the same goal &#8211; to make browsing experience richer &#38; better. Yet, there are a lot of differences in their ways and some  [...]]]></description>
			<content:encoded><![CDATA[<p>The most popular browsers from the country I come from (where Mac is rare) are Google Chrome, Mozilla Firefox &amp; Microsoft Internet Explorer. Like any other browser, these all have the same goal &#8211; to make browsing experience richer &amp; better. Yet, there are a lot of differences in their ways and some are better than other in some ways.</p>
<p>If I ever have to make a generic purpose browser, I&#8217;d certainly pick good (for inclusion) &amp; bad (for exclusion) things from the current browsers.</p>
<h5>Google Chrome:</h5>
<p>The recent one and certainly a game changer. It has improved the user expectations from a browser by 100x.</p>
<p><strong>The Good</strong>:</p>
<ul>
<li>The crashless browser -  protect the user even from the crashes in external plug-ins (Thankfully, Firefox also implemented out-of-box plugins)</li>
<li>Faster startup time &#8211; Do things that are only absolutely needed. Nothing more. Defer everything else, to post-startup (in parallel with the user&#8217;s browsing).</li>
<li>Sandboxing &#8211; Whatever you do on web stays on web. Protect the machine from all the various security issues.</li>
<li>Explicit permissions listed for Extensions &#8211; user must know what an extension is capable of (despite of what it claims to do)</li>
<li>Silent updation: Push updates only when it is good for users. Then, who would say &#8220;no&#8221; to better browsing experience? So, there is no point in showing an annoying dialog &#8220;Updates Available&#8221; when you already know the user clicks &#8220;yes&#8221;.</li>
<li>Incognito Mode starts a new session without closing the current session (sadly, Firefox does that)</li>
</ul>
<p><strong>The Bad: </strong></p>
<ul>
<li>Weakest &amp; the most limited extension model &#8211; So limited that it may give you a feeling that the word &#8220;extension&#8221; doesn&#8217;t suit it.</li>
<li>Still an immature platform for developers. Extension Model hasn&#8217;t moved but the other parts (rendering, UI etc.) are moving forward at a very fast pace. Even, many bugs in the chrome extensions are not getting fixed for many months.</li>
</ul>
<h5>Mozilla Firefox</h5>
<p><strong>The Good:</strong></p>
<ul>
<li>Super cool extension model. There is almost nothing that can&#8217;t be done by the addons. And, XPCOM works across all the platforms.</li>
<li>Known to be the developer-friendly browser from long time. One of the early browsers that emphasized on standards and innovation from its early days.</li>
</ul>
<p><strong>The Bad:</strong></p>
<ul>
<li>Known to be memory hog. Not efficient at Memory management. Have issues with Intel&#8217;s hyperthreading.</li>
<li>MaxVersion in addons is mandatory and is limited to current version (you can&#8217;t just use * for maxversion). The only issue with this is each and every addon is to be updated (you add features or not) with every major version release (which is once in 12 weeks as of now).</li>
<li>Private browsing closes the current session and starts a new one. After closing private session, it restores the earlier session. This means you can&#8217;t do both (with default command line options)</li>
<li>Every extension have complete control (including a binary component), because of lack of a permission model. You can never trust an extension because of this!</li>
</ul>
<h5>Internet Explorer</h5>
<p><strong>The Good:</strong></p>
<ul>
<li>Its never late to catch up with the standards, speed &amp; security (with IE 9 &amp; IE 10)</li>
<li>Native 64-bit for 64-bit OS. (I can&#8217;t believe Firefox and Chrome do not have them for Windows)</li>
</ul>
<p><strong>The Bad:</strong></p>
<ul>
<li>Still maintains the completely idiotic &#8216;Quirks Mode&#8217;. I don&#8217;t see  the greater cause of maintaining a version which is full of bugs,  extremely slow and follows no standards, and also all developers hate  it.</li>
<li>Extension Model &#8211; Its a big pain. You need to be comfortable  with COM to get started with. Its much comfortable to think addons  don&#8217;t exist at all for this version.</li>
<li>Supports ActiveX plugins when the whole world uses NPAPI plugins.</li>
</ul>
<p><em>Disclaimer: All the above are my own thoughts, and I&#8217;ve to confess I haven&#8217;t researched every point. So, not all the above may be true, but is to the best of my knowledge.</em></p>
<img src="http://feeds.feedburner.com/~r/saich/~4/8iGHZQ8LpBU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2011/06/browser-wars-learning-from-each-other/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.saionline.co.in/2011/06/browser-wars-learning-from-each-other/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=browser-wars-learning-from-each-other</feedburner:origLink></item>
		<item>
		<title>5 Reasons I dislike Flash</title>
		<link>http://feedproxy.google.com/~r/saich/~3/5qrEIG5lhE8/</link>
		<comments>http://blog.saionline.co.in/2011/06/5-reasons-i-dislike-flash/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 05:13:09 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[My Experiences]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=345</guid>
		<description><![CDATA[The times have changed to where we spend most of our lives on the web. But, web is far from perfect. It has annoyances lurking around at every corner. Most of the times I get annoyed is because of the bad code (in HTML, CSS, Javascript) by the developers. The next big annoyance is from Flash  [...]]]></description>
			<content:encoded><![CDATA[<p>The times have changed to where we spend most of our lives on the web. But, web is far from perfect. It has annoyances lurking around at every corner. Most of the times I get annoyed is because of the bad code (in HTML, CSS, Javascript) by the developers. The next big annoyance is from Flash content, but I can&#8217;t blame the content developers for their code. Its the design issue of the Flash runtime itself&#8230;</p>
<p>The top 5 things in Flash that annoys me daily:</p>
<ol>
<li>Browser shortcuts (like, Ctrl+W, Ctrl+T) do not work when focused on flash elements, since it consumes all the keyboard events. I&#8217;d expect it to at least pass them to browser if it doesn&#8217;t handle a key event, but it doesn&#8217;t even bother.</li>
<li>Zoom doesn&#8217;t work &#8211; Ctrl++, Ctrl+- are useless. You have to read the content in SWF in the published size itself. You cannot increase or decrease it size. <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </li>
<li>Middle Click doesn&#8217;t work &#8211; I can&#8217;t open a link in new tabs. Opening links in new tabs from SWF is a small-size challenge.</li>
<li>I can&#8217;t find the text I&#8217;m looking for with Ctrl + F. You can&#8217;t just search in Flash content, unless the SWF itself contains a search box &amp; search implementation.</li>
<li>Its pretty famous &amp; is gonna stay there longer. And the worst part &#8211; everyone uses it in their site, though there is absolutely no need for it (making my browsing experience annoying) <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </li>
</ol>
<p>Disclaimer: The above view is completely personal and has absolutely nothing to do with anything (including friends &amp; employer also) else.</p>
<img src="http://feeds.feedburner.com/~r/saich/~4/5qrEIG5lhE8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2011/06/5-reasons-i-dislike-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.saionline.co.in/2011/06/5-reasons-i-dislike-flash/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=5-reasons-i-dislike-flash</feedburner:origLink></item>
		<item>
		<title>Firefox Addons: Little Housekeeping Tips</title>
		<link>http://feedproxy.google.com/~r/saich/~3/6E10iAJsxdg/</link>
		<comments>http://blog.saionline.co.in/2011/03/firefox-addons-little-housekeeping-tips/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 14:23:47 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[addons]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[xpcom]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=304</guid>
		<description><![CDATA[I&#8217;m working on a Firefox addon in the last few weeks and this is my 1st experience with Firefox addons. During my tiny experience, I came across some of those little things that helps you when you&#8217;re in trouble &#38; here I&#8217;m writing about those simple tips. Of course, I mixed some changes in Gecko 2.0  [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a Firefox addon in the last few weeks and this is my 1st experience with Firefox addons. During my tiny experience, I came across some of those little things that helps you when you&#8217;re in trouble &amp; here I&#8217;m writing about those simple tips. Of course, I mixed some changes in Gecko 2.0 also along with these&#8230;.</p>
<p>I know these are very basic, and almost everyone who worked on the addons might be knowing them, but hey, didn&#8217;t I mention you that this is my first encounter with building firefox addon?</p>
<p><strong>How can I be sure if a Binary XPCOM component is loaded / attempted to load from Firefox?</strong></p>
<p>Close all Firefox windows and run the following from command line:</p>
<p>set NSPR_LOG_MODULES=all:5<br />
set NSPR_LOG_FILE=c:\ff.log<br />
C:\Program Files\Mozilla Firefox\firefox.exe</p>
<p>What does it do? Line 1 sets the modules to load &amp; the log level. In the above commands, we are asking to log all modules with log level 5 (meaning all logs). Line 2 sets the path to log file. Now, just launch the Firefox from command line (so that the variables are set)</p>
<p>Troubleshooting Tip: Do not use quotes around the log file name, like set NSPR_LOG_FILE=&#8221;C:\ff.log&#8221;. I tried it the 1st time and it doesn&#8217;t work.</p>
<p>References: <a title="MDC: Troubleshooting XPCOM components registration" href="https://developer.mozilla.org/en/Troubleshooting_XPCOM_components_registration">Troubleshooting XPCOM components registration</a>, <a title="NSPR Reference: Logging" href="http://www.mozilla.org/projects/nspr/reference/html/prlog.html">NSPR Logging</a></p>
<p><strong>How can I sure if an XPCOM component is successfully registered?</strong></p>
<p>This works for both binary &amp; JS components.</p>
<p>Enable Chrome errors in Error Console, if you haven&#8217;t done already! To enable, set <em>javascript.options.showInConsole</em> to <em>true</em> in <em>about:config</em> preferences.</p>
<p>Open Error Console (Ctrl+Shift+J)</p>
<p>Evaluate <em>Components.classes["components-contract-id"].name</em>. Use with the components&#8217; contract id.</p>
<p>If it gives no error, the component is successfully registered.</p>
<p>References:  <a href="http://kb.mozillazine.org/Javascript.options.showInConsole">javascript.options.showInConsole</a>,  <a title="MDC: Troubleshooting XPCOM components registration" href="https://developer.mozilla.org/en/Troubleshooting_XPCOM_components_registration">Troubleshooting XPCOM components registration</a></p>
<p><strong>How to log errors from the XPCOM components?</strong></p>
<p>This is simple thing, and I realized a bit late about it. This is currently how I&#8217;m debugging my components (need to see if there is a better way). You can report error messages to the Error Console with:</p>
<p><em>Components.utils.reportError(&#8220;This is the description of the error&#8221;);</em></p>
<p>References: <a title="Error Console - MDC Doc Center" href="https://developer.mozilla.org/en/Error_Console">Error Console</a></p>
<p><strong>nsIConsoleService</strong></p>
<p>The inconvenience with the reportError API is that it logs all messages as errors. To log at various levels (debug / warning / info), we can use the nsIConsoleService. The <em>logStringMessage()</em> function of this service looks very handy.</p>
<p>I haven&#8217;t used it yet, so I cannot give any more information on this!</p>
<p>References: <a title="nsIConsoleService Documentation on MDC" href="https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIConsoleService">nsIConsoleService Reference</a></p>
<p><strong>UnPack option</strong></p>
<p>If you are using binary components in the addon, you MUST set the unpack value to true in <em>install.rdf</em> file.</p>
<p>References: <a href="https://developer.mozilla.org/en/Install_Manifests#unpack">unpack in Install Manifests</a></p>
<p><strong>Bootstrap Addons</strong></p>
<p>This feature introduced in Gecko 2.0 answers one of my long-time questions &#8211; <em>Why should I restart the browser everytime I add / update / disable / remove an addon?</em></p>
<p>Though this feature is good, it looks complicated to do all the manual work<em>. </em>I&#8217;ve skipped trying this feature for now, but I&#8217;ll look into this some other time.<em><br />
</em></p>
<p>References: <a href="https://developer.mozilla.org/en/Extensions/Bootstrapped_extensions">Bootstrapped Extensions</a><strong><br />
</strong></p>
<p><strong>Gecko 2.0 XPCOM Changes</strong></p>
<p>Though there are many changes, I&#8217;m listing the few which I came across.</p>
<ul>
<li>Javascript component must export NSGetFactory() instead of NSGetModule() function. Binary component must export NSModule() instead of NSGetModule() function. I&#8217;ve explained this in detail in the next section.</li>
<li>Components in components/ folder are no longer auto-registered &amp; auto-loaded. Components registration will be done through the manifest file.</li>
<li>Category Registrations are done through manifest file. Also, category names are modified.</li>
<li>You&#8217;ll have to use the XULRunner SDK 2.0 for Gecko 2.0</li>
</ul>
<p>Troubleshooting Tip: Use the sample CPP file (from the references) to get started for binary components. I got a few compilation errors initially, and then I has to add <em>MOZ_NO_MOZALLOC</em> to preprocessor definitions as read somewhere, and it worked..</p>
<p>References: <a title="XPCOM Changes in Gecko 2.0" href="https://developer.mozilla.org/en/XPCOM/XPCOM_changes_in_Gecko_2.0">XPCOM Changes in Gecko 2.0</a>, <a href="http://mxr.mozilla.org/mozilla-central/source/xpcom/sample/nsSampleModule.cpp">nsSampleModule.cpp source code</a><strong><br />
</strong></p>
<p><strong>Component Registration in Firefox 4.0</strong></p>
<p>All the components to be registered has to mentioned in the <em>chrome.manifest</em> file.</p>
<ul>
<li>All the interfaces (xpt files) are to be registered using <em>interfaces</em> command</li>
<li>A JS component must use <em>component</em> command. It needs to mention its class id also. The contract id can be assigned to this JS component by a separate <em>contract</em> command.</li>
<li>A binary component can be registered with <em>binary-component</em> command. A binary component registration need not specify any class-id or contract-id in the manifest file, since they are available through the exported NSModule() function.</li>
</ul>
<p>References: <a href="https://developer.mozilla.org/en/Chrome_Registration">Chrome Registration</a></p>
<p>If you have felt all the content is copied from somewhere, its ok because its true. I&#8217;ve learned many things from <a title="Mozilla Developer Center" href="https://developer.mozilla.org">MDC</a> itself, I&#8217;m just aggregating those things here!!</p>
<p>If I&#8217;ve got something wrong in here, please do mention them in the comments as I have to correct them in the post as well as in my mind&#8230;</p>
<div id="_mcePaste" class="mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;"><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Lucida, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 18px;">&nbsp;</p>
<h1 id="title" class="first" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.8em; margin-left: 0px; font-size: 1.857em; width: 819px; padding: 0px;">Troubleshooting XPCOM components registration</h1>
<p>&nbsp;</p>
<p></span></span></div>
<img src="http://feeds.feedburner.com/~r/saich/~4/6E10iAJsxdg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2011/03/firefox-addons-little-housekeeping-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.saionline.co.in/2011/03/firefox-addons-little-housekeeping-tips/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=firefox-addons-little-housekeeping-tips</feedburner:origLink></item>
		<item>
		<title>Quotes I like:: Vol. III</title>
		<link>http://feedproxy.google.com/~r/saich/~3/r-nOcH_pP4Y/</link>
		<comments>http://blog.saionline.co.in/2011/03/quotes-i-like-vol-iii/#comments</comments>
		<pubDate>Sat, 05 Mar 2011 14:18:37 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[TimePass]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=167</guid>
		<description><![CDATA[Some random quotes / one-liners, I liked.

Great minds are always feared by lesser minds
&#8230; there&#8217;s a gap between what science knows and what business does (Dan  Pink)
All those who wander are not lost.
What we have done for ourselves alone dies with us; What we do for others dies with them. What we  [...]]]></description>
			<content:encoded><![CDATA[<p>Some random quotes / one-liners, I liked.</p>
<ul>
<li>Great minds are always feared by lesser minds</li>
<li>&#8230; there&#8217;s a gap between what science knows and what business does (Dan  Pink)</li>
<li>All those who wander are not lost.</li>
<li>What we have done for ourselves alone dies with us; What we do for others dies with them. What we do for the world is too insignificant to count.</li>
<li>Even if an analog clock is broken, it shows correct time at least twice a day.</li>
<li>A happy man is not the one who has everything, but who makes most of everything he has.</li>
<li>Keep your face to sunshine and you can&#8217;t see the shadows.</li>
<li>Make sure the thing you&#8217;re living for is worth dying for.</li>
<li>Speaking without egos, Loving without intentions, Caring without  expectations, Praying without selfishness is the sign of True Relation</li>
<li>I decided to send you the cutest n sweetest gift of the world. But the postman shouted at me sayin &#8211; Get out of the postbox <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
<li>If you don&#8217;t count any of my failures, I&#8217;m quite successful.</li>
<li>To live is the rarest thing in the world. Most people exist, that is all.</li>
<li>The biggest fools are those who seek an interpretation for everything</li>
<li>You&#8217;ll never have a quiet world till you knock the patriotism out of the human race</li>
</ul>
<p>You can find my previous favorite one-liners posts at: <a title="Quotes I like :: Vol. II" href="http://blog.saionline.co.in/2008/09/quotes-i-like-vol-ii/">Quotes I like:: Vol. II</a> &amp; <a title="Quotes I like :: Vol. I" href="http://blog.saionline.co.in/2008/08/quotes-i-like-vol-i/">Quotes I like:: Vol. I</a></p>
<img src="http://feeds.feedburner.com/~r/saich/~4/r-nOcH_pP4Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2011/03/quotes-i-like-vol-iii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.saionline.co.in/2011/03/quotes-i-like-vol-iii/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=quotes-i-like-vol-iii</feedburner:origLink></item>
		<item>
		<title>Debug PHP: Setup</title>
		<link>http://feedproxy.google.com/~r/saich/~3/FeVlEg3cSM0/</link>
		<comments>http://blog.saionline.co.in/2010/12/debug-php-setup/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 09:09:35 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpeclipse]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[xdebug]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=276</guid>
		<description><![CDATA[Okay! I forgot how to set up debug for my PHP, so I had trouble today trying to set it up today and had to spend about an hour to do so&#8230; So, I decided I should note it down for future reference and hence I&#8217;m here now!
Tools: PHPEclipse, PHP 5.3.3, XDebug

Make a PHP file with content as &#60;?php echo  [...]]]></description>
			<content:encoded><![CDATA[<p>Okay! I forgot how to set up debug for my PHP, so I had trouble today trying to set it up today and had to spend about an hour to do so&#8230; So, I decided I should note it down for future reference and hence I&#8217;m here now!</p>
<p>Tools: PHPEclipse, PHP 5.3.3, XDebug</p>
<ol>
<li>Make a PHP file with content as &lt;?php echo phpinfo(); ?&gt; and browse the page on localhost.</li>
<li>Copy the source of the above page from the browser and paste it in <a href="http://xdebug.org/find-binary.php">http://xdebug.org/find-binary.php</a> and click &#8220;Analyze my phpinfo() output&#8221;. This step will give you tailored instructions on how to setup, especially points to the right DLL to use.</li>
<li>Be careful with the editing php.ini file. Prefer to add the zend_extension line at the top of the file. (It doesn&#8217;t work if its the last line)</li>
<li>And start debugging from the Eclipse IDE !!</li>
</ol>
<img src="http://feeds.feedburner.com/~r/saich/~4/FeVlEg3cSM0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2010/12/debug-php-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.saionline.co.in/2010/12/debug-php-setup/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=debug-php-setup</feedburner:origLink></item>
		<item>
		<title>C++ Quickies #I : Long live the STL</title>
		<link>http://feedproxy.google.com/~r/saich/~3/YjSLyTVLju8/</link>
		<comments>http://blog.saionline.co.in/2010/09/c-quickies-i-long-live-the-stl/#comments</comments>
		<pubDate>Sun, 19 Sep 2010 05:42:47 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[stl]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=247</guid>
		<description><![CDATA[Its been quite some time (16+ months) I&#8217;ve been out of college and started using STL. Trust me, I didn&#8217;t know much about STL in college, though I used std::string &#38; std::vector everywhere I could. Now, it seems like I couldn&#8217;t (wouldn&#8217;t ? ) write a program without using STL at all. A few snippets  [...]]]></description>
			<content:encoded><![CDATA[<p>Its been quite some time (16+ months) I&#8217;ve been out of college and started using STL. Trust me, I didn&#8217;t know much about STL in college, though I used std::string &amp; std::vector everywhere I could. Now, it seems like I couldn&#8217;t (wouldn&#8217;t ? ) write a program without using STL at all. A few snippets that I really found useful (and simple) and I regularly use where ever possible.</p>
<p>To output the elements (all / subset) in a container (lets say vector), separated by a delimiter, say new line:</p>
<pre class="brush: cpp; title: ; notranslate">
#include &lt;algorithm&gt;

std::copy(v.begin(), v.end(), std::ostream_iterator(std::cout, &quot;\n&quot;));
</pre>
<p>Want to sort an array? No problem &#8230; <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre class="brush: cpp; title: ; notranslate">

#include &lt;algorithm&gt;

std::sort(array, array + lengthOfArray);
</pre>
<p>Read from the standard input into a vector until the end-of-stream?</p>
<pre class="brush: cpp; title: ; notranslate">

#include &lt;algorithm&gt;
#include &lt;iterator&gt;
#include &lt;vector&gt;

typedef std::istream_iterator&lt;int&gt; istream_iterator_int;
std::vector&lt;int&gt; v;
istream_iterator_int start (std::cin);
istream_iterator_int end;
std::back_insert_iterator&lt;vector&lt;int&gt; &gt; dest (v);
std::copy (start, end, dest);
</pre>
<p>Count the no. of instances an object is found?</p>
<pre class="brush: cpp; title: ; notranslate">

#include &lt;algorithm&gt;

size_t count = std::count(v.begin(), v.end(), 42); // Returns no. of elements in v with value 42.
</pre>
<p>And let me inform you&#8230; This is just a grain of what STL can do&#8230;. <img src='http://blog.saionline.co.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>References:</p>
<p><a href="http://www.cs.brown.edu/~jak/proglang/cpp/stltut/tut.html">http://www.cs.brown.edu/~jak/proglang/cpp/stltut/tut.html</a></p>
<p><a href="http://www.cplusplus.com/reference/algorithm/">http://www.cplusplus.com/reference/algorithm/</a></p>
<img src="http://feeds.feedburner.com/~r/saich/~4/YjSLyTVLju8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2010/09/c-quickies-i-long-live-the-stl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.saionline.co.in/2010/09/c-quickies-i-long-live-the-stl/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=c-quickies-i-long-live-the-stl</feedburner:origLink></item>
		<item>
		<title>Just Friends! It got something !!</title>
		<link>http://feedproxy.google.com/~r/saich/~3/eq5rXOaDZUg/</link>
		<comments>http://blog.saionline.co.in/2010/08/just-friends-it-got-something/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 17:33:47 +0000</pubDate>
		<dc:creator>Sai Prasad</dc:creator>
				<category><![CDATA[TimePass]]></category>
		<category><![CDATA[just friends]]></category>
		<category><![CDATA[novels]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://blog.saionline.co.in/?p=231</guid>
		<description><![CDATA[If you&#8217;re wondering what it is, &#8216;Just Friends&#8216; is a novel by an Indian writer. I think it is his debut novel, but don&#8217;t take my word on this. You need to google (or bing, for Bing fans) it to be sure. By &#8216;It got something&#8217;, I don&#8217;t mean to say, its an awesome book. I wouldn&#8217;t even say its a good  [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re wondering what it is, &#8216;<a href="http://sumritshahi.weebly.com/index.html" target="_blank">Just Friends</a>&#8216; is a novel by an Indian writer. I think it is his debut novel, but don&#8217;t take my word on this. You need to google (or bing, for Bing fans) it to be sure. By &#8216;It got something&#8217;, I don&#8217;t mean to say, its an awesome book. I wouldn&#8217;t even say its a good book, its just another book (add some 18+ masala content to the recipe) . What impressed me in the book are the quotes (quoted by the author himself, I believe) in it. They are not inspirational or something, but I liked them (not that I like only inspirational, in general). So, I decided to put my favorites here and share with you.</p>
<ul>
<li>Sleep is deadly and love is lethal. The combination is so powerful that it leaves you helpless, forcing you to sleep later.</li>
<li>A sleepless night is a lover&#8217;s right</li>
<li>Restless nights, drowsy mornings, confused afternoons, lonely evenings&#8230;</li>
<li>Eyes are like prostitutes &#8211; they reveal more than they can conceal.</li>
<li>I laughed, she laughed. Problem solved.</li>
<li>I smiled, she smiled. All problems could wait.</li>
<li>You pose a great competition to sugar for its characteristics of deadly sweetness and mixing quickly and easily in unknown waters.</li>
<li>I wasn&#8217;t superstitious. It was just&#8230; love.</li>
</ul>
<p>In case they don&#8217;t make sense to you, you need to read the novel then coz they all are situational, though you can identify the situations from the statements itself for many of them.</p>
<p>Until next post, have a peaceful life (great would be great, though)&#8230;</p>
<img src="http://feeds.feedburner.com/~r/saich/~4/eq5rXOaDZUg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.saionline.co.in/2010/08/just-friends-it-got-something/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.saionline.co.in/2010/08/just-friends-it-got-something/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=just-friends-it-got-something</feedburner:origLink></item>
	</channel>
</rss>

