<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>ayn blog</title>
	
	<link>http://blog.andrewng.com</link>
	<description>Andrew Ng's personal blog</description>
	<lastBuildDate>Thu, 19 Aug 2010 17:25:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/aynblog" /><feedburner:info uri="aynblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>37.801878</geo:lat><geo:long>-122.410181</geo:long><creativeCommons:license>http://creativecommons.org/licenses/by/2.0/</creativeCommons:license><image><link>http://blog.andrewng.com</link><url>http://farm4.static.flickr.com/3564/3782671049_91cf9cb275.jpg</url><title>aynblog</title></image><feedburner:emailServiceId>aynblog</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site.</feedburner:browserFriendly><item>
		<title>ubuntu lucid, apparmor, and mysql</title>
		<link>http://feedproxy.google.com/~r/aynblog/~3/VwKt518BTNI/</link>
		<comments>http://blog.andrewng.com/2010/08/19/ubuntu-lucid-apparmor-and-mysql/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 17:24:37 +0000</pubDate>
		<dc:creator>ayn</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[apparmor]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[errno13]]></category>
		<category><![CDATA[jaunty]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[upstart]]></category>

		<guid isPermaLink="false">http://blog.andrewng.com/?p=2056</guid>
		<description>I had to move the mysql datadir on my ec2 instance to a different EBS volume. After I move it over, and change the datadir setting in /etc/mysql/my.cnf, I kept getting errno 13 when I started mysql, the error in /var/log/mysql/error.lo looks like this: 100819 15:10:20 [Note] Plugin 'FEDERATED' is disabled. ^G/usr/sbin/mysqld: Can't find file: [...]</description>
			<content:encoded><![CDATA[<p>I had to move the mysql datadir on my ec2 instance to a different EBS volume. After I move it over, and change the datadir setting in /etc/mysql/my.cnf, I kept getting errno 13 when I started mysql, the error in /var/log/mysql/error.lo looks like this:</p>
<pre class="brush: plain; light: true;">
100819 15:10:20 [Note] Plugin 'FEDERATED' is disabled.
^G/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
100819 15:10:20 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
100819 15:10:20  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
</pre>
<p>errono 13 typically means your datadir permissions are messed up, but I double checked, and mysql owned and had permission to everything in there, I even set the shell of the mysql user from false to a real shell and su to it and I was able to read everything. After about 45 minutes of digging around, I asked on the mysql irc channel, and a user with the handle of <em>thumbs</em> told me to check <a href="https://wiki.ubuntu.com/AppArmor">apparmor</a> config.</p>
<p>I just migrated from jaunty to lucid and had no idea what apparmor was. Turned out it had to know about the datadir change or else it won&#8217;t let it start (if you look at /etc/init/mysql.conf then it&#8217;s obvious, but <a href="http://upstart.ubuntu.com/">upstart</a> was new to me too). After modifying /etc/apparmor.d/usr.sbin.mysqld, mysql started up just fine.</p>
<p>Just thought I should post this here in case anyone is having a hard time figuring this out. I certainly did.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/aynblog?a=VwKt518BTNI:q1Gr6S4JKgM:WtzYBjuvWu0"><img src="http://feeds.feedburner.com/~ff/aynblog?d=WtzYBjuvWu0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=VwKt518BTNI:q1Gr6S4JKgM:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/aynblog?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=VwKt518BTNI:q1Gr6S4JKgM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/aynblog?i=VwKt518BTNI:q1Gr6S4JKgM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=VwKt518BTNI:q1Gr6S4JKgM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/aynblog?i=VwKt518BTNI:q1Gr6S4JKgM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=VwKt518BTNI:q1Gr6S4JKgM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/aynblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/aynblog/~4/VwKt518BTNI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.andrewng.com/2010/08/19/ubuntu-lucid-apparmor-and-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.andrewng.com/2010/08/19/ubuntu-lucid-apparmor-and-mysql/</feedburner:origLink></item>
		<item>
		<title>Lightroom 3 rocks!</title>
		<link>http://feedproxy.google.com/~r/aynblog/~3/N-YhLZyApZg/</link>
		<comments>http://blog.andrewng.com/2010/08/03/lightroom-3-rocks/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 02:44:12 +0000</pubDate>
		<dc:creator>ayn</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[lightroom3]]></category>

		<guid isPermaLink="false">http://blog.andrewng.com/?p=2047</guid>
		<description>I tried every single version of Lightroom and Aperture, never liked the way they handled my photos. I always manually organize into a folder hierarchy loosely based on year and then month or event, looked at them in Bridge, and did most adjustments in ACR, and popped into PS for more adjustments or retouching. A [...]</description>
			<content:encoded><![CDATA[<p>I tried every single version of Lightroom and Aperture, never liked the way they handled my photos. I always manually organize into a folder hierarchy loosely based on year and then month or event, looked at them in Bridge, and did most adjustments in ACR, and popped into PS for more adjustments or retouching.</p>
<p>A couple of my friends really like Lightroom so last weekend I decided to give Lightroom 3 a try, I had the beta a while ago and didn&#8217;t like it. After using it for a couple of days, all I can say is WOW, really awesome software for organizing and editing your photos. If you shoot a lot, and have photos stored across different hard drive volumes, you should use Lightroom 3. Here are a couple of things it really does right:</p>
<ul>
<li>It imports photos into directory structure of your choosing, by default it creates top-level folders by year, and sub-folders of dates, which is pretty much how I did it manually before</li>
<li>It is fast! Lightroom 3 and CS5 are finally all Mac native and 64-bit, everything is very very fast</li>
<li>After importing about 35k photos across 3 different locations, I can easily find photos based on Metadata. For example, it&#8217;s easy to create a smart folder with all photos shot with a particular camera (by model or even serial number), I also have folders of shot with particular lens</li>
<li>There is <a href="http://regex.info/blog/lightroom-goodies/data-plot">an awesome plugin</a> to run through a selection of photos (or all photos, if you want) and shows you a plot of the focal lengths you use. This is great when I was deciding between which lens to acquire. Here&#8217;s how my bar chart looks like, and this was run on all photos (well almost all, I deleted a lot of paid shoots coz I don&#8217;t need to keep them) shot with my copy of 5D Mark II:</li>
<div class="thumbnail"><a href="http://skitch.com/andrewng/dxk7t/jeffreys-focal-length-plot"><img src="http://img.skitch.com/20100804-8d1mmci57kw63ds7kw3uiqskjg.preview.jpg" alt="Jeffrey's Focal-Length Plot" /></a><br />
<span style="font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080;">Uploaded with <a href="http://plasq.com/">plasq</a>&#8216;s <a href="http://skitch.com">Skitch</a>!</span></div>
<li>For most things you can do in ACR, you can do in Lightroom, unless you&#8217;re retouching, there is almost no reason to open images in Photoshop. But when you do, Lightroom has tight integration with Photoshop and it works great</li>
<li>It supports dual-screen mode, this is really awesome if you have dual display! I can have a grid on 1 display with the Loupe view on another, this is much faster than zooming in and out in a single display</li>
<li>It publishes directly to Flickr, it syncs comments, views, title, caption, and tags. If you edit photos that have already been published to Flickr, you can simple re-publish and it will figure out how to replace the photos on Flickr instead of uploading new ones. When you use a publish service, it automatically converts to the desired format for upload and then delete them, which is really nice. Before I manually did that in Photoshop and was a pain to convert a lot of them (even converting in batches in Bridge was annoying)</li>
<li>It&#8217;s really easy and fast to sort through your entire photo library by metadata, ratings, tags, etc</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/aynblog?a=N-YhLZyApZg:qgxc5rbrTJY:WtzYBjuvWu0"><img src="http://feeds.feedburner.com/~ff/aynblog?d=WtzYBjuvWu0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=N-YhLZyApZg:qgxc5rbrTJY:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/aynblog?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=N-YhLZyApZg:qgxc5rbrTJY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/aynblog?i=N-YhLZyApZg:qgxc5rbrTJY:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=N-YhLZyApZg:qgxc5rbrTJY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/aynblog?i=N-YhLZyApZg:qgxc5rbrTJY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=N-YhLZyApZg:qgxc5rbrTJY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/aynblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/aynblog/~4/N-YhLZyApZg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.andrewng.com/2010/08/03/lightroom-3-rocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.andrewng.com/2010/08/03/lightroom-3-rocks/</feedburner:origLink></item>
		<item>
		<title>random skiing and snowboarding vids</title>
		<link>http://feedproxy.google.com/~r/aynblog/~3/ADeyGrLz6eA/</link>
		<comments>http://blog.andrewng.com/2010/07/15/random-skiing-and-snowboarding-vids/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 16:44:01 +0000</pubDate>
		<dc:creator>ayn</dc:creator>
				<category><![CDATA[Snowboarding]]></category>
		<category><![CDATA[snowboard]]></category>

		<guid isPermaLink="false">http://blog.andrewng.com/?p=2036</guid>
		<description>Switch triple rodeo at windells: Gnarcade: Gnarcade from Mike Benson on Vimeo. A videogame invasion has hit Mt Hood and High Cascade! Check out Scott Stevens, Micah Hollinger, Chris Beresford, Tim Eddy, Ben Bogart, and Casey Wrightsman as they live life like it&amp;#8217;s one big game.</description>
			<content:encoded><![CDATA[<p>Switch triple rodeo at windells:</p>
<p><iframe class="youtube-player" type="text/html" width="560" height="336" src="http://www.youtube.com/embed/nKynrjhbtPI" frameborder="0"><br />
</iframe></p>
<p>Gnarcade:</p>
<p><object width="560" height="315"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13240711&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=13240711&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="560" height="315"></embed></object>
<p><a href="http://vimeo.com/13240711">Gnarcade</a> from <a href="http://vimeo.com/mikebenson">Mike Benson</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>A videogame invasion has hit Mt Hood and High Cascade!  Check out Scott Stevens, Micah Hollinger, Chris Beresford, Tim Eddy, Ben Bogart, and Casey Wrightsman as they live life like it&#8217;s one big game.  </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/aynblog?a=ADeyGrLz6eA:gjD-ic75iK8:WtzYBjuvWu0"><img src="http://feeds.feedburner.com/~ff/aynblog?d=WtzYBjuvWu0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=ADeyGrLz6eA:gjD-ic75iK8:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/aynblog?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=ADeyGrLz6eA:gjD-ic75iK8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/aynblog?i=ADeyGrLz6eA:gjD-ic75iK8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=ADeyGrLz6eA:gjD-ic75iK8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/aynblog?i=ADeyGrLz6eA:gjD-ic75iK8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=ADeyGrLz6eA:gjD-ic75iK8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/aynblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/aynblog/~4/ADeyGrLz6eA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.andrewng.com/2010/07/15/random-skiing-and-snowboarding-vids/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.andrewng.com/2010/07/15/random-skiing-and-snowboarding-vids/</feedburner:origLink></item>
		<item>
		<title>Migrating a “degraded” Amazon EC2 Instance</title>
		<link>http://feedproxy.google.com/~r/aynblog/~3/gvaB_mOUk78/</link>
		<comments>http://blog.andrewng.com/2010/06/22/migrating-a-degraded-amazon-ec2-instance/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 22:13:24 +0000</pubDate>
		<dc:creator>ayn</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[degraded]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[instance]]></category>
		<category><![CDATA[migration]]></category>

		<guid isPermaLink="false">http://blog.andrewng.com/?p=2021</guid>
		<description>I&amp;#8217;ve been using AWS for a few years now, and it has been rock solid. Last Sunday one of my sites became unreachable, when I got home a couple of hours later, I was able to ssh into the instance and everything seemed to be working perfectly. I checked utmp logs and the instance was [...]</description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using AWS for a few years now, and it has been rock solid. Last Sunday one of my sites became unreachable, when I got home a couple of hours later, I was able to ssh into the instance and everything seemed to be working perfectly. I checked utmp logs and the instance was rebooted. A while later I got this email from Amazon:</p>
<blockquote><p>From: 	Amazon EC2 Notification<br />
Subject: 	Notice: Degraded Amazon EC2 Instance</p>
<p>Hello,</p>
<p>We have noticed that one or more of your instances are running on a host degraded due to hardware failure.</p>
<p>i-xxxxxx</p>
<p>The host needs to undergo maintenance and will be taken down at 12:00 GMT on 2010-06-23. Your instances will be terminated at this point.</p>
<p>The risk of your instances failing is increased at this point. We cannot determine the health of any applications running on the instances. We recommend that you launch replacement instances and start migrating to them.</p>
<p>Feel free to terminate the instances with the ec2-terminate-instance API when you are done with them.</p>
<p>Sincerely,</p>
<p>The Amazon EC2 Team</p></blockquote>
<p>Sounded like they would terminate the instance because of hardware failure, and that would be very bad &#8211; this is a high volume eCommerce site. I looked around to see what was the best way to &#8220;clone&#8221; the instance and relaunch it, and it turned out to be really simple.</p>
<p>When I setup EC2 stuff I always use an EBS volume for the important data like the /home, the MySQL storage, most of the configurations in /etc like Apache vhost configs. I also use an Elastic IP address so I can switch it to another instance easily, and it won&#8217;t require modifying DNS records at all. So all I had to do was:</p>
<ul>
<li>get all your AWS access keys, certs, and user id, onto the instance</li>
<li>create a folder for the AMI bundling work</li>
<li>bundle the root volume on the dying instance</li>
</ul>
<pre class="brush: bash; light: true;">
$ sudo mkdir /mnt/ami &amp;&amp; sudo ec2-bundle-vol -d /mnt/ami -k pk-CKXXXXXXXXXXXX.pem -u 12345678 -c cert-CKXXXXXXXXXXXXXXX.pem
</pre>
<ul>
<li>upload the bundle to S3 and register the AMI</li>
</ul>
<pre class="brush: bash; light: true;">
$ ec2-upload-bundle -b somesite-post-degraded -m /mnt/ami/image.manifest.xml -a XXXXXXXXXX -s XXXXXXXXXXXXX/00XX
$ ec2-register somesite-post-degraded/image.manifest.xml
</pre>
<ul>
<li>launch a new instance with the AMI</li>
<li>unattach the EBS volume from the old instance</li>
<li>attach the EBS volume to new instance</li>
<li>re-assign elastic IP to new instance</li>
</ul>
<p>You can do a lot of these tasks from the <a href="https://console.aws.amazon.com/ec2/home">AWS Management Console</a>. All of that took about 2 hours, most of the time was spent waiting for the AMI to bundle and upload as it was pretty large.</p>
<p>Everything worked perfectly after the migration, when I set up the EC2 infrastructure I had planned for things like these and in theory migration should go without any glitch, but I never actually had a need to migrate an instance. It&#8217;s good to know that everything actually worked as designed.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/aynblog?a=gvaB_mOUk78:cbJYTw8El6I:WtzYBjuvWu0"><img src="http://feeds.feedburner.com/~ff/aynblog?d=WtzYBjuvWu0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=gvaB_mOUk78:cbJYTw8El6I:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/aynblog?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=gvaB_mOUk78:cbJYTw8El6I:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/aynblog?i=gvaB_mOUk78:cbJYTw8El6I:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=gvaB_mOUk78:cbJYTw8El6I:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/aynblog?i=gvaB_mOUk78:cbJYTw8El6I:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=gvaB_mOUk78:cbJYTw8El6I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/aynblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/aynblog/~4/gvaB_mOUk78" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.andrewng.com/2010/06/22/migrating-a-degraded-amazon-ec2-instance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.andrewng.com/2010/06/22/migrating-a-degraded-amazon-ec2-instance/</feedburner:origLink></item>
		<item>
		<title>Extra space/row in UIPopoverController content?</title>
		<link>http://feedproxy.google.com/~r/aynblog/~3/Bf4O0Qw_2eY/</link>
		<comments>http://blog.andrewng.com/2010/05/24/extra-spacerow-in-uipopovercontroller-content/#comments</comments>
		<pubDate>Tue, 25 May 2010 00:59:00 +0000</pubDate>
		<dc:creator>ayn</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[3.2]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[extra space]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[objc]]></category>
		<category><![CDATA[objectivec]]></category>
		<category><![CDATA[popover]]></category>
		<category><![CDATA[UIPopoverController]]></category>
		<category><![CDATA[UISplitViewController]]></category>
		<category><![CDATA[UISplitViewControllerDelegate]]></category>

		<guid isPermaLink="false">http://blog.andrewng.com/?p=2007</guid>
		<description>If you&amp;#8217;re using UISplitViewController in your iPad/Universal apps, you probably implemented the UISplitViewControllerDelegate to add a UIBarButtonItem to the detail view controller&amp;#8217;s toolbar to display a popover. The popover might have some extra space before the first row after you rotate the simulator or the iPad from landscape to portrait, took me a few hours [...]</description>
			<content:encoded><![CDATA[<p>If you&#8217;re using <a href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UISplitViewController_class/Reference/Reference.html"><em>UISplitViewController</em></a> in your iPad/Universal apps, you probably implemented the <a href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UISplitViewControllerDelegate_protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40009454"><em>UISplitViewControllerDelegate</em></a> to add a <em>UIBarButtonItem</em> to the detail view controller&#8217;s toolbar to display a popover. The popover might have some extra space before the first row after you rotate the simulator or the iPad from landscape to portrait, took me a few hours to figure this out, it is because the navigation bar&#8217;s <em>translucent</em> property is set to <em>YES</em>, set it to <em>NO</em> before you add the button and you won&#8217;t see the extra space. Also, if you instantiate the nav bar in your NIB, leave its style as<em>default</em> in Interface Builder, otherwise the popover will be messed up on load when you launch the app in portrait orientation. Set them in code instead.</p>
<pre class="brush: objc; highlight: [12];">
- (void)viewWillAppear:(BOOL)animated {
	[super viewWillAppear:animated];

	self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
	self.navigationController.navigationBar.translucent = YES;
}

#pragma mark -
#pragma mark UISplitViewControllerDelegate methods

- (void)splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)pc {
	self.navigationController.navigationBar.translucent = NO; //if I don't do this we get extra space in popover
	barButtonItem.title = @&quot;Some Title&quot;;

	// Keep references to the popover controller and the popover button, and tell the detail view controller to show the button.
	self.popoverController = pc;
	self.rootPopoverButtonItem = barButtonItem;
	UIViewController &lt;SubstitutableDetailViewController&gt; *detailViewController = [splitViewController.viewControllers objectAtIndex:1];
	[detailViewController showRootPopoverButtonItem:rootPopoverButtonItem];
}

- (void)splitViewController:(UISplitViewController *)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem {
	//setting it back to black translucent
	self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
	self.navigationController.navigationBar.translucent = YES;

	// Nil out references to the popover controller and the popover button, and tell the detail view controller to hide the button.
	UIViewController &lt;SubstitutableDetailViewController&gt; *detailViewController = [splitViewController.viewControllers objectAtIndex:1];
	[detailViewController invalidateRootPopoverButtonItem:rootPopoverButtonItem];
	self.popoverController = nil;
	self.rootPopoverButtonItem = nil;
}
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/aynblog?a=Bf4O0Qw_2eY:WfP9nvypPQA:WtzYBjuvWu0"><img src="http://feeds.feedburner.com/~ff/aynblog?d=WtzYBjuvWu0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=Bf4O0Qw_2eY:WfP9nvypPQA:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/aynblog?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=Bf4O0Qw_2eY:WfP9nvypPQA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/aynblog?i=Bf4O0Qw_2eY:WfP9nvypPQA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=Bf4O0Qw_2eY:WfP9nvypPQA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/aynblog?i=Bf4O0Qw_2eY:WfP9nvypPQA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=Bf4O0Qw_2eY:WfP9nvypPQA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/aynblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/aynblog/~4/Bf4O0Qw_2eY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.andrewng.com/2010/05/24/extra-spacerow-in-uipopovercontroller-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.andrewng.com/2010/05/24/extra-spacerow-in-uipopovercontroller-content/</feedburner:origLink></item>
		<item>
		<title>Speeding up Core Data-based UITableViewController</title>
		<link>http://feedproxy.google.com/~r/aynblog/~3/r2kwaVH0K3I/</link>
		<comments>http://blog.andrewng.com/2010/05/11/speeding-up-core-data-based-uitableviewcontroller/#comments</comments>
		<pubDate>Wed, 12 May 2010 06:17:32 +0000</pubDate>
		<dc:creator>ayn</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[coredata]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[objectivec]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[threads]]></category>
		<category><![CDATA[uitableviewcontroller]]></category>

		<guid isPermaLink="false">http://blog.andrewng.com/?p=1995</guid>
		<description>It is pretty common for an iPhone/iPad app to make an API call to a server, get the JSON response data back, parse that data, and display it in a table view. The usual way to do this looks like this: - (void)apiCall { NSString *urlString = [[NSString alloc] initWithFormat:@&amp;#34;%@/some_models/some_action.json&amp;#34;, apiEndpoint]; NSURL *url = [[NSURL [...]</description>
			<content:encoded><![CDATA[<p>It is pretty common for an iPhone/iPad app to make an API call to a server, get the JSON response data back, parse that data, and display it in a table view. The usual way to do this looks like this:</p>
<pre class="brush: objc;">
- (void)apiCall {
	NSString *urlString = [[NSString alloc] initWithFormat:@&quot;%@/some_models/some_action.json&quot;, apiEndpoint];
	NSURL *url = [[NSURL alloc] initWithString:urlString];
	NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
	[request setHTTPMethod:@&quot;GET&quot;];
	[NSURLConnection connectionWithRequest:request delegate:self];
	[url release];
	[urlString release];
}
</pre>
<p>This fires off the API call asynchronously, and then you implement some delegate methods like this:</p>
<pre class="brush: objc;">
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
	responseData = [[NSMutableData alloc] initWithCapacity:[response expectedContentLength]+100];
}

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
	[responseData appendData:data];
}

- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
	NSString *jsonString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
	[self dictionaryToCoreData:[jsonString JSONValue]]; //this parses the JSON data and persists into Core Data
	[jsonString release];
	[responseData release];
}
</pre>
<p>This approach works fine, but when you run it on the real devices, you might notice that the table view locks up when you go between the navigation flow. Basically the table view ignores user inputs until everything above is finished. This is because everything is performed on the main thread and it locks up the UI. The asynchronous <i>NSURLConnection</i> method used above doesn&#8217;t like to be used in a background thread, and there is really no reason to do things asynchronously if you&#8217;re working in the background, conveniently, there is a <i>+sendSynchronousRequest</i> method that waits until we get the response and data in <i>NSURLConnection</i>. To perform the above API call in a background thread, the code is actually much simpler:</p>
<pre class="brush: objc;">
- (void)apiCall {
	[self performSelectorInBackground:@selector(backgroundApiCall) withObject:nil];
}

- (void)backgorundApiCall {
	@synchronized(self) {
		NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // Top-level pool

		NSString *urlString = [[NSString alloc] initWithFormat:@&quot;%@/some_models/some_action.json&quot;, apiEndpoint];
		NSURL *url = [[NSURL alloc] initWithString:urlString];
		NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
		[request setHTTPMethod:@&quot;GET&quot;];

		NSURLResponse *resp;
		NSError *error;
		NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;resp error:&amp;error];
		// you should probably do some error handling here
		NSString *jsonString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
		[self dictionaryToCoreData:[jsonString JSONValue]];
		[jsonString release];
		[url release];
		[urlString release];
		[pool release];
	}
}
</pre>
<p>Now, when the table view is first loaded, it displays the stale data in Core Data, the API call is fired off in the background, and when we get data back from the call the table view is updated with the new data. Stale data is better than locked up UI.</p>
<p>Notice the very first time you run the app the table view will be empty until the background thread finishes, if this bothers you, you can preload the database with sample data. In our app we can&#8217;t really do this as the data is unique to the user, but it might make sense for you to ship your apps with pre-loaded data.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/aynblog?a=r2kwaVH0K3I:SUcWfCxqscY:WtzYBjuvWu0"><img src="http://feeds.feedburner.com/~ff/aynblog?d=WtzYBjuvWu0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=r2kwaVH0K3I:SUcWfCxqscY:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/aynblog?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=r2kwaVH0K3I:SUcWfCxqscY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/aynblog?i=r2kwaVH0K3I:SUcWfCxqscY:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=r2kwaVH0K3I:SUcWfCxqscY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/aynblog?i=r2kwaVH0K3I:SUcWfCxqscY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=r2kwaVH0K3I:SUcWfCxqscY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/aynblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/aynblog/~4/r2kwaVH0K3I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.andrewng.com/2010/05/11/speeding-up-core-data-based-uitableviewcontroller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.andrewng.com/2010/05/11/speeding-up-core-data-based-uitableviewcontroller/</feedburner:origLink></item>
		<item>
		<title>[Reachability reachabilityForLocalWiFi] crash with OS4 SDK</title>
		<link>http://feedproxy.google.com/~r/aynblog/~3/jIKOYBLxJx4/</link>
		<comments>http://blog.andrewng.com/2010/05/06/reachability-reachabilityforlocalwifi-crash-with-os4-sdk/#comments</comments>
		<pubDate>Thu, 06 May 2010 21:51:07 +0000</pubDate>
		<dc:creator>ayn</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[os4]]></category>
		<category><![CDATA[reachability]]></category>
		<category><![CDATA[sdk]]></category>

		<guid isPermaLink="false">http://blog.andrewng.com/?p=1979</guid>
		<description>If you&amp;#8217;re using Apple&amp;#8217;s reachability framework and compiling with OS4 beta SDK, you might get a crash like this: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[Reachability&amp;#60;0xf37d0&amp;#62; init]: cannot init a class object.' You can fix it by commenting out the [super init] line in + (Reachability*) reachabilityForLocalWiFi in Reachability.m: + (Reachability*) [...]</description>
			<content:encoded><![CDATA[<p>If you&#8217;re using Apple&#8217;s reachability framework and compiling with OS4 beta SDK, you might get a crash like this:</p>
<pre class="brush: objc; light: true;">*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[Reachability&lt;0xf37d0&gt; init]: cannot init a class object.'</pre>
<p>You can fix it by commenting out the [super init] line in + (Reachability*) reachabilityForLocalWiFi in Reachability.m:</p>
<pre class="brush: objc; highlight: [3];">
+ (Reachability*) reachabilityForLocalWiFi;
{
	//[super init];
	struct sockaddr_in localWifiAddress;
	bzero(&amp;localWifiAddress, sizeof(localWifiAddress));
	localWifiAddress.sin_len = sizeof(localWifiAddress);
	localWifiAddress.sin_family = AF_INET;
	// IN_LINKLOCALNETNUM is defined in &lt;netinet/in.h&gt; as 169.254.0.0
	localWifiAddress.sin_addr.s_addr = htonl(IN_LINKLOCALNETNUM);
	Reachability* retVal = [self reachabilityWithAddress: &amp;localWifiAddress];
	if(retVal!= NULL)
	{
		retVal-&gt;localWiFiRef = YES;
	}
	return retVal;
}
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/aynblog?a=jIKOYBLxJx4:MX7_pCjScwQ:WtzYBjuvWu0"><img src="http://feeds.feedburner.com/~ff/aynblog?d=WtzYBjuvWu0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=jIKOYBLxJx4:MX7_pCjScwQ:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/aynblog?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=jIKOYBLxJx4:MX7_pCjScwQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/aynblog?i=jIKOYBLxJx4:MX7_pCjScwQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=jIKOYBLxJx4:MX7_pCjScwQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/aynblog?i=jIKOYBLxJx4:MX7_pCjScwQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=jIKOYBLxJx4:MX7_pCjScwQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/aynblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/aynblog/~4/jIKOYBLxJx4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.andrewng.com/2010/05/06/reachability-reachabilityforlocalwifi-crash-with-os4-sdk/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.andrewng.com/2010/05/06/reachability-reachabilityforlocalwifi-crash-with-os4-sdk/</feedburner:origLink></item>
		<item>
		<title>this blog at geocities</title>
		<link>http://feedproxy.google.com/~r/aynblog/~3/UzmG1j0lTQE/</link>
		<comments>http://blog.andrewng.com/2010/04/27/this-blog-at-geocities/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 05:10:36 +0000</pubDate>
		<dc:creator>ayn</dc:creator>
				<category><![CDATA[Random stuff]]></category>
		<category><![CDATA[geocities]]></category>

		<guid isPermaLink="false">http://blog.andrewng.com/?p=1977</guid>
		<description>This is cool, now that GeoCities is gone I kindda miss these ridiculous sites. Well I guess now they moved to My/Face. If this blog were hosted at geocities it would look like this or like this (I like the animated gif of Gates).</description>
			<content:encoded><![CDATA[<p><a href="http://wonder-tonic.com/geocitiesizer/index.php">This</a> is cool, now that <a href="http://geocities.yahoo.com/index.php">GeoCities</a> is gone I kindda miss these ridiculous sites. Well I guess now they moved to My/Face.</p>
<p>If this blog were hosted at geocities it would look like <a href="http://wonder-tonic.com/geocitiesizer/content.php?theme=1&amp;music=2&amp;url=blog.andrewng.com">this</a> or <a href="http://wonder-tonic.com/geocitiesizer/content.php?theme=2&amp;music=5&amp;url=blog.andrewng.com">like this</a> (I like the animated gif of Gates).</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/aynblog?a=UzmG1j0lTQE:lIDg-_DTnTY:WtzYBjuvWu0"><img src="http://feeds.feedburner.com/~ff/aynblog?d=WtzYBjuvWu0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=UzmG1j0lTQE:lIDg-_DTnTY:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/aynblog?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=UzmG1j0lTQE:lIDg-_DTnTY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/aynblog?i=UzmG1j0lTQE:lIDg-_DTnTY:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=UzmG1j0lTQE:lIDg-_DTnTY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/aynblog?i=UzmG1j0lTQE:lIDg-_DTnTY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=UzmG1j0lTQE:lIDg-_DTnTY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/aynblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/aynblog/~4/UzmG1j0lTQE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.andrewng.com/2010/04/27/this-blog-at-geocities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.andrewng.com/2010/04/27/this-blog-at-geocities/</feedburner:origLink></item>
		<item>
		<title>Kyle Conroy’s Blog – Should I have bought that Apple Product?</title>
		<link>http://feedproxy.google.com/~r/aynblog/~3/wL1nuI2nTtQ/</link>
		<comments>http://blog.andrewng.com/2010/04/26/kyle-conroys-blog-should-i-have-bought-that-apple-product/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 17:31:23 +0000</pubDate>
		<dc:creator>ayn</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[aapl]]></category>

		<guid isPermaLink="false">http://blog.andrewng.com/?p=1974</guid>
		<description>Currently, Apple&amp;#8217;s stock is at an all time high. A share today is worth over 40 times its value seven years ago. So, how much would you have today if you purchased stock instead of an Apple product? See for yourself in the table below. via Kyle Conroy&amp;#8217;s Personal Blog and Portfolio &amp;#8211; Should I [...]</description>
			<content:encoded><![CDATA[<blockquote><p>Currently, Apple&#8217;s stock is at an all time high. A share today is worth over 40 times its value seven years ago. So, how much would you have today if you purchased stock instead of an Apple product? See for yourself in the table below.</p></blockquote>
<p>via <a href="http://www.kyleconroy.com/apple-stock.php">Kyle Conroy&#8217;s Personal Blog and Portfolio &#8211; Should I have bought that Apple Product?</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/aynblog?a=wL1nuI2nTtQ:NULNJ85HNqU:WtzYBjuvWu0"><img src="http://feeds.feedburner.com/~ff/aynblog?d=WtzYBjuvWu0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=wL1nuI2nTtQ:NULNJ85HNqU:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/aynblog?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=wL1nuI2nTtQ:NULNJ85HNqU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/aynblog?i=wL1nuI2nTtQ:NULNJ85HNqU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=wL1nuI2nTtQ:NULNJ85HNqU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/aynblog?i=wL1nuI2nTtQ:NULNJ85HNqU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=wL1nuI2nTtQ:NULNJ85HNqU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/aynblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/aynblog/~4/wL1nuI2nTtQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.andrewng.com/2010/04/26/kyle-conroys-blog-should-i-have-bought-that-apple-product/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.andrewng.com/2010/04/26/kyle-conroys-blog-should-i-have-bought-that-apple-product/</feedburner:origLink></item>
		<item>
		<title>Facebook Like Button WordPress plugin</title>
		<link>http://feedproxy.google.com/~r/aynblog/~3/PXhOejqxsyE/</link>
		<comments>http://blog.andrewng.com/2010/04/21/facebook-like-button-wordpress-plugin/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 06:44:07 +0000</pubDate>
		<dc:creator>ayn</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[like]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.andrewng.com/?p=1962</guid>
		<description>Now you can add a Facebook &amp;#8220;Like&amp;#8221; button to any webpage, so I quickly created a plugin to add that to WordPress, it will take a day or 2 to publish to the official plugins site, but in the meantime you can grab it at GitHub. If you don&amp;#8217;t have Git, then you can download [...]</description>
			<content:encoded><![CDATA[<p>Now you can add a <a href="http://developers.facebook.com/docs/reference/plugins/like">Facebook &#8220;Like&#8221; button</a> to any webpage, so I quickly created a plugin to add that to WordPress, it will take a day or 2 to publish to the <a href="http://wordpress.org/extend/plugins/facebook-like-button-wp-plugin/">official plugins site</a>, but in the meantime you can grab it at <a href="http://github.com/ayn/wp-facebook-like-button">GitHub</a>. If you don&#8217;t have Git, then you can <a href="http://github.com/ayn/wp-facebook-like-button/zipball/master">download a zipfile</a> of it.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/aynblog?a=PXhOejqxsyE:Wi6jGLnDRbI:WtzYBjuvWu0"><img src="http://feeds.feedburner.com/~ff/aynblog?d=WtzYBjuvWu0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=PXhOejqxsyE:Wi6jGLnDRbI:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/aynblog?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=PXhOejqxsyE:Wi6jGLnDRbI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/aynblog?i=PXhOejqxsyE:Wi6jGLnDRbI:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=PXhOejqxsyE:Wi6jGLnDRbI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/aynblog?i=PXhOejqxsyE:Wi6jGLnDRbI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/aynblog?a=PXhOejqxsyE:Wi6jGLnDRbI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/aynblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/aynblog/~4/PXhOejqxsyE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.andrewng.com/2010/04/21/facebook-like-button-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.andrewng.com/2010/04/21/facebook-like-button-wordpress-plugin/</feedburner:origLink></item>
	</channel>
</rss>
