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

<channel>
	<title>Jon Gales</title>
	<atom:link href="http://www.jongales.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jongales.com/blog</link>
	<description>Personal weblog of Jon Gales</description>
	<lastBuildDate>Tue, 10 Aug 2010 00:17:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PostgreSQL automated daily backups</title>
		<link>http://www.jongales.com/blog/2010/08/09/postgresql-automated-daily-backups/</link>
		<comments>http://www.jongales.com/blog/2010/08/09/postgresql-automated-daily-backups/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 00:16:25 +0000</pubDate>
		<dc:creator>JG</dc:creator>
				<category><![CDATA[Web/Tech]]></category>

		<guid isPermaLink="false">http://www.jongales.com/blog/?p=1151</guid>
		<description><![CDATA[I needed to set up an automated backup of a Postgresql database on an Ubuntu Server 10.04 box and it took more Googling than should be necessary. I wanted to keep nightly snapshots for the past week which makes it a tiny bit more difficult than simply running pg_dump from a crontab. Here&#8217;s the one [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to set up an automated backup of a Postgresql database on an Ubuntu Server 10.04 box and it took more Googling than should be necessary. I wanted to keep nightly snapshots for the past week which makes it a tiny bit more difficult than simply running pg_dump from a crontab. Here&#8217;s the one liner shell script I ended up with:<br />
<code><br />
#!/bin/bash<br />
pg_dump -U DBUSERNAME -b -F c -f "/path/to/backups/postgresql/`date +%w`.backup" MYDBNAME<br />
</code><br />
Make sure to setup your <a href="http://www.postgresql.org/docs/8.1/interactive/libpq-pgpass.html">.pgpass file</a> if you haven&#8217;t already. Test it on the command line and if it&#8217;s all good just add it to your crontab file. I have mine running every morning at 2AM.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jongales.com/blog/2010/08/09/postgresql-automated-daily-backups/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>It&#8217;s a Big Ocean</title>
		<link>http://www.jongales.com/blog/2010/07/01/its-a-big-ocean/</link>
		<comments>http://www.jongales.com/blog/2010/07/01/its-a-big-ocean/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 17:51:56 +0000</pubDate>
		<dc:creator>JG</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.jongales.com/blog/?p=1149</guid>
		<description><![CDATA[A project of mine that hits close to home has just just gone live. It&#8217;s a Big Ocean is documenting the human side of the 2010 BP Deepwater Horizon oil spill. We have interviews with fishermen, business owners, park rangers and more people directly affected by this disaster. Content will be posted as it becomes [...]]]></description>
			<content:encoded><![CDATA[<p>A project of mine that hits close to home has just just gone live. <a href="http://itsabigocean.com">It&#8217;s a Big Ocean</a> is documenting the human side of the 2010 BP Deepwater Horizon oil spill. We have interviews with fishermen, business owners, park rangers and more people directly affected by this disaster. Content will be posted as it becomes edited, but we have some teaser stuff up now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jongales.com/blog/2010/07/01/its-a-big-ocean/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What&#8217;s Twitterbot/0.1?</title>
		<link>http://www.jongales.com/blog/2010/04/14/whats-twitterbot0-1/</link>
		<comments>http://www.jongales.com/blog/2010/04/14/whats-twitterbot0-1/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 17:28:25 +0000</pubDate>
		<dc:creator>JG</dc:creator>
				<category><![CDATA[Web/Tech]]></category>

		<guid isPermaLink="false">http://www.jongales.com/blog/?p=1136</guid>
		<description><![CDATA[Some webmasters have seen HEAD requests with the User-Agent Twitterbot/0.1 hit their sites recently and as usual this causes a flurry of questions (I&#8217;ve never really cared too much about bots unless they hit hard, but some webmasters take it really seriously). I did some digging and the IP (128.242.241.134) that Twitterbot is using is [...]]]></description>
			<content:encoded><![CDATA[<p>Some webmasters have seen HEAD requests with the User-Agent <strong>Twitterbot/0.1</strong> hit their sites recently and as usual this causes a flurry of questions (I&#8217;ve never really cared too much about bots unless they hit hard, but some webmasters take it really seriously). I did some digging and the IP (128.242.241.134) that Twitterbot is using is from the same data center that Twitter is hosted. That&#8217;s unusual, most bots following URLs in Tweets come from Amazon EC2 or similar services. I did a little more digging and apparently links in DMs are also being followed which means <em>it must be an official Twitter run bot</em>. Now the question is what is Twitter doing with the data? Is it for analytics? Anti-spam?</p>
<p><strong>Update:</strong> Looks like it may be in <a href="http://techcrunch.com/2010/04/14/twitter-confirms-it-will-launch-its-own-link-shortener/">preparation</a> for launching a URL shortener. I wonder if they will play hardball and rewrite existing links to use their own shortener? That would help future proof tweets for things like the <a href="http://www.loc.gov/tweet/how-tweet-it-is.html">Library of Congress</a>, but would <a href="http://www.businessinsider.com/google-and-twitter-wanted-to-buy-but-bitly-is-waiting-for-a-big-f-ing-number-2010-4">instantly screw</a> Bit.ly and similar.</p>
<p><strong>Update 6/9/10:</strong> <a href="http://blog.twitter.com/2010/06/links-and-twitter-length-shouldnt.html">Bing!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jongales.com/blog/2010/04/14/whats-twitterbot0-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>On Google Webmaster Tools site performance tips</title>
		<link>http://www.jongales.com/blog/2010/02/06/google-webmaster-tools-site-performance-tips/</link>
		<comments>http://www.jongales.com/blog/2010/02/06/google-webmaster-tools-site-performance-tips/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 15:59:54 +0000</pubDate>
		<dc:creator>JG</dc:creator>
				<category><![CDATA[funny]]></category>

		<guid isPermaLink="false">http://www.jongales.com/blog/?p=1110</guid>
		<description><![CDATA[Google Webmaster Tools is a great resource, but the site performance feature makes me chuckle from time to time. I checked how Crossword Tracker was doing and while the site runs really quickly (faster than 88% of sites according to Google), they had two tips. Unfortunately both are impossible&#8230; 
It suggested that I serve Google [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.google.com/webmasters/">Google Webmaster Tools</a> is a great resource, but the site performance feature makes me chuckle from time to time. I checked how <a href="http://crosswordtracker.com">Crossword Tracker</a> was doing and while the site runs really quickly (faster than 88% of sites according to Google), they had two tips. Unfortunately both are impossible&#8230; </p>
<p>It suggested that I serve Google Analytics hosted Javascript with gzip compression and that I could cut down on the number of DNS requests by serving the same JS from my domain. Great ideas guys.</p>
<p><img src="http://www.jongales.com/blog/wp-content/uploads/2010/02/google-webmaster-impossible-tips.png" alt="Google Webmaster impossible performance tips" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jongales.com/blog/2010/02/06/google-webmaster-tools-site-performance-tips/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iPad claim chowder</title>
		<link>http://www.jongales.com/blog/2010/01/28/ipad-claim-chowder/</link>
		<comments>http://www.jongales.com/blog/2010/01/28/ipad-claim-chowder/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 05:42:25 +0000</pubDate>
		<dc:creator>JG</dc:creator>
				<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://www.jongales.com/blog/?p=1106</guid>
		<description><![CDATA[John Gruber in December on The Tablet:
One common prediction I disagree with is that The Tablet will simply be more or less an iPod Touch with a much bigger display. &#8230; If Apple’s starting with a hardware size where the iPhone OS can&#8217;t be used one-handed, then trust me, they’re designing a new interaction model.
Of [...]]]></description>
			<content:encoded><![CDATA[<p>John Gruber in December on <a href="http://daringfireball.net/2009/12/the_tablet">The Tablet</a>:</p>
<blockquote><p>One common prediction I disagree with is that The Tablet will simply be more or less an iPod Touch with a much bigger display. &#8230; If Apple’s starting with a hardware size where the iPhone OS can&#8217;t be used one-handed, then trust me, they’re designing a new interaction model.</p></blockquote>
<p>Of course, it&#8217;s easy to be a pundit after the news breaks. Color me surprised that this was an evolution, not a revolution.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jongales.com/blog/2010/01/28/ipad-claim-chowder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crossword puzzle database, search engine, etc</title>
		<link>http://www.jongales.com/blog/2010/01/11/crossword-puzzle-database-search-engine-etc/</link>
		<comments>http://www.jongales.com/blog/2010/01/11/crossword-puzzle-database-search-engine-etc/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 23:18:21 +0000</pubDate>
		<dc:creator>JG</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Web/Tech]]></category>

		<guid isPermaLink="false">http://www.jongales.com/blog/?p=1102</guid>
		<description><![CDATA[I&#8217;ve become a fan of crossword puzzles and recently started downloading a lot of them and processing them with Python. It was interesting itself (finding the most common answers and what not), but I decided to make a UI for it and create a site that lets you browse both crossword answers and clues, viewing [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve become a fan of crossword puzzles and recently started downloading a <em>lot</em> of them and processing them with Python. It was interesting itself (finding the most common answers and what not), but I decided to make a UI for it and create a site that lets you browse both crossword answers and clues, viewing what points to what and related data to both. You can search too, even if you don&#8217;t know all the letters. It&#8217;s pretty interesting and if you do crossword puzzles you should check out <strong><a href="http://crosswordtracker.com">Crossword Tracker</a></strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jongales.com/blog/2010/01/11/crossword-puzzle-database-search-engine-etc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Impossible job postings</title>
		<link>http://www.jongales.com/blog/2009/12/05/impossible-job-postings/</link>
		<comments>http://www.jongales.com/blog/2009/12/05/impossible-job-postings/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 22:23:39 +0000</pubDate>
		<dc:creator>JG</dc:creator>
				<category><![CDATA[Web/Tech]]></category>
		<category><![CDATA[funny]]></category>

		<guid isPermaLink="false">http://www.jongales.com/blog/?p=1094</guid>
		<description><![CDATA[A chuckle-worthy gig came up today on a Craigslist feed that I follow. Somehow I think working for this joker would be an excruciating experience (emphasis mine):
To apply, email your resume along with a link to your greatest Web Development project. Describe your responsibilities of that project and any additional information (looking for writing structure [...]]]></description>
			<content:encoded><![CDATA[<p>A chuckle-worthy gig came up today on a Craigslist feed that I follow. Somehow I think working for this joker would be an excruciating experience (emphasis mine):</p>
<blockquote><p>To apply, email your resume along with a link to your greatest Web Development project. Describe your responsibilities of that project and any additional information (<em>looking for writing structure and literacy here</em>). What makes you unique and different than other programmers and Web Developers? Your message will be deleted if this information is not contained in the body of the email. <em>Limit your message to 250 characters or less</em>. Thank you. </p></blockquote>
<p>They should just cut email out of the process and only accept applications through Twitter. Or in haiku. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jongales.com/blog/2009/12/05/impossible-job-postings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AT&amp;T Wireless reverse number lookup</title>
		<link>http://www.jongales.com/blog/2009/10/25/att-wireless-reverse-number-lookup/</link>
		<comments>http://www.jongales.com/blog/2009/10/25/att-wireless-reverse-number-lookup/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 00:24:22 +0000</pubDate>
		<dc:creator>JG</dc:creator>
				<category><![CDATA[Web/Tech]]></category>

		<guid isPermaLink="false">http://www.jongales.com/blog/?p=1088</guid>
		<description><![CDATA[Craigslist never fails to amuse. What a couple they must be.

]]></description>
			<content:encoded><![CDATA[<p>Craigslist never fails to amuse. What a couple they must be.</p>
<p><img src="http://www.jongales.com/blog/wp-content/uploads/2009/10/att-reverse-phone-number-lookup.png" alt="AT&#038;T reverse phone number lookup" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jongales.com/blog/2009/10/25/att-wireless-reverse-number-lookup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Percentage Django template tag</title>
		<link>http://www.jongales.com/blog/2009/10/19/percentage-django-template-tag/</link>
		<comments>http://www.jongales.com/blog/2009/10/19/percentage-django-template-tag/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 17:37:52 +0000</pubDate>
		<dc:creator>JG</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.jongales.com/blog/?p=1079</guid>
		<description><![CDATA[Here&#8217;s a handy template filter that calculates percentages inside Django templates.

@register.filter(name='percentage')
def percentage(fraction, population):
    try:
        return "%.2f%%" % ((float(fraction) / float(population)) * 100)
    except ValueError:
        return ''

Usage
There were {{ yes.count }} yes votes ({{ yes.count&#124;percentage:votes.count }}) [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a handy template filter that calculates percentages inside Django templates.</p>
<pre name="code" class="python">
@register.filter(name='percentage')
def percentage(fraction, population):
    try:
        return "%.2f%%" % ((float(fraction) / float(population)) * 100)
    except ValueError:
        return ''
</pre>
<h3>Usage</h3>
<p><code>There were {{ yes.count }} yes votes ({{ yes.count|percentage:votes.count }}) out of {{ votes.count }} responses.</code></p>
<h3>Result</h3>
<pre>There were 40 yes votes (40%) out of 100 responses.</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.jongales.com/blog/2009/10/19/percentage-django-template-tag/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Constant Contact&#8217;s insane API downtime practice</title>
		<link>http://www.jongales.com/blog/2009/10/17/constant-contacts-insane-api-downtime-practice/</link>
		<comments>http://www.jongales.com/blog/2009/10/17/constant-contacts-insane-api-downtime-practice/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 14:43:13 +0000</pubDate>
		<dc:creator>JG</dc:creator>
				<category><![CDATA[Rant]]></category>
		<category><![CDATA[Web/Tech]]></category>

		<guid isPermaLink="false">http://www.jongales.com/blog/?p=1070</guid>
		<description><![CDATA[Constant Contact is the leading email newsletter company and hundreds of thousands of businesses use their service to send marketing emails to customers. Constant Contact is a lot bigger than most people think, they are even a publicly traded company with a half billion dollar market cap. However, money can&#8217;t buy sanity.
Constant Contact is typically [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.constantcontact.com">Constant Contact</a> is the leading email newsletter company and hundreds of thousands of businesses use their service to send marketing emails to customers. Constant Contact is a lot bigger than most people think, they are even a <a href="http://www.google.com/finance?q=NASDAQ%3ACTCT">publicly traded</a> company with a half billion dollar market cap. However, money can&#8217;t buy sanity.</p>
<p>Constant Contact is typically used through a web interface, but they do provide an API to allow some basic functions to be handled remotely. It&#8217;s a pretty limited API (you can&#8217;t even send email through it!), but that&#8217;s a rant for another day. All I&#8217;m using it for is adding contacts and basic list management. Simple stuff.</p>
<p>I&#8217;ve had a lot of problems with reliability in the past, but last night takes the cake. Constant Contact had a scheduled downtime for the API that resulted in all requests returning a 200 OK HTTP status code and an HTML page explaining the issue. If you tried to search for a contact, you got the page. If you tried to add a contact you got the page. Etc. But the 200 OK status code makes it look like the request was processed correctly and this HTML was the response (which should be XML if everything did go as planned). They&#8217;re using a browser error screen for API responses&#8230; Insane.</p>
<p><span id="more-1070"></span></p>
<p><img src="http://www.jongales.com/blog/wp-content/uploads/2009/10/constant-contact-api-error.png" alt="Constant Contact API downtime error page" /></p>
<p>Why return an HTTP 200 OK status code when it&#8217;s most certainly not OK? <strong>How is my code supposed to know that when you say everything is OK and here&#8217;s our response that you really mean &#8220;our shit&#8217;s off, we&#8217;ll be back soon&#8221;?</strong> A 503 Service Unavailable seems much more logical, but there&#8217;s a <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">whole list</a> to choose from. Almost every one is better than 200.</p>
<p>My code can figure out it&#8217;s not the XML that should be returned by catching the exception from the XML processor, but it shouldn&#8217;t have to. Also, I still need to get alerted to when this is caught because what if next time it&#8217;s not that there is downtime but something else that would require a change on my end? There&#8217;s no way to tell since it&#8217;s an HTML page returned and not a simple error code or message.</p>
<p>Even better is the HTML error message (for a service never designed to be used by a device that reads HTML) has a nasty JavaScript error that loops and eventually crashes Safari. Woo! Is there any possible reason for having JavaScript on a page that should only be read by computers? I&#8217;ve gotten a lot of errors back from various APIs and this is the first time it has been a HTML/JS page. And even then it crashes the browser. Fail.</p>
<p><img src="http://www.jongales.com/blog/wp-content/uploads/2009/10/constant-contact-api-js-error.jpg" alt="Constant Contact API downtime JS error"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jongales.com/blog/2009/10/17/constant-contacts-insane-api-downtime-practice/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
