<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>John Watson</title>
	
	<link>http://watson-net.com/blog</link>
	<description />
	<lastBuildDate>Wed, 17 Feb 2010 19:04:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/johnw" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="johnw" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Wordpress + Ubuntu + Flash upload fixed</title>
		<link>http://watson-net.com/blog/wordpress-ubuntu-flash-upload-fixed/</link>
		<comments>http://watson-net.com/blog/wordpress-ubuntu-flash-upload-fixed/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 23:49:48 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://watson-net.com/blog/?p=295</guid>
		<description><![CDATA[Uploading media to WordPress using the built-in Flash uploader has been broken on Ubuntu for a long time (Karmic 9.10 + Flash 10.0 r42). The problem seems to be in Flash itself since I can upload fine to the same blog from a Windows machine. But I just installed the Flash Plugin 10.1 beta 2 and [...]]]></description>
			<content:encoded><![CDATA[<p>Uploading media to <a href="http://wordpress.org">WordPress</a> using the built-in Flash uploader has been broken on Ubuntu for a long time (Karmic 9.10 + Flash 10.0 r42). The problem seems to be in Flash itself since I can upload fine to the same blog from a Windows machine. But I just installed the Flash Plugin 10.1 beta 2 and the problem is gone! Thanks, Adobe! I don&#8217;t know when the official release is. You can get the beta at <a href="http://labs.adobe.com/downloads/flashplayer10.html">labs.adobe.com.</a></p>
<img src="http://feeds.feedburner.com/~r/johnw/~4/RP9ID0KL8bU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://watson-net.com/blog/wordpress-ubuntu-flash-upload-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android vs. web development</title>
		<link>http://watson-net.com/blog/android-alarms/</link>
		<comments>http://watson-net.com/blog/android-alarms/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 01:30:59 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://watson-net.com/blog/?p=284</guid>
		<description><![CDATA[When I first jumped into Android development, I went in with a mindset for developing desktop applications. That was a mistake. I think I would have been able to wrap my head around it quicker if I&#8217;d thought of it more like web application development. In particular, Activities have to account for a certain amount [...]]]></description>
			<content:encoded><![CDATA[<p>When I first jumped into Android development, I went in with a mindset for developing desktop applications. That was a mistake. I think I would have been able to wrap my head around it quicker if I&#8217;d thought of it more like web application development. In particular, Activities have to account for a certain amount of statelessness. And users never close or stop an Activity&#8212;they just start doing something else. It starts to make sense a lot quicker if you think of Activity classes as web pages.</p>
<img src="http://feeds.feedburner.com/~r/johnw/~4/rvSLjcJkITY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://watson-net.com/blog/android-alarms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning Android</title>
		<link>http://watson-net.com/blog/learning-android/</link>
		<comments>http://watson-net.com/blog/learning-android/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 04:12:47 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://watson-net.com/blog/?p=267</guid>
		<description><![CDATA[I&#8217;m excited to be programming in Java again. I bought one of those fancy touch screen Android phones in October because I wanted to start writing applications for mobile phones (OK&#8230; I wanted a new toy). I skimmed the Android framework documentation and did the Hello World tutorial back in December. But late last week [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/john/4029847429/"><img class="alignright" title="New phone by fd, on Flickr" src="http://farm3.static.flickr.com/2537/4029847429_8bc44f5cca_m.jpg" alt="" width="240" height="159" /></a>I&#8217;m excited to be programming in Java again. I bought one of those fancy touch screen Android phones in October because I wanted to start writing applications for mobile phones (OK&#8230; I wanted a new toy). I skimmed the Android framework documentation and did the Hello World tutorial back in December. But late last week I dove in head first and decided to start writing an app.</p>
<p>I believe that the best way to learn how to do anything is to just do it. Overcoming the challenges you encounter while building something real is where you learn all the twisty little quirks that every platform has. The online <a href="http://developer.android.com">Android developer guide</a> and reference is fantastic. And I love books (any recommendations?). But, for example, in the last few days of actually building an an Android app I&#8217;ve learned:</p>
<ul>
<li>There&#8217;s a difference between a paused activity and one that&#8217;s just obscured.</li>
<li>Trying to load Drawable resources in onLayout() of a custom component breaks the Eclipse WYSIWYG layout tool (&#8220;NotFoundException: Could not find drawable resource&#8230;&#8221;).</li>
<li>SoundPool feels much more responsive than MediaPlayer for playing short sound effects.</li>
<li>DatePicker uses the same internal representation as Calendar.</li>
<li>Creating a custom component that extends a standard one and draws itself is actually pretty simple.</li>
</ul>
<p>So far, developing on the Android platform (version 1.5 right now) feels solid and is very productive. The framework takes care of  a lot low-level junk for you so you can concentrate on app features. I feel like I&#8217;ve wrapped my head around the &#8220;Android way&#8221; of Activities and Intents and Listeners. Now it&#8217;s just a matter of becoming a little more comfortable with Java and learning the capabilities of the framework itself.</p>
<img src="http://feeds.feedburner.com/~r/johnw/~4/4ky2fi8Hp8k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://watson-net.com/blog/learning-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Checking the integrity of all JPG files in a directory</title>
		<link>http://watson-net.com/blog/checking-the-integrity-of-all-jpg-files-in-a-directory/</link>
		<comments>http://watson-net.com/blog/checking-the-integrity-of-all-jpg-files-in-a-directory/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 18:53:25 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[corruption]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[integrity]]></category>
		<category><![CDATA[jpeginfo]]></category>
		<category><![CDATA[jpg]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[photos]]></category>

		<guid isPermaLink="false">http://watson-net.com/blog/?p=254</guid>
		<description><![CDATA[I recently had a hard drive go bad on me which actually turned out to be a motherboard going bad. The hard drive may be fine but I don&#8217;t want to take any chances, and anyway, you can buy 1 terabyte now for about $70 US. There was definitely something goofy going on with access [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had a hard drive go bad on me which actually turned out to be a motherboard going bad. The hard drive may be fine but I don&#8217;t want to take any chances, and anyway, you can buy 1 terabyte now for about $70 US. There was definitely something goofy going on with access to the drive. I keep daily backups but a perfect backup of a corrupted source is no good. My most important files are my digital photos, mostly JPG images. I did some visual spot checking but once I hit the 8,500 photos in 2005 I looked for a better alternative. Here&#8217;s what I came up with. (This works on Linux computers. You&#8217;ll have to alter your process on Windows and Macs but the principles are the same.)</p>
<p>First, find a nifty little utility called <em>jpeginfo</em> and install it. <em>jpeginfo</em> is a command line program that attempts to quickly decompress a JPG file and tell you what happens. It&#8217;s not infallible, but I&#8217;m betting that if the JPG file decompresses successfully then the files are good.</p>
<p>Then you just open a shell, <em>cd</em> to your photos directory and run <em>jpeginfo -c</em> on all of your files. Like so:</p>
<pre>    cd photos
    find -iname "*.jpg" -print0 | xargs -0 jpeginfo -c | grep -e WARNING -e ERROR</pre>
<p>Any corrupted JPG files will be listed.</p>
<p>How it works: the <em>find</em> command lists all files ending with .jpg (case insensitive). It passes it to <em>xargs</em> which runs <em>jpeginfo -c</em> on each file. The <em>grep</em> command shows just the files that had a WARNING. Instead of <em>grep WARNING</em> you could also redirect the output to a file so that you can see all of the results.</p>
<p>I found 4 corrupted JPGs in my collection of over 35,000 photos. I knew about some of these. At least 2 I think were corrupted during transfer off the memory card. JPG images are surprisingly resilient. Even with bad data in the file a lot of the image could be decoded in 3 of 4 of the images. Here are the best and worst of the corrupted 4.</p>
<p><img class="alignnone size-full wp-image-264" title="Corrupted JPG 1" src="http://watson-net.com/blog/wp-content/uploads/2009/12/corrupt1.jpg" alt="Corrupted JPG 1" width="500" height="332" /></p>
<p><img class="alignnone size-full wp-image-265" title="Corrupted JPG 2" src="http://watson-net.com/blog/wp-content/uploads/2009/12/corrupt2.jpg" alt="Corrupted JPG 2" width="333" height="500" /></p>
<img src="http://feeds.feedburner.com/~r/johnw/~4/F3PWnUi3MUw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://watson-net.com/blog/checking-the-integrity-of-all-jpg-files-in-a-directory/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Changing the default Gnome terminal size</title>
		<link>http://watson-net.com/blog/changing-default-gnome-terminal-size/</link>
		<comments>http://watson-net.com/blog/changing-default-gnome-terminal-size/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 16:35:21 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://watson-net.com/blog/?p=244</guid>
		<description><![CDATA[Information on changing the default Gnome terminal size is out there but it is scattered and scarce. I have two 20 inch monitors. The default size (80&#215;24) is too small. Here&#8217;s how you can change the default. This applies to all launchers, menu items, and keyboard shortcuts:

Run gconf-editor
Open desktop → gnome → applications → terminal
Change [...]]]></description>
			<content:encoded><![CDATA[<p>Information on changing the default Gnome terminal size is out there but it is scattered and scarce. I have two 20 inch monitors. The default size (80&#215;24) is too small. Here&#8217;s how you can change the default. This applies to all launchers, menu items, and keyboard shortcuts:</p>
<ul>
<li>Run gconf-editor</li>
<li>Open desktop → gnome → applications → terminal</li>
<li>Change the value of <em>exec</em> in the right pane to: <em>gnome-terminal &#8211;geometry 132&#215;40<br />
</em>(Where 132&#215;40 is whatever size you want.) (Use a real &#8220;x&#8221;, don&#8217;t copy and paste the multiplication symbol above.)</li>
</ul>
<p><img class="aligncenter size-medium wp-image-245" title="Gnome terminal gconf settings" src="http://watson-net.com/blog/wp-content/uploads/2009/12/gnome-terminal-gconf-500x407.jpg" alt="Gnome terminal gconf settings" width="500" height="407" /></p>
<img src="http://feeds.feedburner.com/~r/johnw/~4/b1dZ4Rgqvns" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://watson-net.com/blog/changing-default-gnome-terminal-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing for browser SSL warnings</title>
		<link>http://watson-net.com/blog/testing-for-browser-ssl-warnings/</link>
		<comments>http://watson-net.com/blog/testing-for-browser-ssl-warnings/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 17:31:25 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://watson-net.com/blog/?p=237</guid>
		<description><![CDATA[I use an automated deployment script for BigHugeLabs.com. I&#8217;ll regularly do around 10 deployments every day so it&#8217;s important that the system has as much automation as possible. The deploy script builds CSS and JS files, updates shared libraries, deploys files to several locations, and does some testing.
One test I recently added was an automated [...]]]></description>
			<content:encoded><![CDATA[<p>I use an automated deployment script for BigHugeLabs.com. I&#8217;ll regularly do around 10 deployments every day so it&#8217;s important that the system has as much automation as possible. The deploy script builds CSS and JS files, updates shared libraries, deploys files to several locations, and does some testing.</p>
<p>One test I recently added was an automated test for browser SSL warnings. SSL warnings appear in a browser when the browser requests an <em>https</em> page but some of the resources requested on that page are unencrypted. While <a href="http://news.cnet.com/8301-1009_3-10297264-83.html">a study has shown</a> that most people will ignore the warnings, that still leaves a lot of people who take them seriously.</p>
<p>The test works by using <em>wget</em> to request SSL pages and test for non-encrypted resources. Here&#8217;s the relevant Bash:</p>
<pre>wget --quiet -O - "https://bighugelabs.com/cart.php" | grep -P '(script|img).*?src="http://'
if [ $? -eq 0 ]
then
  echo "     *** SSL WARNING IN CART/CHECKOUT! ***"
  beep -r 3
else
  echo "     OK"
fi</pre>
<p><em>wget</em> requests the page and pipes it to stdout. <em>grep</em> scans the page using a Perl regular expression for tags that load <em>http://</em> resources (rather than relative URLs or <em>https://</em>). <em>$? -eq 0</em> tests that the exit status of <em>grep</em> is zero. The exit status is 0 if <em>grep</em> finds a match and 1 if it does not. For good measure the script beeps three times if there is a problem.</p>
<p>This isn&#8217;t fool-proof by any means. The regular expression isn&#8217;t all-inclusive, for one. It also ignores problems that can be caused by scripting. But it&#8217;s a start that should catch some problems caused by embedding resources directly into the page.</p>
<img src="http://feeds.feedburner.com/~r/johnw/~4/LS5pK7wMp3E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://watson-net.com/blog/testing-for-browser-ssl-warnings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix for MySQL binlogs not deleting themselves</title>
		<link>http://watson-net.com/blog/fix-mysql-binlogs/</link>
		<comments>http://watson-net.com/blog/fix-mysql-binlogs/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 03:39:10 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[binlogs]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://watson-net.com/blog/?p=183</guid>
		<description><![CDATA[If you are using the expire_logs_days setting for automatic binary log removal in MySQL and your binary logs are not automatically deleting themselves (SHOW MASTER LOGS), it&#8217;s probably because the index is out of sync with the actual log folder. Manually remove the logs (/var/log/mysql) and then do RESET MASTER to get things back in [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using the <em>expire_logs_days</em> setting for automatic binary log removal in MySQL and your binary logs are not automatically deleting themselves (SHOW MASTER LOGS), it&#8217;s probably because the index is out of sync with the actual log folder. Manually remove the logs (/var/log/mysql) and then do RESET MASTER to get things back in sync again.</p>
<img src="http://feeds.feedburner.com/~r/johnw/~4/7XiZBeKsol0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://watson-net.com/blog/fix-mysql-binlogs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook UIDs going to 64bits</title>
		<link>http://watson-net.com/blog/facebook-uids-going-to-64bits/</link>
		<comments>http://watson-net.com/blog/facebook-uids-going-to-64bits/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 18:55:09 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[32bit]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://watson-net.com/blog/?p=225</guid>
		<description><![CDATA[&#8220;Because of the recent growth due to Facebook Connect and internationalization, we are running out of our allocated 32bit UIDs.&#8221; Running out. Of 32bit UIDs. I wish I had Facebook&#8217;s problems.
]]></description>
			<content:encoded><![CDATA[<p>&#8220;<a href="http://www.facebook.com/developers/message.php#msg_371">Because of the recent growth due to Facebook Connect and internationalization, we are running out of our allocated 32bit UIDs.</a>&#8221; <i>Running out.</i> Of 32bit UIDs. I wish I had Facebook&#8217;s problems.</p>
<img src="http://feeds.feedburner.com/~r/johnw/~4/Tsa4MHUWxd8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://watson-net.com/blog/facebook-uids-going-to-64bits/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I do not like Evernote</title>
		<link>http://watson-net.com/blog/i-do-not-like-evernote/</link>
		<comments>http://watson-net.com/blog/i-do-not-like-evernote/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 23:03:11 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[evernote]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[note taking]]></category>
		<category><![CDATA[notes]]></category>

		<guid isPermaLink="false">http://watson-net.com/blog/?p=186</guid>
		<description><![CDATA[I&#8217;ve been using the web-based version of Evernote in earnest ever since Google announced their intention to abandon Notebook. It&#8217;s nice overall but has some quirks that I do not like. The upload quota for one. The fact that I have to login all the time. Also the pop-up upgrade ads. And I don&#8217;t like [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using the web-based version of Evernote in earnest ever since Google announced their intention to abandon Notebook. It&#8217;s nice overall but has some quirks that I do not like. The upload quota for one. The fact that I have to login all the time. Also the pop-up upgrade ads. And I don&#8217;t like that I can&#8217;t clip images by right-clicking them; it looks like you can, but you can&#8217;t&#8212;you have to highlight them first. Clipping a page takes too long because you have to wait for it to generate a screenshot of the whole page.</p>
<p>Too many interruptions in flow to consider paying money for the service. Which is a bummer because I really wanted to like it. Now I have to keep looking.</p>
<p>If you&#8217;re as frustrated as me by online note taking apps, you might want to check out <a href="http://www.cloudnotes.net">Cloud Notes</a>, a blog whose owner is on a quest to find the perfect online note taking solution.</p>
<img src="http://feeds.feedburner.com/~r/johnw/~4/CJiUl0_nCR8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://watson-net.com/blog/i-do-not-like-evernote/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Programmer’s creed</title>
		<link>http://watson-net.com/blog/programmers-creed/</link>
		<comments>http://watson-net.com/blog/programmers-creed/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 02:58:51 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[backlight]]></category>
		<category><![CDATA[illuminated]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[logitech]]></category>
		<category><![CDATA[photos]]></category>

		<guid isPermaLink="false">http://watson-net.com/blog/?p=218</guid>
		<description><![CDATA[
This is my keyboard. There are many like it, but this one is mine.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/john/3373851109/" title="This is my keyboard. by fd, on Flickr"><img src="http://farm4.static.flickr.com/3427/3373851109_787352aaee.jpg" width="500" height="332" alt="This is my keyboard." /></a></p>
<p>This is my keyboard. There are many like it, but this one is mine.</p>
<img src="http://feeds.feedburner.com/~r/johnw/~4/KZ62a6yBDoE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://watson-net.com/blog/programmers-creed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss><!-- Dynamic page generated in 0.573 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-03-12 08:57:03 -->
