<?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/"
	>

<channel>
	<title>maSnun&#039;s logs &#187; google</title>
	<atom:link href="http://masnun.com/blog/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://masnun.com/blog</link>
	<description>Personal Blog of maSnun</description>
	<lastBuildDate>Sat, 24 Jul 2010 04:33:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Working with the Google Chart (Visualization) JavaScript APIs</title>
		<link>http://masnun.com/blog/2010/05/01/working-with-the-google-chart-visualization-javascript-apis/</link>
		<comments>http://masnun.com/blog/2010/05/01/working-with-the-google-chart-visualization-javascript-apis/#comments</comments>
		<pubDate>Sat, 01 May 2010 16:02:42 +0000</pubDate>
		<dc:creator>masnun</dc:creator>
				<category><![CDATA[Blog Post]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://masnun.com/blog/?p=933</guid>
		<description><![CDATA[For a current project at my workplace I need a good charting solution. I need a pie chart for now, on which people can actually click and interact. I found a few tools and went for the Google Visualization APIs. &#8230; <a href="http://masnun.com/blog/2010/05/01/working-with-the-google-chart-visualization-javascript-apis/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For a current project at my workplace I need a good charting solution. I need a pie chart for now, on which people can actually click and interact. I found a few tools and went for the Google Visualization APIs. The APIs are a set of JS libraries which let you build quick charts and graphics out of data tables. I started trying the sample codes on the Google Ajax playground and quickly understood which way to go to get things right. First I must make it clear that, I&#8217;m no Javascript pro. I have coded with jQuery a few times before and I have no real experience with JS until today. It is just today I spent a good amount of time with the Facebook JS APIs. Who knows if it&#8217;s the brilliant documentation at the Google Code or my fast learning ability, it took me just one hour to learn the Visualization APIs and cook something up from scratch.</p>
<p>Here&#8217;s the source code:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">google.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;visualization&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;1&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;packages&quot;</span><span style="color: #339933;">:</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;piechart&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
google.<span style="color: #660066;">setOnLoadCallback</span><span style="color: #009900;">&#40;</span>drawChart<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> drawChart<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	table <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">visualization</span>.<span style="color: #660066;">DataTable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	table.<span style="color: #660066;">addColumn</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;string&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;Languages&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	table.<span style="color: #660066;">addColumn</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;number&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;Hours worked&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	table.<span style="color: #660066;">addRows</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	table.<span style="color: #660066;">setValue</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;PHP&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	table.<span style="color: #660066;">setValue</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;Python&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	table.<span style="color: #660066;">setValue</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;JS&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	table.<span style="color: #660066;">setValue</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #CC0000;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	table.<span style="color: #660066;">setValue</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	table.<span style="color: #660066;">setValue</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	targetDiv <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'chart'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	chart <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">visualization</span>.<span style="color: #660066;">PieChart</span><span style="color: #009900;">&#40;</span>targetDiv<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	chart.<span style="color: #660066;">draw</span><span style="color: #009900;">&#40;</span>table<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> <span style="color: #CC0000;">400</span><span style="color: #339933;">,</span> height<span style="color: #339933;">:</span> <span style="color: #CC0000;">240</span><span style="color: #339933;">,</span> is3D<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> title<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Languges Worked With (in hours)'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">visualization</span>.<span style="color: #660066;">events</span>.<span style="color: #660066;">addListener</span><span style="color: #009900;">&#40;</span>chart<span style="color: #339933;">,</span> <span style="color: #3366CC;">'select'</span><span style="color: #339933;">,</span> selectionHandler<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">function</span> selectionHandler<span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			selectedData <span style="color: #339933;">=</span> chart.<span style="color: #660066;">getSelection</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			row <span style="color: #339933;">=</span> selectedData<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">row</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">item</span> <span style="color: #339933;">=</span> table.<span style="color: #660066;">getValue</span><span style="color: #009900;">&#40;</span>row<span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			time <span style="color: #339933;">=</span> table.<span style="color: #660066;">getValue</span><span style="color: #009900;">&#40;</span>row<span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			resultDiv <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'res'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			resultDiv.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;Selected Language: &quot;</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">item</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; / Working Hours: &quot;</span> <span style="color: #339933;">+</span> time <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&lt;br&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #009900;">&#125;</span></pre></div></div>

<p>It&#8217;s very simple and easy. First we include the root javascript from: http://google.com/jsapi and then put the above codes in a script tag inside head.</p>
<p>We use the google loader to load the visualization package and then use it to build a PieChart. When the loading is done, the setOnLoadCallback() method invokes another function to proceed with further execution. We packed our main code inside a drawChart() function and set it as the callback.</p>
<p>To assemble the data, we first need a DataTable. A data table is an object with virtual columns and rows. First, we need to define the columns. We do that by calling the addColumn() method. The first parameter is the data type and the second one is the name. In our example, we added two columns.</p>
<p>Next, we call the addRows() passing an integer as the only parameter. This method creates &#8220;filler&#8221; or empty sets for putting data into.</p>
<p>Then, we use the setValue() call to insert/update data. The first parameter is the row number counted from 0. The second one is the index of column. Remember the sequence of the column definitions? Yes, follow that sequence. The first column is the index 0. The 3rd parameter is the actual value for that row and column.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">table.<span style="color: #660066;">setValue</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;meaow&quot;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>The above call will insert the string &#8220;meaow&#8221; into the second column of the 3rd row. It&#8217;s easy! <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
PS: Please be aware of the data type of the column while inserting/updating data.</p>
<p>Now that we have a DataTable at our disposal, all we need to do is feed this data to a PieChart and draw it up. First, we created a new div with the id &#8220;chart&#8221;. This div will be holding the chart. Then we call the PieChart constructor with this div element. Then we call the draw() method of the chart object to paint it on the screen. The first parameter is the datatable and the second one is an object (dictionary/associative array like) defining the look and feel of the charts.</p>
<p>That draws the chart alright. But I need to let the users interact with the chart. So, I added a Listener to listen to any &#8220;select&#8221; events and call the handler function back. We get a event object but for select events, they don&#8217;t have any properties. That is they don&#8217;t tell you what the user clicked. You have to get the data by calling the getSelection() method of the chart. The returned object will have &#8220;row&#8221; and &#8220;column&#8221; values. For PieChart, alone the row value does the job. We get the row index. Then call the getValue() method of the data table to get the value of a certain column in a row. In this case, I just iterated over both columns. Built a text string out of the data and dynamically updated a div with that! </p>
<p>It&#8217;s pretty simple. It&#8217;s powerful and user friendly as well.</p>
<p>PS: I really liked the Google Ajax Playground. I am gonna play a lot in there from now on <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I just realized I&#8217;m becoming a good coder as well. I wrote the above codes without any pretty printer or code formatter. It looks well indented to me <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://masnun.com/blog/2010/05/01/working-with-the-google-chart-visualization-javascript-apis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hosting your Twitter Bots on Google App Engine</title>
		<link>http://masnun.com/blog/2010/02/02/hosting-your-twitter-bots-on-google-app-engine/</link>
		<comments>http://masnun.com/blog/2010/02/02/hosting-your-twitter-bots-on-google-app-engine/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 11:45:56 +0000</pubDate>
		<dc:creator>masnun</dc:creator>
				<category><![CDATA[Blog Post]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://masnun.com/?p=829</guid>
		<description><![CDATA[UPDATE: Download the improved version of the application. I have made some code changes after the blog post got posted to reddit. The source code is now more readable and the app easily configurable. I am amazed to see the &#8230; <a href="http://masnun.com/blog/2010/02/02/hosting-your-twitter-bots-on-google-app-engine/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE: </strong> <a href="http://masnun.googlecode.com/files/twitter_bot_gae_v2.zip">Download</a>  the improved version of the application. I have made some code changes after the blog post got posted to reddit. The source code is now more readable and the app  easily configurable.</p>
<hr />
<p>I am amazed to see the implementation of cron jobs on Google App Engine. I was hosting my twitter bots on my paid shared hosting. My scripts were written in php and they were run via cron jobs set from my cPanel. Of course the cPanel cron UI is now quite familiar to me, to us who use it very often. But as a matter of fact, I can&#8217;t run per minute cron on my host. I should have a minimum interval of 15 minutes between two execution of the same cron job. I was amazed when I first discovered that Google App Engine lets me run cron every minute. Since they calculate my usage in different types of quotas, they hardly care about how often you schedule your cron. So, I decided to port my twitter bots to GAE and Python.</p>
<p>The idea was pretty simple. I already had a Yahoo! Pipe setup which mashes up multiple RSS feeds into one. My app will be collecting data from the pipe in JSON format. Then it&#8217;ll check the last tweeted entry and tweet the newer entries. Pretty straightforward algorithm. I registered a new application for my bots and started developing it on my local machine.</p>
<p>I integrated the u.nu url shortening service with their API quite easily. Though Python 2.6.2 has a built in module for JSON handling, Python 2.5 doesn&#8217;t have it. So, I had to install simplejson for JSON decoding. Later, I moved on to finding a good twitter client for my app. I first tried python-twitter. I have previously used it and it worked fine. But the application was generating some error messages when I integrated into GAE. I was puzzled and tried to find if there was something wrong in my coding. After about an hour, I concluded that my code was okay! There&#8217;s something wrong with the client. A bit of googling revealed that &#8220;python-twitter&#8221; doesn&#8217;t work on GAE without any hacks :&#8217;(. I had to find an alternative and I chose tweepy for that. It was working fine with the app.</p>
<p>Finally after 3 hours, the app was ready and it&#8217;s working! GAE doesn&#8217;t permit long execution period for a process, so I had to decrease the amount of tweets per request. But I covered that up by setting a more frequent cron job <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I would try the new taskqueue API soon to see if that has any help for my app.</p>
<p>My twitter bots have proved handy in the past and it feels great that I can host them on a scalable and efficient platform like Google App Engine &#8212; without paying a single dollar per month! <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><strong>Download Source :</strong> <a href="http://masnun.googlecode.com/files/Twitter_BOT_GAE.zip">http://masnun.googlecode.com/files/Twitter_BOT_GAE.zip</a> <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://masnun.com/blog/2010/02/02/hosting-your-twitter-bots-on-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Google Go Experience</title>
		<link>http://masnun.com/blog/2010/01/02/the-google-go-experience/</link>
		<comments>http://masnun.com/blog/2010/01/02/the-google-go-experience/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 13:07:07 +0000</pubDate>
		<dc:creator>masnun</dc:creator>
				<category><![CDATA[Blog Post]]></category>
		<category><![CDATA[go]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://masnun.com/?p=776</guid>
		<description><![CDATA[I have always wanted to check out the Go language sooner but unfortunately enough couldn&#8217;t have a go&#8230; Today I googled if there are any debian packages for Google Go and luckily I found one&#8230; It&#8217;s of course not an &#8230; <a href="http://masnun.com/blog/2010/01/02/the-google-go-experience/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have always wanted to check out the Go language sooner but unfortunately enough couldn&#8217;t have a go&#8230; Today I googled if there are any debian packages for Google Go and luckily I found one&#8230; It&#8217;s of course not an official release from the Go team. Still it interested me. I downloaded the file and installed the package. Yeah, it works! This is the first time I am playing with Go, so no issues have been encountered. But the debian package requires me to overwrite some of the GCC files. Again, I am not a serious C/C++ programmer, so I don&#8217;t know if that has damaged my GCC to any extent.</p>
<p>Oh yeah, I forgot to mention I am on Ubuntu 9.04 <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I downloaded the package from this link: <a href="http://drop.io/gccgodeb/asset/gccgo-4-5-0-1-i386-deb">http://drop.io/gccgodeb/asset/gccgo-4-5-0-1-i386-deb</a></p>
<p>It&#8217;s nearly a 27 MB of download. I downloaded and double clicked to install it. The installation failed with some errors. So, I pointed back to the <a href="http://www.atoztoa.com/2009/11/gccgo-debian-package.html">Original Source Page</a> (Author&#8217;s Blog Post) of the package and re-read carefully. I had to use the command line to set &#8220;&#8211;force-overwrite&#8221; mode to the dpkg utility so that it could overwrite files at it&#8217;s discretion. Here&#8217;s the command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">--force-overwrite</span> <span style="color: #660033;">-i</span> gccgo_4.5.0-<span style="color: #000000;">1</span>_i386.deb</pre></div></div>

<p>Now, for quick demo, I downloaded the sample &#8220;Hello World!&#8221; source code from the official Go website at <a href="http://golang.org/">http://golang.org/</a> <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  (Hey, wasn&#8217;t it http://go-lang.org the last time I visited it? No way, both URL works now <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  )</p>

<div class="wp_syntax"><div class="code"><pre class="go" style="font-family:monospace;">package main
&nbsp;
import &quot;fmt&quot;
&nbsp;
func main() {
  fmt.Printf(&quot;Hello, ??\n&quot;)
}</pre></div></div>

<p>PS: I am sorry that my Syntax Highlighter doesn&#8217;t yet have the Go syntax highlighting patterns. Neither does my code editor! But still I used the code block, just out of a good practice! <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Then I compiled the source (after naming it masnun.go) with the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gccgo masnun.go</pre></div></div>

<p>It created the file a.out . I ran it from the command line again:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">masnun<span style="color: #000000; font-weight: bold;">@</span>ubuntu:~<span style="color: #000000; font-weight: bold;">/</span>Desktop$ .<span style="color: #000000; font-weight: bold;">/</span>a.out
Hello, ??
masnun<span style="color: #000000; font-weight: bold;">@</span>ubuntu:~<span style="color: #000000; font-weight: bold;">/</span>Desktop$</pre></div></div>

<p>It was pretty easy in fact! I am going to play with Go at my leisure to check out what it has to provide the developers with&#8230; I love Python, let&#8217;s see if Go can give me anything more than Python <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks to Google, we have another programming language to do our bidding! Happy programming!</p>
]]></content:encoded>
			<wfw:commentRss>http://masnun.com/blog/2010/01/02/the-google-go-experience/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using SVN with GoogleCode Project Hosting</title>
		<link>http://masnun.com/blog/2009/09/13/using-svn-with-googlecode-project-hosting/</link>
		<comments>http://masnun.com/blog/2009/09/13/using-svn-with-googlecode-project-hosting/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 13:15:23 +0000</pubDate>
		<dc:creator>masnun</dc:creator>
				<category><![CDATA[Blog Post]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://masnun.com/?p=618</guid>
		<description><![CDATA[At Leevio, we are going to use SVN or Subversion a lot. For demonstration and playing with the SVN system I chose Google Code Project hosting since it&#8217;s free and feature packed. I am a beginner at operating SVN and &#8230; <a href="http://masnun.com/blog/2009/09/13/using-svn-with-googlecode-project-hosting/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At Leevio, we are going to use SVN or Subversion a lot. For demonstration and playing with the SVN system I chose Google Code Project hosting since it&#8217;s free and feature packed. I am a beginner at operating SVN and I had to get a sandbox SVN server to practise what I learn.</p>
<p>I already had the http://masnun.googlecode.com ready for this. So, I started trying out SVN on this account feeling relaxed that no matter what changes I make, no serious harm will be done.</p>
<p>SVN is pretty easy in fact. I read the &#8220;SVN Book&#8221; and &#8220;The Visual Guide to SVN&#8221;. None of them helped me grab SVN like the shell command &#8212; &#8220;svn help&#8221;. It was self explanatory and had a list of all available commands.</p>
<p>To start, I had to create a local repository or better said a local mirror of the project. I did the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> checkout https:<span style="color: #000000; font-weight: bold;">//</span>masnun.googlecode.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span> masnun <span style="color: #660033;">--username</span> masnun</pre></div></div>

<p>It created a directory named &#8220;masnun&#8221; inside my linux home directory after I authenticated with my googlecode password.</p>
<p>Now I was ready to add files. So I copied a file named &#8220;quotes&#8221; into the /home/masnun/masnun (the local mirror) directory and typed in:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> add quotes</pre></div></div>

<p>I got a text editing environment to write the changelog. After typing in a message, I pressed Ctrl+O to write out and then Ctrl + X to quit the editor.</p>
<p>Now the changes were reflected in the local copies, I had to sync the server. So I used:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> commit</pre></div></div>

<p>And it transmitted all the data to the server <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now, I made some changes and updated the file using the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> update quotes</pre></div></div>

<p>Again, wrote the changelog and then :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> commit</pre></div></div>

<p>I liked the simplicity and hated that I spent up much time reading theories telling me why SVN replaced CVS <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Well, now I decided to delete the file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> del quotes
<span style="color: #c20cb9; font-weight: bold;">svn</span> commit</pre></div></div>

<p>That was it&#8230; Easy !</p>
]]></content:encoded>
			<wfw:commentRss>http://masnun.com/blog/2009/09/13/using-svn-with-googlecode-project-hosting/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Decoding Google&#039;s Tweet With PHP</title>
		<link>http://masnun.com/blog/2009/09/05/decoding-googles-tweet-with-php/</link>
		<comments>http://masnun.com/blog/2009/09/05/decoding-googles-tweet-with-php/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 06:30:57 +0000</pubDate>
		<dc:creator>masnun</dc:creator>
				<category><![CDATA[Blog Post]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[humour]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://masnun.com/?p=549</guid>
		<description><![CDATA[This is something for fun &#8212; nothing serious. It just happened that Google just sent a mysterious Tweet around 2 hours ago from now with an image with of the Google home page featuring an UFO. The UFO was seen &#8230; <a href="http://masnun.com/blog/2009/09/05/decoding-googles-tweet-with-php/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is something for fun &#8212; nothing serious. It just happened that Google just sent a <a href="http://twitter.com/google/status/3772868874">mysterious Tweet </a> around 2 hours ago from now with an image with of the Google home page featuring an UFO. The UFO was seen pulling an O out of the google logo. But what the heck does that tweet mean ?</p>
<p><strong>1.12.12 25.15.21.18 15 1.18.5 2.5.12.15.14.7 20.15 21.19 </strong> was the tweet.</p>
<p>Well, it&#8217;s nothing tough. Every number separated by a dot or space corresponds to the alphabet. So, I wrote a PHP script to decode this mysterious tweet and finally found the meaning:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">&nbsp;
masnun<span style="color: #000000; font-weight: bold;">@</span>ubuntu:~<span style="color: #000000; font-weight: bold;">/</span>Desktop$ php decode-google-tweet
all your o are belong to us
masnun<span style="color: #000000; font-weight: bold;">@</span>ubuntu:~<span style="color: #000000; font-weight: bold;">/</span>Desktop$</pre></div></div>

<p>So, it meant <b>&#8221; all your o are belong to us &#8221; </b> <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
Sounds a bit odd ? Or wrong in grammar ? yeah, still, that&#8217;s the message. It is confirmed on the twitpic image.</p>
<p>And here&#8217;s the source code &#8211;</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #000088;">$num</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// placeholder for 1 to 26</span>
<span style="color: #000088;">$alpha</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// placeholder for a to z</span>
&nbsp;
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">27</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$num</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span> <span style="color: #000088;">$i</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;">// dynamically store 1 to 26 in the array</span>
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'a'</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #0000ff;">'z'</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$alpha</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span> <span style="color: #000088;">$i</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;">// dynamically store a to y in the array</span>
<span style="color: #000088;">$alpha</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'z'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// manually add z to the array</span>
<span style="color: #000088;">$dict</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_combine</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$num</span><span style="color: #339933;">,</span><span style="color: #000088;">$alpha</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// combine them to form a dictionary</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// print_r($dict);</span>
&nbsp;
<span style="color: #000088;">$string</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;1.12.12 25.15.21.18 15 1.18.5 2.5.12.15.14.7 20.15 21.19&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// the code to decode</span>
<span style="color: #000088;">$arr</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$string</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// differentiate the parts</span>
&nbsp;
<span style="color: #000088;">$meaning</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// placeholder for the ultimate meaning</span>
&nbsp;
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span>count<span style="color: #009900;">&#40;</span><span style="color: #000088;">$arr</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #000088;">$s</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$arr</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// dot seperated portions</span>
<span style="color: #000088;">$a</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;.&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$s</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// seperate the numbers</span>
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$j</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$j</span><span style="color: #339933;">&lt;</span>count<span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$j</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$a</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$j</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// get individual numbers</span>
<span style="color: #000088;">$meaning</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$dict</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// look up in the dictionary for the corresponding char</span>
 <span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$meaning</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// restore the spaces</span>
&nbsp;
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$meaning</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// echo the meaning</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>It was quite a bit of fun decoding the message with PHP. Well, I do agree that there was no need to use PHP here. But why do the hard work from memory when you have automation tools at your hand <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ?</p>
]]></content:encoded>
			<wfw:commentRss>http://masnun.com/blog/2009/09/05/decoding-googles-tweet-with-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using web.py with Google App Engine</title>
		<link>http://masnun.com/blog/2009/08/01/using-web-py-with-google-app-engine/</link>
		<comments>http://masnun.com/blog/2009/08/01/using-web-py-with-google-app-engine/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 03:15:12 +0000</pubDate>
		<dc:creator>masnun</dc:creator>
				<category><![CDATA[Blog Post]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[free-services]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://masnun.com/?p=382</guid>
		<description><![CDATA[I love coding in Python and have been exploring the excellent web.py framework lately. From what I&#8217;ve seen, web.py is a very simple yet powerful python based web framework. It&#8217;d take me a lot of time to learn django (if &#8230; <a href="http://masnun.com/blog/2009/08/01/using-web-py-with-google-app-engine/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I love coding in Python and have been exploring the excellent web.py framework lately. From what I&#8217;ve seen, web.py is a very simple yet powerful python based web framework. It&#8217;d take me a lot of time to learn django (if I ever manage to make up my mind into it) and it already took around a couple of hours to understand the Google App Engine&#8217;s default webapp framework.</p>
<p>web.py includes a built in web server to develop an application locally. But I am a Google fan and was thinking of deploying web.py on Google App Engine. I believed GAE and web.py together can help me put up a web app in minutes. And so did they&#8230; <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>The first question came to my mind was &#8220;How am I going to install web.py on my GAE account ?&#8221;. Well, it was pretty easy in the end. Just extract the web.py package and put the &#8220;web&#8221; directory inside your application directory. That is the &#8220;web&#8221; directory would be in the same directory where the app.yaml file resides. Now, in app.yaml file, map all URLs to a single python file. In my case, it was &#8220;main.py&#8221;.</p>
<p>Now develop the application in the normal web.py way. &#8220;It&#8217;s easy as pie!&#8221; &#8212; I thought. But it was not that easy in fact. I had to make a couple of changes.</p>
<p>The app I wrote didn&#8217;t do what I expected it to. Rather it raised an &#8220;import error&#8221; <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  Later, I found out that I have to use &#8220;web.application.cgirun()&#8221; method instead of the normal &#8220;run()&#8221; method.</p>
<p>Then I reloaded the app. But this time I got an &#8220;internal server error&#8221;. After visiting the web.py cookbook, I found out that, to use web.py templates on GAE, I have to compile all templates using the &#8220;web/template.py &#8211;compile templates&#8221; command. I did so. All my templates were compiled into python source code. Cool !</p>
<p>Now my app was running smooth and working fine ! So, at last I made it&#8230; Yahoo ! I am loving python, web.py and Google App Engine together <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>PS: I am using web.py 0.3 where I have the cgirun() method. In older versions of web.py, you have to be tricky. In that case, please consult this thread:</p>
<p><a href="http://bit.ly/EoVyM" target="_blank">http://bit.ly/EoVyM</a></p>
<p><strong>Here&#8217;s the source code (Without the template):</strong></p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> web
urls = <span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;/(.*)&quot;</span>,<span style="color: #483d8b;">&quot;site&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> <span style="color: #dc143c;">site</span>:
	<span style="color: #ff7700;font-weight:bold;">def</span> GET<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>,path<span style="color: black;">&#41;</span>:
		render = web.<span style="color: black;">template</span>.<span style="color: black;">render</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'templates'</span><span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">return</span> render.<span style="color: black;">masnun</span><span style="color: black;">&#40;</span>path<span style="color: black;">&#41;</span>
&nbsp;
app = web.<span style="color: black;">application</span><span style="color: black;">&#40;</span>urls,<span style="color: #008000;">globals</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
	app.<span style="color: black;">cgirun</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">'__main__'</span>:
  main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p><strong>Here&#8217;s the &#8220;templates/masnun.htm&#8221;:</strong></p>
<pre>$def with (name)
&lt;html&gt;&lt;head&gt;&lt;title&gt;web.py demo&lt;/title&gt;&lt;/head&gt;&lt;body&gt;
You requested: &lt;b&gt; $name&lt;/b&gt;&lt;/body&gt;&lt;/html&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://masnun.com/blog/2009/08/01/using-web-py-with-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Behavior: A Hypothesis</title>
		<link>http://masnun.com/blog/2009/04/18/google-behavior-a-hypothesis/</link>
		<comments>http://masnun.com/blog/2009/04/18/google-behavior-a-hypothesis/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 15:45:24 +0000</pubDate>
		<dc:creator>masnun</dc:creator>
				<category><![CDATA[Blog Post]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://masnun.com/2009/04/18/google-behavior-a-hypothesis/</guid>
		<description><![CDATA[I was just wondering what made Google drop my site from the first page of the &#8220;masnun&#8221; keyword. It was a very tensed period of my tech life. I started investigating the reasons. I first removed the links from buzzcity &#8230; <a href="http://masnun.com/blog/2009/04/18/google-behavior-a-hypothesis/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was just wondering what made Google drop my site from the first page of the &#8220;masnun&#8221; keyword. It was a very tensed period of my tech life. I started investigating the reasons. I first removed the links from buzzcity which usually ended up linking to a Java jad file. I removed them. Nothing happened. Then I started thinking about markup validation. From the look of it, valid mark up is doing the job for me. I had bunches of invalid html markup in my previous theme template. So I chose a brand new template that&#8217;s 100% valid and follows xhtml 1.0 strict rules. I made no post, no pings and Google brought me back to the front page.
</p>
<p>It&#8217;s just a hypothesis that Google is extremely serious about markup validation. I am not sure about it. Lets see if my site stays on number 2 position from now on. </p>
]]></content:encoded>
			<wfw:commentRss>http://masnun.com/blog/2009/04/18/google-behavior-a-hypothesis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Strange Google Behavior</title>
		<link>http://masnun.com/blog/2009/04/12/strange-google-behavior/</link>
		<comments>http://masnun.com/blog/2009/04/12/strange-google-behavior/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 13:42:05 +0000</pubDate>
		<dc:creator>masnun</dc:creator>
				<category><![CDATA[Blog Post]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://masnun.com/2009/04/12/strange-google-behavior/</guid>
		<description><![CDATA[My site has not been banned from Google&#8217;s index, yet, my site ranking has fallen. And it ain&#8217;t showing up for the keyword &#8220;masnun&#8221;&#8230; Not at all&#8230; I was using no black hat SEO, still I think a certain change &#8230; <a href="http://masnun.com/blog/2009/04/12/strange-google-behavior/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My site has not been banned from Google&#8217;s index, yet, my site ranking has fallen. And it ain&#8217;t showing up for the keyword &#8220;masnun&#8221;&#8230; Not at all&#8230;</p>
<p>I was using no black hat SEO, still I think a certain change in the design caused the havoc. I have taken some corrective measures to see what happens next.</p>
]]></content:encoded>
			<wfw:commentRss>http://masnun.com/blog/2009/04/12/strange-google-behavior/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google CSE with maSnun.com</title>
		<link>http://masnun.com/blog/2009/03/21/google-cse-with-masnuncom/</link>
		<comments>http://masnun.com/blog/2009/03/21/google-cse-with-masnuncom/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 15:26:36 +0000</pubDate>
		<dc:creator>masnun</dc:creator>
				<category><![CDATA[Blog Post]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[site-news]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://masnun.com/2009/03/21/google-cse-with-masnuncom/</guid>
		<description><![CDATA[I have finally replaced WordPress&#8217; default search engine with Google Custom Search Engine (CSE). I previously used to use Google Custom Search engine in the past on my old Freewebs site. But today while exploring my adsense account, I decided &#8230; <a href="http://masnun.com/blog/2009/03/21/google-cse-with-masnuncom/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have finally replaced WordPress&#8217; default search engine with Google Custom Search Engine (CSE).
</p>
<p>I previously used to use Google Custom Search engine in the past on my old <a href="http://freewebs.com/masnun">Freewebs</a> site. But today while exploring my adsense account, I decided to add a &#8220;Adsense for search&#8221; block to masnun.com. I created the search engine and put the code on masnun.com straightway while using the option to open search result in a new page. But soon I gathered some interest to add the search page right on masnun.com.
</p>
<p>To display the search results on my site, I had to put two blocks of code. One for the search box, another for the result page. I am using wordpress. So, to copy my template I had to edit one of my themes page. I chose the search result page of my current theme. I removed the code for WordPress&#8217; built in search functionality and put my Google CSE Search Result Page code.
</p>
<p>But to display the search result template, I have to visit: <a href="http://masnun.com/?s=something">http://masnun.com/?s=something</a>
	</p>
<p>So, I added a hidden field with the name &#8220;s&#8221; and value &#8220;search&#8221; to the search box form. I set the form&#8217;s target to: <a href="http://masnun.com/">http://masnun.com/</a>. I then put the code for the search box on my right sidebar replacing my old search box. Now It was working.
</p>
<p> But I was having problem with the right sidebar being over ridden by the search results. So I removed the following code:
</p>
<p><em>&lt;?php get_sidebar(); ?&gt; </em>. Removing it removed the sidebars. Only the header and the footer was visible to form the site template.
</p>
<p>Now the only problem with the layout was that I had no margin on the left side. The results were looking odd. Not being an CSS wizard, I had to manage some margin with table. Here&#8217;s the code:
</p>
<p><em>&lt;table&gt;<br/>&lt;tr&gt;&lt;td&gt;&amp;nbsp;&amp;npsp;&lt;/td&gt;<br/>&lt;td&gt;<br />
</em></p>
<p><em>The results page code here.<br />
</em></p>
<p><em>&lt;/td&gt;<br/>&lt;/tr&gt;<br/>&lt;/table&gt;<br />
</em></p>
<p>
 </p>
<p>Now that was fine.
</p>
<p>The search engine is running. I expect ads to pop up in the results page soon. I wish Google would index my new entries time to time. That would make the search mechanism a great one for masnun.com.
</p>
<p><strong>UPDATE: </strong>I am really amazed to see that this post got indexed by Google within twenty minutes!! That&#8217;s why Google rocks! Love you Google?!</p>
]]></content:encoded>
			<wfw:commentRss>http://masnun.com/blog/2009/03/21/google-cse-with-masnuncom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google App Engine Sample Apps</title>
		<link>http://masnun.com/blog/2009/03/18/google-app-engine-sample-apps/</link>
		<comments>http://masnun.com/blog/2009/03/18/google-app-engine-sample-apps/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 23:00:56 +0000</pubDate>
		<dc:creator>masnun</dc:creator>
				<category><![CDATA[Blog Post]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://masnun.com/2009/03/18/google-app-engine-sample-apps/</guid>
		<description><![CDATA[I recently found this URL: http://code.google.com/p/google-app-engine-samples/ It&#8217;s a Google Code project with links to some cool sample app source codes. I haven&#8217;t yet checked them out. But I liked the online demo of the &#8220;Shell&#8221; app. It&#8217;s really nice: http://shell.appspot.com/ &#8230; <a href="http://masnun.com/blog/2009/03/18/google-app-engine-sample-apps/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently found this URL:  <a href="http://code.google.com/p/google-app-engine-samples/">http://code.google.com/p/google-app-engine-samples/</a>
	</p>
<p>It&#8217;s a Google Code project with links to some cool sample app source codes.
</p>
<p>I haven&#8217;t yet checked them out. But I liked the online demo of the &#8220;Shell&#8221; app. It&#8217;s really nice: <a href="http://shell.appspot.com/">http://shell.appspot.com/</a>
	</p>
<p>Take your time to have some real fun <span style="font-family:Wingdings">J</span> with these projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://masnun.com/blog/2009/03/18/google-app-engine-sample-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
