<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
 
 <title>Joshua Wood</title>
 
 <link href="http://joshuawood.net" />
 <updated>2012-02-14T14:16:30-08:00</updated>
 <id>http://joshuawood.net</id>
 <author>
   <name>Joshua Wood</name>
   <email>josh@joshuawood.net</email>
 </author>

 
 <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/joshuap" /><feedburner:info uri="joshuap" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><entry>
   <title>Happy Valentine's Day</title>
   <link href="http://joshuawood.net/valentine" />
   <updated>2012-02-14T13:22:00-08:00</updated>
   <id>hhttp://joshuawood.net/valentine</id>
   <content type="html">&lt;p&gt;When my wife and I were dating, we communicated a lot via text messages because she lived in CA, while I was in WA. The year we were married, I wrote a little PHP script to take my iPhone's sms.db file and turn it into a searchable archive of our conversations, as a gift for Valentine's day. I'm sure she didn't fully understand the level of nerd it takes to code a Valentine's day present, but in any case it was a hit.&lt;/p&gt;

&lt;p&gt;I have since moved to programming Ruby (and haven't looked back), so this year I thought it would be fun to upgrade the "codebase". I ended up using Sinatra for the server; anything else but a bare Rack app would be excessive. Including a HAML template with inline CSS, it's 42 lines of code. Without the template, it's 11.&lt;/p&gt;

&lt;p&gt;Happy Valentine's Day, Kay. Looking forward to 60+ years of archives :).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/joshuap/valentine"&gt;View the code at Github&lt;/a&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Hearsay - An Active Record extension for tracking mentions</title>
   <link href="http://joshuawood.net/rails-hearsay" />
   <updated>2012-01-24T17:53:00-08:00</updated>
   <id>hhttp://joshuawood.net/rails-hearsay</id>
   <content type="html">&lt;p&gt;Last year I created a small project manager in Ruby on Rails that among other things lets the users reference (or mention) tickets by number when posting messages and comments. Each ticket is assigned a unique number, beginning with 1. So when I reference "ticket #1" in a comment on an otherwise unrelated message, the system is smart enough to know that the ticket exists, and will automatically link to it in my comment.&lt;/p&gt;

&lt;p&gt;Instead of just scanning the body of the comment for any pattern matching "#n" on the fly and assuming the ticket exists, I decided it would be better to scan the body once when the comment is created, and implicitly check each match to make sure that a ticket with that number exists. If it does, then an association between the comment and the ticket is created using a join table.&lt;/p&gt;

&lt;p&gt;Using a join table for this purpose has a few benefits. For instance, I can easily search for all comments referencing a specific ticket without using a regular expression in the query. It also ensures that the reference was intentional, or at least the ticket existed at the time the comment was created. If I wanted to get really fancy, I could allow the user to remove a reference that incidentally happens to match the search pattern.&lt;/p&gt;

&lt;p&gt;I had originally built this as a simple Rails plugin in vendor/plugins, but since those plugins are now deprecated in Rails 3.2, it was a good opportunity to package it as a gem and release into the wild.&lt;/p&gt;

&lt;p&gt;So, I'm introducing a little gem called "hearsay" that aids in creating associations between model attributes and other models:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/joshuap/hearsay" title="Hearsay on Github"&gt;https://github.com/joshuap/hearsay&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I've included basic usage instructions in the readme, but the code is documented with all the available options if you want to dig deeper.&lt;/p&gt;

&lt;p&gt;Because the regular expression and finder method are configurable, this could be used for any situation where you want to match some text and use it to associate other objects; one alternative example could be twitter style mentions, where the regular expression is &lt;code&gt;/@(\w+)/i&lt;/code&gt; and the finder might be &lt;code&gt;find_by_username&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I'm considering this beta until I can get around to writing some tests. Contributions and suggestions are welcome.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Piracy is actually a problem</title>
   <link href="http://joshuawood.net/piracy-is-actually-a-problem" />
   <updated>2012-01-19T15:27:00-08:00</updated>
   <id>hhttp://joshuawood.net/piracy-is-actually-a-problem</id>
   <content type="html">&lt;p&gt;I've been a pirate since I was 12 years old. Growing up with the Internet in the 90s, there were no guidelines for appropriate digital behavior;
everything was pretty much fair game. After discovering the then ripe world of anonymous FTP servers, I quickly amassed thousands of mp3s, cracked
copies of all the latest software, and plenty of malware that fortunately I never got too carried away with... (I also hate to think how much I
unwittingly acquired.)&lt;/p&gt;

&lt;p&gt;Come to think of it, much of my early computer knowledge was learned from pirated software. My first (albeit terrible) websites were made with cracked
copies of Photoshop 5, and Dreamweaver (*cough* and &lt;a href="http://en.wikipedia.org/wiki/NetObjects_Fusion"&gt;Net Objects Fusion&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;As I ventured through my later teen years and into adulthood, the concept of "pirating" just did not exist for me. It was content I needed, it was there
for the taking, so I downloaded it. I never thought of it as "stealing". It was almost like it was mine already, since in a way I viewed the web as an
extension of my own machine.&lt;/p&gt;

&lt;p&gt;It wasn't until recently that my view of digital content and the web began to shift. Oddly enough, it did not begin with SOPA, PIPA, or any
of the other piracy issues that have been raised. It began with music.&lt;/p&gt;

&lt;p&gt;I have always loved music. Thanks to those early unprotected FTPs, peer-to-peer services like Napster and Kazaa, and most recently BitTorrent, I've
listened to a lot of it. I've even purchased some of it (note: sarcasm).&lt;/p&gt;

&lt;p&gt;Over the past few years, however, I have begun to love music less. I began to notice this slowly at first, but it has become increasingly obvious, that
I do not listen to as much music as I used to, and when I do, I don't appreciate it as much. There is so much of it, and while I know there are plenty
of great artists out there waiting to be discovered, I think that having such a limitless collection at my fingertips has become overwhelming. I've also
wondered if maybe I don't appreciate it because I haven't attached any real value to it.&lt;/p&gt;

&lt;p&gt;Years ago, out of some twisted moralism, I decided to "go legit" with all of my software (i.e., shell out thousands of dollars) because it is my
livelihood, and somehow I reasoned that it would be wrong to profit from software that I hadn't paid for. More recently, however, it has begun to sink
in that all bits do actually matter.&lt;/p&gt;

&lt;p&gt;The thing about SOPA (and friends), is that there really is an underlying issue here. Obviously, tightening down on the web is not the answer. The
Internet is a vital part of our tradition of democracy and free speech, and to preserve these freedoms, we must take the good with the bad. But I'll be
the first to admit that demanding my freedom with BitTorrent running in the background makes me a pretty big hypocrite.&lt;/p&gt;

&lt;p&gt;I don't believe that any of this legislation is truly about stopping piracy, but the fact remains that piracy really is wrong, and we can't effectively
fight bills like SOPA with one hand in the cookie jar. In order to truly stop piracy, perceptions about piracy need to change. That can only happen
through responsibility and respect for all property.&lt;/p&gt;

&lt;p&gt;Today I am taking responsibility for my own part of the problem, and am formatting several terabytes worth of content that I never really needed in the first
place. While I don't feel this is too large a sacrifice for me, it's something that I have been putting off. Today seemed like a good day for it.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Twitter Bootstrap is ruining the Internet</title>
   <link href="http://joshuawood.net/twitter-bootstrap-is-ruining-the-internet" />
   <updated>2011-12-08T18:45:00-08:00</updated>
   <id>hhttp://joshuawood.net/twitter-bootstrap-is-ruining-the-internet</id>
   <content type="html">&lt;p&gt;I'm really, really tired of seeing apps and blogs using Twitter's
Bootstrap toolkit. I completely understand the draw; it "bootstraps"
your idea/design/what-have-you. Why pay a designer (or try to design it
yourself) when Twitter and others have already done the work for
you? For one, your site will look like Twitter. But you lose more than just
originality. The design process is a big part of discovering exactly how
your interface functions best for its intended purpose, and when you
outsource that process to a toolkit like Bootstrap, you're left in a
cozy little box that is hard to break out of.&lt;/p&gt;

&lt;p&gt;Truth be told, I'm one of the worst offenders when it comes to taking
the easy way out, especially regarding design (take this blog,
for example. I designed it myself... :)) It doesn't have to be this
way, though, and I am going to do my best to change.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>How to Deploy Jekyll/Octopress to Heroku</title>
   <link href="http://joshuawood.net/how-to-deploy-jekyll-slash-octopress-to-heroku" />
   <updated>2011-09-16T11:42:00-07:00</updated>
   <id>hhttp://joshuawood.net/how-to-deploy-jekyll-slash-octopress-to-heroku</id>
   <content type="html">&lt;p&gt;I recently migrated my WordPress blog to &lt;a href="http://octopress.org/"&gt;Octopress&lt;/a&gt;, which is a blogging framework for &lt;a href="https://github.com/mojombo/jekyll"&gt;Jekyll&lt;/a&gt;, the static site generator.&lt;/p&gt;

&lt;p&gt;When I was researching my options for moving my blog to Jekyll, I had some reservations about using Octopress versus just rolling my own layout for Jekyll. I wanted to deploy to &lt;a href="http://pages.github.com/"&gt;Github Pages&lt;/a&gt;, but I really hated the deployment strategy that comes with Octopress. Since Github Pages actually runs Jekyll, I didn't like the thought of having to keep my Jekyll source on a 'source' branch and deploying the generated static site to my master branch just to get it to play nice with Github. This was before I realized that I'd probably need at least a few plugins if I wanted to mimic the behavior of my WordPress site. The more I looked at Github Pages, the more I began to think it wasn't for me...&lt;/p&gt;

&lt;p&gt;So then I started looking at &lt;a href="http://www.heroku.com/"&gt;Heroku&lt;/a&gt;, and was confronted with an even uglier (albeit simpler) deployment strategy: check the systematically generated /public directory into source control. With a populated public directory, Octopress is a fully qualified rack application, and Heroku has no problem running it just like any other application. But I didn't want to clutter up my master branch with a public directory where a majority of the files are likely to change on almost every commit. My solution was to merge the Github strategy with the existing Heroku strategy, adding a little extra GIT flavor.&lt;/p&gt;

&lt;!-- more --&gt;

&lt;p&gt;First, I created a _heroku directory, and copied the Octopress config.ru and Gemfile. On the Gemfile, I ditched everything except the Sinatra dependency:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;code class="ruby"&gt;&lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;http://rubygems.org&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;sinatra&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;1.2.6&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;I added a public folder and created a "hello world" index.html file in it, just to have something to push up to Heroku before figuring out the actual deploy. Heroku doesn't need anything else to run the static site, so now all I needed was to populate the public folder with my static site output from Jekyll, and push the entire thing to Heroku.&lt;/p&gt;

&lt;p&gt;I decided to write a Rake task similar to the :push deploy task for Github Pages that comes with Octopress, but first I needed to create my Heroku application and push up an initial deploy:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;code class="sh"&gt;gem install heroku
&lt;span class="nb"&gt;cd &lt;/span&gt;_heroku
git init .
git add .
git commit -am &lt;span class="s2"&gt;&amp;quot;initial commit&amp;quot;&lt;/span&gt;
heroku create
git push heroku master
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;With that completed, I was able to launch my fresh Heroku app in my browser and see "Hello World" from the index.html file I had created. Note that instead of cloning an existing repository or creating a separate branch, I simply initialized a new git repository. This repository will be automatically picked up by my parent "source" repository and committed as a sub-repository which is then tracked by the most recent commit. I feel this is a lot cleaner than committing the static output to my Octopress repository, and is the point of this entire post.&lt;/p&gt;

&lt;p&gt;Finally, I created a Rake task to copy my Jekyll /public directory (where the static files are generated) to _heroku/public, commit the result, and then push the sub-repository to Heroku. The code is pretty similar to the Github push method:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;code class="ruby"&gt;  &lt;span class="n"&gt;desc&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;deploy basic rack app to heroku&amp;quot;&lt;/span&gt;
  &lt;span class="n"&gt;multitask&lt;/span&gt; &lt;span class="ss"&gt;:heroku&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
    &lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;## Deploying to Heroku &amp;quot;&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;Dir&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;deploy_dir&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/public/*&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;each&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;rm_rf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nb"&gt;system&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;cp -R &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;public_dir&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/* &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;deploy_dir&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/public&amp;quot;&lt;/span&gt;
    &lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;## copying &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;public_dir&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; to &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;deploy_dir&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/public&amp;quot;&lt;/span&gt;
    &lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;deploy_dir&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
      &lt;span class="nb"&gt;system&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;git add .&amp;quot;&lt;/span&gt;
      &lt;span class="nb"&gt;system&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;git add -u&amp;quot;&lt;/span&gt;
      &lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;## Committing: Site updated at &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="no"&gt;Time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;utc&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
      &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Site updated at &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="no"&gt;Time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;utc&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
      &lt;span class="nb"&gt;system&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;git commit -m &amp;#39;&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#39;&amp;quot;&lt;/span&gt;
      &lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;## Pushing generated &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;deploy_dir&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; website&amp;quot;&lt;/span&gt;
      &lt;span class="nb"&gt;system&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;git push heroku &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;deploy_branch&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
      &lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;## Heroku deploy complete&amp;quot;&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;To make this the default deploy method, I changed a few config settings at the top of the Rakefile:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;code class="ruby"&gt;&lt;span class="n"&gt;deploy_default&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;heroku&amp;quot;&lt;/span&gt;
&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;.&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;deploy_branch&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;master&amp;quot;&lt;/span&gt;
&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;.&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;deploy_dir&lt;/span&gt;     &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;_heroku&amp;quot;&lt;/span&gt;   &lt;span class="c1"&gt;# deploy directory (for Github pages deployment)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;And that's it! I gave the new code a try:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;code class="sh"&gt;rake generate
rake deploy
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Everything seemed to go alright, so I fired up my browser and there was my shiny new Octopress blog, with free hosting, and a deployment strategy that doesn't suck.&lt;/p&gt;

&lt;p&gt;Know a better way? &lt;a href="#disqus_thread"&gt;I'd welcome the input&lt;/a&gt; :).&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Validating URL/URI in Ruby on Rails 3</title>
   <link href="http://joshuawood.net/validating-url-in-ruby-on-rails-3" />
   <updated>2011-04-29T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/validating-url-in-ruby-on-rails-3</id>
   <content type="html">&lt;p&gt;I ran into an issue on a client project this week where we needed to &lt;strong&gt;validate a URL&lt;/strong&gt; in our &lt;strong&gt;Ruby on Rails application&lt;/strong&gt;, but wanted to check that it actually existed in addition to validating the format with a regular expression. After some minor searching, I ran across &lt;a title="Validating URL/URI in Ruby on Rails" href="http://www.igvita.com/2006/09/07/validating-url-in-ruby-on-rails/" target="_blank"&gt;Ilya Grigorik's blog&lt;/a&gt; (that's been happening a lot lately for some reason.) He provided a nice little &lt;strong&gt;ActiveRecord validator&lt;/strong&gt; that uses Net:HTTP to ping a domain and validate that it returns a 200 code (HTTPSuccess).&lt;/p&gt;

&lt;p&gt;As it turns out, his post (and thereby his method) was a bit outdated, so I put together an updated validator that takes advantage of the new "&lt;a title="Sexy Validation in Edge Rails (Rails 3)" href="http://thelucid.com/2010/01/08/sexy-validation-in-edge-rails-rails-3/" target="_blank"&gt;sexy validations&lt;/a&gt;" provided in Rails 3. And here it is:&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;&lt;script src="https://gist.github.com/948880.js?file=uri_validator.rb"&gt;&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;To get up and running, create a new file in your Rails lib directory called "uri_validator.rb", and copy/paste the above code. If you have added the lib directory to your autoload paths, then you're done! Otherwise, you'll want to include the file in your environment.rb or application.rb files (in your config directory) like so:&lt;/p&gt;

&lt;p&gt;&lt;script src="https://gist.github.com/948880.js?file=environment.rb"&gt;&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;Finally, to use the new sexy validator, simply add the :uri option to any existing &lt;em&gt;validates&lt;/em&gt; call:&lt;/p&gt;

&lt;p&gt;&lt;script src="https://gist.github.com/948880.js?file=model.rb"&gt;&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;This allows you to specify a custom format (must be a valid regular expression); otherwise, the format will default to &lt;strong&gt;URI::regexp(%w(http https))&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;There it is, if you come up with your own variations of the validator or regex, don't forget to tell me about them!&lt;/p&gt;

&lt;p&gt;By the way, just wanted to give a personal shout out to Ilya for his fantastic support of his new non-blocking &lt;a title="EventMachine" href="http://rubyeventmachine.com/" target="_blank"&gt;EventMachine&lt;/a&gt; based ruby web server, &lt;a title="Goliath Ruby Non-Blocking Web Server" href="http://goliath.io" target="_blank"&gt;Goliath&lt;/a&gt;. Hey man, you might want to change the name to &lt;a title="David and Goliath" href="http://en.wikipedia.org/wiki/Goliath" target="_blank"&gt;David&lt;/a&gt;: I was going to make some crack here about his &lt;a title="Sling (weapon)" href="http://en.wikipedia.org/wiki/Sling_(weapon)" target="_blank"&gt;sling&lt;/a&gt; (not to be - or maybe? - confused with &lt;a title="David's Sling Missile" href="http://en.wikipedia.org/wiki/David's_Sling" target="_blank"&gt;David's Sling&lt;/a&gt;) being asynchronous, but you get the idea :). Anyway, rock on.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>HDR Photos from Costa Rica</title>
   <link href="http://joshuawood.net/costa-rica-hdr" />
   <updated>2010-10-02T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/costa-rica-hdr</id>
   <content type="html">&lt;p align="center"&gt;&lt;a href="http://www.flickr.com/photos/distancetohere/5037621334"&gt;&lt;img title="Puerto Viejo, Costa Rica" src="http://assets.distancetohere.com/2010/10/MG_8992_3_4_tonemapped_topaz_1280-580x385.jpg" alt="Puerto Viejo, Costa Rica" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My new wife and I traveled to &lt;strong&gt;Puerto Viejo, Costa Rica&lt;/strong&gt; this month for our honeymoon. It was great to have some time to unwind after the wedding as well as unplug from the digital world. I'm proud to say I happily went over a week without my laptop and other devices... I did bring my iPhone along, but it only came out a few times to check itineraries and keep an eye on the bank account. The people of Costa Rica are wonderful and we made a lot of new friends that I hope we can keep in touch with.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Above:&lt;/strong&gt; Waiting for a bus to San José in Puerto Viejo, Costa Rica&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/distancetohere/sets/72157625062158310"&gt;Check out the whole set &amp;raquo;&lt;/a&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>S. Carey</title>
   <link href="http://joshuawood.net/s-carey" />
   <updated>2010-08-19T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/s-carey</id>
   <content type="html">&lt;p&gt;&lt;img class="aligncenter size-large wp-image-537" title="scarey5" src="http://assets.distancetohere.com/2010/08/scarey5-580x386.jpg" alt="" width="580" height="386" /&gt;&lt;/p&gt;

&lt;p&gt;There have been some good albums this year, but I think this might be my favorite.
&lt;br /&gt;&lt;blockquote&gt;The debut album from S. Carey, All We Grow, is the result of a young  lifetime spent immersed in music. As a band member of Bon Iver from the  very beginning, Sean Carey witnessed a flip of his formal training to  step firmly into a worldwide-touring rock band. His performance degree  in classical percussion from the University of Wisconsin - Eau Claire  and his love for jazz drumming prepared him for a central role in the  inspiring force of the Bon Iver live show.&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;a href="http://assets.distancetohere.com/2010/08/inthedirt.mp3"&gt;In The Dirt&lt;/a&gt;&lt;br /&gt;
  &lt;a href="http://assets.distancetohere.com/2010/08/inthestream.mp3"&gt;In The Stream&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a title="All We Grow - First Listen" href="http://www.npr.org/templates/story/story.php?storyId=128958397" target="_blank"&gt;Listen to the entire album on NPR&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="Pre-order &amp;quot;All We Grow&amp;quot; on Jagjaguwar" href="http://www.scdistribution.com/cat/scd_catalog.php?usersearch=S. Carey" target="_blank"&gt;Pre-order on Jagjaguwar&lt;/a&gt; or &lt;a title="Pre-order &amp;quot;All We Grow&amp;quot; on Amazon" href="http://www.amazon.com/All-We-Grow-S-Carey/dp/B003TTZSVK/" target="_blank"&gt;Amazon&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Michael Gungor</title>
   <link href="http://joshuawood.net/michael-gungor" />
   <updated>2010-08-05T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/michael-gungor</id>
   <content type="html">&lt;p&gt;
  &lt;a href="http://assets.distancetohere.com/2010/07/gungor.jpeg"&gt;&lt;img class="aligncenter size-large wp-image-460" title="gungor" src="http://assets.distancetohere.com/2010/07/gungor-580x265.jpg" alt="" width="580" height="265" /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;I like pretty much everything about &lt;a href="http://www.gungormusic.com/"&gt;Michael Gungor&lt;/a&gt; and his band of musical gypsies (I don't know that they're gypsies, just speculating.) I started to write a dissertation on "Christian" vs. "Non-Christian" music, but for Michael's sake, I will leave that for another post. Let's just say that it was a musically refreshing experience to see Gungor play an unfortunately under-promoted and undersold show at &lt;a href="http://www.crossroadschurch.net/"&gt;Crossroads&lt;/a&gt; in Vancouver, WA.&lt;/p&gt;

&lt;p&gt;The band has graciously given me permission to post a free download of their song "&lt;strong&gt;Call me out&lt;/strong&gt;" for one month. Get it before it's gone, and be sure to check out their latest album, &lt;strong&gt;Beautiful Things&lt;/strong&gt; on &lt;a href="http://itunes.apple.com/us/album/beautiful-things/id353582848"&gt;iTunes&lt;/a&gt; or &lt;a href="http://www.amazon.com/Beautiful-Things-Gungor/dp/B0031AV74O"&gt;Amazon&lt;/a&gt;!&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Gungor - Beautiful Things&lt;/strong&gt; (Stream only)&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Gungor - Call Me Out (Downloadable)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Internet induced stress, and its effect on the mind.</title>
   <link href="http://joshuawood.net/internet-and-stress" />
   <updated>2010-07-16T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/internet-and-stress</id>
   <content type="html">&lt;p&gt;For the past couple years, a theory has been growing vaguely in the back of my mind, but recently I've finally been able to shed some light on it. In a nutshell, as the Web becomes more ubiquitous in my every day life, I've felt a ramping level of stress and mental fatigue - and I don't think it's a coincidence.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;It's hard to imagine a life before the smart phone, much less life before the Internet. In the 15 or so years since the Web's world debut, it has evolved beyond a point that few of even the most clairvoyant minds could speculate. The Web has become so essential in day to day life that it would be hard to withdraw even if we wanted to; that is, there is definitely an addictive quality in the fiber optic lines that feed our ever-increasing demand for current, relevant information.&lt;/p&gt;

&lt;p&gt;I am part of the last few generations that can even remember a time before the Web, and part of the first few that do not remember a time before PCs. In fact, my father was writing software in the 70s - the decade before I was born. So, the birth of the Web is almost contemporaneous with my own. I grew up learning to read, write, and type; and while I (thankfully) took to reading as a hobby, I was highly enamored by the computer and the (seemingly) limitless possibilities it offered. Like it or not, the fact of the matter is that much of my childhood was spent behind a computer screen, and that trend has steadily increased into adulthood.&lt;/p&gt;

&lt;p&gt;Now it's 2010, and the Web is basically a mainstay of society. Google, whose stated goal is to "&lt;a href="http://www.google.com/corporate/facts.html" target="_blank"&gt;organize the world's information and make it accessible to everyone&lt;/a&gt;," has already succeeded with a large portion of the world's information, and adds to its index every day. Not only has the Web taken over the way we share information, but the way we share our lives: it has moved beyond the informative and into the social realm. Services such as Facebook, MySpace, and Twitter have already woven themselves into the fabric of our social world in a way that makes them almost indispensable. And it doesn't stop there.&lt;/p&gt;

&lt;p&gt;The Web is unique as a technology in the sense that it is assimilating other technologies. We are spending less time watching our TVs and more time watching the same programs online. Do we even listen to radio anymore? Not usually by choice - and if we do, half the time that's online too. When's the last time you wrote a letter? For that matter, when's the last time you wrote with a pen? (rent checks or grocery lists don't count.) Now books are going online, and even elementary schools are starting to make the switch from paper to internet-enabled digital reading devices. Not to mention clocks, maps, telephone... the list goes on.&lt;/p&gt;

&lt;p&gt;I love the conveniences of the Internet as much as (and maybe more than...) the next person, and maybe that's why I've also begun to worry about the effect that it is having on my mind. For the past couple years I've been having increasing trouble concentrating, formulating complex logic, comprehending reading, and even simply thinking, be it creatively or contemplatively. I've noticed a decrease in patience (not that I had much to begin with) and an increase in scattered, disorganized thinking. I used to love to write creatively, but have not had the attention span or the imagination. Even my sleep has suffered; I rarely dream anymore, and fantasy is all but lost in my dreams. I often wake with the feeling that I spent the night in routine (but mentally taxing) thought patterns; sometimes my dreams are just continuations of the inner monologue that narrates my data-collecting during the day.&lt;/p&gt;

&lt;p&gt;I know I'm not the only one experiencing this. It has been a somewhat discussed issue in the media as of late. Microsoft even lampooned it in their &lt;a href="http://www.microsoft.com/showcase/en/us/details/b2120ca2-e42a-464c-a2f6-2c5a11f0276c" target="_blank"&gt;advertising campaign&lt;/a&gt; for their &lt;a href="http://www.bing.com" target="_blank"&gt;Bing search engine,&lt;/a&gt; depicting victims of "Search overload" and touting Bing as the cure. But is the cure to "Search overload" really smarter search?&lt;/p&gt;

&lt;p&gt;This is basically what had been running through my mind (nebulously) for the past year when I came across an &lt;a href="http://www.forbes.com/2010/05/29/internet-ipad-computers-intelligent-technology-carr.html" target="_blank"&gt;article&lt;/a&gt; about an upcoming book titled, "&lt;a href="http://www.amazon.com/Shallows-What-Internet-Doing-Brains/dp/0393072223/" target="_blank"&gt;The Shallows: What the Internet Is Doing to Our Brains&lt;/a&gt;" by &lt;a href="http://www.roughtype.com/" target="_blank"&gt;Nicholas Carr&lt;/a&gt;. While I am admittedly part of the dwindling few who still go out of their way to read books on paper, this was the first time in a while that I can remember being excited about buying a new release. Carr expertly describes the phenomena of the Information Age without resorting to whistle blowing or finger pointing. Beginning with a history of information-technology, he goes on to show scientifically how our brains adapt to the tools that we use, and while this isn't necessarily a bad thing (without it we wouldn't be able to evolve&lt;sup&gt;1&lt;/sup&gt;), there are always pros and cons. As our brains compensate to increase performance of new abilities, there will always be old ones that are lost.&lt;/p&gt;

&lt;p&gt;Carr's overall premise and final warning is that while computers and the Internet have given us many advantages, including improved productivity and resourcefulness, they also have changed the way we absorb information, and in turn are literally changing the way our brains behave on the neurological level. We may be gaining a wealth of knowledge and the skills to access it, but in turn we're losing our ability for deep, contemplative thinking (among other things). In effect, computers are making us more like themselves.&lt;/p&gt;

&lt;p&gt;I also tend to wonder how valuable this "wealth" of online information really is, when I consider the complex makeup of the human brain. We have designed our technological systems to treat our brains and memory as if they were also digital, when in reality nothing is further from the truth. With all the knowledge in the world at our fingertips, is it possible that we are simply deluding the knowledge that we actually possess? After a heavy session of online searching, sometimes I feel almost more disconnected from the subject than when I started.&lt;/p&gt;

&lt;p&gt;All that being said, I love the Internet. I think it's great to have so much information available in one place. I don't think it would be possible or even plausible to change the technology or boycott it... After all many of us make our living directly or indirectly online, myself included (maybe I should title this "Bitchings of a computer programmer"). I do however think that we should regularly evaluate the tools that we use, and be aware of their effects on our lives. With so many different information sources, services, and devices, I would propose that we are entering an age of "Distraction Management", where our productivity and well being are largely dependent on whether we can harness the power of these tools without them driving us mad.&lt;/p&gt;

&lt;ul class="footnotes"&gt;
  &lt;li&gt;1. Evolution by adaptation, not Darwinian theory.&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Backup SMS (sms.db) on iOS/iPhone4</title>
   <link href="http://joshuawood.net/backup-sms-db-on-ios-iphone4" />
   <updated>2010-06-25T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/backup-sms-db-on-ios-iphone4</id>
   <content type="html">&lt;p&gt;Here is a quick little how-to on backing up your SMS database on your iPhone4 or 4.0 firmware 3G/3GS.&lt;/p&gt;

&lt;!-- more --&gt;

&lt;p&gt;First of all, why backup SMS.db by itself when you can backup your entire iPhone? There are many reasons, but the biggest one will probably be so that you can restore your text messages without moving over other potentially unwanted data that comes with restoring your iPhone from a full backup. Personally, I wanted a fresh start when moving from my 3G to my iPhone4 - except I had 2 years of text messages stored on my 3G that I'd rather not lose. Now that the iPhone4 jailbreak has been released, it should be no problem to pull the sms.db from the 3GS filesystem and copy it over to the iPhone4.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The short-version of the process is as follows:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Upgrade to 4.0 (iOS) firmware first, if you're on a 3G/3Gs.&lt;/li&gt;
	&lt;li&gt;For 3GS and earlier models, jailbreak with &lt;strong&gt;redsn0w&lt;/strong&gt;. You can get the latest &lt;a title="redsn0w 0.9.5 BETA" rel="nofollow" href="http://wikee.iphwn.org/howto:rsbeta" target="_blank"&gt;here&lt;/a&gt;. For iPhone4, simply open &lt;a title="iPhone4 Jailbreak" href="http://www.jailbreakme.com/" target="_blank"&gt;jailbreakme.com&lt;/a&gt; on your device and follow the instructions.&lt;/li&gt;
	&lt;li&gt;Install &lt;strong&gt;OpenSSH &lt;/strong&gt;in Cydia.&lt;/li&gt;
	&lt;li&gt;SSH or SFTP in to your phone using the IP address listed in your Wifi settings. (Port: 22, username: root, password: alpine)&lt;/li&gt;
	&lt;li&gt;CD to the directory: /private/var/mobile/Library/SMS&lt;/li&gt;
	&lt;li&gt;Copy sms.db to your local computer&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you have any questions, feel free to use the comments below. If there is enough interest, I'll further explain any of the above steps in case they aren't clear enough.&lt;/p&gt;

&lt;p&gt;This is a technique that has been covered by a few other sites for the 3G, and hasn't changed very much with the iPhone4 (Really the only difference that I found is that the path of /var changed to /private/var.) I'll have to do another post on some more creative reasons to get your hands on your SMS.db. If you know your way around SQL Lite (it's easy to learn), there's pretty much no limit to how you can use your iPhone's SMS database!&lt;/p&gt;

&lt;p&gt;&lt;del datetime="2010-08-04T21:51:25+00:00"&gt;&lt;strong&gt;Update 06/30/10:&lt;/strong&gt; This post may have been a bit premature since the iPhone4 has not been (officially?) jailbroken yet? I have not gottten around to attempting to restore SMS.db to my iPhone4 (just donâ€™t have the time for it at the moment). If someone can post a solution that would be great, or I will post my findings here once I get around to trying it.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update 08/04/10:&lt;/strong&gt; Now that the jailbreak for the iPhone4 has been officially released, you should be good to go!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>7 Reasons I'm dreading the iPhone 4</title>
   <link href="http://joshuawood.net/7-reasons-im-dreading-the-iphone-4" />
   <updated>2010-06-23T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/7-reasons-im-dreading-the-iphone-4</id>
   <content type="html">&lt;p&gt;In the spirit of the iPhone 4 launch tomorrow, I figured it would be a good opportunity to collect a few thoughts on the latest wonder-device from Apple.&lt;!--more--&gt; I've been waiting for this release since last November, which is when I went hot-tubbing and forgot to take my 3G from my pocket. Because my contract wasn't up until February of 2010 and I knew there would be a new phone this summer, I opted to skip the 3GS and have been patiently biding my time with a waterlogged, half-functional 3G. The phone has actually held up pretty well, but that's a different story... Here are 7 reasons I am &lt;span style="text-decoration: line-through;"&gt;looking forward to&lt;/span&gt; dreading the iPhone 4.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Multitasking&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because taking a picture of myself for Twitter while drinking coffee, changing lanes, and listening to "On the Road" on audiobook isn't enough; I want to be able to check Google Maps while the photo is uploading. Did I mention I drive a 5-speed?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. iMovie&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I suspect the iPhone 4 is going to do for video what the iPhone did for, well, everything else: make it extremely simple for anyone to distribute. I can't WAIT until every hipster and their brother starts clogging my newsfeed with "art". Does it come with vintage effects? Does it shoot stop-motion? How whimsical of you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. "Facetime"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Finally, I can take portraits of myself without using the mirror. (Also: why didn't they call it "iChat"?)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Folders&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is something that could (and should) have been released as an update after first-generation users realized how many Apps they could download over lunch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. New plans from AT&amp;amp;T&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that I have the best mobile display in the world, I'm looking forward to checking out some HD video on my way home to the cardboard box behind the 7-eleven. (Hey, at least I have 3G.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. 5-megapixels&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The camera is one thing that I really am looking forward to. Considering I've never owned a digital camera over 5-megapixels, I am excited to finally enter the world of digital photography. I even bought a copy of Photoshop mobile to celebrate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Retina Display&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It looks glossy, so maybe I didn't need that front-facing camera after all.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Liking comments on Facebook</title>
   <link href="http://joshuawood.net/liking-comments-you-like" />
   <updated>2010-06-21T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/liking-comments-you-like</id>
   <content type="html">&lt;p&gt;Just a quick observation I made this morning - maybe I'm behind the times. Facebook users can now "Like" comments of content they "Like". Sounds a bit circular, doesn't it?&lt;/p&gt;

&lt;p&gt;This is how it works: A friend posts a picture of a kitten taking a bath in a bowl of oatmeal on your wall. You find it adorable, but since Facebook doesn't have an "Adorable" button, the next best thing is to  "Like" it. You also leave a comment reaffirming this mixup, and even go so far as to explain why, in your opinion, Facebook MUST create a "Love" button. Naturally all of your friends love your idea, but - because Facebook has not received your suggestion a million times yet - must also settle for "Liking" your comment.&lt;/p&gt;

&lt;p&gt;Personally, I've been suggesting a feature that allows users to "Like" their friend's "Likes". Perhaps some of the more obnoxious Facebookers would get caught in an infinite loop.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Secret Cities</title>
   <link href="http://joshuawood.net/secret-cities" />
   <updated>2010-05-27T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/secret-cities</id>
   <content type="html">&lt;p style="text-align: center;"&gt;&lt;img class="size-large wp-image-402 aligncenter" title="Secret Cities" src="http://assets.distancetohere.com/2010/05/SCRTCTS-8770-580x386.jpg" alt="" width="580" height="386" /&gt;&lt;/p&gt;

&lt;p&gt;Been listening to these guys (and gal) the past week, and I must admit they've grown on me. Subtle, percussive, nice composition. I don't have much more to say than that. Keep it coming.&lt;/p&gt;

&lt;p&gt;Check out their upcoming album release titled "Pink Graffiti" at &lt;a title="Secret Cities on Western Vinyl" href="http://westernvinyl.com/artists/secretcities.html" target="_blank"&gt;Western Vinyl&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;
  &lt;a href='http://assets.distancetohere.com/2010/05/WV72.PG_.PT1_.mp3'&gt;Pink Graffiti pt. 1&lt;/a&gt;&lt;br /&gt;
  &lt;a href="http://assets.distancetohere.com/2010/05/WV72.BF_.160.mp3"&gt;Boyfriends&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
  &lt;a href="http://www.bloglovin.com/blog/1799663/distance-to-here?claim=f5k3zqg4f8s"&gt;Follow my blog with bloglovin&lt;/a&gt;
&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Balmorhea</title>
   <link href="http://joshuawood.net/balmorhea" />
   <updated>2010-05-21T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/balmorhea</id>
   <content type="html">&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="580" height="326" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=7296360&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1" /&gt;&lt;embed type="application/x-shockwave-flash" width="580" height="326" src="http://vimeo.com/moogaloop.swf?clip_id=7296360&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"&gt;&lt;/embed&gt;&lt;/object&gt;

&lt;p&gt;Hailing from Austin, Texas, Balmorhea (pronounced Bal-moor-ay) is a 5-piece instrumental ensemble that delivers a satisfying blend of classical and post-rock. They've released four albums to date; their latest, titled "Constellations", was released February 23, 2010.&lt;/p&gt;

&lt;p&gt;
  &lt;a href='http://assets.distancetohere.com/2010/05/WV70_BWSPRT.mp3'&gt;Balmorhea - Bowsprit&lt;/a&gt;&lt;br /&gt;
  &lt;a href='http://assets.distancetohere.com/2010/05/HARMBOON.mp3'&gt;Balmorhea - Harm and Boon&lt;/a&gt;
&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Ocean And A Rock</title>
   <link href="http://joshuawood.net/lisa-hannigan" />
   <updated>2010-05-15T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/lisa-hannigan</id>
   <content type="html">&lt;object width="580" height="326"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6350184&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=6350184&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="580" height="326"&gt;&lt;/embed&gt;&lt;/object&gt;

&lt;p&gt;The filming isn't exactly Vincent Moon, but Lisa Hannigan is wonderful nonetheless. Thanks &lt;a href="http://insidedannyrobertshead.tumblr.com/" target="_blank"&gt;Danny&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>A more simplistic life</title>
   <link href="http://joshuawood.net/simple" />
   <updated>2010-04-13T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/simple</id>
   <content type="html">&lt;p&gt;I am an excessive person, it is my nature. With most things in my life, I go through phases of obsessive focus. I need everything to fit (assuming I care one way or the other). If something won't fit, I can't find rest until it will. This brings me around to my point: an obsessive-compulsive personality can be hell to a Blog. Especially a Blog severely lacking focus. So, as with most similar problems, the answer is deconstruction. Rip out everything that doesn't keep the heart pumping. Maybe my analogies could use some work too.&lt;/p&gt;

&lt;p&gt;If you're looking for stuff that's missing, don't worry, I will restore some elements (my blogroll in particular) once I figure out a user interface I can live with.&lt;/p&gt;

&lt;p&gt;What do you think so far?&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>A Lightbulb Bouquet</title>
   <link href="http://joshuawood.net/lightbulb-bouquet" />
   <updated>2010-04-12T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/lightbulb-bouquet</id>
   <content type="html">&lt;p&gt;&lt;img class="alignnone size-large wp-image-333" title="Lightbulb Bouquet" src="http://assets.distancetohere.com/2010/04/lightbulbs-580x580.jpg" alt="" width="580" height="580" /&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Painted Grey @ Insomnia Coffee (updated)</title>
   <link href="http://joshuawood.net/painted-grey" />
   <updated>2010-04-11T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/painted-grey</id>
   <content type="html">&lt;p&gt;&lt;img class="alignnone size-large wp-image-319" title="Painted Grey" src="http://assets.distancetohere.com/2010/04/85266418-580x435.jpg" alt="" width="580" height="435" /&gt;&lt;img class="alignnone size-large wp-image-321" title="Painted Grey" src="http://assets.distancetohere.com/2010/04/85275972-580x435.jpg" alt="" width="580" height="435" /&gt;&lt;img class="alignnone size-large wp-image-320" title="Painted Grey" src="http://assets.distancetohere.com/2010/04/85267464-580x435.jpg" alt="" width="580" height="435" /&gt;&lt;img class="alignnone size-large wp-image-322" title="Painted Grey" src="http://assets.distancetohere.com/2010/04/85276948-580x435.jpg" alt="" width="580" height="435" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="Painted Grey" href="http://www.myspace.com/paintedgrey" target="_blank"&gt;Painted Grey&lt;/a&gt;, Portland OR @ Insomnia Coffee in Hillsboro&lt;/p&gt;

&lt;p&gt;&lt;a href='http://assets.distancetohere.com/2010/04/could-this-be.mp3'&gt;Could This Be&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>civicrm_contact_type doesn't exist, 1146</title>
   <link href="http://joshuawood.net/civicrm_contact_type-1146" />
   <updated>2010-04-06T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/civicrm_contact_type-1146</id>
   <content type="html">&lt;p&gt;If you've tried upgrading to CiviCRM 3.1.3 in Joomla, you may have run into the following error:
&lt;pre&gt;DB Error: no such table
Database Error Code: Table 'your_database.civicrm_contact_type' doesn't exist, 1146&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;The solution is really simple, just follow &lt;a title="Re: Upgrade from 2.2.6 to 3.1.3 - missing table civicrm_contact_type" href="http://forum.civicrm.org/index.php/topic,12466.msg55157.html#msg55157" target="_blank"&gt;these instructions&lt;/a&gt;, expertly provided by &lt;a title="Deepak Srivastava on CiviCRM Forums" href="http://forum.civicrm.org/index.php?action=profile;u=191" target="_blank"&gt;Deepak Srivastava&lt;/a&gt; over at the &lt;a title="CiviCRM Forums" href="http://forum.civicrm.org" target="_blank"&gt;CiviCRM community forums&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Workaround - 1
&lt;br /&gt;==========
&lt;br /&gt;As soon as you see the error, doing a page reload should bring the upgrade screen back. And hitting upgrade button should work normally.&lt;/p&gt;

&lt;p&gt;- OR -&lt;/p&gt;

&lt;p&gt;Workaround - 2
&lt;br /&gt;==========
&lt;br /&gt;Before installing the new codebase increase the session lifteime, so that session doesn't expire between installing the new codebase and hitting the upgrade.
&lt;br /&gt;Note: Session lifetime could be increased from Global Configuration &amp;gt;&amp;gt; Session Settings &amp;gt;&amp;gt; Session Lifetime. Change the session timeout back to previous one, once you done with upgrade.&lt;/blockquote&gt;

&lt;p&gt;Other than that, follow the &lt;a title="Upgrade Joomla Sites to CiviCRM 3.1" href="http://wiki.civicrm.org/confluence/display/CRMDOC/Upgrade+Joomla+Sites+to+3.1#UpgradeJoomlaSitesto3.1-4.RuntheDatabaseUpgradescript" target="_blank"&gt;official instructions&lt;/a&gt;, and you should be home-free!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Tracking copied text using Javascript, jQuery, and PHP</title>
   <link href="http://joshuawood.net/tracking-copied-text-using-javascript-and-php" />
   <updated>2009-09-28T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/tracking-copied-text-using-javascript-and-php</id>
   <content type="html">&lt;p&gt;Everyone knows that most web site usage statistics are tracked by web servers, including user local, operating systems, page views, unique visits, etc. However, if you're really serious about tracking your user's activity, you'll use an analytics solution such as &lt;a href="http://www.webtrends.com/" target=_blank rel=nofollow&gt;WebTrends&lt;/a&gt;, which is used by the New York Times to log on-screen actions which cannot be tracked by traditional means. Using the WebTrends dcsMultiTrack function, it's possible to capture virtually any event that can trigger a JavaScript function, whether it's on a static HTML page or inside a flash application.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;One of the more creative pieces of tracking code that I ran across while browsing the &lt;a href="http://nytimes.com/" target=_blank rel=nofollow&gt;New York Times&lt;/a&gt; source code (yeah, most people read the news... so?) was when a user copies text from an article. It's really such a simple concept, but one that never occurred to me: &lt;a href="http://mark.kolich.com/2009/09/use-javascript-and-jquery-to-get-user-selected-text.html" target=_blank&gt;when the user selects text on screen, use JavaScript to capture it&lt;/a&gt;. Then set up a trigger to submit the selected text to the server via AJAX when the copy command is detected. Imagine the analytics that could be created based on popular locations within individual articles!&lt;/p&gt;

&lt;p&gt;So I decided to work up a little demonstration using jQuery to log the event and PHP to handle the request server-side. This is very basic, but should be enough to get started toward your own super-analytics. You will need to include jQuery 1.3.2.&lt;/p&gt;

&lt;h3&gt;The JavaScript&lt;/h3&gt;

``` javascript
/**
	* Copyright (c) 2009 Joshua Wood
	* http://www.distancetohere.com
	* Based on research by Mark S. Kolich and The New York Times WordReference function
	* http://mark.kolich.com/2009/09/use-javascript-and-jquery-to-get-user-selected-text.html
	* Copyright (c) 2009 Mark S. Kolich
	* http://mark.kolich.com
	* 
	*
	* Permission is hereby granted, free of charge, to any person
	* obtaining a copy of this software and associated documentation
	* files (the "Software"), to deal in the Software without
	* restriction, including without limitation the rights to use,
	* copy, modify, merge, publish, distribute, sublicense, and/or sell
	* copies of the Software, and to permit persons to whom the
	* Software is furnished to do so, subject to the following
	* conditions:
	*
	* The above copyright notice and this permission notice shall be
	* included in all copies or substantial portions of the Software.
	*
	* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
	* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
	* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
	* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
	* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
	* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
	* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
	* OTHER DEALINGS IN THE SOFTWARE.
*/

// Create a new Object for our code to reside in (makes it pretty and manageable)
var Example = Example || {};
Example = (function(){
	
	var selection, selectionText, responseText; // Global object variables
	
	// Get currently selected text
	// Method based on getSelected() from CodeToad at
	// http://www.codetoad.com/javascript_get_selected_text.asp
	function getSelection() {
		var t = '';
		if(window.getSelection){ return window.getSelection(); }
		else if(document.getSelection){ return document.getSelection(); }
		else if(document.selection){
			var selection = document.selection &amp;&amp; document.selection.createRange();
			selection.toString = function() { return this.text };
			return selection;
		}
		return t;
	}
	
	// This is the callback function for the mouseup event
	function handleClick(event) {
		selection = getSelection();
		selectionText = selection &amp;&amp; selection.toString();
	}
	
	// This is the callback function for the oncopy event
	function handleCopy(event) {
		var wc = wordCount(selectionText);
		if(wc) {
			// Do something with copied text (send to server via ajax)
			responseText = $.ajax({
			      url: "log.php",
			      global: false,
			      type: "POST",
			      data: ({text : selectionText}),
			      dataType: "text",
			      success: function(msg){
			         $('#response').text(msg);
			      }
			   }
			).responseText;
		}
	}
	
	// A simple function to count the words in a string, copied directly from nytimes.com
	function wordCount(inStr) {
		var wc;
		wc = inStr &amp;&amp; inStr.replace(/[^\s\w]+/g, ""); // sans-punctuation
		wc = wc &amp;&amp; wc.replace(/^\s*/, "").replace(/\s*$/, ""); // trim
		wc = wc &amp;&amp; wc.length &amp;&amp; wc.split(/\s+/).length; // count words
		return Number(wc);
	}

  return {
		initialize: function() {
			$(document).bind("mouseup", handleClick);
			document.getElementsByTagName("html")[0].oncopy =  handleCopy;
		}
	};
})();

// Initialize our little program and wait for copied text!
$(document).ready(function(){
	Example.initialize();
});
```

&lt;h3&gt;The PHP&lt;/h3&gt;

``` php
// Log some text from the request and spit it back out
// (This is where you would do something with it)&lt;/p&gt;

$text = $_REQUEST['text'];
echo $text;
```

&lt;p&gt;This example will wait for the user to copy text on screen, and then submit it to the server-side file log.php which can process it, save it, etc (in this case it sends it back to the browser and puts it in the DIV with the id "request").&lt;/p&gt;

&lt;p&gt;&lt;a href="/wp-content/uploads/2009/09/copytext/?phpMyAdmin=rPCz01uAVIsJ4rJmXuWAb8at3N4" class="btn"&gt;View Example&lt;/a&gt; &lt;a href="/wp-content/uploads/2009/09/copytext.zip?phpMyAdmin=rPCz01uAVIsJ4rJmXuWAb8at3N4" class="btn dark"&gt;Download&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What other tracking applications can you see for JavaScript and Ajax?&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Google: The Duplicate Content Myth</title>
   <link href="http://joshuawood.net/duplicate-content-multiple-site-issues" />
   <updated>2009-09-17T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/duplicate-content-multiple-site-issues</id>
   <content type="html">&lt;p&gt;Greg Grothaus of Google's Search quality team posted a &lt;a title="Greg Grothaus: Duplicate Content &amp;amp; Multiple Site Issues" href="http://www.youtube.com/watch?v=6hSoXutuj0g&amp;amp;feature=player_embedded#t=873" target="_blank"&gt;video&lt;/a&gt; on the &lt;a title="Duplicated Content and Multiple Sites" href="http://googlewebmastercentral.blogspot.com/2009/09/duplicate-content-and-multiple-site.html" target="_blank"&gt;Google Webmaster Central Blog&lt;/a&gt; dispelling the duplicate content penalty myth. The video is a reproduction of a talk he gave at the Search Engine Strategies conference in San Jose last month on Duplicate Content and Multiple Site Issues.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;In the video, Greg explains that Google does not automatically penalize you for having duplicate content on your web site as many have believed. Many have accepted this myth because of Google's search feature that hides similar pages from the user. However, it has never been Google's intention to penalize well-meaning webmasters who might happen to have multiple copies of the same page by accident. Anyone who has been developing web sites for a while (specifically dynamic ones) will tell you that it's quite common to have several different variations of the same URL. Greg crystalizes this with the following example:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;These URLs are all different:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;example.com/&lt;/li&gt;
	&lt;li&gt;example.com/?&lt;/li&gt;
	&lt;li&gt;example.com/index.html&lt;/li&gt;
	&lt;li&gt;example.com/Home.aspx&lt;/li&gt;
	&lt;li&gt;www.example.com/&lt;/li&gt;
	&lt;li&gt;www.example.com/?&lt;/li&gt;
	&lt;li&gt;www.example.com/index.html&lt;/li&gt;
	&lt;li&gt;www.example.com/Home.aspx&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The URLs are all slightly different, but they are all displaying the home page of example.com, which is obviously not duplicate content. Google, in its infinite wisdom, understands this and will even attempt to pick the best url and combine all of the extras into one listing in search results.&lt;/p&gt;

&lt;p&gt;However, just because there is no penalty for duplicate content does not give us an excuse to become lazy about keeping our URLs and URL re-writing techniques as clean as possible. You are still at a major disadvantage if people are linking to different copies of the same page, in that the link juice that could be captured by one single url on your web site is now being dispersed among two or more. Greg rightly states that if you have two identical pages with slightly different links, and 10 people are linking to one and 10 to the other, your listing is going to have half the rank from incoming links that it should. This is called dilution of link popularity. In addition to problems with linking, multiple URLs could also result in user-unfriendly URLs in search results, as well as inefficient crawling by search engines: you want them digging for new content, not re-reading the same thing.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a title="Greg Grothaus: Duplicate Content &amp;amp; Multiple Site Issues" href="http://www.youtube.com/watch?v=6hSoXutuj0g&amp;amp;feature=player_embedded#t=873" target="_blank"&gt;Click here to watch Greg's presentation on YouTube&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a title="Google Webmaster Central Blog" href="http://googlewebmastercentral.blogspot.com/2009/09/duplicate-content-and-multiple-site.html" target="_blank"&gt;Click here for the original posting on the Google Webmaster Central Blog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>The anti-Twitter pack: Quitter</title>
   <link href="http://joshuawood.net/free-anti-twitter-icons-quitter" />
   <updated>2009-09-05T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/free-anti-twitter-icons-quitter</id>
   <content type="html">&lt;p&gt;Everyone who is fed up with the narcissistic micro-blogging phenomenon that is Twitter, air your protest proudly with this icon pack for the anti-twats.&lt;/p&gt;

&lt;p&gt;If you are a victim of Twitter-addiction, use the Quitter pack to ease the withdrawal of tweet-cessation.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.janlukacs.ro/quitter/"&gt;&lt;img src="http://assets.distancetohere.com/2009/09/quitter.png" alt="Quitter Icon Pack" width="580" height="149" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;How to use:&lt;/h3&gt;

&lt;ol&gt;
	&lt;li&gt;Download the icon pack from &lt;a href="http://www.janlukacs.ro/quitter/"&gt;janlukacs.ro&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;Replace Twitter icon on blog with Quitter&lt;/li&gt;
	&lt;li&gt;Let the healing begin&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;(don't forget to &lt;a title="Follow me on Twitter!" href="http://www.twitter.com/joshuap"&gt;follow&lt;/a&gt; me)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Joomla 1.0 to 1.5 Migration Issues</title>
   <link href="http://joshuawood.net/joomla-1-0-to-1-5-migration-issues" />
   <updated>2009-09-02T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/joomla-1-0-to-1-5-migration-issues</id>
   <content type="html">&lt;p&gt;I have a good number of my clients running &lt;strong&gt;Joomla&lt;/strong&gt; on their web sites, many of them large organization web sites with hundreds of articles and some of the most data-intensive extensions. I had been following the development progress of &lt;strong&gt;Joomla 1.5&lt;/strong&gt; for several months after its release, at which point I was still chained to the 1.0.x series for most existing sites because compatible extensions hadn't been released. Now that most of the extensions that matter are at the very least compatible in legacy mode, I've been slowly working over the summer to get my clients migrated from the 1.0.x series to 1.5. It's not the easiest process, in fact I think it's the most complicated, rage-inducing software upgrade I've ever had to deal with... However it has gotten easier as I've encountered some common issues that can be (sometimes easily) avoided.&lt;/p&gt;

&lt;h3&gt;Character Encoding&lt;/h3&gt;

&lt;p&gt;By far, the most irksome (and most common) issue with Joomla 1.5 migration is encoding. &lt;strong&gt;Joomla 1.0.x&lt;/strong&gt; uses latin character encoding (&lt;strong&gt;iso-8859-1&lt;/strong&gt;), while 1.5 uses the more standardized &lt;strong&gt;UTF-8&lt;/strong&gt;. I'm definitely not saying it's a bad thing to convert your data to UTF-8, but I will warn that it can cause a severe headache if you go at it by trial and error. Unfortunately, in my experience (so far) it will come down to some trial and error. There are, however, several steps you can take that if performed &lt;strong&gt;correctly&lt;/strong&gt;, will save you from throwing your computer out the window.&lt;/p&gt;

&lt;p&gt;I will start by saying that so far, I have not successfully migrated data from 1.0 to 1.5 without first &lt;strong&gt;converting&lt;/strong&gt; the 1.0 database to UTF-8 manually. I will go through the steps to accomplish this shortly. I just want to clarify because this seems to be the recurring theme in my migration-issues. The Joomla 1.5 installer does have the capacity to convert your migration files from iso-8859-1 (or other character set) to UTF-8 on the fly using PHP's iconv function, but every time I've attempted this I have ended up with major problems with character encoding on my new 1.5 installation (this mostly results with special characters and punctuation missing or replaced in the migrated content). I've also attempted to convert my migration files to UTF-8 manually with the &lt;strong&gt;iconv&lt;/strong&gt; command in Unix, with similar issues. Sometimes it has worked better than others, but it seems there is always some sort of problem with it. Basically, if you can get your Joomla 1.0.x install working properly with UTF-8 encoding, migrating to Joomla 1.5 will be a much simpler endeavor.&lt;/p&gt;

&lt;h4&gt;Converting Joomla 1.0.x to UTF-8&lt;/h4&gt;

&lt;p&gt;For the purpose of migrating, we should only have to get the database converted to UTF-8, and ensure that when we generate a migration file from the Joomla administrator, that file will be UTF-8 as well. The following steps should accomplish this. I highly recommend first creating a copy of your production Joomla installation and database to work with.&lt;/p&gt;

&lt;p&gt;1. Create a dump file (I'll call this "joomla-latin.sql") of your existing Joomla database using phpMyAdmin or the command-line. Remember, the command for dumping a database is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;mysqldump --opt -u username -p database_name &amp;gt; joomla-latin.sql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;2. Create an empty MySQL database (we'll call it "joomla10-utf8"). Make sure the character set is UTF-8, and use a UTF-8 coalition such as &lt;strong&gt;utf8_general_ci&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;3. Before we can import any data, we need to take the dump file we created in step one and convert it to UTF-8 as well. For this step we'll use &lt;strong&gt;sed&lt;/strong&gt; from the command-line to convert the file:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sed -r 's/latin1/utf8/g' joomla-latin.sql &amp;gt; joomla-utf8.sql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;4. Now that we've got our UTF-8 dump file, we can finally import it into the new UTF-8 database that we created in step 2:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;mysql -u username -p joomla10-utf8 &amp;lt; joomla-utf8.sql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;5. We should now have a UTF-8 database which is identical to our production Joomla database, save for the encoding. To test it, open up your Joomla configuration.php and replace the old database name with the new database.&lt;/p&gt;

&lt;p&gt;6. If you view your Joomla web site at this point, you should at least see that your data is there, however there may be some encoding problems because Joomla still thinks it's using iso-8859-1. To fix this, open up your language file and set the _&lt;strong&gt;ISO&lt;/strong&gt; definition to  "&lt;strong&gt;charset=utf-8&lt;/strong&gt;".&lt;/p&gt;

&lt;p&gt;7. You may also need to modify your includes/database.php file to complete the conversion. Open the file and go to line 102, and find the following line and uncomment it:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$this-&amp;gt;_table_prefix = $table_prefix;
&lt;br /&gt;//@mysql_query("SET NAMES 'utf8'", $this-&amp;gt;_resource);  &lt;strong&gt;&amp;lt;-- Uncomment&lt;/strong&gt;
&lt;br /&gt;$this-&amp;gt;_ticker = 0;
&lt;br /&gt;$this-&amp;gt;_log = array();&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you follow these steps exactly, you should be up and running with a workable UTF-8 version of your Joomla 1.0.x web site. Verify that your data is displaying correctly, and then you can create your migration file using the 1.0 migrator component and proceed to your Joomla 1.5 installation. When you load your migration file during the 1.5 installation, you will need to select UTF-8 as the encoding since your migration file has already been converted. If you fail to select the UTF-8 character set, the migration will fail with an iconv error (it will be trying to convert the file to UTF-8 when that is what it already is).&lt;/p&gt;

&lt;p&gt;For more information regarding UTF-8 encoding and Joomla, check out &lt;a title="David Gal's Joomla! 1.0 UTF-8 Guide" href="http://forum.joomla.org/viewtopic.php?f=11&amp;amp;t=55065" target="_self"&gt;David Gal's Joomla UTF-8 Guide&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Errors during migration&lt;/h3&gt;

&lt;p&gt;If you encounter errors during the migration process (while installing Joomla 1.5), you will have to reset your Joomla installation and start over from scratch. Unless I'm completely inept, it's not uncommon to encounter some errors during the migration (it's easy to miss something). A few things to consider when resetting your installation:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Empty your Joomla 1.5 installation database, as the installer probably created some tables&lt;/li&gt;
  &lt;li&gt;Delete the migration file that you uploaded via the installer or copied manually, located here: installation/sql/migration/migrate.sql&lt;/li&gt;
  &lt;li&gt;If the installation completed but something went wrong, you will also have to delete or empty your configuration.php file.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One other thing is that when you complete a Joomla 1.5 installation using your 1.0 migration script, you will have to remove the installation directory before you can view the new web site to verify that your data is intact. Instead of deleting the directory, I'd recommend renaming it until you are certain you won't have to start over with your installation/migration, otherwise you will have to replace it from a fresh Joomla distribution in the event that you need to try again. In fact, it will be a good idea to keep your installation directory until you're ready to go live with your migrated Joomla 1.5 web site. One time I got to the point of updating my 1.0 template to be 1.5 compatible and realized the data wasn't quite right, and had to re-install with a fixed migration script. Luckily all I had to do was rename the directory back to "installation", and follow the steps I mentioned above before re-installing and then going back to work on my template updates.&lt;/p&gt;

&lt;p&gt;These are a few of the major issues that I (and many others) have encountered while attempting to migrate Joomla 1.0 to 1.5. Luckily, the headache is definitely worth it, Joomla 1.5 has solved a lot of major complaints I had with 1.0, and is a much more mature platform all around. I've developed several 1.5 native extensions so far and am much happier with the framework than I was with 1.0.x. There is definitely more I could write on the subject of migration, I may add to this article as I have the time and as I encounter any new problems since I am still in the process of migrating a few sites myself.&lt;/p&gt;

&lt;h3&gt;Additional Resources&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a title="Official Joomla 1.0.x to 1.5 Stable Guide" href="http://docs.joomla.org/Migrating_from_1.0.x_to_1.5_Stable" target="_blank"&gt;Official Joomla 1.0.x to 1.5 Stable Guide&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a title="Convert a MySQL database to UTF-8" href="http://docs.joomla.org/Convert_a_MySQL_database_to_UTF-8"&gt;Convert a MySQL database to UTF-8&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a title="Common Migrator Errors" href="http://docs.joomla.org/Common_Migrator_Errors" target="_blank"&gt;Common Migrator Errors&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a title="David Gal's Joomla! 1.0 UTF-8 Guide" href="http://forum.joomla.org/viewtopic.php?f=11&amp;amp;t=55065" target="_blank"&gt;David Gal's Joomla! 1.0 UTF-8 Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Goodbye Expression Engine, Hello WordPress.</title>
   <link href="http://joshuawood.net/goodbye-expression-engine-hello-wordpress" />
   <updated>2009-09-02T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/goodbye-expression-engine-hello-wordpress</id>
   <content type="html">&lt;p&gt;I recently got the itch to renew a never-ending project that will keep me up nights and threaten to steal my focus from money-making endeavors; therefore there is a somewhat updated look here at DTH as well as a completely different publishing platform... Don't get me wrong, I love Expression Engine. I just couldn't get over the numerous blogging features and addons that WordPress has over EE. For certain projects I would definitely pick EE over WordPress just as I would even choose Joomla over both for many applications. Anyway, recently I've developed a few web sites &lt;a href="http://www.augustforecast.com/" target="_blank"&gt;professionally&lt;/a&gt; using WP and I think that as far as blogging software is concerned, it is pretty hard to beat.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;Seriously though, I have been working on DTH for two reasons: I wanted to fine-tune my recently perfected WordPress expertise, and I've been wanting to start writing again, creating personally, etc... I will however admit that a big part of the reason I want to write a blog is so I can rank it in search engines and convert some of you readers to paying customers... There, I said it.&lt;/p&gt;

&lt;p&gt;The layout / design is still a work in progress... It has not been fully tested for browser compatibility yet. If you happen to find a bug, or even just want to criticize my poor taste, feel free to &lt;a href="http://www.hintmedia.com/contact/" target="_blank"&gt;contact&lt;/a&gt; me. (or leave a comment)&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Climbing the Sierra Buttes</title>
   <link href="http://joshuawood.net/climbing-the-sierra-buttes" />
   <updated>2007-07-17T00:00:00-07:00</updated>
   <id>hhttp://joshuawood.net/climbing-the-sierra-buttes</id>
   <content type="html">&lt;p&gt;It was a Thursday afternoon, and I had just checked in to a hotel room in Truckee, CA. I had driven an hour or so from Colfax to attend a wedding and visit my parents who were flying in from Idaho later that night. The girl at the front desk had looked at me with some worry when I walked in with my full military rucksack complete with a machete strapped to the side, but I didn't really have any other option. The majority of Team Bersheisse had green lighted a weekend trip to begin the following night, and it would be the last time such a large number of the core would be together. I had forgotten about the wedding, which was scheduled for 3pm on Friday, about 6 hours before I was supposed to be in Sierra City to meet the Team. So, this is how I ended up walking through the doors of a Hampton Inn wearing formal clothing and carrying enough equipment to survive alone in the Sierra Nevada mountains for around a month.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;On my way to the hotel, I had stopped by the Ace Mountain Hardware store in Truckee to pick up a few forgotten items. The store is definitely not your typical Ace Hardware. In addition to tools they are fully stocked with all kinds of wilderness survival and sporting goods. For $7.95, I got a custom topographical map of the Sierra Buttes/Deer Lake area printed and laminated. As I studied the map of our weekends adventure, I began to realize that "backpacking in the Sierra Buttes" didn't mean we were going to be mountain climbing. Our destination, Deer Lake, would actually take us 3 miles away from the Buttes. I decided that, if need be, I would skip the wedding to go early the next day to make the climb before the Team arrived.&lt;/p&gt;

&lt;p&gt;I got a late start on Friday, having some obligation to my parents and family friends, but I was off on the 50-mile drive to Sierra City without too much trouble. Fellow adventurer and good friend Dane had been living in the forest just outside the town of Calpine, and I was looking forward to stopping in to check up on him. However, I couldn't remember the name of the small town, and only later did I realize that my path to Sierra City took me left on CA-49 when I should have veered right on CA-89 for a short detour to Calpine. Soon I was flying around a sharp bend in the road and my mountain loomed in front of me, reaching like the tentacles of a giant squid into the sky. Once I saw what I was up against, I forgot about Dane and was eager to get my feet on the ground.&lt;/p&gt;

&lt;p&gt;There are several different routes that lead up the mountain to the fire lookout station, which sits 8,591 feet above sea level. The usual trail begins at Upper Sardine Lake and climbs 3,200 feet over 5.5 miles to the summit. Since it was already approaching 4 o'clock in the afternoon, I opted for the slightly shorter Tamarack Lakes trail head which climbs 2,300 feet over 4 miles. I parked my truck next to the tail head, loaded up my daypack, which I keep attached to my full pack, and I was on my way to the top. The trail began to climb immediately, and I kept a steady pace. It started off as a 4x4 trail, and I passed one truck on its way back to the main road before I reached a narrower trail that vehicles cannot navigate.&lt;/p&gt;

&lt;p&gt;After climbing the first two miles or so, I hadn't seen anyone besides the truck. As I rounded a corner, I was startled to see a dirty man with a very full beard, trekking poles, and a classic looking rucksack walking down the mountain. We stopped for a minute to talk, and he told me that he was thru-hiking the PCT, which starts in Mexico and ends in Canada. I was excited to see him, since the PCT is something that I still only dream of accomplishing. He was on his way to near by Packer Lake for dinner, and although he had probably been on the trail for weeks since his last stop, he didn't seem worn out or tired in the least. After a while, I wished him good luck and sent him on his way to Packer Lake, feeling slightly less significant as I set out once more up the mountain.&lt;/p&gt;

&lt;p&gt;The rest of the climb was mostly uneventful. My legs began to get a little stiff only after I reached the switchbacks that lead up to the lookout. The tower is perched atop the mountain like a Taoist temple, and has 4 sets of very steep stairs. There is usually a fire lookout inside the tower during the summer, and as I climbed the stairs I looked up at the thick windows and thought I saw someone looking down at me. I climbed higher, and I heard music coming from inside the tower. When I crossed the final step and peered inside, the place was completely deserted, and for a minute a feeling of panic washed over me, followed by embarrassment.&lt;/p&gt;

&lt;p&gt;Focusing so much on the tower, I hadn't even looked at my surroundings. Green hills and contrasting red and brown rock were scattered generously with twinkling blue lakes; blue green mountains lined the horizon in all directions. The wind had picked up and was now threatening to send me back down the way I came, but I couldn't move. I stood there, torn by the wind, my eyes attempting to take in everything at once, as a golden eagle soared across the sky looping back and forth before disappearing into the sun. There are few things that compare to the feeling that the top of a mountain will give you.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Airplane Games</title>
   <link href="http://joshuawood.net/airplane-games" />
   <updated>2006-11-21T00:00:00-08:00</updated>
   <id>hhttp://joshuawood.net/airplane-games</id>
   <content type="html">&lt;p&gt;I like being seated first on a plane for one reason: the anticipation of who will sit next to me as I settle in and begin to watch the procession of passengers march down the isle. I don't ever analyze the people that aren't already looking at their tickets to double-check their seat numbers. Like everyone else these people already know exactly where their seats are, and usually have a ways to march before they nervously take out their boarding pass to delay eye contact with their pre-selected neighbor until the last minute. On a flight with unassigned seating, people check their boarding passes anyways; as if a seat number will magically appear, saving them the dreaded decision. Typically people are more prone to favor predestination on airplanes, in which case if they end up becoming acquaintances, friends, or even lovers with their seatmate, it can be blamed on the airline. Personally, I'd rather the person that I'm going to be sitting with for the next 4-6 hours have a choice in the matter, although there is a lot more guesswork involved if you do happen to have an attractive person pre-assigned to you.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;Most people don't even realize they are a part of these intricate social games, but once in a great while you find someone who does, and is also playing. I've been in many different circles of friends, ranging from military to Hollywood bohemians, to small-town intellectuals, and they all have a version of "get It." It's like every civilization dating back to ancient Sumer having its own version of god without being linked to each other. No one ever says what "It" actually is, usually because no one knows. The truth is that "get It" is merely a universal verb for relating to a specific school of thought, no matter what that school of thought may be. For example, a Neo-Nazi and a Rabbi might both "get It," but needless to say their definitions of "It" are far from similar. The people who are consciously playing these social games, well, they "get It" on a level far above anyone else. These people are part of a culture that traverses social circles, religious opinion, and political standing. If everyone "got It," people in airplanes wouldn't be worried about flying into skyscrapers, and people in skyscrapers wouldn't be constantly looking out their 40th floor windows for airplanes.&lt;/p&gt;

&lt;p&gt;As I bounced North in a Bombardier Q400 twin-turbine prop jet, I wondered if the girl sitting next to me was pretty. She had a nice profile, which was all I had been able to see as I glanced up from a speech I was reading when she sat down. I told myself that it didn't matter anyways, and went back to my reading. The girl pulled out a notepad and began working on something, I'm still not sure what because although I saw her writing out of the corner of my eye, I never saw anything on her notepad but printed numbers. She also kept feeding something to a bag that was at her feet, which I thought very odd.&lt;/p&gt;

&lt;p&gt;Over the course of the first leg of the flight, which was Sacramento to Boise, the girl and I didn't say a word to each other. We sat in our respective assignments, shifting from time to time because of the uncomfortably small seats, and went about our respective activities. I finished my speech and moved on to "Travels with Charley" by John Steinbeck. The flight attendant announced that they would be serving refreshments momentarily, and since I wasn't listening, I missed the specifics on the complementary wine or bear. I began a debate with myself over whether the wine would be red or not; if it was Quelque chose Blanc or Riesling, I would definitely opt for the beer. The girl and I both had the 2005 reserve Merlot of some unknown vineyard in California.&lt;/p&gt;

&lt;p&gt;When two people are intrigued by one another, there are little signals and idiosyncrasies that neither person can help showing. Things like reaching for your drink at the same time, or exchanging slight glances out of the corner of your eye that you both know the other can see, but you do it anyways. Whenever something such as this happens, it's best to draw it out for as long as you can without talking. I find the awkward silence and quiet wondering is usually more entertaining than after you break down and actually talk to the person. If they don't have something interesting to say after two or three hours of this, you know it's time to change seats.&lt;/p&gt;

&lt;p&gt;When the girl finally spoke, she wanted to know what the tattoo on my hand said. I explained the Hebrew translation for "The fear of the Lord" to her, and the look on her face was either of relief that it wasn't some sort of fanatical Shiite muslim script, or a sarcastic sneer. I asked her what was in her bag that needed feeding, and she unzipped the top, revealing some kind of small parrot. We talked about the bird for a while, and then I decided it was time to change seats, but mostly because we had stopped in Boise and half the people on the plane had gotten off, so there was now plenty of open space. We both took window seats at the opposite sides of our row, and didn't say much for the remainder of the flight, which suited me. Once the silence is ruined, awkward is all that remains.&lt;/p&gt;
</content>
 </entry>
 
 
</feed>

