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

<channel>
	<title>John Herren's Blog</title>
	<atom:link href="http://jhherren.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jhherren.wordpress.com</link>
	<description></description>
	<lastBuildDate>Wed, 14 Oct 2009 07:25:01 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='jhherren.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/2ad7e23479db607355f4d4f3172a9b52?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>John Herren's Blog</title>
		<link>http://jhherren.wordpress.com</link>
	</image>
			<item>
		<title>Reading Radar featured on Boing Boing</title>
		<link>http://jhherren.wordpress.com/2009/10/14/reading-radar-featured-on-boing-boing/</link>
		<comments>http://jhherren.wordpress.com/2009/10/14/reading-radar-featured-on-boing-boing/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 07:25:01 +0000</pubDate>
		<dc:creator>John Herren</dc:creator>
				<category><![CDATA[mashups]]></category>

		<guid isPermaLink="false">http://jhherren.wordpress.com/?p=189</guid>
		<description><![CDATA[A guest blogger, Connie Choe, has posted a profile of Reading Radar on my all-time favorite blog Boing Boing. I can&#8217;t believe that this simple little mashup has received so much attention. Would anyone be interested in a video tutorial or something to learn how to build mashup sites like this?
     [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=189&subd=jhherren&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A guest blogger, <a href="http://www.boingboing.net/2009/10/12/boing-boing-guest-bl-2.html">Connie Choe</a>, has posted a <a href="http://www.boingboing.net/2009/10/13/reading-radar-api-ma.html">profile of Reading Radar</a> on my all-time favorite blog Boing Boing. I can&#8217;t believe that this <a href="http://readingradar.com">simple little mashup</a> has received so much attention. Would anyone be interested in a video tutorial or something to learn how to build mashup sites like this?</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jhherren.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jhherren.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jhherren.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jhherren.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jhherren.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jhherren.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jhherren.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jhherren.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jhherren.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jhherren.wordpress.com/189/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=189&subd=jhherren&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jhherren.wordpress.com/2009/10/14/reading-radar-featured-on-boing-boing/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/46640cd4061d603e78c1a989d6c30d75?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jhherren</media:title>
		</media:content>
	</item>
		<item>
		<title>Liz&#8217;s Photography Site is Live</title>
		<link>http://jhherren.wordpress.com/2009/04/08/lizs-photography-site-is-live/</link>
		<comments>http://jhherren.wordpress.com/2009/04/08/lizs-photography-site-is-live/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 07:47:01 +0000</pubDate>
		<dc:creator>John Herren</dc:creator>
				<category><![CDATA[mashups]]></category>

		<guid isPermaLink="false">http://jhherren.wordpress.com/?p=129</guid>
		<description><![CDATA[Liz has been asking me for some time now for a website to show off her photography. She&#8217;s been quite the shutterbug these last several years, consuming gigabytes upon gigabytes of disk space. I&#8217;ve had a lot of fun watching her try new things and watching her confidence build as what was one was a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=129&subd=jhherren&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://twitter.com/lizney78">Liz</a> has been asking me for some time now for a website to show off her photography. She&#8217;s been quite the shutterbug these last several years, consuming gigabytes upon gigabytes of disk space. I&#8217;ve had a lot of fun watching her try new things and watching her confidence build as what was one was a hobby has become much more. She has taken quite an interest in photographing local musicians, made some good contacts, and has begun selling prints. I feel really grateful to her that we have such and awesome time machine to look back on past memories in all of their splendor.</p>
<div class="wp-caption aligncenter" style="width: 510px"><a href="http://www.flickr.com/photos/jhherren/3422777249/"><img title="Elizabeth Herren Photography" src="http://farm4.static.flickr.com/3616/3422777249_03aa9ae4dd.jpg?v=0" alt="elhphotos.com - Elizabeth Herren Photography" width="500" height="365" /></a><p class="wp-caption-text">elhphotos.com - Elizabeth Herren Photography</p></div>
<p>I finally sat down this evening and put together a simple site.  Her site, <a title="Elizabeth Herren Photography" href="http://elhphotos.com">elhphotos.com</a> pulls in an album from her <a href="http://www.flickr.com/photos/elhphotos">&#8220;professional&#8221; Flickr account</a> (as opposed to her <a href="http://www.flickr.com/photos/lizney78">personal one</a>), so she&#8217;ll be able to manage the slideshow without needing to edit the site at all.</p>
<p>Technically you could call this site a mashup. It&#8217;s all client side, using some <a title="jquery flickr plugin" href="http://www.projectatomic.com/2008/04/jquery-flickr/">jquery plugins to access her Flickr feed</a>, and the <a title="jquery slimbox2 plugin" href="http://www.digitalia.be/software/slimbox2">slimbox2 plugin</a> to power the lightbox effect.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jhherren.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jhherren.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jhherren.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jhherren.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jhherren.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jhherren.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jhherren.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jhherren.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jhherren.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jhherren.wordpress.com/129/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=129&subd=jhherren&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jhherren.wordpress.com/2009/04/08/lizs-photography-site-is-live/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/46640cd4061d603e78c1a989d6c30d75?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jhherren</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3616/3422777249_03aa9ae4dd.jpg?v=0" medium="image">
			<media:title type="html">Elizabeth Herren Photography</media:title>
		</media:content>
	</item>
		<item>
		<title>Twitter and the Case for Web Hooks</title>
		<link>http://jhherren.wordpress.com/2009/03/05/twitter-and-the-case-for-web-hooks/</link>
		<comments>http://jhherren.wordpress.com/2009/03/05/twitter-and-the-case-for-web-hooks/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 09:27:22 +0000</pubDate>
		<dc:creator>John Herren</dc:creator>
				<category><![CDATA[web hooks]]></category>

		<guid isPermaLink="false">http://jhherren.wordpress.com/?p=125</guid>
		<description><![CDATA[My, my, we do love our Twitter. Tiny messages in a list. A global chatroom really, but just the messages you want to see. What an elegant system.

But it&#8217;s hard to track conversations.
But 140 characters isn&#8217;t enough for some dude who has trouble making his thoughts a wee bit more concise and is accustomed to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=125&subd=jhherren&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>My, my, we do love our <a title="follow me, everything is alright" href="http://twitter.com/johnherren">Twitter</a>. Tiny messages in a list. A global chatroom really, but just the messages you want to see. What an elegant system.</p>
<ul>
<li>But it&#8217;s hard to track conversations.</li>
<li>But 140 characters isn&#8217;t enough for some dude who has trouble making his thoughts a wee bit more concise and is accustomed to using long, redundant, extra words.</li>
<li>But it doesn&#8217;t automatically link up my stock symbols in my tweets.</li>
</ul>
<p>But, but, but.</p>
<h2>Enter the API</h2>
<p>Everyone who&#8217;s used Twitter for a significant amount of time has concocted a list of features that Twitter lacks and desperately needs. Fortunately, Twitter has a given us a nice API to let geeks fill in the gaps somewhat. Without Googling around to find the most recent stat, I&#8217;ve read that the majority of tweets are placed through the API instead of the Twitter site, through mobile and desktop apps. That&#8217;s a good indication.</p>
<p>Besides API based clients&#8211;alternate software that does what the Twitter site does, there has been a surge in Twitter powered bots. These bots read and write to Twitter using some kind of logic in between. I&#8217;ve seen autonomous chat bots and autoresponders.</p>
<h2>Who Are My Twitter Followers?</h2>
<p>A pattern I&#8217;ve seen a lot lately with Twitterized apps is &#8220;all you have to do to join my app is follow @sometwittername&#8221;. @sometwittername then uses the API to find his followers, and then sends the user tweets, or, links via direct message with special links just for that user.  It&#8217;s a MLM&#8217;ers dream. The top essential tactic of these web marketing guys is to BUILD YOUR LIST, and there&#8217;s no friendlier way than Twitter, right?</p>
<p>If you want to see an example of this pattern in action, <a href="http://www.guruofsales.com/general/695/win-100-just-follow-my-twitter">here&#8217;s one</a>, which I reluctantly link to for demonstration purposes only.</p>
<p>Yes, apparently we have &#8220;Twitter marketing gurus&#8221; now.</p>
<p>So now the developer needs to know who his followers are, so he can spam or provide $ValueAddedService. Currently, the Twitter API gives developers two ways of finding out who is following you. The first one requires polling, which means you have to call the API at regular intervals.</p>
<p>Polling sucks. If you request too often, it&#8217;s wasteful. If you don&#8217;t request often enough, you miss the opportunity to do cool stuff with new followers in a timely fashion.</p>
<p>A better way to detect new followers is to tap into your email stream. When Twitter emails you with a new follower notification, it tucks away some extra headers into your message. This is <a href="http://apiwiki.twitter.com/FAQ?SearchFor=X-Twittersenderscreenname&amp;sp=1#Howshouldmybotfollowusersthatfollowitorinspectdirectmessages">documented for some reason in the FAQ</a>. The headers look something like this:</p>
<ul style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0 0 0 3em;padding:0;">
<li><span style="font-family:'Courier New';"><span style="font-weight:inherit;font-style:inherit;font-size:100%;vertical-align:baseline;border-width:0;margin:0;padding:0;">X-TwitterEmailType</span></span><span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;"> <span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;">- will be &#8216;is_following&#8217; or &#8216;direct_message&#8217;</span></span></li>
<li><span style="font-family:'Courier New';"><span style="font-weight:inherit;font-style:inherit;font-size:100%;vertical-align:baseline;border-width:0;margin:0;padding:0;">X-TwitterCreatedAt</span></span> <span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;"><span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;">- ex: Thu Aug 07 15:17:15 -0700 2008</span></span></li>
<li><span style="font-family:'Courier New';"><span style="font-weight:inherit;font-style:inherit;font-size:100%;vertical-align:baseline;border-width:0;margin:0;padding:0;">X-TwitterSenderScreenName</span></span><span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;"> <span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;">- ex: &#8216;bob&#8217;</span></span><span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;"> </span></li>
<li><span style="font-family:'Courier New';"><span style="font-weight:inherit;font-style:inherit;font-size:100%;vertical-align:baseline;border-width:0;margin:0;padding:0;">X-TwitterSenderName</span></span><span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;"> <span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;">- ex: &#8216;Bob Smith&#8217;</span></span><span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;"> </span></li>
<li><span style="font-family:'Courier New';"><span style="font-weight:inherit;font-style:inherit;font-size:100%;vertical-align:baseline;border-width:0;margin:0;padding:0;">X-TwitterSenderID</span></span><span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;"> <span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;">- ex: 12345</span></span></li>
<li><span style="font-family:'Courier New';"><span style="font-weight:inherit;font-style:inherit;font-size:100%;vertical-align:baseline;border-width:0;margin:0;padding:0;">X-TwitterRecipientScreenName</span></span><span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;"> <span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;">- ex: &#8216;john&#8217;</span></span></li>
<li><span style="font-family:'Courier New';"><span style="font-weight:inherit;font-style:inherit;font-size:100%;vertical-align:baseline;border-width:0;margin:0;padding:0;">X-TwitterRecipientName</span></span><span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;"> <span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;">- ex: &#8216;John Doe&#8217;</span></span></li>
<li><span style="font-family:'Courier New';"><span style="font-weight:inherit;font-style:inherit;font-size:100%;vertical-align:baseline;border-width:0;margin:0;padding:0;">X-TwitterRecipientID</span></span><span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;"> <span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;">- ex: 67890</span></span></li>
<li><span style="font-family:'Courier New';"><span style="font-weight:inherit;font-style:inherit;font-size:100%;vertical-align:baseline;border-width:0;margin:0;padding:0;">X-TwitterDirectMessageID</span></span><span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;"> </span><span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;">-</span> <span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;"><span style="font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-width:0;margin:0;padding:0;">ex: 2346346</span></span></li>
</ul>
<p>So all you have to do to maintain an instantly up-to-date list of your followers is to send your email notifications through a script (most any SMTP server can do this) and check for messages with the X-TwitterEmailType set to &#8216;is_following&#8217;, and then grab the SenderID or SenderScreenName and you&#8217;re all set.</p>
<p>This is a wannabe web hook in action.</p>
<h2>WTF is a Web Hook?</h2>
<p>If this is the first time you&#8217;re hearing the term &#8220;web hook&#8221;, pay attention. It&#8217;s the next step in this whole read-write web thing.</p>
<p>In short, a web hook, or &#8220;http callback&#8221; allows you to subscribe to another website&#8217;s <em>events</em> with a URL. You tell a website, &#8220;Hey, when some event happens, send some information about it to this URL&#8221;. Why? It doesn&#8217;t matter, it&#8217;s up to the developer to decide what to do with that information.</p>
<p>An excellent example of a web hook is <a href="https://www.paypal.com/ipn">Paypal&#8217;s Instant Payment Notification</a>. It works like this:</p>
<ol>
<li>You come to my store, fill up your cart, and hit the checkout button.</li>
<li>My site sends you and your order info to Paypal, and you pay up.</li>
<li>In my Paypal account, I&#8217;ve set up my IPN (web hook!) URL.</li>
<li>Paypal POSTs the order information to the hook URL letting me know that you&#8217;ve paid</li>
<li>I record the sale, do whatever business logic I need to do so my Oompa Loompas can ship your stuff to you.</li>
</ol>
<p>There&#8217;s a little more to it, but that&#8217;s the basics. I can choose to do whatever I want with that data from Paypal.</p>
<p>The key part is step 5. I do whatever logic I need to do with my own code.</p>
<p>Web hooks are APIs knowing to call other API endpoints. That&#8217;s it.</p>
<ul>
<li>Homework: flip through this <a href="http://blog.webhooks.org/2008/11/02/web-hooks-and-the-programmable-world-of-tomorrow/">presentation by Jeff Lindsay about web hooks</a>. He&#8217;s a fucking NASA web astronaut and lives and breathes web hooks.</li>
<li>Extra Credit: subscribe to <a href="http://blog.webhooks.org/">Jeff&#8217;s blog about web hooks</a>. It&#8217;s quality.</li>
</ul>
<p>Now back to the Twitter. Why should you have to hook into your email stream to get those &#8220;is_following&#8221; notifications?  In the same way Twitter sends you an email, it could just as easily send an HTTP POST with that same data to a script you control. Would it not be much simpler to specify a callback URL in your Twitter settings?</p>
<p>Your site would become integrated with Twitter itself. That word <em>integrated</em> is key. Instead a basic request-response API <strong>message</strong>, now our websites are having a <strong>conversation</strong>.</p>
<h2>I Understand Now! What Possibilities! Web Hooks Rock My Casbah!</h2>
<p>Now imagine what would be possible if Twitter allowed hooks for <strong>all</strong> the different events that happen on the platform.</p>
<ul>
<li>Twitter, ping this URL of mine when someone I follow tweets or DM&#8217;s or replies to me.</li>
<li>Twitter, ping a different URL of mine when someone unfollows me.</li>
<li>Twitter, ping yet another URL when someone I follow updates her profile. She&#8217;s cute, and I need to stay on top of those thumbnail changes.</li>
</ul>
<p>Twitter, just ping my scripts when stuff happens.</p>
<h2>Now Make Hooks Programmable</h2>
<p>Maybe I&#8217;m not interested in every single hookable event. How cool would it be if I could get a list of all my subscribed events through an API call?</p>
<ul>
<li>Me: Yo Twitter, what do I care about? What am I subscribed to?</li>
<li>Twitter: Sup dawg, I heard you like profile changes and unfollows, so I send twirps to your tweets so you can twit when I twat.</li>
</ul>
<p>But instead of jive talk you&#8217;d get back XML or JSON with event names and your hook URLs.</p>
<p>Take it one step further and suppose you only want your hook called when only certain people perform certain actions. Why not make setting and unsetting the hooks themselves programmable via the API?</p>
<p>Example: Call my URL http://myawesometwittersite.com/myhooks/profile/update when @cutetwitterchick updates her profile.</p>
<p>I could easily perform that logic in my own code, but telling Twitter to do it is that much cooler:</p>
<pre style="padding-left:30px;">set_hook ( hook_name, hook_URL [, screename | ID | email ]  )</pre>
<pre style="padding-left:30px;">unset_hook ( hook_name, hook_URL [, screename | ID | email ]  )</pre>
<pre style="padding-left:30px;">list_hooks()</pre>
<h2>The Hooked Web</h2>
<p>Jump to the future when all of your favorite sites implement programmable hooks. The pipedream, holy grail, end result is that you no longer even need Twitter, because it&#8217;s become a protocol. Just like blogs happily send pingbacks, you can install a Twitter-speaking, open sourced package on a Slicehost account that is your own personal Twitter. The protocol is extensible, so you can do things like:</p>
<ul>
<li>display replied messages in threads as conversations</li>
<li>allow longer than 140 character messages</li>
<li>automatically hyperlink those stock symbols</li>
</ul>
<p>And, unlike email, newsgroups,  and chatrooms, it doesn&#8217;t turn into a jacked-up, spammed to hell system, because you&#8217;re still only following what you want to follow. It&#8217;s a decentralized, pluggable architecture, and it integrates with any site using web hooks. At your service.</p>
<p>Take this platform one step further and visualize a user interface layer. You have a nice, decentralized activity stream&#8211;an open FriendFeed platform with all of your <em>stuff</em>. Maybe it&#8217;s organized by the source, or grouped by service type or however you want it organized. Messages can carry their own css styling, but only if you allow it. Messages can have interactive elements, but only if you allow them. And, holy crap, messages can come packaged with next actions! Twitter messages allow you to reply, calling a hook specified in the message. Flickr messages allow you to comment directly from this &#8216;StreamReader&#8217; software. You subscribe to Mechanical Turk hits, and receive a new hit whenever you complete one.</p>
<p>One more step further. Not only do messages have next actions, but I can write plugins to attach next actions to any message, and I can do it conditionally. This would be like being able to write filters for Google Reader. For example, filter out all the messages from my group of PHP programming buddies when a message is about photography. I&#8217;m not interested, but those guys LOVE fucking cameras for some reason.</p>
<p>I&#8217;ve very conveniently ignored the implementation details of such an animal. Twitter could quickly become a push architecture with all of these hooks in place, and that turns quickly into n-squared network traffic patterns. Luckily we have some heavy brains working on xmpp and pubsub and the like, and maybe the end solution would be half push, half poll.</p>
<p>At this point it&#8217;s just really fun to imagine the possibilities of a read-write-read-write-read-write web.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jhherren.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jhherren.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jhherren.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jhherren.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jhherren.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jhherren.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jhherren.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jhherren.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jhherren.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jhherren.wordpress.com/125/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=125&subd=jhherren&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jhherren.wordpress.com/2009/03/05/twitter-and-the-case-for-web-hooks/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/46640cd4061d603e78c1a989d6c30d75?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jhherren</media:title>
		</media:content>
	</item>
		<item>
		<title>Happy Valentizzle, Bitch</title>
		<link>http://jhherren.wordpress.com/2009/02/13/happy-valentizzle-bitch/</link>
		<comments>http://jhherren.wordpress.com/2009/02/13/happy-valentizzle-bitch/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 19:52:17 +0000</pubDate>
		<dc:creator>John Herren</dc:creator>
				<category><![CDATA[meh-ta]]></category>

		<guid isPermaLink="false">http://jhherren.wordpress.com/?p=118</guid>
		<description><![CDATA[Here&#8217;s a Valentine&#8217;s Day card I shooped up for Liz back in 2006. Thought I&#8217;d share it with the world this year.

       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=118&subd=jhherren&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here&#8217;s a Valentine&#8217;s Day card I shooped up for Liz back in 2006. Thought I&#8217;d share it with the world this year.</p>
<p style="text-align:center;"><a href="http://www.flickr.com/photos/jhherren/3277350566/"><img class="aligncenter" title="Be My Valentizzle" src="http://farm4.static.flickr.com/3495/3277350566_b8d3fcc8d1.jpg?v=0" alt="" width="500" height="333" /></a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jhherren.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jhherren.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jhherren.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jhherren.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jhherren.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jhherren.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jhherren.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jhherren.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jhherren.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jhherren.wordpress.com/118/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=118&subd=jhherren&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jhherren.wordpress.com/2009/02/13/happy-valentizzle-bitch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/46640cd4061d603e78c1a989d6c30d75?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jhherren</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3495/3277350566_b8d3fcc8d1.jpg?v=0" medium="image">
			<media:title type="html">Be My Valentizzle</media:title>
		</media:content>
	</item>
		<item>
		<title>Mashing up the New York Times Best Sellers: ReadingRadar.com</title>
		<link>http://jhherren.wordpress.com/2009/02/03/mashing-up-the-new-york-times-best-sellers-readingradarcom/</link>
		<comments>http://jhherren.wordpress.com/2009/02/03/mashing-up-the-new-york-times-best-sellers-readingradarcom/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 07:00:04 +0000</pubDate>
		<dc:creator>John Herren</dc:creator>
				<category><![CDATA[mashups]]></category>

		<guid isPermaLink="false">http://jhherren.wordpress.com/?p=113</guid>
		<description><![CDATA[I&#8217;m a fan of APIs, Web Services, and Mashups, and it&#8217;s no secret. One of my New Year&#8217;s resolutions is to create and publish more mashups, instead of simply lengthening my ever-growing ideas.txt file. A couple of weeks ago I relaunched, with little fanfare, DRM News, a domain I&#8217;ve owned for several years now. It&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=113&subd=jhherren&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://readingradar.com"><img class="size-medium wp-image-115 alignleft" title="readingradar" src="http://jhherren.files.wordpress.com/2009/02/readingradar.png?w=300&#038;h=235" alt="readingradar" width="300" height="235" /></a>I&#8217;m a fan of APIs, Web Services, and Mashups, and it&#8217;s no secret. One of my New Year&#8217;s resolutions is to create and publish more mashups, instead of simply lengthening my ever-growing ideas.txt file. A couple of weeks ago I relaunched, <a href="http://twitter.com/johnherren/status/1150317208">with little fanfare</a>, <a href="http://drmnews.com">DRM News</a>, a domain I&#8217;ve owned for several years now. It&#8217;s simply an RSS aggregator from several sources revolving around digital rights management. It was trivial to slap together, to the point where I&#8217;d hardly consider it programming. But hey, at least I deployed something.</p>
<p>When I saw the Reddit post about the <a href="http://developer.nytimes.com/docs/best_sellers_api">New York Times Best Seller API</a>, I thought it would be a good opportunity to do a mashup for popular books. My hope was to create a site that could be on &#8220;auto-pilot&#8221; and maybe even send me a Amazon Associate check every now and then. I designed the site to use extensive caching of the NYT and Amazon APIs to minimize remote calls, but update the data often enough so that the information would be fresh. A few nights of hacking later and we have:</p>
<p><a href="http://readingradar.com">Reading Radar &#8211; From the New York Times Bestseller Lists</a></p>
<p>The NYT API was simple enough to use. The REST API offers three response formats, XML, JSON, or serialized PHP. I did <a href="http://developer.nytimes.com/forum/read/37425">find a bug in the API</a>, and was very pleased how reactive the NYT API team was to resolve the problem. Kudos!</p>
<p>The guts of the mashup are simple. I&#8217;m using <a href="http://developer.yahoo.com/yui/">YUI</a> for the layout and initial CSS, and JQuery for some visual effects on the list pages. On the server side, I&#8217;m using my current favorite thing ever, the <a href="http://framework.maintainable.com/">Maintainable Framework</a>. I was made aware of the framework by Mike Naberezny, one of the two main authors. Mike and I are ex-Zenders, and Mike was responsible for much of the code early on with the Zend Framework. The Maintainable Framework is very Rails-like, and because I&#8217;m familiar with some of the conventions in Rails, getting going with Maintainable was a cinch. Mike&#8217;s documentation is well-done, and I&#8217;m looking forward to using this framework for all things PHP for the foreseeable future, and hope to help out with bugs and maybe even some code.</p>
<p><a href="http://readingradar.com">Reading Radar</a> is simple enough that I decided to forgo a database and just use a file based cache, powered by the Zend_Cache component of the Zend Framework. I&#8217;m using two caches, one that does not expire, and one that expired every several hours so that my data is fresh. I&#8217;m caching just a few API calls: the list of lists from the NYT API, which powers the left navigation; the actual lists themselves, which also provide book data; and the individual book histories. The NYT API offers a few other bits of information I&#8217;m not using, such as links to the first chapters and editorial reviews. The reason I don&#8217;t is because when I spot-checked several books, most of them did not have these links. My hope is that as the API matures, more of the data will find its way in.</p>
<p>To pull the Amazon information, I turn to the easy to use Zend_Service_Amazon component from Zend Framework. It provides me the ratings data, reviews, related products, images, number of pages, and so forth. So using the ISBN numbers from the NYT API, I&#8217;m able to query for the Amazon products, and spew those gratuitous affiliate links everywhere using the Amazon ASIN IDs.</p>
<p>So the end result, ideally, is that I have an automatically up-to-date site that I&#8217;ll never have to touch, is relevant to the search engines,  and will generate passive income. Realistically, it was a fun way to spend a few evenings doing what I love: making mashups. The site is far from perfect, and I&#8217;m sure there will be bugs to squash.</p>
<p>I&#8217;m love to hear opinions and ways to make this little site better. I know my designer buddies could offer suggestions, and I&#8217;d be interested to hear from the affiliate marketing gurus about better ways to integrate the Amazon links better than I have.  My real question is, how would you drive traffic to something like this, and would it even be worthwhile?</p>
<p>Jimmy Palmer and I have been thinking of some interesting ideas to extend sites like Reading Radar.. more on that as it develops.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jhherren.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jhherren.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jhherren.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jhherren.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jhherren.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jhherren.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jhherren.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jhherren.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jhherren.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jhherren.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=113&subd=jhherren&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jhherren.wordpress.com/2009/02/03/mashing-up-the-new-york-times-best-sellers-readingradarcom/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/46640cd4061d603e78c1a989d6c30d75?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jhherren</media:title>
		</media:content>

		<media:content url="http://jhherren.files.wordpress.com/2009/02/readingradar.png?w=300" medium="image">
			<media:title type="html">readingradar</media:title>
		</media:content>
	</item>
		<item>
		<title>Liz at the Inauguration</title>
		<link>http://jhherren.wordpress.com/2009/01/21/liz-at-the-inauguration/</link>
		<comments>http://jhherren.wordpress.com/2009/01/21/liz-at-the-inauguration/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 04:59:47 +0000</pubDate>
		<dc:creator>John Herren</dc:creator>
				<category><![CDATA[politik]]></category>

		<guid isPermaLink="false">http://jhherren.wordpress.com/?p=106</guid>
		<description><![CDATA[Liz and her mom Audrey made the long haul to D.C. for the swearing in, leaving me at home for a week of bachelorhood/debauchery/lonelyness.
They decided to go for the cheap seats and watch from the Lincoln Memorial, and grabbed a nice spot on the steps. When we spoke yesterday through the saturated cellphone tubes, she [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=106&subd=jhherren&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Liz and her mom Audrey made the long haul to D.C. for the swearing in, leaving me at home for a week of bachelorhood/debauchery/lonelyness.</p>
<p>They decided to go for the cheap seats and watch from the Lincoln Memorial, and grabbed a nice spot on the steps. When we spoke yesterday through the saturated cellphone tubes, she told me she had done an interview with the Washington Post. While her interview was not published (that we know of), she and Audrey, and Audrey&#8217;s friend Dixie can be spotted in the background. Liz is the upper left in the blue coat, <a href="http://twitter.com/lizney78/status/1133580856">sending a Twitter message</a> from her pink-clad iPhone.</p>
<p><a href="http://jhherren.files.wordpress.com/2009/01/lizatinauguration.jpg"><img class="alignnone size-medium wp-image-107" title="LizAtInauguration" src="http://jhherren.files.wordpress.com/2009/01/lizatinauguration.jpg?w=300&#038;h=167" alt="LizAtInauguration" width="300" height="167" /></a></p>
<p>(click for fullsize)</p>
<p>The screencap is from 2:11 in the video, which is the one titled <a href="http://www.washingtonpost.com/wp-srv/metro/interactives/inauguration09/video/index.html">&#8220;The Swearing In&#8221;</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jhherren.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jhherren.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jhherren.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jhherren.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jhherren.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jhherren.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jhherren.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jhherren.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jhherren.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jhherren.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=106&subd=jhherren&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jhherren.wordpress.com/2009/01/21/liz-at-the-inauguration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/46640cd4061d603e78c1a989d6c30d75?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jhherren</media:title>
		</media:content>

		<media:content url="http://jhherren.files.wordpress.com/2009/01/lizatinauguration.jpg?w=300" medium="image">
			<media:title type="html">LizAtInauguration</media:title>
		</media:content>
	</item>
		<item>
		<title>Mashup Sighting</title>
		<link>http://jhherren.wordpress.com/2008/11/10/mashup-sighting/</link>
		<comments>http://jhherren.wordpress.com/2008/11/10/mashup-sighting/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 00:01:37 +0000</pubDate>
		<dc:creator>John Herren</dc:creator>
				<category><![CDATA[mashups]]></category>

		<guid isPermaLink="false">http://jhherren.wordpress.com/?p=104</guid>
		<description><![CDATA[Via the Hype Machine blog, I just found one of my mashups, Gblinker, mentioned in a textbook called Business Driven Technology. Chapter 14 has a section on mashups, and here&#8217;s a photo of the page. Judging by the other entries on the page, it looks like this section was lifted from the speek geeking page [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=104&subd=jhherren&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Via the <a href="http://blog.hypem.com/2008/05/were-in-a-text-book/">Hype Machine</a> blog, I just found one of my mashups, Gblinker, mentioned in a textbook called <a href="http://www.amazon.com/Business-Driven-Technology-Stephen-Haag/dp/0072983019">Business Driven Technology</a>. Chapter 14 has a section on mashups, and here&#8217;s a <a href="http://www.flickr.com/photos/juirama/2476316604/in/set-72157604951548455/">photo of the page</a>. Judging by the other entries on the page, it looks like this section was lifted from the speek geeking page from the Mashup Camp III in Boston.</p>
<p><a href="http://www.flickr.com/photos/bidochko/365411407/"><img class="alignnone" title="Gblinker diagram" src="http://farm1.static.flickr.com/172/365411407_02320b29ed.jpg" alt="" width="500" height="375" /></a></p>
<p>The idea for Gblinker was simple. At some of the conferences I attended, Google handed out some fun blinky LED pins as swag. I thought it would be a cool idea to rig one up to a computer and have it blink whenever I received a Gmail message. So to be lazy I decided to reuse what I could find instead of writing a program from scratch. I knew there was a Gmail widget for the Yahoo widget engine (formerly Konfabulator), so I started there. In the documentation, I discoveded that Yahoo widgets could make COM calls&#8211;what luck! So I wrote a simple dll in C# to flip on and off the serial port&#8217;s RTS bit, and modified the Gmail widget to call the dll. That&#8217;s all there was to it. The fun hack ended up winning 5th or 6th place at Mashup Camp in Boston, and as far as I know, was the first hardware mashup from any of the camps. The prize: a copy of Visual Studio <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>It&#8217;s always fun to see things you&#8217;ve done pop up out of nowhere, especially in dead-tree version. My favorite surprise was when my TagCloud prototype ended up in the book Yahoo Hacks. Coincidentally, <a href="http://oreilly.com/catalog/yahoohks/chapter/hack88.pdf">the free sample chapter (PDF link)</a> just happens to be the one on TagCloud.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jhherren.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jhherren.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jhherren.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jhherren.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jhherren.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jhherren.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jhherren.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jhherren.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jhherren.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jhherren.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=104&subd=jhherren&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jhherren.wordpress.com/2008/11/10/mashup-sighting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/46640cd4061d603e78c1a989d6c30d75?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jhherren</media:title>
		</media:content>

		<media:content url="http://farm1.static.flickr.com/172/365411407_02320b29ed.jpg" medium="image">
			<media:title type="html">Gblinker diagram</media:title>
		</media:content>
	</item>
		<item>
		<title>Laura Ann&#8217;s Music Debut</title>
		<link>http://jhherren.wordpress.com/2008/10/23/93/</link>
		<comments>http://jhherren.wordpress.com/2008/10/23/93/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 17:18:03 +0000</pubDate>
		<dc:creator>John Herren</dc:creator>
				<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://jhherren.wordpress.com/2008/10/23/93/</guid>
		<description><![CDATA[My niece, Laura Ann, spent some time with us over the weekend. Since I was recovering from the flu, we decided to have some relaxed playtime&#8211;a nice departure from the normal high-energy entertainment.
Laura Ann, 7, LOVES to play with PhotoBooth on the Mac, but finally grew tired of it after a while, so I though [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=93&subd=jhherren&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://www.flickr.com/photos/lizney78/2941351962/in/set-72157608020765331/"><img class="alignleft" style="margin:10px;" title="Laura Ann" src="http://farm4.static.flickr.com/3223/2941351962_6d9c204bcf_m.jpg" alt="" width="160" height="240" /></a>My niece, Laura Ann, spent some time with us over the weekend. Since I was recovering from the flu, we decided to have some relaxed playtime&#8211;a nice departure from the normal high-energy entertainment.</p>
<p>Laura Ann, 7, LOVES to play with PhotoBooth on the Mac, but finally grew tired of it after a while, so I though we would give Garage Band a try.  And boy, fun was had! Coming from the days of early PC based multitracking (ah, Cool Edit Pro, how I loved thee), I was quite impressed with the ease of Garage Band as well as the internal mic on the macbook. Here&#8217;s the result of some of the songs she recorded. She picked out the instrument arrangements from the included song catalog all by herself, and improvised all the lyrics in a bunch of one-takes. There&#8217;s no punch-in&#8217;s; all I did was bump her vocal track a tad and added some cheezy Garage Band effects. I absolutely loved the results and I&#8217;m sure we&#8217;ll be doing this some more in the future. </p>
<p>The first song is one she&#8217;s doing with her school for Halloween. I&#8217;d heard her singing it randomly&#8211;she sings all the time&#8211;so i figured we might as well lay it down. Here&#8217;s &#8220;Five Little Pumpkins&#8221;</p>
<p><span style='text-align:left;display:block;'><p><object type='application/x-shockwave-flash' data='http://jhherren.wordpress.com/wp-content/plugins/audio-player/player.swf' width='290' height='24' id='audioplayer1'><param name='movie' value='http://jhherren.wordpress.com/wp-content/plugins/audio-player/player.swf' /><param name='FlashVars' value='&amp;bg=0xf8f8f8&amp;leftbg=0xeeeeee&amp;lefticon=0x666666&amp;rightbg=0xcccccc&amp;rightbghover=0x999999&amp;righticon=0x666666&amp;righticonhover=0xffffff&amp;text=0x666666&amp;slider=0x666666&amp;track=0xFFFFFF&amp;border=0x666666&amp;loader=0x9FFFB8&amp;soundFile=http%3A%2F%2F82.165.181.172%2Flah%2F5%20little%20pumpkins.mp3' /><param name='quality' value='high' /><param name='menu' value='false' /><param name='bgcolor' value='#FFFFFF' /></object></p></span></p>
<p>The next one is my favorite, &#8220;Funky Baby&#8221;. I had her list some funky stuff to be the lyrics and she came up with &#8220;Funky Baby, Turnip Greens, Funky Monkey, Cole Slaw, Cereal Box&#8221;. </p>
<p><span style='text-align:left;display:block;'><p><object type='application/x-shockwave-flash' data='http://jhherren.wordpress.com/wp-content/plugins/audio-player/player.swf' width='290' height='24' id='audioplayer1'><param name='movie' value='http://jhherren.wordpress.com/wp-content/plugins/audio-player/player.swf' /><param name='FlashVars' value='&amp;bg=0xf8f8f8&amp;leftbg=0xeeeeee&amp;lefticon=0x666666&amp;rightbg=0xcccccc&amp;rightbghover=0x999999&amp;righticon=0x666666&amp;righticonhover=0xffffff&amp;text=0x666666&amp;slider=0x666666&amp;track=0xFFFFFF&amp;border=0x666666&amp;loader=0x9FFFB8&amp;soundFile=http%3A%2F%2F82.165.181.172%2Flah%2Ffunky%20baby.mp3' /><param name='quality' value='high' /><param name='menu' value='false' /><param name='bgcolor' value='#FFFFFF' /></object></p></span></p>
<p>Next up is the roots ballad &#8220;I Love&#8221; which is destined to be a classic. She just sang about stuff she loves. No doubt the zoo tops that list, but I&#8217;m glad to be on it eventually. I especially like her lyric &#8220;I want to see what&#8217;s up there, in the serious beyond. I don&#8217;t know what to see with my eyes, it&#8217;s so special&#8221; And more howling.. she&#8217;s into wolves right now.</p>
<p><span style='text-align:left;display:block;'><p><object type='application/x-shockwave-flash' data='http://jhherren.wordpress.com/wp-content/plugins/audio-player/player.swf' width='290' height='24' id='audioplayer1'><param name='movie' value='http://jhherren.wordpress.com/wp-content/plugins/audio-player/player.swf' /><param name='FlashVars' value='&amp;bg=0xf8f8f8&amp;leftbg=0xeeeeee&amp;lefticon=0x666666&amp;rightbg=0xcccccc&amp;rightbghover=0x999999&amp;righticon=0x666666&amp;righticonhover=0xffffff&amp;text=0x666666&amp;slider=0x666666&amp;track=0xFFFFFF&amp;border=0x666666&amp;loader=0x9FFFB8&amp;soundFile=http%3A%2F%2F82.165.181.172%2Flah%2FI%20love.mp3' /><param name='quality' value='high' /><param name='menu' value='false' /><param name='bgcolor' value='#FFFFFF' /></object></p></span></p>
<p><a href="http://www.flickr.com/photos/lizney78/2299223393/"><img class="alignnone" title="Laura Ann Herren" src="http://farm3.static.flickr.com/2363/2299223393_3e6c86393c_m.jpg" alt="" width="240" height="160" /></a><a href="http://www.flickr.com/photos/lizney78/2299223319/in/photostream/"><img class="alignnone" title="Laura Ann Herren" src="http://farm4.static.flickr.com/3122/2299223319_cb6ee55893_m.jpg" alt="" width="240" height="160" /></a></p>
<p><a href="http://www.flickr.com/photos/lizney78/2299223839/in/photostream/"><img class="alignnone" title="Laura Ann Herren" src="http://farm3.static.flickr.com/2376/2299223839_f54ee19e81_m.jpg" alt="" width="240" height="160" /></a><a href="http://www.flickr.com/photos/lizney78/2300020160/in/photostream/"><img class=" alignnone" title="Laura Ann Herren" src="http://farm4.static.flickr.com/3236/2300020160_07c138918e_m.jpg" alt="Laura Ann Herren" width="240" height="160" /><br />
</a></p>
<p>Finally is the way-over-the-top &#8220;I Have the Blues&#8221;. Pretty much speaks for itself.</p>
<p><span style='text-align:left;display:block;'><p><object type='application/x-shockwave-flash' data='http://jhherren.wordpress.com/wp-content/plugins/audio-player/player.swf' width='290' height='24' id='audioplayer1'><param name='movie' value='http://jhherren.wordpress.com/wp-content/plugins/audio-player/player.swf' /><param name='FlashVars' value='&amp;bg=0xf8f8f8&amp;leftbg=0xeeeeee&amp;lefticon=0x666666&amp;rightbg=0xcccccc&amp;rightbghover=0x999999&amp;righticon=0x666666&amp;righticonhover=0xffffff&amp;text=0x666666&amp;slider=0x666666&amp;track=0xFFFFFF&amp;border=0x666666&amp;loader=0x9FFFB8&amp;soundFile=http%3A%2F%2F82.165.181.172%2Flah%2FI%20have%20the%20blues.mp3' /><param name='quality' value='high' /><param name='menu' value='false' /><param name='bgcolor' value='#FFFFFF' /></object></p></span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jhherren.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jhherren.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jhherren.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jhherren.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jhherren.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jhherren.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jhherren.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jhherren.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jhherren.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jhherren.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=93&subd=jhherren&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jhherren.wordpress.com/2008/10/23/93/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/46640cd4061d603e78c1a989d6c30d75?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jhherren</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3223/2941351962_6d9c204bcf_m.jpg" medium="image">
			<media:title type="html">Laura Ann</media:title>
		</media:content>

		<media:content url="http://farm3.static.flickr.com/2363/2299223393_3e6c86393c_m.jpg" medium="image">
			<media:title type="html">Laura Ann Herren</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3122/2299223319_cb6ee55893_m.jpg" medium="image">
			<media:title type="html">Laura Ann Herren</media:title>
		</media:content>

		<media:content url="http://farm3.static.flickr.com/2376/2299223839_f54ee19e81_m.jpg" medium="image">
			<media:title type="html">Laura Ann Herren</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3236/2300020160_07c138918e_m.jpg" medium="image">
			<media:title type="html">Laura Ann Herren</media:title>
		</media:content>

		<media:content url="http://82.165.181.172/lah/5 little pumpkins.mp3" medium="audio">
			<media:player url="http://jhherren.wordpress.com/wp-content/plugins/audio-player/player.swf?soundFile=http://82.165.181.172/lah/5 little pumpkins.mp3" />
		</media:content>

		<media:content url="http://82.165.181.172/lah/funky baby.mp3" medium="audio">
			<media:player url="http://jhherren.wordpress.com/wp-content/plugins/audio-player/player.swf?soundFile=http://82.165.181.172/lah/funky baby.mp3" />
		</media:content>

		<media:content url="http://82.165.181.172/lah/I love.mp3" medium="audio">
			<media:player url="http://jhherren.wordpress.com/wp-content/plugins/audio-player/player.swf?soundFile=http://82.165.181.172/lah/I love.mp3" />
		</media:content>

		<media:content url="http://82.165.181.172/lah/I have the blues.mp3" medium="audio">
			<media:player url="http://jhherren.wordpress.com/wp-content/plugins/audio-player/player.swf?soundFile=http://82.165.181.172/lah/I have the blues.mp3" />
		</media:content>
	</item>
		<item>
		<title>Google Adsense for Feeds</title>
		<link>http://jhherren.wordpress.com/2008/08/19/google-adsense-for-feeds/</link>
		<comments>http://jhherren.wordpress.com/2008/08/19/google-adsense-for-feeds/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 12:26:58 +0000</pubDate>
		<dc:creator>John Herren</dc:creator>
				<category><![CDATA[Geeking Out]]></category>

		<guid isPermaLink="false">http://jhherren.wordpress.com/?p=91</guid>
		<description><![CDATA[Looks like Google is now supporting Adsense ads for RSS feeds.
I remember the good ol&#8217; days of Adsense. Now it&#8217;s about as ubiquitous as hit counters were in the 90&#8217;s. Still, I sure don&#8217;t mind seeing those Google checks in the mail, although they are fewer and further between these days.
The lack of Adsense support [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=91&subd=jhherren&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Looks like Google is now supporting Adsense ads for RSS feeds.</p>
<p>I remember the good ol&#8217; days of Adsense. Now it&#8217;s about as ubiquitous as hit counters were in the 90&#8217;s. Still, I sure don&#8217;t mind seeing those Google checks in the mail, although they are fewer and further between these days.</p>
<p>The lack of Adsense support for feeds has been a pain point for bloggers and sploggers alike. Several startups exist solely to plug that hole. I guess we should get ready to start seeing ads in our feeds as often they appear on sites.</p>
<p>One more reason to love the <a href="http://www.google.com/help/reader/faq.html#shortcuts">keyboard shortcuts in Google Reader</a>.</p>
<p>The announcement (if you must):</p>
<p><a href="http://adsense.blogspot.com/2008/08/i-feel-need-need-for-feeds.html">Inside AdSense: I feel the need&#8230; the need for feeds</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jhherren.wordpress.com/91/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jhherren.wordpress.com/91/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jhherren.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jhherren.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jhherren.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jhherren.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jhherren.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jhherren.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jhherren.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jhherren.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jhherren.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jhherren.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=91&subd=jhherren&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jhherren.wordpress.com/2008/08/19/google-adsense-for-feeds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/46640cd4061d603e78c1a989d6c30d75?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jhherren</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting the number of posts per category in WordPress</title>
		<link>http://jhherren.wordpress.com/2008/08/13/getting-the-number-of-posts-per-category-in-wordpress/</link>
		<comments>http://jhherren.wordpress.com/2008/08/13/getting-the-number-of-posts-per-category-in-wordpress/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 18:32:40 +0000</pubDate>
		<dc:creator>John Herren</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jhherren.wordpress.com/?p=84</guid>
		<description><![CDATA[This morning JTk presented me a WordPress riddle:
What I would like to be able to do is ask the MySQL if a category has any posts in it or if it is empty.  So I can do one thing if there are posts there and another if that category is empty.  And try as I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=84&subd=jhherren&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This morning <a href="http://imjtk.com/">JTk</a> presented me a WordPress riddle:</p>
<blockquote><p>What I would like to be able to do is ask the MySQL if a category has any posts in it or if it is empty.  So I can do one thing if there are posts there and another if that category is empty.  And try as I might, no matter how hard I beat my head against it, all I get is a bruised head.  And, yes, I have to do this conditional because WP is flawed and will break if I try and do certain things with empty categories&#8230;..</p>
<p>Here is the schema ( maybe it helps )<br />
<a href="http://blog.kapish.co.in/wp-content/uploads/2008/01/wp_db.png" target="_blank">http://blog.kapish.co.in/wp-content/uploads/2008/01/wp_db.png</a></p>
<p>And the worst part of this, is &#8211; I know this is trivial so I hate to even ask, but I guess I don&#8217;t hate enough not to ask <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   I asked the &#8220;community&#8221; and got told that there is not a WP function for this ( um, yeah, thanks&#8230;. ) that I shouldn&#8217;t make straight db calls ( arrrggg ), and that there are plugins that accomplish similar things&#8230;.  But no real help, so I decided to ask a ninja&#8230;.</p></blockquote>
<p>So we want to get the number of posts per category. JTk, you&#8217;re in luck! A quick look at the schema (if that diagram is current) tells me we could query the wp_post2cat table and do a COUNT and a GROUP BY query on the category of interest. Even better, if wp_categories.category_count is what I think it is, that&#8217;s a simpler query. But let&#8217;s see what the code gives us already. In category.php, there are some tasty sounding functions like get_categories(), get_category(), get_category_by_path(), get_category_by_slug() and so on. I installed a clean version of WordPress, added some categories and assigned some fake posts to them. Then I tried some of these functions to see what&#8217;s up.</p>
<p>&lt;?php var_dump(get_categories()); ?&gt;</p>
<p>Output:</p>
<pre>array(3) {
  [1]=&gt;
  object(stdClass)#68 (15) {
    ["term_id"]=&gt;
    &amp;<span class="entity">string</span>(1) "3"
    ["name"]=&gt;
    &amp;<span class="entity">string</span>(14) "First Category"
    ["slug"]=&gt;
    &amp;<span class="entity">string</span>(14) "first-category"
    ["term_group"]=&gt;
    string(1) "0"
    ["term_taxonomy_id"]=&gt;
    string(1) "3"
    ["taxonomy"]=&gt;
    string(8) "category"
    ["description"]=&gt;
    &amp;<span class="entity">string</span>(0) ""
    ["parent"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
    ["count"]=&gt;
    &amp;<span class="entity">string</span>(1) "4"
    ["cat_ID"]=&gt;
    &amp;<span class="entity">string</span>(1) "3"
    ["category_count"]=&gt;
    &amp;<span class="entity">string</span>(1) "4"
    ["category_description"]=&gt;
    &amp;<span class="entity">string</span>(0) ""
    ["cat_name"]=&gt;
    &amp;<span class="entity">string</span>(14) "First Category"
    ["category_nicename"]=&gt;
    &amp;<span class="entity">string</span>(14) "first-category"
    ["category_parent"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
  }
  [2]=&gt;
  object(stdClass)#69 (15) {
    ["term_id"]=&gt;
    &amp;<span class="entity">string</span>(1) "4"
    ["name"]=&gt;
    &amp;<span class="entity">string</span>(15) "Second Category"
    ["slug"]=&gt;
    &amp;<span class="entity">string</span>(15) "second-category"
    ["term_group"]=&gt;
    string(1) "0"
    ["term_taxonomy_id"]=&gt;
    string(1) "4"
    ["taxonomy"]=&gt;
    string(8) "category"
    ["description"]=&gt;
    &amp;<span class="entity">string</span>(0) ""
    ["parent"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
    ["count"]=&gt;
    &amp;<span class="entity">string</span>(1) "2"
    ["cat_ID"]=&gt;
    &amp;<span class="entity">string</span>(1) "4"
    ["category_count"]=&gt;
    &amp;<span class="entity">string</span>(1) "2"
    ["category_description"]=&gt;
    &amp;<span class="entity">string</span>(0) ""
    ["cat_name"]=&gt;
    &amp;<span class="entity">string</span>(15) "Second Category"
    ["category_nicename"]=&gt;
    &amp;<span class="entity">string</span>(15) "second-category"
    ["category_parent"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
  }
  [3]=&gt;
  object(stdClass)#90 (15) {
    ["term_id"]=&gt;
    &amp;<span class="entity">string</span>(1) "1"
    ["name"]=&gt;
    &amp;<span class="entity">string</span>(13) "Uncategorized"
    ["slug"]=&gt;
    &amp;<span class="entity">string</span>(13) "uncategorized"
    ["term_group"]=&gt;
    string(1) "0"
    ["term_taxonomy_id"]=&gt;
    string(1) "1"
    ["taxonomy"]=&gt;
    string(8) "category"
    ["description"]=&gt;
    &amp;<span class="entity">string</span>(0) ""
    ["parent"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
    ["count"]=&gt;
    &amp;<span class="entity">string</span>(1) "1"
    ["cat_ID"]=&gt;
    &amp;<span class="entity">string</span>(1) "1"
    ["category_count"]=&gt;
    &amp;<span class="entity">string</span>(1) "1"
    ["category_description"]=&gt;
    &amp;<span class="entity">string</span>(0) ""
    ["cat_name"]=&gt;
    &amp;<span class="entity">string</span>(13) "Uncategorized"
    ["category_nicename"]=&gt;
    &amp;<span class="entity">string</span>(13) "uncategorized"
    ["category_parent"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
  }
}</pre>
<p>OK, so it sounds like the person who told JTk there were no built-in WordPress functions for this was lying <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   This function tells us exactly what we need. A couple of interesting observations, though. I had a category named &#8220;Empty Category&#8221; with no posts, which does not show up here. The <a href="http://codex.wordpress.org/Function_Reference/get_categories">documentation page </a>tells me that I can pass a parameter to include the empty ones easily enough:</p>
<p>&lt;?php var_dump(get_categories(array(&#8216;hide_empty&#8217;=&gt;false))); ?&gt;</p>
<pre>array(4) {
  [0]=&gt;
  object(stdClass)#67 (15) {
    ["term_id"]=&gt;
    &amp;<span class="entity">string</span>(1) "5"
    ["name"]=&gt;
    &amp;<span class="entity">string</span>(14) "Empty Category"
    ["slug"]=&gt;
    &amp;<span class="entity">string</span>(14) "empty-category"
    ["term_group"]=&gt;
    string(1) "0"
    ["term_taxonomy_id"]=&gt;
    string(1) "5"
    ["taxonomy"]=&gt;
    string(8) "category"
    ["description"]=&gt;
    &amp;<span class="entity">string</span>(0) ""
    ["parent"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
    ["count"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
    ["cat_ID"]=&gt;
    &amp;<span class="entity">string</span>(1) "5"
    ["category_count"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
    ["category_description"]=&gt;
    &amp;<span class="entity">string</span>(0) ""
    ["cat_name"]=&gt;
    &amp;<span class="entity">string</span>(14) "Empty Category"
    ["category_nicename"]=&gt;
    &amp;<span class="entity">string</span>(14) "empty-category"
    ["category_parent"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
  }
  [1]=&gt;
  object(stdClass)#68 (15) {
    ["term_id"]=&gt;
    &amp;<span class="entity">string</span>(1) "3"
    ["name"]=&gt;
    &amp;<span class="entity">string</span>(14) "First Category"
    ["slug"]=&gt;
    &amp;<span class="entity">string</span>(14) "first-category"
    ["term_group"]=&gt;
    string(1) "0"
    ["term_taxonomy_id"]=&gt;
    string(1) "3"
    ["taxonomy"]=&gt;
    string(8) "category"
    ["description"]=&gt;
    &amp;<span class="entity">string</span>(0) ""
    ["parent"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
    ["count"]=&gt;
    &amp;<span class="entity">string</span>(1) "4"
    ["cat_ID"]=&gt;
    &amp;<span class="entity">string</span>(1) "3"
    ["category_count"]=&gt;
    &amp;<span class="entity">string</span>(1) "4"
    ["category_description"]=&gt;
    &amp;<span class="entity">string</span>(0) ""
    ["cat_name"]=&gt;
    &amp;<span class="entity">string</span>(14) "First Category"
    ["category_nicename"]=&gt;
    &amp;<span class="entity">string</span>(14) "first-category"
    ["category_parent"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
  }
  [2]=&gt;
  object(stdClass)#69 (15) {
    ["term_id"]=&gt;
    &amp;<span class="entity">string</span>(1) "4"
    ["name"]=&gt;
    &amp;<span class="entity">string</span>(15) "Second Category"
    ["slug"]=&gt;
    &amp;<span class="entity">string</span>(15) "second-category"
    ["term_group"]=&gt;
    string(1) "0"
    ["term_taxonomy_id"]=&gt;
    string(1) "4"
    ["taxonomy"]=&gt;
    string(8) "category"
    ["description"]=&gt;
    &amp;<span class="entity">string</span>(0) ""
    ["parent"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
    ["count"]=&gt;
    &amp;<span class="entity">string</span>(1) "2"
    ["cat_ID"]=&gt;
    &amp;<span class="entity">string</span>(1) "4"
    ["category_count"]=&gt;
    &amp;<span class="entity">string</span>(1) "2"
    ["category_description"]=&gt;
    &amp;<span class="entity">string</span>(0) ""
    ["cat_name"]=&gt;
    &amp;<span class="entity">string</span>(15) "Second Category"
    ["category_nicename"]=&gt;
    &amp;<span class="entity">string</span>(15) "second-category"
    ["category_parent"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
  }
  [3]=&gt;
  object(stdClass)#90 (15) {
    ["term_id"]=&gt;
    &amp;<span class="entity">string</span>(1) "1"
    ["name"]=&gt;
    &amp;<span class="entity">string</span>(13) "Uncategorized"
    ["slug"]=&gt;
    &amp;<span class="entity">string</span>(13) "uncategorized"
    ["term_group"]=&gt;
    string(1) "0"
    ["term_taxonomy_id"]=&gt;
    string(1) "1"
    ["taxonomy"]=&gt;
    string(8) "category"
    ["description"]=&gt;
    &amp;<span class="entity">string</span>(0) ""
    ["parent"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
    ["count"]=&gt;
    &amp;<span class="entity">string</span>(1) "1"
    ["cat_ID"]=&gt;
    &amp;<span class="entity">string</span>(1) "1"
    ["category_count"]=&gt;
    &amp;<span class="entity">string</span>(1) "1"
    ["category_description"]=&gt;
    &amp;<span class="entity">string</span>(0) ""
    ["cat_name"]=&gt;
    &amp;<span class="entity">string</span>(13) "Uncategorized"
    ["category_nicename"]=&gt;
    &amp;<span class="entity">string</span>(13) "uncategorized"
    ["category_parent"]=&gt;
    &amp;<span class="entity">string</span>(1) "0"
  }
}</pre>
<p>Sure enough,there is the empty category. I also noticed that the article count appears in both -&gt;count and -&gt;category_count. I&#8217;ll just assume the cached version, -&gt;category_count, will remain correct through the code, but I&#8217;m just guessing it doesn&#8217;t matter which member we use.</p>
<p>So, that&#8217;s fine if we want the whole collection, but what about individual categories? Fortunately, we can extract this same data for both the category ID as well as the name of the category. Here&#8217;s an example of each, querying my &#8220;First Category&#8221; category:</p>
<p>Using -&gt;category_count</p>
<p>&lt;?php var_dump( (int) get_category(&#8216;3&#8242;)-&gt;category_count); ?&gt;</p>
<p>&lt;?php var_dump( (int) get_category_by_slug(&#8216;First Category&#8217;)-&gt;category_count; ?&gt;</p>
<p>&lt;?php var_dump( (int) get_category_by_slug(&#8216;first-category&#8217;)-&gt;category_count); ?&gt;</p>
<p>Using -&gt;count</p>
<p>&lt;?php var_dump( (int) get_category(&#8216;3&#8242;)-&gt;count); ?&gt;</p>
<p>&lt;?php var_dump( (int) get_category_by_slug(&#8216;First Category&#8217;)-&gt;count; ?&gt;</p>
<p>&lt;?php var_dump( (int) get_category_by_slug(&#8216;first-category&#8217;)-&gt;count); ?&gt;</p>
<p>All of these return the correct result, int(4). Good on ya, WordPress.</p>
<p>Now let&#8217;s see how robust the function is. Will it choke on a non-existent category, or return a zero like it should?</p>
<p>&lt;?php var_dump( (int) get_category(&#8216;6969&#8242;)-&gt;category_count); ?&gt;</p>
<p>&lt;?php var_dump( (int) get_category_by_slug(&#8216;This Damn Category&#8217;)-&gt;category_count); ?&gt;</p>
<p>Both of these do indeed return zero, which is nice and correct.</p>
<p>In practical terms, you can use this code stub to do something will all categories depending on whether or not there are posts:</p>
<pre>foreach (get_categories(array('hide_empty'=&gt;false)) as $category){
	if ($category-&gt;count &gt; 0){
		//has posts, do something
	}else{
		//no posts, do something else
	}
}</pre>
<p>That&#8217;s all there is to it!  There&#8217;s definitely a built in function to inspect categories, and even some nice <a href="http://codex.wordpress.org/Function_Reference/get_categories">examples</a> to go with. Happy WordPress hacking, and don&#8217;t forget that now&#8217;s the time to <a href="http://jhherren.wordpress.com/2008/08/07/the-beginning-of-the-end-of-phps-popularity/">upgrade to PHP 5</a> if you haven&#8217;t already <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jhherren.wordpress.com/84/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jhherren.wordpress.com/84/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jhherren.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jhherren.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jhherren.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jhherren.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jhherren.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jhherren.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jhherren.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jhherren.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jhherren.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jhherren.wordpress.com/84/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jhherren.wordpress.com&blog=985554&post=84&subd=jhherren&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jhherren.wordpress.com/2008/08/13/getting-the-number-of-posts-per-category-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/46640cd4061d603e78c1a989d6c30d75?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jhherren</media:title>
		</media:content>
	</item>
	</channel>
</rss>