<?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>WombatNation</title>
	<atom:link href="http://www.wombatnation.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wombatnation.com</link>
	<description>Speech Applications, MySQL, Python, Soccer, Java, Beer and Incinerating Toilets</description>
	<lastBuildDate>Mon, 30 Jan 2012 08:10:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Astromixology</title>
		<link>http://www.wombatnation.com/2012/01/astromixology</link>
		<comments>http://www.wombatnation.com/2012/01/astromixology#comments</comments>
		<pubDate>Mon, 30 Jan 2012 08:07:42 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Food and Drink]]></category>
		<category><![CDATA[The Unusual and the Weird]]></category>

		<guid isPermaLink="false">http://www.wombatnation.com/?p=936</guid>
		<description><![CDATA[Whenever I&#8217;m looking for a drink recipe, I first seek out my trusty Mixology pamphlet, courtesy of the Southern Comfort Corporation, ca. 1974. What better source could there be for cocktail recipes than a pamphlet that mixes astrology with photos of swinging dudes in gaudy polyester leisure suits accompanied by the smiling Stepford wives. Sure, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wombatnation.com/w/wp-content/uploads/2012/01/mix_cover.jpg"><img class="alignleft size-full wp-image-937" title="Mixology cover" src="http://wombatnation.com/w/wp-content/uploads/2012/01/mix_cover.jpg" alt="Mixology cover" width="250" height="366" align="left" hspace="5" /></a>
Whenever I&#8217;m looking for a drink recipe, I first seek out my trusty Mixology pamphlet, courtesy of the Southern Comfort Corporation, ca. 1974. What better source could there be for cocktail recipes than a pamphlet that mixes astrology with photos of swinging dudes in gaudy polyester leisure suits accompanied by the smiling Stepford wives. Sure, this guy is in a pretty reasonable looking sweater, but steel yourself now for what is to come.</p>

<p>Back in the 70&#8242;s, subliminal messaging was a controversial topic. I remember running across a book from that same year called <a href="http://www.amazon.com/Subliminal-Seduction-Wilson-Bryan-Key/dp/0451061489?tag=wombatnation-20">Subliminal Persuasion</a> that had a lot of images from advertising and movies with supposedly embedded suggestive words and images, primarily of a sexual nature. Check out the <a title="Subliminal Manipulation blog" href="http://subliminalmanipulation.blogspot.com/">Subliminal Manipulation blog</a> if you don&#8217;t sex believe me.</p>

<p>Take a closer look at the hair of the guy on the Mixology cover. Now, think about other parts of a man&#8217;s body. Good luck getting this image out of your head (no pun intended) anytime soon. I&#8217;m really, really sorry.</p>

<p>Next up we&#8217;ve got a dude confidently sporting a pink suit. The previous sentence is the only known sentence on the internet including the words dude and pink suit, but not the word pimp. Ignore the faint yellow polka-dots. I double-checked the pamphlet and they must be a scanning artifact. I was so hoping they weren&#8217;t, though. I think my scanner understandably puked on the image.</p>

<p><a href="http://wombatnation.com/w/wp-content/uploads/2012/01/mix_pg_2_3.jpg"><img class="size-full wp-image-940" title="Pink suited swinger" src="http://wombatnation.com/w/wp-content/uploads/2012/01/mix_pg_2_3.jpg" alt="" width="600" height="435" /></a></p>

<blockquote>Almost everyone knows his Zodiac sign today. But few have any real knowledge of astrology.</blockquote>

<blockquote>Intent of astrology data herein is simply to inform, not to advise. Therefore any personal application is the individual&#8217;s responsibility.</blockquote>

<p>Check out Mr. quilted pants on the left. What grandmother wouldn&#8217;t want to see her granddaughter coming home with a nice boy wearing a handmade quilt? OK, besides any grandmother with something against hobos. Those pants are so appalling that I almost didn&#8217;t notice the crazy blue plaid suit in the back. He&#8217;s channeling Rodney Dangerfield from Caddyshack, but coming up well short. Powder blue cardigan boy looks positively normal in this photo.</p>

<p><a href="http://wombatnation.com/w/wp-content/uploads/2012/01/mix_pg_8_9.jpg"><img class="size-full wp-image-941" title="Quilted pants and blue plaid suit" src="http://wombatnation.com/w/wp-content/uploads/2012/01/mix_pg_8_9.jpg" alt="" width="600" height="435" /></a></p>

<p>If your party kilt is at the drycleaner, a full tartan suit is always a great substitute. It&#8217;s a little hard to see, but, yes, those are matching pants. Fortunately, I don&#8217;t think it&#8217;s the royal Stewart tartan. Too bad his promiscuous plaid partner up front isn&#8217;t in a matching tartan. I can&#8217;t identify the tartans for certain due to the cumulative retinal scarring, but I&#8217;m suspecting they&#8217;re variants of the Montgomery Ward tartan.</p>

<p><a href="http://wombatnation.com/w/wp-content/uploads/2012/01/mix_pg_10_11.jpg"><img class="size-full wp-image-942" title="Worst use of tartan evah" src="http://wombatnation.com/w/wp-content/uploads/2012/01/mix_pg_10_11.jpg" alt="" width="600" height="435" /></a></p>

<p>If you&#8217;re daring and desperate for the full pamphlet in a high enough resolution to actually read it, <a title="Images from Mixology Pamphlet" href="http://www.wombatnation.com/images/mixology.zip">download the 2 MB zipfile</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wombatnation.com/2012/01/astromixology/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kohler Numi Review in NY Times</title>
		<link>http://www.wombatnation.com/2011/10/kohler_numi</link>
		<comments>http://www.wombatnation.com/2011/10/kohler_numi#comments</comments>
		<pubDate>Sat, 22 Oct 2011 20:23:16 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[The Unusual and the Weird]]></category>

		<guid isPermaLink="false">http://www.wombatnation.com/?p=925</guid>
		<description><![CDATA[The competition for toilet supremacy is heating up. The NY Times has a great review of Kohler&#8217;s Numi, which opens up like a Transformer to accept your tributes. Someone should hack the opening chime to play a recording of Optimus Prime saying &#8221;No sacrifice is too great in the service of freedom.&#8221; And I would love to see [...]]]></description>
			<content:encoded><![CDATA[<p>The competition for toilet supremacy is heating up. The NY Times has a great review of <a href="http://www.nytimes.com/2011/10/13/technology/personaltech/kohlers-numi-is-everything-one-wants-in-a-toilet-and-more.html">Kohler&#8217;s Numi</a>, which opens up like a Transformer to accept your tributes. Someone should hack the opening chime to play a recording of Optimus Prime saying &#8221;No sacrifice is too great in the service of freedom.&#8221; And I would love to see it do battle with <a href="http://www.wombatnation.com/2004/08/toto-neorest-600">Toto&#8217;s Megatron, I mean Neorest</a>.</p>

<p><img class="alignnone" title="Kohler Numi transforming" src="http://graphics8.nytimes.com/images/2011/10/13/business/13-BASICS1/13-BASICS1-articleLarge.jpg" alt="Kohler Numi transforming" width="500" /></p>

<p>When I first glanced at the image of the remote control, I thought the bottom left button said &#8220;Lasers&#8221;. Now, that would be freaking awesome. Whether as a laser light show to accompany the event or as a modern alternative to the <a href="http://www.wombatnation.com/essays/incinolet.html">incineration of your contributions</a>, I&#8217;m all for it. And surely a couple frickin&#8217; lasers would come in handy when kicking some Neorest butt.</p>

<p><img class="alignnone" title="Kohler Numi remote control" src="http://graphics8.nytimes.com/images/2011/10/13/business/13-BASICS4/13-BASICS4-articleInline.jpg" alt="Kohler Numi remote control" width="190" height="280" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wombatnation.com/2011/10/kohler_numi/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Streaming ResultSets with the MySQL JDBC Driver</title>
		<link>http://www.wombatnation.com/2011/06/streaming-resultsets-with-the-mysql-jdbc-driver</link>
		<comments>http://www.wombatnation.com/2011/06/streaming-resultsets-with-the-mysql-jdbc-driver#comments</comments>
		<pubDate>Sat, 04 Jun 2011 01:00:04 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.wombatnation.com/?p=909</guid>
		<description><![CDATA[When you use the MySQL JDBC driver to select rows from a table, the connection will block until the entire ResultSet has been pulled over to the client. In most cases this makes sense, especially if the server is on a different host. Retrieving the entire ResultSet will minimize the number of TCP packets that [...]]]></description>
			<content:encoded><![CDATA[<p>When you use the MySQL JDBC driver to select rows from a table, the connection will block until the entire ResultSet has been pulled over to the client. In most cases this makes sense, especially if the server is on a different host. Retrieving the entire ResultSet will minimize the number of TCP packets that must be sent from the server.</p>

<p>However, if you are returning a very large ResultSet, the client will have to allocate a lot of memory on the heap. If you end up accessing each row to create an object from the data, then you will need enough heap space for the entire ResultSet plus all of the objects you instantiate.</p>

<p>The driver documentation explains how to <a href="http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-implementation-notes.html">force the driver to stream the ResultSet row-by-row</a>.</p>

<p>The first catch is that you must be using a regular Statement object, not a PreparedStatement.</p>

<p>The documentation says you need to add the following non-intuitive code before executing the query:</p>


<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">stmt <span style="color: #339933;">=</span> conn.<span style="color: #006633;">createStatement</span><span style="color: #009900;">&#40;</span>java.<span style="color: #006633;">sql</span>.<span style="color: #003399;">ResultSet</span>.<span style="color: #006633;">TYPE_FORWARD_ONLY</span>,
              java.<span style="color: #006633;">sql</span>.<span style="color: #003399;">ResultSet</span>.<span style="color: #006633;">CONCUR_READ_ONLY</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
stmt.<span style="color: #006633;">setFetchSize</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Integer</span>.<span style="color: #006633;">MIN_VALUE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>


<p>though you can actually just use <code>conn.createStatement()</code> since TYPE_FORWARD_ONLY and CONCUR_READ_ONLY are the defaults.</p>

<p>There are a couple caveats in the documentation, though they are fairly obvious. You should process the ResultSet as quickly as possible, since locks will be held as long as the statement (and any transaction it is in) is open.</p>

<p>In addition to being non-intuitive, setting the fetch size to <code>Integer.MIN_VALUE</code> might cause unexpected results if you run your code against a database server other than MySQL.</p>

<p>If you&#8217;re willing to go all out in committing to MySQL, you can cast the return value of <code>createStatement()</code> to <code>com.mysql.jdbc.Statement.StatementImpl</code> and then call <code>enableStreamingResults()</code>. That will, at least, make the behavior of your code more obvious.</p>

<p>At work I needed to cache a lot of data from a couple of tables. Using the default behavior caused the heap to grow to over 12.5 GB. That made for trouble when running on my 8 GB laptop. By switching to streaming the ResultSet, the heap maxed out at only 5 GB.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wombatnation.com/2011/06/streaming-resultsets-with-the-mysql-jdbc-driver/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tweeting by Phone with PhoneBlogger</title>
		<link>http://www.wombatnation.com/2011/03/tweeting-by-phone-with-phoneblogger</link>
		<comments>http://www.wombatnation.com/2011/03/tweeting-by-phone-with-phoneblogger#comments</comments>
		<pubDate>Sun, 20 Mar 2011 23:06:52 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[PhoneBlogger]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[VoiceXML]]></category>

		<guid isPermaLink="false">http://www.wombatnation.com/?p=905</guid>
		<description><![CDATA[In late 2002, I thought it would be cool to build an application that allowed you to blog by phone. Tools, libraries and hosted services were a bit more limited back then, but after a few months of learning, coding and debugging, I managed to release the first version of PhoneBlogger in January 2003. Along [...]]]></description>
			<content:encoded><![CDATA[<p>In late 2002, I thought it would be cool to build an application that allowed you to blog by phone. Tools, libraries and hosted services were a bit more limited back then, but after a few months of learning, coding and debugging, I managed to release the first version of <a href="http://www.wombatnation.com/phoneblogger/">PhoneBlogger</a> in January 2003. Along the way, I learned a lot about <a href="http://python.org">Python</a>, <a href="http://voicexml.org">VoiceXML</a>, JavaScript, XML-RPC, audio encoding, shared web hosting and command line tools for Linux.</p>

<p>Fast forward nearly ten years and not only have the tools and libraries come a long way, but there are many more free or inexpensive hosted services that simplify building a tool/service like PhoneBlogger. Instead of hosting the application code on a shared hosting site, I can now build and deploy on <a href="http://code.google.com/appengine/">Google App Engine</a>. Though scalability is not an issue for my personal use of PhoneBlogger, if it were turned into a public service, App Engine would make scaling much simpler and more economical. App Engine also makes deployment a snap, though with a small amount of work, so would <a href="http://fabfile.org/">Fabric</a>. For my PhoneBlogger rewrite, I decided to use App Engine.</p>

<p>In the original version of PhoneBlogger, I coded a bunch of static VoiceXML and JavaScript for managing the telephone interaction with a caller. At the time, three of the most prominent services for VoiceXML developers were <a href="http://studio.tellme.com">Tellme</a> (now owned by Microsoft), <a href="http://cafe.bevocal.com">BeVocal</a> (now owned by Nuance) and <a href="http://evolution.voxeo.com">Voxeo</a> (still independent). I had to write slightly different code for Tellme and BeVocal, but the differences weren&#8217;t that significant. I think it would have been pretty simple to port to Voxeo, as well. Improved support of VoiceXML 2 would now likely allow me to use the same code on each platform.</p>

<p>While VoiceXML is still a great option for building speech apps, a couple of new services bring you simple APIs for building speech or DTMF (touchtone) applications, at the cost of portability. This time around I&#8217;ve started with <a href="http://twilio.com">Twilio</a>. I very quickly turned a Python/GAE example from the Twilio website into a DTMF app for tweeting by phone. Although speech recognition allows you to build much more complex and natural applications, many simple applications can be built quickly and easily with just support for pressing keys to provide input. PhoneBlogger falls into that category, for now.</p>

<p>One very convenient thing about Twilio is that I can use their platform to capture and host recordings in a format that is simple to play back in a web browser. If I were really concerned about longevity of the recordings I could easily retrieve them and store them elsewhere, but I&#8217;m okay with keeping them on Twilio servers for now. That&#8217;s an easy enhancement to add later. The biggest downside for tweeting the Twilio links is that the Twilio recording URLs are ginormous. Fortunately, the goo.gl URL shortener made quick work of that problem.</p>

<p>I&#8217;m also going to take a look at porting my code to <a href="http://tropo.com">Tropo</a>, which is a service offered by Voxeo. Tropo is built on Voxeo&#8217;s Prophecy platform and offers speech recognition as an option.</p>

<p>I decided to begin the rewrite by first supporting tweeting by phone. Twitter offers a great API, which is made even simpler by libraries like Tweepy. I highly recommend first checking out the OAuth support in any library for Twitter you might consider using. OAuth can be a complex beast, but libraries like <a href="http://joshthecoder.github.com/tweepy/">Tweepy</a> make it almost trivial.</p>

<p>The original PhoneBlogger source code and a couple iterations of it are <a href="http://sourceforge.net/projects/phoneblogger/">available on SourceForge</a>. I wasn&#8217;t particularly interested in learning about CVS at the time, so I just uploaded tarballs of all the code. While SourceForge has improved a lot, I&#8217;ve become more of a fan of GitHub. Google Code, LaunchPad and BitBucket are also great options. I started using LaunchPad when working on a <a href="https://launchpad.net/gearmanij">Java library for Gearman</a>, but then set up a <a href="https://github.com/RobertStewart">couple of repos on GitHub</a> when I started working on <a href="https://github.com/log4mongo/log4mongo-java">Log4mongo-Java</a>. I&#8217;m much happier with Git, Bazaar and Mercurial than Subversion and CVS (Caveman Versioning System). I&#8217;ve already started posting code for the new <a href="https://github.com/RobertStewart/phoneblogger">phoneblogger project on GitHub</a>.</p>

<p>As of now, the new version of PhoneBlogger supports tweeting by phone. All the code is on GitHub, along with a README file with the basic steps to set it up for yourself. In an upcoming blog post I&#8217;ll walk through those steps in a little more detail.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wombatnation.com/2011/03/tweeting-by-phone-with-phoneblogger/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>O&#8217;Reilly Media Wishlist</title>
		<link>http://www.wombatnation.com/2011/02/oreilly-media-wishlist</link>
		<comments>http://www.wombatnation.com/2011/02/oreilly-media-wishlist#comments</comments>
		<pubDate>Thu, 10 Feb 2011 18:33:00 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.wombatnation.com/?p=902</guid>
		<description><![CDATA[Programming Scala The Ruby Programming Language Hadoop: The Definitive Guide, Second Edition Data Mashups in R Great R: Level 1 Hands-on Cassandra JavaScript: The Good Parts Complete Web Monitoring Scaling MongoDB]]></description>
			<content:encoded><![CDATA[<ul>
    <li><a href="http://oreilly.com/catalog/9780596155957/">Programming Scala</a></li>
    <li><a href="http://oreilly.com/catalog/9780596516178/">The Ruby Programming Language</a></li>
    <li><a href="http://oreilly.com/catalog/9781449389734/">Hadoop: The Definitive Guide, Second Edition</a></li>
    <li><a href="http://oreilly.com/catalog/9780596559649/">Data Mashups in R</a></li>
    <li><a href="http://oreilly.com/catalog/0636920001041/">Great R: Level 1</a></li>
    <li><a href="http://oreilly.com/catalog/0636920014195/">Hands-on Cassandra</a></li>
    <li><a href="http://oreilly.com/catalog/9780596517748/">JavaScript: The Good Parts</a></li>
    <li><a href="http://oreilly.com/catalog/9780596155131/">Complete Web Monitoring</a></li>
         <li><a href="http://oreilly.com/catalog/9781449303211/">Scaling MongoDB</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.wombatnation.com/2011/02/oreilly-media-wishlist/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Avoid Replicating Statements in MySQL</title>
		<link>http://www.wombatnation.com/2010/12/how-to-avoid-replicating-statements-in-mysql</link>
		<comments>http://www.wombatnation.com/2010/12/how-to-avoid-replicating-statements-in-mysql#comments</comments>
		<pubDate>Thu, 30 Dec 2010 06:45:05 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.wombatnation.com/?p=677</guid>
		<description><![CDATA[If a replication slave gets out of sync with the master, you can bring them back in sync by running statements that don&#8217;t execute on every server in the replication chain. There are sane and insane ways to do this. The right way is to execute SET SESSION sql_log_bin=0; on your current connection before running [...]]]></description>
			<content:encoded><![CDATA[<p>If a replication slave gets out of sync with the master, you can bring them back in sync by running statements that don&#8217;t execute on every server in the replication chain. There are sane and insane ways to do this.</p>

<p>The right way is to execute <code>SET SESSION sql_log_bin=0;</code> on your current connection before running the statements you don&#8217;t want replicated. Then, either execute <code>SET SESSION sql_log_bin=1;</code> or close the connection.</p>

<p>The crazy way is to execute the statements while the default database is set to a database that is not replicated. Many DBAs configure MySQL servers so that the mysql database is not replicated, since it may contain user and host info that is specific to a server instance. When the default database is set to a database that is not replicated, mysqld will not replicate statements affecting any database. Feature or bug, you be the judge.</p>

<p>In my example scenario below, db1 is the master and db2 is the slave.</p>

<p>First, create a table in the test database and verify  it is replicated. Here&#8217;s an example create statement.</p>

<p><pre>mysql&gt; CREATE TABLE test.rs (a INT);</pre></p>

<p>Then, use the MySQL CLI to connect to the master database server (in this case, db1), set the default database to mysql (-D mysql) and execute an INSERT statement. The short version of this is:</p>

<p><pre>[me@server ~]$ mysql -u me -D mysql -h db1 -e "INSERT INTO test.rs VALUES (1);"</pre></p>

<p>Then, verify that the row was added on the master, but not on the slave.</p>

<p><pre>[me@server ~]$ mysql -u me -h db1 -e "SELECT * FROM test.rs;"
+------+
| a    |
+------+
|    1 |
+------+
[me@server ~]$ mysql -u me -h db2 -e "SELECT * FROM test.rs;"
[me@server ~]$</pre></p>

<p>And if you haven&#8217;t already guessed, the insane way is frequently the accidental source of many out-of-sync situations. Use the sane way to fix the damage.</p>

<p>Of course, the easy way to sync up tables on out of sync servers in a replication chain is to use <a href="http://www.maatkit.org/doc/mk-table-sync.html">mk-table-sync</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wombatnation.com/2010/12/how-to-avoid-replicating-statements-in-mysql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mongo SV 2010</title>
		<link>http://www.wombatnation.com/2010/12/mongo-sv-2010</link>
		<comments>http://www.wombatnation.com/2010/12/mongo-sv-2010#comments</comments>
		<pubDate>Wed, 08 Dec 2010 05:57:38 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[MongoDB]]></category>

		<guid isPermaLink="false">http://www.wombatnation.com/?p=886</guid>
		<description><![CDATA[10Gen put on another excellent MongoDB conference last Friday, this time at Microsoft Research in Mountain View. Like Mongo SF, there was a good balance between intro and advanced material, as well as between 10Gen presenters and third party presenters, like myself. Registration was smooth, sessions ran on time, they made it easy on presenters, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/mongoSV-badge-blue.png" alt="Mongo SV 2010 badge" /></p>

<p><a href="http://www.10gen.com/">10Gen</a> put on another excellent <a href="http://mongodb.org/">MongoDB</a> conference last Friday, this time at Microsoft Research in Mountain View. Like Mongo SF, there was a good balance between intro and advanced material, as well as between 10Gen presenters and third party presenters, like myself. Registration was smooth, sessions ran on time, they made it easy on presenters, presentations were videotaped, audio was recorded with a direct feed, food was adequate (though putting squeaky bags of chips in rooms was not a good idea), 10Gen people were really helpful and the after party at Tied House was excellent.</p>

<p>And best of all, I talked my way out of an undeserved traffic ticket while leaving Microsoft Research. The car in front of me pulled into the street and then stopped to wait for a car to go by. I pulled up to the stop sign and stopped, since he was already in the street. When he finally pulled away, so did I. Fortunately, the cop accepted my side of the story and let me go. He was actually pretty nice about it.</p>

<p>Below are the slides from <a href="http://www.slideshare.net/WombatNation/logging-app-behavior-to-mongo-db">my presentation on Logging Application Behavior to MongoDB</a>. If you&#8217;re interested in logging to MongoDB from Java, Python, Ruby, PHP and/or C#, I hope you&#8217;ll find them useful.</p>

<div style="width:425px" id="__ss_6011901"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/WombatNation/logging-app-behavior-to-mongo-db" title="Logging Application Behavior to MongoDB">Logging Application Behavior to MongoDB</a></strong><object id="__sse6011901" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=loggingappbehaviortomongodb-101202190943-phpapp02&#038;rel=0&#038;stripped_title=logging-app-behavior-to-mongo-db&#038;userName=WombatNation" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse6011901" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=loggingappbehaviortomongodb-101202190943-phpapp02&#038;rel=0&#038;stripped_title=logging-app-behavior-to-mongo-db&#038;userName=WombatNation" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object><div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/WombatNation">Robert Stewart</a>.</div></div>

<p>I&#8217;m currently on the agenda to present on the same topic at the <a href="http://www.meetup.com/San-Francisco-MongoDB-User-Group/calendar/15112426/">January 18 San Francisco MongoDB Meetup</a>. By then, I plan to have more detailed info on analyzing data that has been logged to MongoDB.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wombatnation.com/2010/12/mongo-sv-2010/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snail Mail 419 Scam</title>
		<link>http://www.wombatnation.com/2010/11/snail-mail-419-scam</link>
		<comments>http://www.wombatnation.com/2010/11/snail-mail-419-scam#comments</comments>
		<pubDate>Wed, 24 Nov 2010 06:00:29 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[The Unusual and the Weird]]></category>

		<guid isPermaLink="false">http://www.wombatnation.com/?p=878</guid>
		<description><![CDATA[While it was tempting to write this post in all caps, that would cause me too much pain. Yesterday I received my first ever 419-style spam/scam by US Postal mail. It was actually posted from Dar es Salaam, Tanzania, with a cool rhino stamp that cost somebody 800 Tanzanian shillings, which is currently about 55 [...]]]></description>
			<content:encoded><![CDATA[<p>While it was tempting to write this post in all caps, that would cause me too much pain.</p>

<p>Yesterday I received my first ever <a href="http://www.419scam.org/">419-style spam/scam</a> by US Postal mail. It was actually posted from <a href="http://en.wikipedia.org/wiki/Dar_es_Salaam">Dar es Salaam, Tanzania</a>, with a cool rhino stamp that cost somebody 800 Tanzanian shillings, which is currently about 55 US cents.</p>

<p><img src="/images/tz_stamp.jpg" alt="Tanzanian rhino stamp" /></p>

<p>My correspondent is allegedly CHARLES TAYLOR (JNR), son of <a href="en.wikipedia.org/wiki/Charles_Taylor_(Liberia)">Liberian strong man Charles Taylor</a>. Daddy is now locked up in The Hague awaiting trial for his role in the civil war in Sierra Leone. And, no, he did not have a role in the design of the classic Converse sneakers, though it hasn&#8217;t been proven yet that Naomi Campbell didn&#8217;t decorate her chucks with sanguine diamonds courtesy of the Chuckster. Seems like Chuckie, Jr.,  is reaching out to <a href="http://rampael.blogspot.com/2010/11/sobre-carta-de-charles-taylor-jr.html">people in Spain</a>, as well.</p>

<p><img src="/images/tz_spam.jpg" alt="Tanzanian spam letter" /></p>

<p>It&#8217;s a pretty sweet offer, as I would be in line for a minimum of nearly $90 million USD.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wombatnation.com/2010/11/snail-mail-419-scam/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Speaking at Mongo SV 2010</title>
		<link>http://www.wombatnation.com/2010/11/speaking-at-mongo-sv-2010</link>
		<comments>http://www.wombatnation.com/2010/11/speaking-at-mongo-sv-2010#comments</comments>
		<pubDate>Wed, 17 Nov 2010 23:26:19 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.wombatnation.com/?p=870</guid>
		<description><![CDATA[I&#8217;ve very excited to be speaking on Logging Application Behavior to MongoDB at Mongo SV 2010 in Mountain View on December 3rd. Interest in the conference has soared and 10Gen is now expecting 500 attendees. Just a week ago, they were at 300 attendees. They had to add a fourth track of talks to handle [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/mongoSV-badge-blue.png" alt="Mongo SV 2010 badge" /></p>

<p>I&#8217;ve very excited to be speaking on <strong>Logging Application Behavior to <a href="http://www.mongodb.org/">MongoDB</a></strong> at <a href="http://www.10gen.com/conferences/mongosv2010">Mongo SV 2010 in Mountain View</a> on December 3rd. Interest in the conference has soared and <a href="http://www.10gen.com/">10Gen</a> is now expecting 500 attendees. Just a week ago, they were at 300 attendees. They had to add a fourth track of talks to handle the interest.</p>

<p>If you&#8217;re going to be at Mongo SV, please let me know or look for me at the conference. I&#8217;ll obviously be easy to find between 2:45 and 3:30 pm.</p>

<p>In my talk I&#8217;m planning to cover:</p>

<ul>
    <li>Why MongoDB is useful for application logging</li>
    <li>Strategies for logging to MongoDB</li>
    <li>Commonalities in logging libraries</li>
    <li>General purpose and MongoDB-specific logging libraries for:
<ul>
    <li>Java</li>
    <li>Python</li>
    <li>Ruby</li>
    <li>PHP</li>
    <li>C#/.NET</li>
</ul>
</li>
    <li>Analyzing logs in MongoDB</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.wombatnation.com/2010/11/speaking-at-mongo-sv-2010/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Foreign Key Constraint Error 150</title>
		<link>http://www.wombatnation.com/2010/10/mysql-foreign-key-constraint-error-150</link>
		<comments>http://www.wombatnation.com/2010/10/mysql-foreign-key-constraint-error-150#comments</comments>
		<pubDate>Mon, 04 Oct 2010 22:30:18 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.wombatnation.com/?p=849</guid>
		<description><![CDATA[Like a lot of software tools, MySQL error messages are sometimes not very precise, and sometimes not even that accurate. Last night during a database schema update, we ran into an issue creating a table with a foreign key constraint. Our tests had run successfully on several other MySQL 5.0 and 5.1 systems, so I [...]]]></description>
			<content:encoded><![CDATA[<p>Like a lot of software tools, MySQL error messages are sometimes not very precise, and sometimes not even that accurate. Last night during a database schema update, we ran into an issue creating a table with a foreign key constraint. Our tests had run successfully on several other MySQL 5.0 and 5.1 systems, so I wasn&#8217;t sure why it failed on this MySQL 5.0 instance. The actual error message was something like:
<pre>ERROR 1005 (HY000): Can't create table 'test.b' (errno: 150)</pre>
Looking up the error code confirmed that it was an issue with the foreign key constraint.
<pre>$ perror 150
MySQL error code 150: Foreign key constraint is incorrectly formed</pre>
This suggested to me that there was something wrong with the syntax. But, then why did it work elsewhere?</p>

<p>Oftentimes, the problem is actually with the columns that are referenced in the constraint. A careful comparison of the two tables revealed no differences in the column definitions. However, the column definition doesn&#8217;t tell the whole story.</p>

<p>It would be painful if you had to declare the character set each time for every character-based column. So, MySQL lets you define the default character set for the table, and each character column will inherit that specification. The table inherits from the database setting and the database inherits the systemwide setting. So, visually inspecting the CREATE TABLE statement may not be sufficient.</p>

<p>In our case, the first table had been created when we had been using a systemwide default character set of latin1. We had since changed to using utf8. Since the columns that were being referenced in the constraint were varchars, the character set needed to be the same. This would not have been an issue, of course, if the columns had been integers or some other non character-based column.</p>

<p>The statements below can be used to recreate the error message. It&#8217;s more obvious in this example, because the default character set is explicitly stated. Default values are great, until they silently sneak up on you and gnaw your hand off.</p>


<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> a <span style="color: #66cc66;">&#40;</span>
	id <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
	<span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>InnoDB <span style="color: #993333; font-weight: bold;">DEFAULT</span> CHARSET<span style="color: #66cc66;">=</span>latin1;
&nbsp;
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> b <span style="color: #66cc66;">&#40;</span>
	id <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
	<span style="color: #993333; font-weight: bold;">FOREIGN</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">REFERENCES</span> a<span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
	<span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>InnoDB <span style="color: #993333; font-weight: bold;">DEFAULT</span> CHARSET<span style="color: #66cc66;">=</span>utf8;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.wombatnation.com/2010/10/mysql-foreign-key-constraint-error-150/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

