<?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>jeremyslade.com</title>
	<atom:link href="http://jeremyslade.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jeremyslade.com</link>
	<description>web devel and other tech stuff</description>
	<lastBuildDate>Thu, 29 Apr 2010 06:18:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Go language</title>
		<link>http://jeremyslade.com/2010/04/go-language/</link>
		<comments>http://jeremyslade.com/2010/04/go-language/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 06:18:11 +0000</pubDate>
		<dc:creator>jeremy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jeremyslade.com/?p=100</guid>
		<description><![CDATA[Just watched &#8220;Another Go at Language Design&#8221; by Rob Pike from Google.  I had not heard of the Go language prior to this, and now I&#8217;m very intrigued.  The main points that I find interesting:

It&#8217;s a compiled language for speed, yet flexible Interface mechanism supports a (type-safe) duck-typing style I really miss when doing C/C++/Java
Goroutines [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://golang.org/"><img class="alignnone" title="Go logo" src="http://golang.org/doc/go-logo-black.png" alt="" width="149" height="52" /></a>Just watched &#8220;<a href="http://www.stanford.edu/class/ee380/Abstracts/100428.html">Another Go at Language Design</a>&#8221; by Rob Pike from Google.  I had not heard of the <a href="http://golang.org/">Go language</a> prior to this, and now I&#8217;m very intrigued.  The main points that I find interesting:</p>
<ul>
<li>It&#8217;s a compiled language for speed, yet flexible Interface mechanism supports a (type-safe) duck-typing style I really miss when doing C/C++/Java</li>
<li>Goroutines + channels provide concurrency in the language</li>
<li>It&#8217;s designed to be good a system-level programming tasks</li>
</ul>
<p>Admittedly, I&#8217;m not enamored with the syntax.  I&#8217;ve grown very fond of the aesthetics of Ruby, and Go seems like a big step backward on first impression.</p>
<p>I&#8217;ll add that to stack of things to learn more about.  It may be a good fit for upcoming projects&#8230;</p>
<p>BTW &#8212; I highly recommend the <a href="http://www.stanford.edu/class/ee380/Abstracts/100428.html">EE380 Computer Systems Colloquium</a>, a weekly lecture series held at Stanford during the academic year.  It&#8217;s been a while since I viewed any of the presentations, and this reminded me of the interesting topics they cover.  I hope to be a regular viewer again.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyslade.com/2010/04/go-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving on from Intel</title>
		<link>http://jeremyslade.com/2010/04/moving-on-from-intel/</link>
		<comments>http://jeremyslade.com/2010/04/moving-on-from-intel/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 16:27:43 +0000</pubDate>
		<dc:creator>jeremy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jeremyslade.com/?p=96</guid>
		<description><![CDATA[I&#8217;m down to one week left at Intel.  I&#8217;m looking forward to the next step in my career / personal development &#8212; I&#8217;ll be taking a position at IntelePeer starting in May.
This represents a big change in a number of ways.  It&#8217;s a small company of ~70 people, in a totally new industry for me [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://intel.com/"><img class="alignnone" src="http://www.intel.com/sites/sitewide/HAT/30recode/pix/intlogo.gif" alt="" width="127" height="51" /></a>I&#8217;m down to one week left at Intel.  I&#8217;m looking forward to the next step in my career / personal development &#8212; I&#8217;ll be taking a position at <a href="http://intelepeer.com/">IntelePeer</a> starting in May.</p>
<p>This represents a big change in a number of ways.  It&#8217;s a small company of ~70 people, in a totally new industry for me (telecom).  I&#8217;ll be doing more focused software development than I&#8217;ve done for a while at Intel.  And while I will still be in Fort Collins, I&#8217;m going to be telecommuting primarily.</p>
<p>There&#8217;s plenty I will miss about Intel, but I think it&#8217;s time to move on.  I&#8217;ve been here (HP / Intel) since getting out of school (12 years), and the longer I stay, the harder it will be to look into other opportunities.  Besides, one of the core Intel values is supposed to be risk taking, right? <a href="http://intelepeer.com/"><img class="alignright" src="http://www.intelepeer.com/images/logo.jpg" alt="" width="195" height="40" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyslade.com/2010/04/moving-on-from-intel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenFlashChart &#8212; loading data via javascript</title>
		<link>http://jeremyslade.com/2009/10/openflashchart-loading-data-via-javascript/</link>
		<comments>http://jeremyslade.com/2009/10/openflashchart-loading-data-via-javascript/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 06:47:05 +0000</pubDate>
		<dc:creator>jeremy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jeremyslade.com/?p=71</guid>
		<description><![CDATA[
I&#8217;m just getting started using OFC2 to render charts for a project.  I specifically want to include all the data in the initial page load, rather than require another request to the server (the standard way to do it w/ OFC2).  The library provides a mechanism for this, but it is described as hard, &#8216;for [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-72" href="http://jeremyslade.com/2009/10/openflashchart-loading-data-via-javascript/ofc_sample/"><img class="size-full wp-image-72 alignleft" style="margin: 2px;" title="OFC2 sample chart" src="http://jeremyslade.com/wp-content/uploads/2009/10/ofc_sample.jpg" alt="OFC2 sample chart" width="200" height="115" /></a></p>
<p>I&#8217;m just getting started using <a href="http://teethgrinder.co.uk/open-flash-chart-2/">OFC2</a> to render charts for a project.  I specifically want to include all the data in the initial page load, rather than require another request to the server (the standard way to do it w/ OFC2).  The library provides a mechanism for this, but it is described as hard, &#8216;<a href="http://teethgrinder.co.uk/open-flash-chart-2/tutorial-5.php">for advanced users only</a>&#8216;.  After slogging through it for a few hours today, I finally arrived at the key.</p>
<p>The data to be loaded in to a chart has to be passed to the OFC2 swf object as a <a href="http://json.org/">JSON</a> string (not a javascript object).  The OFC2 download package includes the <a href="http://www.json.org/json2.js">json2.js</a> javascript library to create JSON string from objects.  The problem is, it produces bad output.</p>
<p>Just as example, here a simple javascript object that defines a basic OFC2 bar chart (the image at the start of this post):</p>
<p><code>var d = { elements: [{type:'bar_glass',values:[1,2,4,8,4,2,1]}],<br />
title: { text: "test data" } };</code></p>
<p>JSON.stringify(d) produces the following:</p>
<p><code>{"elements":"[{\"type\": \"bar_glass\", \"values\": [1, 2, 4, 8, 4, 2, 1]}]","title":{"text":"test data"}}</code></p>
<p>The array value for &#8220;elements&#8221; was turned into a quoted string.  When this JSON is parsed, it will be interpreted as a quoted string, not an array.  Fail.</p>
<p>The latest OFC2 version as of this writing (Lug Wyrm Charmer) contains a json2.js version dated 2008-03-24.  The latest version from json.org is dated 2009-09-29, but it&#8217;s still broken.  Use a better javascript library, such as <a href="http://prototypejs.org/">prototype</a> &#8212; In my testing, using the <a href="http://api.prototypejs.org/language/object.html#tojson-class_method">Object.toJSON()</a> method from prototype instead of JSON.stringify() worked perfectly.</p>
<p>So here&#8217;s a full working example (apologies for the formatting):</p>
<p><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;ofc test&lt;/title&gt;<br />
&lt;script type="text/javascript" src="swfobject.js"&gt;&lt;/script&gt;<br />
&lt;script type="text/javascript" src="prototype.js"&gt;&lt;/script&gt;<br />
&lt;script type="text/javascript"&gt;<br />
swfobject.embedSWF("open-flash-chart.swf", "my_chart", "250", "200", "9.0.0",<br />
"expressInstall.swf", {"get-data":"load_data"});</code></p>
<p>function load_data() {<br />
var data = { elements: [{type:'bar_glass',values:[1,2,4,8,4,2,1]}],<br />
title: { text: &#8220;test data&#8221; } };<br />
return Object.toJSON(data);<br />
}<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div id=&#8221;my_chart&#8221;&gt;&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyslade.com/2009/10/openflashchart-loading-data-via-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>windows change caps lock into a control key</title>
		<link>http://jeremyslade.com/2009/09/windows-change-caps-lock-into-a-control-key/</link>
		<comments>http://jeremyslade.com/2009/09/windows-change-caps-lock-into-a-control-key/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 06:47:10 +0000</pubDate>
		<dc:creator>jeremy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jeremyslade.com/?p=66</guid>
		<description><![CDATA[This is old stuff, but I recently had to re-find this:
Change Caps Lock into a Control key: caps_lock_to_control.reg (via johnhaller.com)
That&#8217;s one of the first thing that goes on when I setup WinXP.  I have zero experience with Vista.  I wonder what changes for Win7?
]]></description>
			<content:encoded><![CDATA[<p>This is old stuff, but I recently had to re-find this:</p>
<p>Change Caps Lock into a Control key: <a href="http://johnhaller.com/jh/useful_stuff/disable_caps_lock/caps_lock_to_control.reg">caps_lock_to_control.reg</a> (via <a href="http://johnhaller.com/jh/useful_stuff/disable_caps_lock/caps_lock_to_control.reg">johnhaller.com</a>)</p>
<p>That&#8217;s one of the first thing that goes on when I setup WinXP.  I have zero experience with Vista.  I wonder what changes for Win7?</p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyslade.com/2009/09/windows-change-caps-lock-into-a-control-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CowPotato at BDNT</title>
		<link>http://jeremyslade.com/2009/09/cowpotato-at-bdnt/</link>
		<comments>http://jeremyslade.com/2009/09/cowpotato-at-bdnt/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 06:24:44 +0000</pubDate>
		<dc:creator>jeremy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[bdnt]]></category>
		<category><![CDATA[CowPotato]]></category>
		<category><![CDATA[game]]></category>

		<guid isPermaLink="false">http://jeremyslade.com/?p=60</guid>
		<description><![CDATA[I presented CowPotato at the BDNT meetup in Boulder tonight &#8212; it went well except for having no audio for the gameplay video.  The crowd seemed to enjoy it all the same.  Generated some good laughs, and some good feedback.  Too bad I was probably the only Android user in the house&#8230;

CowPotato [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.froogloid.com/cowpotato"><img alt="" src="http://lh4.ggpht.com/_477U0D9RPP8/SoiwH9XQPtI/AAAAAAAAApw/rlmWt4tFm_o/cowpotato300.png" title="CowPotato" class="alignleft" width="80" height="80" /></a>I presented <a href="http://www.froogloid.com/cowpotato">CowPotato</a> at the <a href="http://www.bdnewtech.com/">BDNT meetup in Boulder</a> tonight &#8212; it went well except for having no audio for the gameplay video.  The crowd seemed to enjoy it all the same.  Generated some good laughs, and some good feedback.  Too bad I was probably the only <a href="http://www.android.com/">Android</a> user in the house&#8230;</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/KuBbH4uqqz4&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/KuBbH4uqqz4&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>CowPotato is nowhere near done.  We had to rush to finish up a bunch of things to <a href="http://www.froogloid.com/froogloid/wish-us-luck-adc-2-cowpotato%e2%84%a2-has-been-submitted">submit</a> to <a href="http://code.google.com/android/adc/">ADC2</a>.  We plan to continue polishing it and adding gameplay features over the coming weeks.  No plan yet on how / if / when to start charging or otherwise generate some revenue.</p>
<p>And hopefully in the near future I&#8217;m going to start putting some content up over on <a href="http://crazyheadgames.com/">CrazyheadGames.com</a> &#8212; some additional games, some android tutorials, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyslade.com/2009/09/cowpotato-at-bdnt/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CowPotato game for Android &#8212; beta demo video</title>
		<link>http://jeremyslade.com/2009/08/cowpotato-game-for-android-beta-demo-video/</link>
		<comments>http://jeremyslade.com/2009/08/cowpotato-game-for-android-beta-demo-video/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 04:42:29 +0000</pubDate>
		<dc:creator>jeremy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jeremyslade.com/?p=56</guid>
		<description><![CDATA[
I&#8217;ve been working on CowPotato for Android, with the guys at Froogloid.  We&#8217;re getting close to being done, driving to the deadline for the Android Developer Challenge 2 (Aug 31).
Restarting with Java from scratch, OpenGL ES, Android, etc &#8212; there&#8217;s been a big learning curve to get to this point.  I&#8217;m looking forward [...]]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/fKk0hgEpoqM&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/fKk0hgEpoqM&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>I&#8217;ve been working on <a href="http://www.cyrket.com/package/com.froogloid.android.cowpotato">CowPotato</a> for Android, with the guys at <a href="http://froogloid.com/cowpotato">Froogloid</a>.  We&#8217;re getting close to being done, driving to the deadline for the <a href="http://code.google.com/android/adc/">Android Developer Challenge 2</a> (Aug 31).</p>
<p>Restarting with Java from scratch, OpenGL ES, Android, etc &#8212; there&#8217;s been a big learning curve to get to this point.  I&#8217;m looking forward to working on more Android games to comes.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyslade.com/2009/08/cowpotato-game-for-android-beta-demo-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixed my ubuntu sound problems</title>
		<link>http://jeremyslade.com/2009/07/fixed-my-ubuntu-sound-problems/</link>
		<comments>http://jeremyslade.com/2009/07/fixed-my-ubuntu-sound-problems/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 03:57:45 +0000</pubDate>
		<dc:creator>jeremy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jeremyslade.com/?p=53</guid>
		<description><![CDATA[I have been enjoying my recent upgrade to Ubuntu 9.04.  Suddenly started having sound problems, however &#8212; no idea how/when/why this started happening.
But the symptom is that all sound stops, and I just hear static when sound is supposed to be playing.  Well I finally found the answer: turn up the volume.  [...]]]></description>
			<content:encoded><![CDATA[<p>I have been <a href="http://twitter.com/jslade/status/2432326959">enjoying</a> my recent upgrade to <a href="http://www.ubuntu.com/">Ubuntu</a> 9.04.  Suddenly started having sound problems, however &#8212; no idea how/when/why this started happening.</p>
<p>But the symptom is that all sound stops, and I just hear static when sound is supposed to be playing.  Well I finally <a href="http://ubuntuforums.org/archive/index.php/t-1018321.html">found the answer</a>: turn up the volume.  Seems the PCM device gets muted somehow, and ALSA produces static instead of nothing in that case.  Go figure.  Turning the volume up for PCM in the ALSA mixer gets things back to normal.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyslade.com/2009/07/fixed-my-ubuntu-sound-problems/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://jeremyslade.com/2009/07/50/</link>
		<comments>http://jeremyslade.com/2009/07/50/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 03:34:43 +0000</pubDate>
		<dc:creator>jeremy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jeremyslade.com/?p=50</guid>
		<description><![CDATA[I have been enjoying my recent upgrade to Ubuntu 9.04.  Suddenly started having sound problems, however &#8212; no idea how/when/why this started happening.
But the symptom is that all sound stops, and I just hear static when sound is supposed to be playing.  Well I finally found the answer: turn up the volume.  [...]]]></description>
			<content:encoded><![CDATA[<p>I have been <a href="http://twitter.com/jslade/status/2432326959">enjoying</a> my recent upgrade to <a href="http://www.ubuntu.com/">Ubuntu</a> 9.04.  Suddenly started having sound problems, however &#8212; no idea how/when/why this started happening.</p>
<p>But the symptom is that all sound stops, and I just hear static when sound is supposed to be playing.  Well I finally <a href="http://ubuntuforums.org/archive/index.php/t-1018321.html">found the answer</a>: turn up the volume.  Seems the PCM device gets muted somehow, and ALSA produces static instead of nothing in that case.  Go figure.  Turning the volume up for PCM in the ALSA mixer gets things back to normal.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyslade.com/2009/07/50/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alibaba OpenGL game project source code</title>
		<link>http://jeremyslade.com/2009/06/alibaba-opengl-game-project-source-code/</link>
		<comments>http://jeremyslade.com/2009/06/alibaba-opengl-game-project-source-code/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 07:21:51 +0000</pubDate>
		<dc:creator>jeremy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jeremyslade.com/?p=41</guid>
		<description><![CDATA[I&#8217;m working on some OpenGL-based games for Android, so I pulled out code for a project I did for a class at Stanford in 2003 &#8212; my first and only game to date.  It was fun to reminisce, and perhaps someone else might have some fun with the code (see below).
From the README, describing the [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 410px"><a href="http://jeremyslade.com/pub/code_samples/alibaba-cs148/alibaba-cs148-shot1.png"><img src="http://jeremyslade.com/pub/code_samples/alibaba-cs148/alibaba-cs148-shot1.png" alt="alibaba game project for Stanford cs148" width="400" height="300" /></a><p class="wp-caption-text">&#39;alibaba&#39; game project for Stanford cs148</p></div>
<p>I&#8217;m working on some OpenGL-based games for <a href="http://android.com/">Android</a>, so I pulled out code for a project I did for a <a href="http://cs148.stanford.edu/">class at Stanford</a> in 2003 &#8212; my first and only game to date.  It was fun to reminisce, and perhaps someone else might have some fun with the code (see below).</p>
<p>From the <a href="http://jeremyslade.com/pub/code_samples/alibaba-cs148/README.txt">README</a>, describing the basics of the game:</p>
<blockquote><p>You control a flying magic carpet, pursuing Ali Baba and his 40<br />
thieves across the desert.  The object is to kill all of the thieves,<br />
by lobbing exploding coconuts at them, before they make it to the<br />
safety of their cave.</p></blockquote>
<p>And of course this great memory, also from the <a href="http://jeremyslade.com/pub/code_samples/alibaba-cs148/README.txt">README</a>:</p>
<blockquote><p>Just for humor: my two sons (5 &amp; 3) were very fascinated with the<br />
game, anxiously following the development.  One night they were<br />
sitting on my lap actually playing it, when the 5-yr-old puked up all<br />
over my desk, keyboard, red book, laptop, etc (vertigo?)  That was a<br />
bit of a setback <img src='http://jeremyslade.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p></blockquote>
<p>The sacrifices we make to bring you great games&#8230;</p>
<p>I had to hack the source a bit to build with more recent versions of g++ etc.  I&#8217;ve included two tarballs with the full source plus binaries for two platforms:</p>
<ul>
<li><strong>WinXP -</strong> <a href="http://jeremyslade.com/pub/code_samples/alibaba-cs148/alibaba-cs148-winxp-cygwin.zip">alibaba-cs148-winxp-cygwin.zip</a></li>
<li><strong>Ubuntu 9.04 </strong>- <a href="http://jeremyslade.com/pub/code_samples/alibaba-cs148/alibaba-cs148-ubuntu-904.tar.gz">alibaba-cs148-ubuntu-904.tar.gz</a></li>
</ul>
<p>Enjoy!  You&#8217;re free to use the code however you want (except to claim it as your own and submit it for another school project)</p>
<p>BTW &#8212; Nothing there yet, but I&#8217;ll be putting the Android games over on <a href="http://crazyheadgames.com//">CrazyheadGames.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyslade.com/2009/06/alibaba-opengl-game-project-source-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating rails app from sqlite to mysql</title>
		<link>http://jeremyslade.com/2009/04/migrating-rails-app-from-sqlite-to-mysql/</link>
		<comments>http://jeremyslade.com/2009/04/migrating-rails-app-from-sqlite-to-mysql/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 08:05:56 +0000</pubDate>
		<dc:creator>jeremy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jeremyslade.com/?p=32</guid>
		<description><![CDATA[I run a pretty simple rails site for pickup ultimate games in Fort Collins, hosted at Dreamhost.  For many months, it had been working just fine using sqlite for the database.  Somehow in the last few weeks, it developed a locking issue and has just not worked right since.
Why the locking issue all [...]]]></description>
			<content:encoded><![CDATA[<p>I run a pretty simple rails site for <a href="http://fcultimate.net/">pickup ultimate games</a> in Fort Collins, hosted at <a href="http://dreamhost.com/">Dreamhost</a>.  For many months, it had been working just fine using sqlite for the database.  Somehow in the last few weeks, it developed a locking issue and has just not worked right since.</p>
<p>Why the locking issue all of a sudden?  Perhaps it experienced concurrent requests for the first time?  Maybe some change to dreamhost&#8217;s NFS setup, or the mod_rails/passenger setup?  Who knows.  But whatever the reason, sqlite was no longer working, so I migrated the site to mysql.</p>
<p>Two steps involved: create the mysql databases, and transfer the data from the sqlite dbs to the mysql db&#8217;s.  I was using sqlite because it was easy, essentially no overhead for setup / admin (at a cost, obviously).  I created a devel and test db on my mysql instance at home, and the production db on the dreamhost-provided mysql server.  Updated the rails config to match.</p>
<p>Migrating the data was the only part with any gotchas.  In theory, something like this should work:</p>
<pre name="code" class="bash">
echo .dump | sqlite3 production.sqlite3 |  \
    mysql -u username --password="passwd" -h myhost production
</pre>
<p>Dump from sqlite, import directly into mysql.  The issue is some <a href="http://stackoverflow.com/questions/18671/quick-easy-way-to-migrate-sqlite3-to-mysql">differences in the SQL dialect between sqlite and mysql</a>.  See that article at StackOverflow for the details, but it ended up being a matter of a few minor edits to be able to import the dump into the new mysql production database.</p>
<p>I expect many more months of smooth sailing from here&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyslade.com/2009/04/migrating-rails-app-from-sqlite-to-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
