<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3" -->
<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/"
	>

<channel>
	<title>Self Debugging</title>
	<link>http://www.selfdebugging.com</link>
	<description>The greatest of faults is to be conscious of none -- Thomas Carlyle</description>
	<pubDate>Sat, 15 Nov 2008 23:23:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3</generator>
	<language>en</language>
			<item>
		<title>The SV Google Technology User Group</title>
		<link>http://www.selfdebugging.com/2008/11/15/the-sv-google-technology-user-group/</link>
		<comments>http://www.selfdebugging.com/2008/11/15/the-sv-google-technology-user-group/#comments</comments>
		<pubDate>Sat, 15 Nov 2008 09:48:04 +0000</pubDate>
		<dc:creator>waleed</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.selfdebugging.com/2008/11/15/the-sv-google-technology-user-group/</guid>
		<description><![CDATA[I recently heard about an interesting user group that I should&#8217;ve known about earlier. The SV Google Technology User Group meets once a month at the Googleplex in Mountain View to discuss the latest from Google. 

At the last meetup on Wednesday Ryan Barrett from the App Engine team talked about recent updates and ideas [...]]]></description>
			<content:encoded><![CDATA[<p>I recently heard about an interesting user group that I should&#8217;ve known about earlier. The <a href="http://sv-gtug.org/">SV Google Technology User Group</a> meets once a month at the Googleplex in Mountain View to discuss the latest from Google. </p>
<p><a href='http://picasaweb.google.com/sv.gtug/SVGTUG112008' title=''><img src='http://www.selfdebugging.com/wordpress/wp-content/uploads/2008/11/svgtug.png' alt='' /></a></p>
<p>At the last meetup on Wednesday Ryan Barrett from the App Engine team talked about recent updates and ideas they&#8217;re thinking about. The most interesting for me was the idea of a local library that allows me to run a script locally to access my data on the Data Store through a REST API. That would make it easier to do things like making global updates to the data store or pulling everything to a local database for advanced reporting. Not that it can&#8217;t be done today, but a library from Google would standardize that and open the door for developers to write scripts that can work with any app engine application with little or no changes. </p>
<p>The main presentation was about <a href="http://www.sproutcore.com/">SproutCore</a>, a JavaScript framework that feels a lot like Ruby on Rails. It supports an MVC model, data bindings, automatic packing of JS files, and a big library of UI components. My view is that it has a great potential, especially with the continuing trend of pushing more functionality to the client side. But it&#8217;s still in it&#8217;s early days, and some developers, myself included, might have reservations about the lack of support for IE 6 in the current offering. But definitely something to keep an eye on. </p>
<p>Van Riper, the SV-GTUG Lead, was also kind enough to let me do a lightning talk bout some of the work that my startup is doing on the App Engine, especially <a href="http://www.bitpixels.com/">BitPixels</a>, a website thumbnail service, that we&#8217;re using to serve about 5 million thumbnails a month. We store all the thumbnails in the data store and serve them off of Google&#8217;s infrastructure, which is working great for us. </p>
<p>Pictures from the meetup <a href="http://picasaweb.google.com/sv.gtug/SVGTUG112008">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.selfdebugging.com/2008/11/15/the-sv-google-technology-user-group/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Super Simple Facebook App</title>
		<link>http://www.selfdebugging.com/2008/10/28/a-super-simple-facebook-app/</link>
		<comments>http://www.selfdebugging.com/2008/10/28/a-super-simple-facebook-app/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 23:56:03 +0000</pubDate>
		<dc:creator>waleed</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.selfdebugging.com/2008/10/28/a-super-simple-facebook-app/</guid>
		<description><![CDATA[Last night I was invited to do a quick presentation at the Facebook meetup at AOL on how to start building Facebook applications. I generally prefer the hands-on approach, so rather than talking about the concepts, I chose to write a simple app on stage to show how easy it is to get started on [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I was invited to do a quick presentation at the Facebook meetup at AOL on how to start building Facebook applications. I generally prefer the hands-on approach, so rather than talking about the concepts, I chose to write a simple app on stage to show how easy it is to get started on Facebook development. I chose to build a gifting app because it&#8217;s simple enough that it can be done in an hour, and it covers the basic concepts of Facebook development including invites. Things went well, and we had a functional app running live on Facebook by the end of the hour. If you want to try, it&#8217;s called <a href="http://www.facebook.com/apps/application.php?id=87740630267">Hello Halloween</a>.</p>
<p>Many in the audience wanted a copy of the source code, so I&#8217;m releasing it here under the if-something-goes-wrong-I-have-nothing-to-do-with-it license. Feel free to use and change it in any shape or form you like, commercial or non-commercial. So, without further ado, here is the code, and then more details below:</p>
<div style="background-color:#f0f0f0;width:500px;overflow-x:scroll;font-size:10px;line-height:10px;">
<pre>
&lt;?
require_once &#39;facebook&#47;facebook.php&#39;;

$API_KEY = &#34;???api_key&#34;;
$SECRET_KEY = &#34;???secret_key&#34;;
$CODE_ROOT = &#34;??? path to your server. e.g.: http:&#47;&#47;mydomain.com&#47;halloween&#47;&#34;;

$fb = new Facebook($API_KEY, $SECRET_KEY);
$uid = $fb-&gt;require_login();

$conn = mysql_connect(&#39;???mysql_host&#39;, &#39;???mysql_user&#39;, &#39;???mysql_password&#39;);
mysql_select_db(&#39;???mysql_database&#39;, $conn);
mysql_query(&#34;INSERT Users(uid) VALUES($uid);&#34;, $conn);
?&gt;

&lt;style&gt;
    .giftbox img { width:80px; height:80px; }
    .giftbox {
        float:left;
        margin:10px 20px;
        border:1px solid #f0f0f0;
        width: 130px;
        height: 100px;
    }
    .menu {font-size:1.1em;margin-bottom:30px;font-weight:bold;}
    .page {width:640px;margin-left:30px;}
&lt;&#47;style&gt;

&lt;div class=&#34;page&#34;&gt;
    &lt;div class=&#34;menu&#34;&gt;
    &lt;a href=&#34;&#47;hellohalloween&#47;&#34;&gt;Home&lt;&#47;a&gt;
    | &lt;a href=&#34;&#47;hellohalloween&#47;?receivedgifts&#34;&gt;Received Gifts&lt;&#47;a&gt;
    | &lt;a href=&#34;&#47;hellohalloween&#47;?sentgifts&#34;&gt;Sent Gifts&lt;&#47;a&gt;&lt;br&#47;&gt;
    &lt;&#47;div&gt;

    &lt;? if (isset($_REQUEST&#91;&#39;receivedgifts&#39;&#93;)): ?&gt;
        &lt;h1&gt;You Received These Gifts:&lt;&#47;h1&gt;
        &lt;table style=&#34;border-collapse:collapse;&#34; border=&#34;1&#34; bordercolor=&#34;#c0c0c0&#34; cellpadding=&#34;20&#34;&gt;
            &lt;tr&gt;
                &lt;th&gt;From&lt;&#47;th&gt;
                &lt;th&gt;Gift&lt;&#47;th&gt;
                &lt;th&gt;Date&lt;&#47;th&gt;
            &lt;&#47;tr&gt;
            &lt;? $q = mysql_query(&#34;SELECT * FROM Gifts WHERE receiver = $uid&#34;); ?&gt;
            &lt;? while ($row = mysql_fetch_assoc($q)): ?&gt;
                &lt;tr&gt;
                &lt;td&gt;&lt;fb:profile-pic uid=&#34;&lt;?=$row&#91;&#39;sender&#39;&#93;?&gt;&#34; &#47;&gt;&lt;&#47;td&gt;
                &lt;td&gt;&lt;img src=&#34;&lt;?=$CODE_ROOT?&gt;images&#47;gift0000&lt;?=$row&#91;&#39;gift&#39;&#93;?&gt;.jpg&#34; &#47;&gt;&lt;&#47;td&gt;
                &lt;td&gt;&lt;?=$row&#91;&#39;time_sent&#39;&#93;?&gt;&lt;&#47;td&gt;
            &lt;&#47;tr&gt;
        &lt;? endwhile; ?&gt;
        &lt;&#47;table&gt;
    &lt;? elseif (isset($_REQUEST&#91;&#39;sentgifts&#39;&#93;)): ?&gt;
        &lt;h1&gt;You Sent These Gifts:&lt;&#47;h1&gt;
        &lt;table style=&#34;border-collapse:collapse;&#34; border=&#34;1&#34; bordercolor=&#34;#c0c0c0&#34; cellpadding=&#34;20&#34;&gt;
            &lt;tr&gt;
                &lt;th&gt;To&lt;&#47;th&gt;
                &lt;th&gt;Gift&lt;&#47;th&gt;
                &lt;th&gt;Date&lt;&#47;th&gt;
            &lt;&#47;tr&gt;
            &lt;? $q = mysql_query(&#34;SELECT * FROM Gifts WHERE sender = $uid&#34;); ?&gt;
            &lt;? while ($row = mysql_fetch_assoc($q)): ?&gt;
                &lt;tr&gt;
                &lt;td&gt;&lt;fb:profile-pic uid=&#34;&lt;?=$row&#91;&#39;receiver&#39;&#93;?&gt;&#34; &#47;&gt;&lt;&#47;td&gt;
                &lt;td&gt;&lt;img src=&#34;&lt;?=$CODE_ROOT?&gt;images&#47;gift0000&lt;?=$row&#91;&#39;gift&#39;&#93;?&gt;.jpg&#34; &#47;&gt;&lt;&#47;td&gt;
                &lt;td&gt;&lt;?=$row&#91;&#39;time_sent&#39;&#93;?&gt;&lt;&#47;td&gt;
            &lt;&#47;tr&gt;
        &lt;? endwhile; ?&gt;
        &lt;&#47;table&gt;
    &lt;? else: ?&gt;
        &lt;? if (isset($_REQUEST&#91;&#39;gift&#39;&#93;)): ?&gt;
            &lt;?
                $giftId = (int)$_REQUEST&#91;&#39;gift&#39;&#93;;
                $ids = $_REQUEST&#91;&#39;ids&#39;&#93;;
                foreach ($ids as $id) {
                    mysql_query(&#34;INSERT Gifts(sender, receiver, gift) VALUES($uid, $id, $giftId);&#34;, $conn);
                }
            ?&gt;
            &lt;div style=&#34;padding:5px;font-size:2em;border:1px solid #F8F0E8;background-color:#FFFEe8;&#34;&gt;Awesome. Your gifts are on their way. Why not send some more?&lt;&#47;div&gt;
        &lt;? endif; ?&gt;

        &lt;fb:request-form
            action=&#34;index.php&#34;
            method=&#34;POST&#34;
            invite=&#34;false&#34;
            type=&#34;Hello Halloween&#34;
            content=&#34;I sent you a scary halloween gift.&lt;fb:req-choice url=&#39;http:&#47;&#47;apps.facebook.com&#47;hellohalloween&#47;?receivedgifts&#39; label=&#39;Accept Gift&#39;&#34;
            &gt;
            &lt;h1 style=&#34;margin-left:20px;&#34;&gt;1. Select a gift&lt;&#47;h1&gt;
            &lt;div class=&#34;giftbox&#34;&gt;
                &lt;input name=&#34;gift&#34; type=&#34;radio&#34; value=&#34;1&#34; checked &#47;&gt;
                &lt;img src=&#34;&lt;?=$CODE_ROOT?&gt;images&#47;gift00001.jpg&#34;&gt;&lt;br&#47;&gt;
            &lt;&#47;div&gt;
            &lt;div class=&#34;giftbox&#34;&gt;
                &lt;input name=&#34;gift&#34; type=&#34;radio&#34; value=&#34;2&#34; &#47;&gt;
                &lt;img src=&#34;&lt;?=$CODE_ROOT?&gt;images&#47;gift00002.jpg&#34;&gt;&lt;br&#47;&gt;
            &lt;&#47;div&gt;
            &lt;div class=&#34;giftbox&#34;&gt;
                &lt;input name=&#34;gift&#34; type=&#34;radio&#34; value=&#34;3&#34; &#47;&gt;
                &lt;img src=&#34;&lt;?=$CODE_ROOT?&gt;images&#47;gift00003.jpg&#34;&gt;&lt;br&#47;&gt;
            &lt;&#47;div&gt;
            &lt;div class=&#34;giftbox&#34;&gt;
                &lt;input name=&#34;gift&#34; type=&#34;radio&#34; value=&#34;4&#34; &#47;&gt;
                &lt;img src=&#34;&lt;?=$CODE_ROOT?&gt;images&#47;gift00004.jpg&#34;&gt;&lt;br&#47;&gt;
            &lt;&#47;div&gt;
            &lt;div class=&#34;giftbox&#34;&gt;
                &lt;input name=&#34;gift&#34; type=&#34;radio&#34; value=&#34;5&#34; &#47;&gt;
                &lt;img src=&#34;&lt;?=$CODE_ROOT?&gt;images&#47;gift00005.jpg&#34;&gt;&lt;br&#47;&gt;
            &lt;&#47;div&gt;
            &lt;div class=&#34;giftbox&#34;&gt;
                &lt;input name=&#34;gift&#34; type=&#34;radio&#34; value=&#34;6&#34; &#47;&gt;
                &lt;img src=&#34;&lt;?=$CODE_ROOT?&gt;images&#47;gift00006.jpg&#34;&gt;&lt;br&#47;&gt;
            &lt;&#47;div&gt;
            &lt;div class=&#34;giftbox&#34;&gt;
                &lt;input name=&#34;gift&#34; type=&#34;radio&#34; value=&#34;7&#34; &#47;&gt;
                &lt;img src=&#34;&lt;?=$CODE_ROOT?&gt;images&#47;gift00007.jpg&#34;&gt;&lt;br&#47;&gt;
            &lt;&#47;div&gt;
            &lt;div class=&#34;giftbox&#34;&gt;
                &lt;input name=&#34;gift&#34; type=&#34;radio&#34; value=&#34;8&#34; &#47;&gt;
                &lt;img src=&#34;&lt;?=$CODE_ROOT?&gt;images&#47;gift00008.jpg&#34;&gt;&lt;br&#47;&gt;
            &lt;&#47;div&gt;
            &lt;div class=&#34;giftbox&#34;&gt;
                &lt;input name=&#34;gift&#34; type=&#34;radio&#34; value=&#34;9&#34; &#47;&gt;
                &lt;img src=&#34;&lt;?=$CODE_ROOT?&gt;images&#47;gift00009.jpg&#34;&gt;&lt;br&#47;&gt;
            &lt;&#47;div&gt;
            &lt;div style=&#34;clear:both&#34;&#47;&gt;
            &lt;fb:multi-friend-selector showborder=&#34;false&#34; actiontext=&#34;2. Select friends to send it to&#34;&gt;
        &lt;&#47;fb:request-form&gt;
    &lt;? endif; ?&gt;
&lt;&#47;div&gt;
</pre>
</div>
<p>To run this you&#8217;ll need a host that can run PHP, and you need a mysql database with two tables:<br />
<b>Users</b>: a table to store the list of your app users. Add two columns here:<br />
- uid : a BIGINT to store the user id<br />
- time_added: (optional, but useful) a TIMESTAMP with the default value CURRENT_TIMESTAMP</p>
<p><b>Gifts</b>: a table to store who sent what to whom.<br />
- sender: BIGINT for the sender id<br />
- receiver: BIGINT for the receiver id<br />
- gift: TINYINT for the integer value representing the gift (1, 2, 3, &#8230;etc)<br />
- time_sent: a TIMESTAMP with the default value CURRENT_TIMESTAMP. </p>
<p>And, you&#8217;ll also need to search through the source code for the 3 question marks (???) and replace every instance with the appropriate value for your app (database name, id, password, api key, &#8230;etc). </p>
<p>You&#8217;ll also need to download the PHP client library from Facebook and put it in a folder called facebook under your app root. Get the library <a href="http://developers.facebook.com/get_started.php">here</a>.</p>
<p>And, finally, you&#8217;ll need to get your own gift images and put them in the &#8220;images&#8221; folder under your app folder. Name your gifts in the form &#8220;gift00001.jpg&#8221;, &#8220;gift00002.jpg&#8221;, &#8230;etc. And, make sure the images are square in dimensions so they don&#8217;t look funny when scaled in the app. </p>
<p>That&#8217;s about it. Enjoy. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.selfdebugging.com/2008/10/28/a-super-simple-facebook-app/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Facebook Connect Demo</title>
		<link>http://www.selfdebugging.com/2008/10/04/facebook-connect-demo/</link>
		<comments>http://www.selfdebugging.com/2008/10/04/facebook-connect-demo/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 02:54:56 +0000</pubDate>
		<dc:creator>waleed</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.selfdebugging.com/2008/10/04/facebook-connect-demo/</guid>
		<description><![CDATA[Update: I removed the widget from the right side column because Facebook Connect still has bugs and it didn&#8217;t work for all users. Instead, here is an image of how the widget would look like live on the blog. 



This is a demo I wrote for the Facebook Meetup on Sept. 29th. Unfortunately I didn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p><b>Update:</b> I removed the widget from the right side column because Facebook Connect still has bugs and it didn&#8217;t work for all users. Instead, here is an image of how the widget would look like live on the blog. </p>
<p><center><br />
<a href='http://www.selfdebugging.com/wordpress/wp-content/uploads/2008/10/fbconnectdemo.png' title='Facebook Connect Widget'><img src='http://www.selfdebugging.com/wordpress/wp-content/uploads/2008/10/fbconnectdemo.png' alt='Facebook Connect Widget' /></a><br />
</center></p>
<p>This is a demo I wrote for the <a href="http://www.facebook.com/event.php?eid=27859189750">Facebook Meetup</a> on Sept. 29th. Unfortunately I didn&#8217;t get the chance to show it, so I&#8217;m posting it here for anyone interested in seeing a sample use of Facebook Connect on a blog. </p>
<p>The demo is a widget you add to your blog to allow your readers to become fans. It stores the data on the Facebook datastore, and therefore doesn&#8217;t require a database on your server. It consists of a simple HTML/Javascript widget to put on your blog, and a few php files to put on your server to handle communication with the Facebook APIs.</p>
<p>Here I&#8217;ll explain how I did this so you can try it yourself. </p>
<p>1. First, I created a Facebook Application called &#8220;SelfDebugging&#8221;, and I set the callback URL to the root of my blog: http://www.selfdebugging.com . I didn&#8217;t change any other setting.</p>
<p>2. I uploaded the xd_receiver.htm file to the root of my blog. For more information about this check out <a href="http://wiki.developers.facebook.com/index.php/Trying_Out_Facebook_Connect">Trying out Facebook Connect</a> on the developers wiki. </p>
<p>3. I uploaded the Facebook php client libraries to my blog URL in a folder named &#8220;facebook&#8221; right under the root. You can get the latest version of the libraries from <a href="http://svn.facebook.com/svnroot/platform/clients/php/trunk/">here</a>.</p>
<p>So far everything is just standard code for any Facebook Connect application. The next steps will be the custom code.</p>
<p>4. I created a fans.php file on the root of my blog. Here is the source code:</p>
<p><code><br />
&lt;?php<br />
include_once 'facebook/facebook.php';</p>
<p>$fb = new Facebook("6795b8c55abfd31bce6d52f2495a92d7", "217e26e2e1a6bde7ec90865ac8a53dfc");<br />
$user = $fb->get_loggedin_user();</p>
<p>if (isset($_REQUEST["addfan"])) {<br />
	$result = array("uid" => $user);<br />
	$objectId = $fb->api_client->data_createObject("blogfan", $result);<br />
	$fb->api_client->data_setAssociation("isblogfan", 1, $objectId);</p>
<p>	echo "thank you";<br />
}<br />
elseif (isset($_REQUEST["getfans"])) {<br />
	if (!$result = $fb->api_client->data_getAssociatedObjects('isblogfan', 1, true)){<br />
		$result = array();<br />
	}</p>
<p>	$all_fans = array();<br />
	foreach ($result as $objid)	{<br />
		$all_fans[] = $objid['id2'];<br />
	}</p>
<p>	if ($all_fans)	{<br />
		$result = $fb->api_client->data_getObjects($all_fans);</p>
<p>		foreach ($result as $fan){<br />
			echo '&lt;fb:profile-pic uid="' . $fan[2] . '" size="thumb" facebook-logo="true"></fb:profile-pic>&#8216;;<br />
		}<br />
	}<br />
}<br />
?><br />
</code></p>
<p>5. I created a text widget in Wordpress (the one you see on the right side) and put this code in:</p>
<p><code><br />
&lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"><br />
&lt;head><br />
    &lt;title>Facebook Connect Demo&lt;/title><br />
&lt;/head><br />
&lt;body><br />
    &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script><br />
    &lt;script src=&#8221;http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php&#8221; type=&#8221;text/javascript&#8221;>&lt;/script><br />
    &lt;script type=&#8221;text/javascript&#8221;></p>
<p>    function initConnect()<br />
    {<br />
        FB_RequireFeatures([&#8221;XFBML&#8221;], function(){<br />
            FB.Facebook.init(&#8221;6795b8c55abfd31bce6d52f2495a92d7&#8243;, &#8220;xd_receiver.htm&#8221;, {doNotUseCachedConnectState: false});<br />
        });<br />
    }</p>
<p>    function getFans()<br />
    {<br />
        $(&#8221;#fans&#8221;).load(&#8221;fans.php?getfans=1&#8243;, &#8220;&#8221;, initConnect);<br />
    }</p>
<p>    function becomeFan()<br />
    {<br />
        FB.Connect.requireSession();</p>
<p>        FB.Facebook.get_sessionState().waitUntilReady(function(){<br />
            //alert(&#8221;You&#8217;re uid = &#8221; + FB.Facebook.apiClient.get_session().uid);</p>
<p>            $(&#8221;#result&#8221;).load(&#8221;fans.php?addfan=1&#8243;);<br />
        });<br />
    }</p>
<p>    &lt;/script></p>
<p>    &lt;style><br />
        #fans       { width:180px; }<br />
        #fans img   { margin:5px; }<br />
    &lt;/style></p>
<p>    &lt;h2>Blog Fans&lt;/h2><br />
    &lt;div id=&#8217;fans&#8217;>&lt;/div><br />
    &lt;div id=&#8217;result&#8217;>&lt;/div><br />
    &lt;input type=&#8221;button&#8221; onclick=&#8221;becomeFan();&#8221; value=&#8221;Become a fan&#8221; />&lt;br /></p>
<p>    &lt;script type=&#8221;text/javascript&#8221;><br />
        getFans();<br />
    &lt;/script><br />
&lt;/body><br />
&lt;/html><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.selfdebugging.com/2008/10/04/facebook-connect-demo/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Facebook Profile Migration - How I did it</title>
		<link>http://www.selfdebugging.com/2008/07/26/facebook-profile-migration-how-i-did-it/</link>
		<comments>http://www.selfdebugging.com/2008/07/26/facebook-profile-migration-how-i-did-it/#comments</comments>
		<pubDate>Sat, 26 Jul 2008 16:44:07 +0000</pubDate>
		<dc:creator>waleed</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.selfdebugging.com/2008/07/26/facebook-profile-migration-how-i-did-it/</guid>
		<description><![CDATA[As I went throught converting my application, Blog Networks, to the new profile design, I document the steps I went through hoping to help others who&#8217;re going through the same process. In this post I&#8217;ll cover the essential changes that you need to do, and in a futuer post I&#8217;ll describe how to utilize some [...]]]></description>
			<content:encoded><![CDATA[<p id="n38:">As I went throught converting my application, Blog Networks, to the new profile design, I document the steps I went through hoping to help others who&#8217;re going through the same process. In this post I&#8217;ll cover the essential changes that you need to do, and in a futuer post I&#8217;ll describe how to utilize some of the new features the new profile brings.</p>
<p id="n38:">&nbsp;</p>
<h2 id="n38:"><strong id="umta22">1. Get the new Facebook client library </strong></h2>
<p>First, download the latest version of the PHP client library and overwrite the old one. Get the latest version here:<br id="n38:0" /><br />
<a id="umta24" href="http://svn.facebook.com/svnroot/platform/clients/php/branches/redesign-changes/" target="_blank">http://svn.facebook.com/<wbr id="umta25"></wbr>svnroot/platform/clients/php/<wbr id="umta26"></wbr>branches/redesign-changes/</a></p>
<p>&nbsp;</p>
<h2 id="c51c">2. Which version of the APIs to use?</h2>
<p>During the transition period some users will be on the old profile and some on the new. However, the new client library points all API calls to the new URL, <strong id="fgcl">api.new.facebook.com</strong>. While this works, it has the side effect of switching your users to the new profile the moment they hit any of your pages that require the user to login because it&#8217;ll forward them to a <strong id="jqck">www.new </strong>url<strong id="jqck0"> </strong>to log in. I didn&#8217;t feel comfortable making my users feel that my application was responsible for changing their Facebook experience. I also wanted to utilize the fact that adding the profile box and the email opt-in are selected by default. <br id="s.t." /><br />
So, instead, I decide to let users on the old profile use the old APIs and users on the new profile use the new APIs. If you want an easier migration path, then skip this step. Otherwise, edit your facebook.php file as follows:<br id="qb-d" /><br />
<strong id="jqck1"><br id="umta55" /><br />
</strong><strong id="umta56">Change this:</strong></p>
<p><font face="Courier New">&nbsp; public static function get_facebook_url($subdomain=&#8217;www&#8217;) {<br />
&nbsp;&nbsp;&nbsp; return &#8216;http://&#8217; . $subdomain . &#8216;.new.facebook.com&#8217;;<br />
&nbsp; }<br />
</font></p>
<p><strong id="umta66">To This:</strong></p>
<p><font face="Courier New">&nbsp; public static function get_facebook_url($subdomain=&#8217;www&#8217;) {<br />
&nbsp;&nbsp;&nbsp; global $NEWPROFILE;</p>
<p>&nbsp;&nbsp;&nbsp; if ($NEWPROFILE)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return &#8216;http://&#8217; . $subdomain . &#8216;.new.facebook.com&#8217;;<br />
&nbsp;&nbsp;&nbsp; else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return &#8216;http://&#8217; . $subdomain . &#8216;.facebook.com&#8217;;<br />
&nbsp; }<br />
</font></p>
<p>&nbsp;</p>
<h2 id="hix4"><strong id="umta30">3. Which profile are your users on?</strong></h2>
<p>If you chose to support both the old and new APIs in the previous step, then you&#8217;ll need to know on which profile a user is. Add this little code to a file that you include in every one of your PHP pages. A config file is a good place, or you can add it to the top of the facebook client library (facebook.php):</p>
<p><font face="Courier New">// New or old profile?<br />
$NEWFACEBOOK = false;<br />
if ($_REQUEST[&quot;fb_sig_in_new_</font><wbr id="umta35"></wbr><font face="Courier New">facebook&quot;] == &quot;1&quot;){<br />
&nbsp;&nbsp;&nbsp; // User is on the new profile.<br />
&nbsp;&nbsp;&nbsp; $NEWFACEBOOK = true;</font><font face="Courier New"><br />
}<br />
</font></p>
<p>&nbsp;<strong id="umta89">4. Switching from require_add to require_login</strong></p>
<p><strong id="k16v0">  </strong>The new Facebook client library doesn&#8217;t have the <strong id="in-9">require_add()</strong> and <strong id="in-90">require_install()</strong> methods, so if you use any of these your code will break. If you chose to support only the new APIs in step 2 above, then simply change all calls to the above two methods to <strong id="in-91">require_login()</strong>. </p>
<p>However, if you choose to have users on the old profile continue to &quot;add&quot; your app rather than authorizing it, then add the following code to your facebook.php file, and you don&#8217;t need to change anything in your application code:</p>
<p>&nbsp; <font face="Courier New">// Used in the transition perdiod to accomodate both<br />
&nbsp;// old profile and the new one.<br />
&nbsp; public function require_install() {<br />
&nbsp;&nbsp;&nbsp; return $this-&gt;require_add();<br />
&nbsp; }</p>
<p>&nbsp; // Used in the transition perdiod to accomodate both <br />
&nbsp; // users on the old profile and the new one.<br />
&nbsp; public function require_add() {<br />
&nbsp;&nbsp;&nbsp; global $NEWFACEBOOK;<br />
&nbsp;&nbsp;&nbsp; if ($NEWFACEBOOK) {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return $this-&gt;require_login();<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp; &nbsp;&nbsp;&nbsp; <br />
&nbsp; &nbsp;&nbsp;&nbsp; if ($user = $this-&gt;get_loggedin_user()) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($this-&gt;fb_params[&#8217;added&#8217;]) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return $user;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; $this-&gt;redirect($this-&gt;get_</font> <wbr id="umta113"></wbr><font face="Courier New">add_url(self::current_url()));<br />
&nbsp; }</font><br id="umta115" /><br />
&nbsp;</p>
<h2 id="q1bh"><strong id="umta127">5. No post-add page</strong></h2>
<p>With the new profile, Facebook will no longer call your <strong id="p6b0">post-add</strong> page. On the old profile, Facebook redirects new users to this page after they add an app. Many developers, myself included, use the post-add page to do any initialization required for the new user, such as adding their user id to the database. <br id="umta130" /><br />
So, now that the postadd page is gone, you need to use a different approach. The solution I used is to include code in canvas pages that tests if the user who&#8217;s currently viewing the page is in my database, and if not, I add them and do any required initialization. This adds a little overhead to your pages, so you might want to do it only on a few strategically selected pages that you know users will have to pass by as they interact with your app. <br id="umta132" /><br />
Another thing I noticed recently, but never got the chance to try, is the <strong id="li_v">Post-Authorize Redirect</strong> URL. This seems to replace the post-add page, so you might want to try it before updating your application.</p>
<p>&nbsp;</p>
<h2 id="gon9"><strong id="umta136">6. No post-remove page, either</strong></h2>
<p id="gon9">Since the concept of adding and removing an app no longer applies, then it&#8217;s clear why Facebook won&#8217;t call this page anymore.</p>
<p id="gon9">&nbsp;</p>
<h2 id="gon9"><strong id="umta142">7. Allow users to add a profile box</strong></h2>
<p>Read this first: <br />
<a id="umta146" href="http://wiki.developers.facebook.com/index.php/New_Design_Narrow_Boxes" target="_blank">http://wiki.developers.<wbr id="umta147"></wbr>facebook.com/index.php/New_<wbr id="umta148"></wbr>Design_Narrow_Boxes</a><br id="umta149" /><br />
<br />
With the new profile you can use new FBML tags to display a button that allows users to add your box to their profiles. Here is a sample code that you can add in your canvas pages to do this. </p>
<p><font face="Courier New">&lt;fb:if-section-not-added section=&#8217;profile&#8217;&gt;<br />
&nbsp;&nbsp;&nbsp; Add a box on your profile:<br />
&nbsp;&nbsp;&nbsp; &lt;fb:add-section-button section=&#8217;profile&#8217; /&gt;<br />
&lt;/fb:if-section-not-added&gt;</p>
<p></font></p>
<h2>8. Allow users to opt-in to receive emails</h2>
<p>&nbsp;</p>
<p id="hyof0">&nbsp;This one is easy, here is an example:</p>
<p><font face="Courier New">&lt;fb:prompt-permission perms=&quot;email&quot;&gt;<br />
&nbsp;&nbsp;&nbsp; Opt-in to receive emails from us<br />
&lt;/fb:prompt-permission&gt;<br />
</font><br />
If the user has already granted that permission, this tag will render nothing.</p>
<h2 id="i0050">9. The new Profile Boxes</h2>
<p>Read this first: <br />
http://wiki.developers.facebook.com/index.php/New_Design_Narrow_Boxes</p>
<p>If you&#8217;re not interested in allowing users to add your profile box to their Wall tab, then you can skip this step. You&#8217;re profile box will continue to show in the Boxes tab as usual. However, if you want to give the user the option to put your box on their main tab, then do the following change:</p>
<p>In your code where you update the user profile, change this:</p>
<p><font face="Courier New">&nbsp;&nbsp;&nbsp; $facebook-&gt;api_client-&gt;profile_setFBML($markup, $uid);</p>
<p></font>To this:</p>
<p><font face="Courier New">&nbsp;&nbsp;&nbsp; $profile_main = &quot;put FBML markup for new box here&quot;;<br />
&nbsp;&nbsp;&nbsp; $facebook-&gt;api_client-&gt;profile_setFBML($markup, <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $uid, null, null, null, $profile_main);</p>
<p></font>Notice that we added new markup for the narrow box that shows on the main profile tab. This new box is limited to a max height of 250px, so you&#8217;ll probably need a different markup than what you use in the default profile box. Also, note that the profile_main markup should not have the fb:wide and fb:narrow tags.</p>
<h2 id="i:pc">10. Bonus Tips: <strong id="umta180">The &#8216;jsonwrapper&#8217; include</strong></h2>
<p>The new library includes the file jsonwrapper.php, which is for backward compatibility. If you&#8217;re using PHP 5.2, then you don&#8217;t need this and can save a few CPU cycles. Remove this line from <strong id="umta183">facebookapi_php5_restlib.php</strong></p>
<p><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp; include_once &#8216;jsonwrapper/jsonwrapper.php&#8217;;</p>
<p></font>This should cover the critical changes you need to make. However, if you like to utilize the new features that the new profile brings, then you need to read more about application tabs, info sections, the publisher API, and more. I&#8217;ll cover some of those in the next post as I implement them. </p>
<p><strong id="umta2">Useful URLs:</strong></p>
<ul id="umta4">
<li id="umta9"><strong id="umta10">Access your app on the new profile:</strong><br />
    <a id="umta12" href="http://apps.new.facebook.com/yourappname/" target="_blank">http://apps.new.facebook.com/<wbr id="umta13"></wbr>yourappname/</a></li>
<li id="umta14"><strong id="umta15">Remove app authorizations for testing purposes <br id="umta16" /><br />
    </strong><a id="umta17" href="http://www.facebook.com/privacy/?view=platform" target="_blank">http://www.facebook.com/<wbr id="umta18"></wbr>privacy/?view=platform</a></li>
</ul>
<p>
<u id="umta191"><strong id="umta192">References:</strong></u> <u id="umta191"><strong id="umta192"> </strong></u></p>
<ul>
<li><strong id="umta195">New Design Platform Changes<br />
    </strong><a id="umta197" href="http://wiki.developers.facebook.com/index.php/New_Design_Platform_Changes" target="_blank">http://wiki.developers.<wbr id="umta198"></wbr>facebook.com/index.php/New_<wbr id="umta199"></wbr>Design_Platform_Changes</a></li>
</ul>
<ul>
<li><strong id="vha5">New Design Integration Guide<br />
    </strong><a href="http://wiki.developers.facebook.com/index.php/New_Design_Integration_Guide">http://wiki.developers.facebook.com/index.php/New_Design_Integration_Guide</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.selfdebugging.com/2008/07/26/facebook-profile-migration-how-i-did-it/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Facebook Change-athon Event</title>
		<link>http://www.selfdebugging.com/2008/07/21/facebook-change-athon-event/</link>
		<comments>http://www.selfdebugging.com/2008/07/21/facebook-change-athon-event/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 07:00:38 +0000</pubDate>
		<dc:creator>waleed</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.selfdebugging.com/2008/07/21/facebook-change-athon-event/</guid>
		<description><![CDATA[Time for a new developer meetup. Just 3 days after f8,  Sudha and I are organizing a Facebook Profile Change-athon to get developers together and help each other migrate our apps to the new Facebook APIs. It&#8217;s also to catch up and discuss the announcements from f8 if you miss it. 
This is a [...]]]></description>
			<content:encoded><![CDATA[<p>Time for a new developer meetup. Just 3 days after f8,  <a href="http://coolastory.blogspot.com/">Sudha</a> and I are organizing a Facebook Profile Change-athon to get developers together and help each other migrate our apps to the new Facebook APIs. It&#8217;s also to catch up and discuss the announcements from f8 if you miss it. </p>
<p>This is a full day event, 9am - 9pm, on Saturday July 26 and is divided into two parts:</p>
<p>1. The first part at 9:00am is for developers (bring your laptop) and will consist of coding sessions and a technical presentation about the migration path and new features. </p>
<p>2. The second part at 6:30 pm is for both, developers and non-developers and will include a presentation about the new Facebook features and a panel discussion about the new business opportunities coming along.</p>
<p>See the schedule here (subject to change): http://blog.weekendapps.com/schedule-activities/</p>
<p>We&#8217;ll announce the location in the next couple of days (either San Francisco or the South Bay). If you&#8217;re interested, join the <a href="http://www.facebook.com/event.php?eid=19772679301">Facebook event</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.selfdebugging.com/2008/07/21/facebook-change-athon-event/feed/</wfw:commentRss>
		</item>
		<item>
		<title>WeekendApps: Incubator on steroids</title>
		<link>http://www.selfdebugging.com/2008/02/16/weekendapps-incubator-on-steroids/</link>
		<comments>http://www.selfdebugging.com/2008/02/16/weekendapps-incubator-on-steroids/#comments</comments>
		<pubDate>Sun, 17 Feb 2008 00:55:33 +0000</pubDate>
		<dc:creator>waleed</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.selfdebugging.com/2008/02/16/weekendapps-incubator-on-steroids/</guid>
		<description><![CDATA[
WeekendApps is a new experiment in entrepreneurship that 4 friends and I are organizing on February 22-24. It can be described as a weekend incubator, the mission of which is to launch as many startups in a short period of time as possible. We&#8217;re targeting Facebook applications because they&#8217;re easy to build and launch in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://weekendapps.com/"><img vspace="10" hspace="10" border="0" align="left" alt="WeekendApps" src="/wordpress/wp-content/uploads/2008/02/logo150.gif" /></a></p>
<p><a href="http://weekendapps.com/">WeekendApps</a> is a new experiment in entrepreneurship that 4 friends and I are organizing on February 22-24. It can be described as a weekend incubator, the mission of which is to launch as many startups in a short period of time as possible. We&#8217;re targeting Facebook applications because they&#8217;re easy to build and launch in one weekend and they have great potential. We&#8217;ll have <a href="http://www.orrick.com/lawyers/Bio.asp?ID=169142">Chris Field</a> from Orrick on site to help with legal aspects and incorporation, an <a href="http://blog.weekendapps.com/schedule-activities/">impressive list of speakers</a>, a core team of designers and marketing experts, and we&#8217;re giving out $2000+ worth of software for the lucky winners, courtesy of Adobe Developer Connection. All this, you get for free if you <a href="http://blog.weekendapps.com/sign-up/">sign up before 2/18</a>. And, we&#8217;re also planning an ad-exchange program among applications to give everyone a free way to promote their apps.</p>
<p>&nbsp;</p>
<p><strong>The plan is simple: Start on Friday, release on Saturday, and go viral on Sunday.</strong></p>
<p>&nbsp;</p>
<p><strong>Presentations:</strong></p>
<ul>
<li>Facebook Platform and Applications, by <a href="http://davemorin.com/blog/">Dave Morin</a> from Facebook.</li>
<li>Incorporating your startup, and other legal details, by <a href="http://www.orrick.com/lawyers/Bio.asp?ID=169142">Chris field</a> from Orrick.</li>
<li>Going from Zero to 1 Million Page Views in One Month, by Siqi Chen (App: <a href="http://www.facebook.com/apps/application.php?id=7019261521">Friends for Sale</a>).</li>
<li>How I reached 5M installs, Nicolas Kokkalis (App: <a href="http://www.facebook.com/apps/application.php?id=5757353179">Who&rsquo;s your perfect match</a>)</li>
<li>Promoting and Monetizing Facebook Apps, by KW Low (App: <a href="http://www.facebook.com/apps/application.php?id=6568019289">My Heros Abilities</a>).</li>
<li>Flex on Facebook: Flex Apps on FB Platform, by <a href="http://startupism.com/about/">Alex Notov</a>, founder Shockapps, and editor at <a href="http://startupism.com/">Startupism</a>.</li>
</ul>
<p><strong>Panels:</strong></p>
<ul>
<li><strong>Micropayments in Facebook</strong>: as a revenue source and to simplify personal transactions.</li>
</ul>
<p><strong>Gifts and Giveaways</strong></p>
<ul>
<li>One copy of <strong>Adobe Creative Suite bundle</strong> to the lucky winner from the Designer s Team. Your choice of Web Premium, Design Premium or Production Premium (retail price $999).</li>
<li>2 Copies of <strong>Adobe Flex Builder 3 Pro</strong> (retail $699 when it launches) to the lucky winners. Gifts from <a href="http://www.adobe.com/">Adobe</a>.</li>
<li>Free dinner, courtesy of our sponsors.</li>
</ul>
<p>&nbsp;&nbsp;</p>
<p><strong>So, why WeekendApps? </strong></p>
<p>Back in November, I attended an event that really highlighted for me what Silicon Valley is all about. Especially for someone who&#8217;s new to the bay area. That event was <a href="http://startupweekend.com/">Startup Weekend</a>, a weekend-long gathering of entrepreneurs, developers, graphics designers, &#8230;etc. to start and launch a startup in one weekend. We released a product, got <a href="http://www.techcrunch.com/2007/11/18/startup-weekend-san-francisco-in-full-swing/">TechCrunced</a>, and most importantly, it was a great way to make new friends, experience the most intense team work environment ever, and simply have a lot of fun.</p>
<p>Then, there was a <a href="http://credibilityserver.stanford.edu/captology/facebook/">class at Stanford</a> in which students built and released Facebook applications that reached over 15 million users. I attended their showcase and was blown away by the level of success they achieved in such a short time.</p>
<p>So I got together with friends that I met at Startup Weekend and we decided to create something new that takes the best of both worlds. And that&#8217;s how WeekendApps was born. If you&#8217;re an entrepreneurs, I encourage you to check it out. I promise, you&#8217;ll be glad you did. And, remember, the free ticket are available until 2/18 only.</p>
<p>Our event page on <a href="http://www.facebook.com/event.php?eid=7953767155">Facebook here</a>, and you can <a href="http://blog.weekendapps.com/sign-up/">get tickets here</a>.<a href="http://www.facebook.com/event.php?eid=7953767155"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.selfdebugging.com/2008/02/16/weekendapps-incubator-on-steroids/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Announcing OnSingularity.com</title>
		<link>http://www.selfdebugging.com/2008/01/16/announcing-onsingularitycom/</link>
		<comments>http://www.selfdebugging.com/2008/01/16/announcing-onsingularitycom/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 09:22:22 +0000</pubDate>
		<dc:creator>waleed</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.selfdebugging.com/2008/01/16/announcing-onsingularitycom/</guid>
		<description><![CDATA[
I&#8217;m happy to announce the public launch of my latest project, On Singularity: a social news and discussion site for the futurist community. I&#8217;ve been interested in the subject for many years now; and I passionately seek and read the latest news about discoveries in science, technology, AI, bio-technology and similar areas regularly. So when [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://onsingularity.com"><img width="167" height="74" border="0" align="left" style="margin: 10px;" src="http://www.selfdebugging.com/wordpress/wp-content/uploads/image/OnSingularityNinua.PNG" alt="On Singularity" /></a></p>
<p>I&#8217;m happy to announce the public launch of my latest project, <a href="http://onsingularity.com/">On Singularity</a>: a social news and discussion site for the futurist community. I&#8217;ve been interested in the subject for many years now; and I passionately seek and read the latest news about discoveries in science, technology, AI, bio-technology and similar areas regularly. So when I started building <a href="http://zooov.com">Zooov</a> to create social news services targeted to niche fields, I immediately thought about building a news portal for the Singularity community. I know that had there been such a Web site already, I would&#8217;ve been a regular contributor to it for sure. The reason I&#8217;m so excited about this is that for years I&#8217;ve been scanning through the science sections of many news sites to find the few stories that interest me; and this project has the potential to make the process so much easier. See, not all science news are the same. For example, a news article about discovering new species of fish is very different from an article about discovering a new gene that regulates cell growth in mice. Most science news sites will put both articles in the biology section; but for someone interested in discoveries that affect the future, like me, the two articles are very different: the first is not so interesting to me, but the second is; because it highlights progress in understanding uncontrollable growth in cells which usually causes cancer and shows that we&#8217;re a tiny step closer to finding a cure, which, in turn, would greatly enhance the lives of millions and extend our lifespans considerably. You might not see things as I do; but if you&#8217;re like me, then you&#8217;re probably as exited about this web site as I am. Check it out at: <a href="http://onsingularity.com/">http://onsingularity.com/</a> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.selfdebugging.com/2008/01/16/announcing-onsingularitycom/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Reddit Tracker: a must-have for serious redditers</title>
		<link>http://www.selfdebugging.com/2007/10/09/reddit-tracker-a-must-have-for-serious-redditers/</link>
		<comments>http://www.selfdebugging.com/2007/10/09/reddit-tracker-a-must-have-for-serious-redditers/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 16:42:32 +0000</pubDate>
		<dc:creator>waleed</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

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

		<guid isPermaLink="false">http://www.selfdebugging.com/2007/10/09/reddit-tracker-a-must-have-for-serious-redditers/</guid>
		<description><![CDATA[What is this Reddit Tracker?
It&#8217;s a bookmarklet I wrote to highlight new comments on Reddit. When I visit a comment thread a second time, it highlights the new comments that were added since my last visit.
Why?
Because it&#8217;s hard to follow comment threads on Reddit. You see, they&#8217;re not listed in order. They move up and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What is this Reddit Tracker?</strong><br />
It&#8217;s a bookmarklet I wrote to highlight new comments on Reddit. When I visit a comment thread a second time, it highlights the new comments that were added since my last visit.</p>
<p><strong>Why?</strong><br />
Because it&#8217;s hard to follow comment threads on Reddit. You see, they&#8217;re not listed in order. They move up and down based on votes. So, when there is a lot of comments, it&#8217;s hard to tell which ones are new.</p>
<p><strong>Do I need to install anything?</strong><br />
No. It&#8217;s doesn&#8217;t require installation. It&#8217;s just a simple Javascript bookmarklet that you add to your browser. And I&#8217;m providing the source code as well, if you&#8217;re interested.</p>
<p><strong>How do I add it to my browser?</strong><br />
If you use Firefox, just drag the link below to your browser&#8217;s bookmarks toolbar (IE users see below).</p>
<p><center></p>
<p style="border: 1px solid blue; padding: 5px; width: 100px"> <script src="http://selfdebugging.com/customjs/InsertRedditBookmarklet.js" type="text/javascript"></script></p>
<p></center><strong>How does it work?</strong><br />
1. On the comments thread page, click the &#8220;Reddit Tracker&#8221; button. You&#8217;ll get the little message below telling you that this thread is now being tracked.</p>
<p style="text-align: center"><a href="http://www.selfdebugging.com/wordpress/wp-content/uploads/2007/10/reddit-start-tracking.PNG" title="Start Tracking Comments"><img src="http://www.selfdebugging.com/wordpress/wp-content/uploads/2007/10/reddit-start-tracking.PNG" alt="Start Tracking Comments" /></a></p>
<p>2. The next time you visit the page, click &#8220;Reddit Tracker&#8221; again and it&#8217;ll highlight the new comments in bold. See image below (click for full size image).</p>
<p style="text-align: center"><a href="http://www.selfdebugging.com/wordpress/wp-content/uploads/2007/10/reddit-comment-count.PNG" title="Highlighting new comments"><img src="http://www.selfdebugging.com/wordpress/wp-content/uploads/2007/10/reddit-comment-count-small.PNG" alt="Highlighting new comments" /></a></p>
<p>3. If there are no new comments, it tells you so.</p>
<p style="text-align: center"><a href="http://www.selfdebugging.com/wordpress/wp-content/uploads/2007/10/reddit-nothing-new.PNG" title="Nothing New"><img src="http://www.selfdebugging.com/wordpress/wp-content/uploads/2007/10/reddit-nothing-new.PNG" alt="Nothing New" /></a></p>
<p>If you&#8217;re wondering what that little blue link is. It&#8217;s a link to the <a href="http://zooov.com/break" title="Break Time on ZoooV">Break Time</a> community on my new startup ZoooV.com. Yes, I&#8217;m evil :). If it bothers you too much, you can easily remove it; you have the code. But, it&#8217;s barely visible.</p>
<p><strong>How about IE Users?</strong><br />
IE users, I&#8217;m sorry. It&#8217;s too much code to fit within IE&#8217;s bookmarklet limit. However, if you really want an IE version, leave a comment below and if I find enough interest I&#8217;ll create a simplified version for IE and email you when it&#8217;s ready. It might not have all the features of the Firefox version, but it should do.</p>
<p><strong>Where is the Source Code?</strong><br />
<a href="http://selfdebugging.com/customjs/RedditTrackerBookmarklet.js">Click here to get the source code</a>. Feel free to change it or build on it. And, although you don&#8217;t have to, I would be so very grateful if you keep my little &#8216;break time&#8217; link there. You can add your own link if you like. And, if you do build a better version based on my code, let me know so I can link to you from here.</p>
<p><strong>Final thoughts</strong><br />
I wrote this after I built a similar tool for YC News. So, if you hang out there as well, grab the <a href="http://www.selfdebugging.com/2007/10/09/yc-news-tracker-a-better-way-to-read-comments/" title="Y-Combinator News Tracker">YC News Tracker</a>. And, while we&#8217;re at it, you might also want to check this <a href="http://hystry.com">Firefox plugin</a> written by my friend, Kartik. Although it requires installation, it&#8217;s a more powerful tool for highlighting changes on any Web page, including Reddit. It&#8217;s really cool.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.selfdebugging.com/2007/10/09/reddit-tracker-a-must-have-for-serious-redditers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>YC News Tracker: A better way to read comments</title>
		<link>http://www.selfdebugging.com/2007/10/09/yc-news-tracker-a-better-way-to-read-comments/</link>
		<comments>http://www.selfdebugging.com/2007/10/09/yc-news-tracker-a-better-way-to-read-comments/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 16:27:05 +0000</pubDate>
		<dc:creator>waleed</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

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

		<guid isPermaLink="false">http://www.selfdebugging.com/2007/10/09/yc-news-tracker-a-better-way-to-read-comments/</guid>
		<description><![CDATA[If you&#8217;re like me, and you read YC News often, then you probably have as much a hard time as I do trying to figure out which comments are new. You see, comments are not listed in order; they move up and down depending on how many votes they get. So beyond a few comments, [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like me, and you read <a href="http://news.ycombinator.com/" title="Y-Combinator Hacker News">YC News</a> often, then you probably have as much a hard time as I do trying to figure out which comments are new. You see, comments are not listed in order; they move up and down depending on how many votes they get. So beyond a few comments, it&#8217;s not easy to find the newly added ones.</p>
<p>So, I came up with a simple solution. It&#8217;s entirely in JavaScript, doesn&#8217;t install anything, and doesn&#8217;t depend on a server. It&#8217;s a bookmarklet that highlights new comments that were added to a thread since the last time you visited. I&#8217;ve been using it for a while, and I&#8217;m much happier; so I&#8217;m sharing it with you. And I&#8217;m also offering the fully-commented source code below for those interested.</p>
<p>Here is how it works:</p>
<p>1. On the comments thread page, click the &#8220;YC Tracker&#8221; button. You&#8217;ll get the little message below telling you that this thread is now going to be tracked.</p>
<p style="text-align: center"><a href="http://www.selfdebugging.com/wordpress/wp-content/uploads/2007/10/start-tracking.PNG" title="Start Tracking Comments"><img src="http://www.selfdebugging.com/wordpress/wp-content/uploads/2007/10/start-tracking.PNG" alt="Start Tracking Comments" /></a></p>
<p>2. The next time you visit the page, click &#8220;YC Tracker&#8221; again and it&#8217;ll highlight the new comments in bold. See below (click for full size image).</p>
<p style="text-align: center"><a href="http://www.selfdebugging.com/wordpress/wp-content/uploads/2007/10/comment-count.PNG" title="Highlighting new comments"><img src="http://www.selfdebugging.com/wordpress/wp-content/uploads/2007/10/comment-count-small.PNG" alt="Highlighting new comments" /></a></p>
<p>3. If there are no new comments, it&#8217;ll tell you so.</p>
<p style="text-align: center"><a href="http://www.selfdebugging.com/wordpress/wp-content/uploads/2007/10/nothing-new.PNG" title="Nothing New"><img src="http://www.selfdebugging.com/wordpress/wp-content/uploads/2007/10/nothing-new.PNG" alt="Nothing New" /></a></p>
<p>If you&#8217;re wondering what that little blue link is. It&#8217;s a link to the <a href="http://zooov.com/break" title="Break Time on ZoooV">Break Time</a> community on my new startup, ZoooV.com. Yes, I&#8217;m evil :). If it bothers you too much, you can easily remove it; you have the code. But, it&#8217;s barely visible.</p>
<p>If you use Firefox, then simply drag the link below to your bookmarks toolbar.</p>
<p><center></p>
<p style="border: 1px solid blue; padding: 5px; width: 100px"> <script src="http://selfdebugging.com/customjs/InsertNewsYCBookmarklet.js" type="text/javascript"></script></p>
<p></center><br />
IE users, I&#8217;m sorry. It&#8217;s too much code to fit within IE&#8217;s bookmarklet limit. However, if you really want an IE version, leave a comment below and if I find enough interest I&#8217;ll create a simplified version for IE and email you when it&#8217;s ready.</p>
<p>And, for coders out there, <a href="http://selfdebugging.com/customjs/NewsYCTrackerBookmarklet.js">click here to get the source code</a>. Feel free to change it or build on it. And, although you don&#8217;t have to, I would be so very grateful if you keep my little &#8216;break time&#8217; link there. You can add your own link if you like. And, if you do build a better version based on my code, let me know so I can link to you from here.</p>
<p><strong>Update:</strong> I just posted a similar tool for Reddit. It&#8217;s, creatively, called: <a href="http://www.selfdebugging.com/2007/10/09/reddit-tracker-a-must-have-for-serious-redditers/">Reddit Tracker</a>. I&#8217;ve never been good with names.</p>
<p><strong>Update 2:</strong> <a href="http://news.ycombinator.com/item?id=65382">AKKARTIK</a> just built a GreaseMoneky plug-in based on this and in the process made it so much better by adding a list of tracked threads. Thank you so much, akkartik. I&#8217;m really loving it now. So, if you have GreaseMonkey, get the new plug-in from this link. And, if you don&#8217;t, and you read YC News often, go get it. It&#8217;s worth it.</p>
<p><span class="comment"><font color="#000000"><a href="http://akkartik.name/newsyc-comment-tracker3.user.js" rel="nofollow">http://akkartik.name/newsyc-comment-tracker3.user.js</a></font></span></p>
<p style="text-align: center"><img src="/wordpress/wp-content/uploads/2007/10/tracked-threads.PNG" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.selfdebugging.com/2007/10/09/yc-news-tracker-a-better-way-to-read-comments/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Only 9.6% of YC News Readers Use IE!!</title>
		<link>http://www.selfdebugging.com/2007/10/01/only-96-of-yc-news-readers-use-ie/</link>
		<comments>http://www.selfdebugging.com/2007/10/01/only-96-of-yc-news-readers-use-ie/#comments</comments>
		<pubDate>Mon, 01 Oct 2007 18:55:49 +0000</pubDate>
		<dc:creator>waleed</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.selfdebugging.com/wordpress/?p=18</guid>
		<description><![CDATA[There were a few heated discussions about Vista on Hacker News yesterday that got me wondering: What operating systems do people in this community use? How about browsers?
As it happened, I had just posted an announcement about my new startup a few days ago and I had Google Analytics installed, so I managed to collect [...]]]></description>
			<content:encoded><![CDATA[<p>There were a few heated discussions about Vista on <a href="http://news.ycombinator.com/">Hacker News</a> yesterday that got me wondering: What operating systems do people in this community use? How about browsers?</p>
<p>As it happened, I had just posted an announcement about my new startup a few days ago and I had Google Analytics installed, so I managed to collect a fair amount of information. Here is what I found most interesting:</p>
<p><strong>1. Internet Explorer accounted for a mere 9.6% of all browsers. And, yes, that includes both IE6 and IE7 combined.</strong></p>
<p>Sure, I did expect more Firefox users than IE given the high-tech nature of the community, but this was unexpected. Only 9.6%!! And, sure enough, Firefox was #1 with 71%, followed by Safari with 11%. Below is a more detailed report. Click to see the larger image.</p>
<p><a href="http://selfdebugging.wordpress.com/files/2007/10/internet-browsers.PNG" title="Browsers"><img src="http://selfdebugging.wordpress.com/files/2007/10/internet-browsers.PNG" alt="Browsers" height="165" width="370" /></a></p>
<p><strong>2. Windows still has the majority with 52.7%, but it&#8217;s so close to losing it. </strong></p>
<p>Here I actually expected to see more Mac users because, seemingly, Apple news make up over 90% of all tech news. However, Macs came in second with 28.9% followed by Linux with 18%.</p>
<p><a href="http://selfdebugging.wordpress.com/files/2007/10/operating-systems.PNG" title="Operating Systems"><img src="http://selfdebugging.wordpress.com/files/2007/10/operating-systems.PNG" alt="Operating Systems" width="370" /></a></p>
<p>As for Windows itself, XP still accounts for 83.7% compared to 9.9% for Vista.</p>
<p><a href="http://selfdebugging.wordpress.com/files/2007/10/windows.PNG" title="Windows"><img src="http://selfdebugging.wordpress.com/files/2007/10/windows.PNG" alt="Windows" height="164" width="409" /></a></p>
<p><strong>3.</strong><strong> News.YC users came from 66 different countries.</strong></p>
<p>And that&#8217;s more interesting when you consider the fact that it&#8217;s a niche Web site targeted to startup news, and mostly US startup news. The recent expansion of scope to include more technology news might explain this, though. But, not surprisingly, over 75% of the visitors came from the US, Canada, and the United Kingdom with 63.8%, 7.2%, and 5.6% respectively.</p>
<p><a href="http://selfdebugging.wordpress.com/files/2007/10/countries.PNG" title="Countries"><img src="http://selfdebugging.wordpress.com/files/2007/10/countries.PNG" alt="Countries" height="173" width="370" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.selfdebugging.com/2007/10/01/only-96-of-yc-news-readers-use-ie/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.870 seconds -->
