<?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>For Work And Play &#187; Web Development</title>
	<atom:link href="http://andrewwoods.net/blog/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewwoods.net</link>
	<description>Musings, Insights, and Ramblings of a Seattle Web Developer</description>
	<lastBuildDate>Sun, 30 Oct 2011 06:47:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>My .vimrc</title>
		<link>http://andrewwoods.net/blog/2011/10/02/my-vimrc/</link>
		<comments>http://andrewwoods.net/blog/2011/10/02/my-vimrc/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 01:35:25 +0000</pubDate>
		<dc:creator>Andrew Woods</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://andrewwoods.net/?p=510</guid>
		<description><![CDATA[Download my .vimrc file for your own use]]></description>
			<content:encoded><![CDATA[<p>One of my main text editors is vim, which comes pre-installed on every mac and linux distro. It can be a pain to create a .vimrc file, so i thought i&#8217;d share mine with you. I&#8217;m a web developer that writes mostly php, so I&#8217;ve a couple of tricks at the bottom to help with things i do a lot.
</p>
<p>
One thing is commenting my code. Sometimes I want to write a comment on a single line but use the /* and */ syntax. This works for both PHP and CSS. 
When I&#8217;m in insert mode, I&#8217;ll go a new line and type <kbd>scom</kbd>. I have an abbreviation set up that writes the comment characters AND moves the cursor back a few characters, so I can type the text of the comment. Pretty cool, eh?  
</p>
<p>
You can <a href="http://andrewwoods.net/wp-content/uploads/2011/10/vimrc.txt">download my vimrc</a> file. It should be put into your $HOME directory and renamed to <strong>.vimrc</strong>.
</p>]]></content:encoded>
			<wfw:commentRss>http://andrewwoods.net/blog/2011/10/02/my-vimrc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert Line Endings In Textmate</title>
		<link>http://andrewwoods.net/blog/2010/12/17/convert-line-endings-in-textmate/</link>
		<comments>http://andrewwoods.net/blog/2010/12/17/convert-line-endings-in-textmate/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 19:29:43 +0000</pubDate>
		<dc:creator>Andrew Woods</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[dos]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://andrewwoods.net/?p=442</guid>
		<description><![CDATA[Goto Text &#62; Filter Through Command



	Set Input to &#8220;Document&#8221;
	Set Output to &#8220;Replace Document&#8221;
	Use this sed one-liner as your command to convert from Unix to DOS:

sed "s/$/`echo -e \\\r`/"
]]></description>
			<content:encoded><![CDATA[<p>Goto Text &gt; Filter Through Command</p>

<a href="http://andrewwoods.net/wp-content/uploads/2010/12/textmate-text-filter-through-command.png"><img class="aligncenter size-full wp-image-445" title="textmate-text-filter-through-command" src="http://andrewwoods.net/wp-content/uploads/2010/12/textmate-text-filter-through-command.png" alt="Menu in Textmate &quot;Text -&gt; Filter Through Command&quot;" width="410" height="325" /></a>
<ul>
	<li>Set <strong>Input</strong> to &#8220;Document&#8221;</li>
	<li>Set <strong>Output</strong> to &#8220;Replace Document&#8221;</li>
	<li>Use this sed one-liner as your command to convert from Unix to DOS:</li>
</ul>
<pre>sed "s/$/`echo -e \\\r`/"</pre>
<div id="attachment_444" class="wp-caption aligncenter" style="width: 412px"><a href="http://andrewwoods.net/wp-content/uploads/2010/12/textmate-filter-through-command-sed-unix2dos.png"><img class="size-full wp-image-444" title="textmate-filter-through-command-sed-unix2dos" src="http://andrewwoods.net/wp-content/uploads/2010/12/textmate-filter-through-command-sed-unix2dos.png" alt="Screenshot of &quot;Filter through command&quot; dialog in Textmate" width="402" height="336" /></a><p class="wp-caption-text">Convert line endings from Unix to Dos using Sed in Textmate for current document</p></div>]]></content:encoded>
			<wfw:commentRss>http://andrewwoods.net/blog/2010/12/17/convert-line-endings-in-textmate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Application Architecture on Localhost</title>
		<link>http://andrewwoods.net/blog/2009/08/07/application-architecture-on-localhost/</link>
		<comments>http://andrewwoods.net/blog/2009/08/07/application-architecture-on-localhost/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 23:58:00 +0000</pubDate>
		<dc:creator>Andrew Woods</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.andrewwoods.net/blog/?p=157</guid>
		<description><![CDATA[You&#8217;re ready to begin development on your project. Now what? Since you are a professional, you need to setup your environment not just a for a single project, but the many projects to come. Sure you could just create a folder on your desktop, and start hacking together an html file from scratch. but I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[You&#8217;re ready to begin development on your project. Now what? Since you are a professional, you need to setup your environment not just a for a single project, but the many projects to come. Sure you could just create a folder on your desktop, and start hacking together an html file from scratch. but I&#8217;m gonna show you a better way. The solution I&#8217;m going to show you will use a local webserver. I&#8217;m using Apache, and you should be too. If you&#8217;re using PHP at all, you have to use a web server.
<h3>Filesystem Setup</h3>
It should be easy to get to, and easy to manage. Lets start by going to root of your filesystem either in Finder or the Terminal, and create a directory &#8216;www&#8217;. This will contain everything web related. In the &#8216;/www&#8217; is where you begin to organize. I suggest by type first.  Think for a minute about the kinds of things you&#8217;ll need &#8211; websites, log files, software from third parties like jQuery, Smarty, BluePrint &#8211; are a few of the basics. Create a directory to hold each of these type of information. &#8216;libs&#8217; for the 3rd party libraries, &#8217;sites&#8217; to contain each of your client web projects, and &#8216;logs&#8217; to hold the log files that are associated with each of your websites. So your structure should look like the following:
<ul>
	<li>www
<ul>
	<li>libs
<ul>
	<li>php</li>
	<li>js</li>
	<li>css</li>
	<li>sql</li>
</ul>
</li>
	<li>logs</li>
	<li>sites</li>
</ul>
</li>
</ul>
In the libs directory I suggest one more level of organization &#8211; language name. That way your PHP, Javascript, Ruby, and CSS all separate. Then the only other thing to do is to make sure you include the version number of any libraries you extract into here. e.g. /www/libs/{lang}/{software-1.0} Now you have one place on your system to store all your software libraries. When you create your website projects , copy the desired libraries to your /www/sites/{project} directory.

In my &#8216;/www/sites&#8217; directory, I use project names, which is typically the domain name minus the top-level domain. Generically it looks like &#8216;/www/sites/{projectname}&#8217;. So my <a title="A Seattle Web Development Agency" href="http://mastodonlabs.com" target="_blank">Mastodon Labs</a> project is in the directory &#8216;/www/sites/mastodonlabs&#8217;, which lives on the internet at mastodonlabs.com. If you know that you&#8217;ll have a client where you work on multiple projects, you could use the client name as a level of organization e.g. /www/sites/{clientname}/{projectname}.

Now that your structure to for organizing projects is intact, what should go into the project? a folder for documentation, one for sql scripts, one for the website root, and one for your framework (if you use one). I use <a title="an Ellis Labs project" href="http://codeigniter.com" target="_blank">CodeIgniter</a>
<ul>
	<li>/www/sites/foobar
<ul>
	<li>ci_system</li>
	<li>docs</li>
	<li>site</li>
	<li>sql</li>
</ul>
</li>
</ul>
You may be wondering why the directory &#8216;foobar&#8217; isn&#8217;t the site root. There are multiple reasons. Most importantly, it&#8217;s a best practice not to have any config files in the document root of your website. This helps keep your website secure by design. Every framework has at least one, usually containing database information. So a user should never be able to visit a URL like http://foobar.com/system/config/database.ini.  While there are techniques to hide such directories, it&#8217;s just best not to put them in the document root.

&#8216;docs&#8217; is a good place to keep notes about the project, a list of things to do for the current project, special instructions, list of notes for the specific versions of the site. For projects that require a database, it&#8217;s also good to have a set of SQL scripts that build/modify your database structure. For that purpose, you use the &#8217;sql&#8217; directory.

Since all these directories are contained in one project directory, it&#8217;ll be easy to manage them all in a version control system. We&#8217;ll talk about that in the next post, but for now, let&#8217;s focus on your <a title="Homepage for the Apache HTTPD project" href="http://httpd.apache.org/">Apache</a>fgv configuration setup.
<h3>Apache Configuration</h3>
When Apache starts up, it parses it&#8217;s config file <em>httpd.conf</em>. On my mac (OS X 10.4), this is located at /etc/httpd/httpd.conf. While it&#8217;s possible to have all your configuration in one big file, I use a second file called vhosts.conf which is read in with an include statement.
<pre>Include /etc/httpd/vhosts.conf</pre>
This file holds all the virtual hosts (read: websites) configurations on your machine. At its most basic, this file is responsible for mapping the url of the website to the corresponding directory in the filesystem. There&#8217;s a lot it you can put here, but for a simple websites this is all you need.

When you&#8217;re doing your local development, you only need to worry about one hostname &#8211; localhost. You&#8217;re probably wondering &#8220;but how do we access more than one website?&#8221;. The answer is ports. By default, websites are served on Port 80. It&#8217;s possible to have your web server listen to more ports for requests.  If you want to listen to port 3000, you would put this statement in httpd.conf
<pre>Listen 3000</pre>
This gets to you have way there. Now apache will listen to requests on that port. When it gets a request, what should happen? First add the following to your httpd.conf, if its not already in there.
<pre>NameVirtualHost *</pre>
Now you need to tell it which virtual host you want to receive it. go to your vhosts.conf file and add the following lines:
<pre>&lt;VirtualHost *:3000&gt;
    DocumentRoot /www/sites/foobar/site
    ErrorLog /www/logs/foobar/error.log
    CustomLog /www/logs/foobar/access.log common
&lt;/VirtualHost&gt;</pre>
Now you just stop/start apache so that it reloads with your new configuration. Be aware that the /www/logs/foobar directory needs to exist before you restart Apache, otherwise Apache will not restart successfully and it will fail silently (you wont see an error message). Apache will create the log files if they don&#8217;t already exist.

On my system, I use <em>/usr/sbin/apachectl stop</em> to shutdown the server, and use <em>/usr/sbin/apachectl start</em> to start it up.

Thats it. Now  you see your website in your browser when you load http://localhost:3000

Happy Computing!]]></content:encoded>
			<wfw:commentRss>http://andrewwoods.net/blog/2009/08/07/application-architecture-on-localhost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Barcamp Seattle 2009 Schedule</title>
		<link>http://andrewwoods.net/blog/2009/06/11/barcamp-seattle-2009-schedule/</link>
		<comments>http://andrewwoods.net/blog/2009/06/11/barcamp-seattle-2009-schedule/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 05:33:53 +0000</pubDate>
		<dc:creator>Andrew Woods</dc:creator>
				<category><![CDATA[Event]]></category>
		<category><![CDATA[Fun Stuff]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://andrewwoods.net/blog/?p=263</guid>
		<description><![CDATA[Some of you may be wondering what the schedule is for Barcamp. Friday Night there is a kickoff party/book signing at office nomads . Tara Hunt (@missrogue) will be selling and signing copies of her book &#8220;The Whuffie Factor&#8220;. Saturday morning at 10am the doors open for Barcamp Seattle. People will mingle for a bit [...]]]></description>
			<content:encoded><![CDATA[<p>Some of you may be wondering what the schedule is for Barcamp. Friday Night there is a kickoff party/book signing at <a href="http://www.officenomads.com">office nomads</a> . <a href="http://www.horsepigcow.com/">Tara Hunt</a> (<a title="Tara's Twitter page" href="http://twitter.com/missrogue">@missrogue</a>) will be selling and signing copies of her book &#8220;<a href="http://www.thewhuffiefactor.com/">The Whuffie Factor</a>&#8220;. Saturday morning at 10am the doors open for <a title="registration site" href="http://barcampseattle-09.pathable.com/">Barcamp Seattle</a>. People will mingle for a bit and around 10:30 we&#8217;ll make announcements and let people signup themselves up for sessions on the board for the day. Everyone who shows up, has the opportunity to run a session. At 5pm, the sessions will wrap up for the day. Afterwards, we&#8217;ll head over to the Red Door, which is just a couple of blocks away. On Sunday, another set of session will start at 10am  and will wrap up at 1pm.</p>
<ul>
<li>Fri 6-9pm <a title="Facebook Event Information" href="http://www.facebook.com/home.php?ref=home#/event.php?eid=102686183979">Kickoff Party/Book Signing</a> at Office Nomads</li>
<li>Sat 10am-5pm Barcamp Seattle, Day 1</li>
<li>Sat 6pm-11pm Party at <a title="Walking Directions from Barcamp to Red Door" href="http://maps.google.com/maps?f=d&amp;source=s_d&amp;saddr=801+North+34th+Street+Seattle,+WA+98103+(Adobe)&amp;daddr=3401+Evanston+Ave+N+%23+Main,+Seattle,+WA+98103+(Red+Door)&amp;hl=en&amp;geocode=%3BFXUU1wIdDRG1-A&amp;mra=ls&amp;dirflg=w&amp;sll=47.649909,-122.351347&amp;sspn=0.00717,0.013626&amp;ie=UTF8&amp;z=18">Red Door</a></li>
<li>Sun 10am-1pm Barcamp Seattle, Day 2</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://andrewwoods.net/blog/2009/06/11/barcamp-seattle-2009-schedule/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Build Your Portfolio With CodeIgniter</title>
		<link>http://andrewwoods.net/blog/2009/06/10/build-your-portfolio-with-codeigniter/</link>
		<comments>http://andrewwoods.net/blog/2009/06/10/build-your-portfolio-with-codeigniter/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 19:40:27 +0000</pubDate>
		<dc:creator>Andrew Woods</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://andrewwoods.net/blog/?p=233</guid>
		<description><![CDATA[You know about web design, and you&#8217;ve decided to use a PHP framework to get you started. With the availability of so many great open source software projects out there &#8211; like Zend Framework, CakePHP, and Drupal, Wordpress &#8211; it&#8217;s easy to be overwhelmed. Each of those projects has their merits and drawbacks, but my [...]]]></description>
			<content:encoded><![CDATA[You know about web design, and you&#8217;ve decided to use a PHP framework to get you started. With the availability of so many great open source software projects out there &#8211; like Zend Framework, CakePHP, and Drupal, Wordpress &#8211; it&#8217;s easy to be overwhelmed. Each of those projects has their merits and drawbacks, but my favorite is <a title="An Open Source Web Application Framework" href="http://codeigniter.com/">CodeIgniter</a> &#8211; it&#8217;s powerful, lightweight, and flexible. There are several  tutorials on CodeIgniter. Here&#8217;s a <a title="Video Tutorial on CodeIgniter.com" href="http://codeigniter.com/tutorials/watch/intro/">introductory video tutorial</a> that uses PHP4 syntax. The things this tutorial uses PHP5 syntax.   For the sake of  brevity, I&#8217;m going to assume you&#8217;ve already installed it. I&#8217;m going to explain how to build a portfolio site using CodeIgniter.

Lets think about the typical layout of a portfolio &#8211; homepage, about, contact, services, work &#8211; most of which are probably static pages. The &#8220;work&#8221; page could be database driven, depending on how comfortable you are using databases. For this post, I&#8217;m going to assume its static, and leave it as an exercise for you to make it dynamic. Let&#8217;s get started, shall we?!

Here&#8217;s <a title="CodeIgniter Online Manual for URLs" href="http://codeigniter.com/user_guide/general/urls.html">how CodeIgniter reads it&#8217;s urls</a> by default:

<code>example.com/class/function/ID</code>

You want your URLs to be simple. The homepage should be &#8220;/&#8221;, contact &#8220;/contact&#8221;, about  &#8220;/about&#8221;, and services &#8220;/services. For the moment, we&#8217;re not going to consider the Work pages. If you create your controllers using the default URL setup, you&#8217;ll have 4 controllers to start. In each one of those, you would create a method called index(). This is the method that gets called automatically when you don&#8217;t specify a 2nd segment for your URL.  While that will work, there is a better way, that will makes things easier for you.

Lets  start by opening your favorite text editor, and create a file called <strong>Main.php</strong>. In this file we&#8217;ll create your controller. it should look like this:
<pre>&lt;?php
class Main extends Controller {
    public function __construct(){
        parent::__construct();
    }

    public function index(){
        echo "Homepage";
   }
}
?&gt;</pre>
Save this to your <em>CI_INSTALL/application/controllers</em> directory. To run go to <em>example.com/index.php/main</em> where example.com is your site. But wait, we wanted to call it &#8216;/home&#8217; . To make this happen we&#8217;re going to use a magical feature of CodeIgniter &#8211; <a title="Routes Documentation from Code Igniter" href="http://codeigniter.com/user_guide/general/routing.html">routes</a>! Ok, maybe it&#8217;s not magical, but it sure is great to use. So you&#8217;re aware <strong>it&#8217;s a very bad practice to use echo statements in your controller</strong>. This gets fixed shortly.

In your <em>CI_INSTALL/application/config</em> is a file called <strong>routes.php</strong> that we need to edit.  The default controller should be set to &#8220;main&#8221;, like below.
<pre>$route['default_controller'] = "main";</pre>
While we&#8217;re editing the routes.php file, lets also add the following lines below the default controller and scaffolding settings.

<code> </code>
<pre>// Custom routes for my site
$route['about'] = "main/about";
$route['contact'] = "main/contact";
$route['services'] = "main/services";</pre>
Now that we&#8217;ve made that update, lets go back to our controller <strong>main.php</strong>. Lets update the index action to use a view script instead of the echo statement. The code below will load the file <strong>home.php</strong> in the <em>CI_INSTALL/application/views </em>directory.
<pre>public function index(){
    $this-&gt;load-&gt;view('home');
}</pre>
That takes care of how to load the home page. Now lets create the methods for the other routes.
<pre>public function about(){
    $this-&gt;load-&gt;view('about');
}

public function contact(){
    $this-&gt;load-&gt;view('contact');
}

public function services(){
    $this-&gt;load-&gt;view('services');
}</pre>
When you call your views scripts this way, you&#8217;ll need to have all the page HTML &#8211; from DOCTYPE to your closing &#8220;html&#8221; tag. You can call multiple view scripts, so I suggest you make two more  &#8211; <strong>header.php</strong> and <strong>footer.php</strong> &#8211; as an exercise. For now, create them with all the required HTML. For the about page, run it in your browser like this

<em>example.com/index.php/about</em>

Now that we&#8217;ve done a majority of the pages now, we just need to do the &#8216;work&#8217; pages. We made this one separate because this one could be more involved than the other pages, depending how you&#8217;d like to implement it,  so its best to create a separate controller. Since this will be responsible for displaying pages of our work, we&#8217;re gonna want a little more power.  We&#8217;ll have two different different URLs &#8211; /work (which will be an overview page), and /work/client-name to display each client project on it&#8217;s own page. The overview page is easy. It works just like the homepage. In your CI_INSTALL/application/controllers directory, add the following code.
<pre>&lt;?php
class Work extends Controller {

	public function __construct(){
		parent::__construct();

	}

	public function index(){
		$this-&gt;load-&gt;view('work_index');
	}

}
?&gt;</pre>
Now that you&#8217;ve created the controller, now create a view script in <em>CI_INSTALL/application/views</em> called <strong>work_index.php</strong> and add the html you want to display.

For the client pages, we&#8217;re going to add a little more code. Our goal here is to have one page that we can re-use for every client. The first thing we need in a new method that we&#8217;ll call client. In the method we&#8217;ll create an array to associate the client id with their information.
<pre>public function client($clientId){

    $data = array(
        'foo' =&gt; array('title' =&gt; 'Foo Title',
                 'hero' =&gt; '/images/foo/hero.jpg',
                 'altText' =&gt; 'foo logo')
        ,'bar' =&gt; array('title' =&gt; 'Bar Title',
                 'hero' =&gt; '/images/bar/hero.jpg',
                 'altText' =&gt; 'bar logo')
    );

    $this-&gt;load-&gt;view('work_client', $data[$clientId]);
}</pre>
What&#8217;s happening above, is the third segment that comes in is passed in as the argument to the method. To paraphrase: the value of $clientId is whatever appears the in the third url segment. $clientId is used to get the corresponding information to send to the page. Below is a simple view file that will process that uses the information for the client.
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;?php echo $title; ?&gt;&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
    &lt;h1&gt;<img id="hero" src="&lt;?php echo $hero; ?&gt;" alt="&lt;?php echo $altText ?&gt;" />&lt;/h1&gt;
        &lt;img id="hero"
             src="&lt;?php echo $hero?&gt;"
             alt="&lt;?php echo $altText ?&gt;" /&gt;
	&lt;p&gt;this is some information about the project.
You should update the controller with the information that you would like
 to appear here.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
Above we mentioned that we want our client urls to be example.com/index.php/work/client-name, but if you&#8217;ve been paying attention, you currently need to type example.com/index.php/work/client/client-name for the page to show up. Now I&#8217;ll show you how to fix that &#8211; by returning to our magical friend <strong>routes.php</strong>. Add this to the file just below the routes you added earlier.
<pre>$route['work/(:any)'] = "work/client/$1";</pre>
At this point everything should be working fine. But you&#8217;re probably thinking &#8220;how do I get rid of the index.php from my URLs?&#8221; To do this you need a .htaccess file in the root of your website. paste the lines below into it on your server.
<pre>RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|css|js|images|robots\.txt)
# this line adds index.php to the URL so CodeIgniter can process it.
RewriteRule ^(.*)$ index.php?$1 [L]</pre>
Throughout your site, now you can write URLs like <em>/about</em>. The Apache web server will use the <a title="Dot H T Access Documentation from Apache Foundation" href="http://httpd.apache.org/docs/2.0/configuring.html#htaccess">htaccess file</a> make the URL be <em>index.php/about</em> so CodeIgniter can handle it properly.

Ok. That should be enough to get you started. Take the time to write your feedback in the comments below. If this helped you, great! If there&#8217;s something you think is missing, that is also good to know.]]></content:encoded>
			<wfw:commentRss>http://andrewwoods.net/blog/2009/06/10/build-your-portfolio-with-codeigniter/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Orca Card</title>
		<link>http://andrewwoods.net/blog/2009/05/24/orca-card/</link>
		<comments>http://andrewwoods.net/blog/2009/05/24/orca-card/#comments</comments>
		<pubDate>Sun, 24 May 2009 20:48:01 +0000</pubDate>
		<dc:creator>Andrew Woods</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Transit]]></category>

		<guid isPermaLink="false">http://andrewwoods.net/blog/?p=192</guid>
		<description><![CDATA[Life in Seattle and its surrounding cities and counties is about to get a little easier for those who take public transportation. Several transportation agencies have a new project. It will simplify and accelerate the process of paying for transportation. Enter ORCA Card.

The ORCA card is a universal access pass that works on multiple agencies&#8217; [...]]]></description>
			<content:encoded><![CDATA[Life in Seattle and its surrounding cities and counties is about to get a little easier for those who take public transportation. Several transportation agencies have a new project. It will simplify and accelerate the process of paying for transportation. Enter <a title="Homepage of ORCA Card" href="http://www.orcacard.com">ORCA Card</a>.

The ORCA card is a universal access pass that works on multiple agencies&#8217; systems surrounding the Puget Sound. You might say &#8220;One pass to rule them all&#8221;. In fact, ORCA is an acronym for <em>One Regional Card for All</em>.  It uses RFID to hold your currency and pass information, and accesses it when you tap the sensor.   You can add value in person, over the phone, and online. It&#8217;s the last option that likely speed adoption. Being able to add value to your card outside of business hours empowers the customer, increases the usability of the system, and increases the likelihood that the customer will keep using it.
<h3>Costs</h3>
By now your probably wondering how much it costs. To get the card, it&#8217;s currently free. However, this is true for a limited time. Keep in mind that they&#8217;ll charge you to <strong>replace</strong> an existing card. Given that the cards are expected to last &#8220;<a href="http://www.orcacard.com/ERG-Seattle/p2_002.do?m=42&amp;i=418">approximately five years with regular use</a>&#8220;, the replacement cost is trivial.

The cost for your travel is separate. Trying to estimate what you should spend each month can be difficult. I live in Seattle, so I use the <a title="has fare and trip information for King County" href="http://metrokc.gov">King County Metro</a> site. Here&#8217;s the basic rule for King County &#8211; All of Seattle is 1 zone, Everything else is another. Here&#8217;s a <a title="fare information from King Country Metro's site" href="http://metro.kingcounty.gov/tops/bus/fare/fare-info.html">chart for the fare information</a>.
<h3>Challenges</h3>
The first of a few challenges for ORCA is the same as any new project &#8211; gaining adoption. My friends and I are early adopters, and we&#8217;re already sold on it. However, getting the masses to use it will take a fair amount of effort. The second challenge is their website <a href="http://orcacard.com">orcacard.com</a> which is poorly designed, has suspect accessibility, and lots of ugly query string URLs. They need to contact <a title="Seattle Web Design Agency" href="http://mastodonlabs.com" target="_self">Mastodon Labs</a> to solve these problems with a <a title="Contact Mastodon Labs" href="http://mastodonlabs.com/contact" target="_self">website redesign</a>.
<h3>Tips</h3>
<ol>
	<li>Get your card now, while they&#8217;re free.</li>
	<li>Get<strong> two cards</strong> &#8211; one for you, one for guests. So when you have a friend or family member come to visit you, they can use the second card and not worry about how much to pay and carrying exact change. Also it can be a backup for you, should you misplace your primary card.</li>
	<li>You don&#8217;t need to ask the driver for a transfer, the ORCA knows if its a transfer the next time you scan your card.</li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://andrewwoods.net/blog/2009/05/24/orca-card/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mobile Edition</title>
		<link>http://andrewwoods.net/blog/2009/05/19/mobile-edition/</link>
		<comments>http://andrewwoods.net/blog/2009/05/19/mobile-edition/#comments</comments>
		<pubDate>Tue, 19 May 2009 20:19:12 +0000</pubDate>
		<dc:creator>Andrew Woods</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://andrewwoods.net/blog/?p=189</guid>
		<description><![CDATA[This morning I&#8217;ve launched the mobile edition of AndrewWoods.net However, it doesn&#8217;t include this blog. That&#8217;s for a future time.   In keeping with the One Web idea, I&#8217;m using the same url but a different layout. I chose this method, because it complies with the DRY principle, it made it easier/faster to develop, [...]]]></description>
			<content:encoded><![CDATA[This morning I&#8217;ve launched the mobile edition of <a href="http://andrewwoods.net">AndrewWoods.net</a> However, it doesn&#8217;t include this blog. That&#8217;s for a future time. <img src='http://andrewwoods.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  In keeping with the One Web idea, I&#8217;m using the same url but a different layout. I chose this method, because it complies with the DRY principle, it made it easier/faster to develop, and its more cost effective since i&#8217;m not using a separate hosting account for a mobile site.

The difficulty to mobile web development is that you need to test a wide variety of devices. Acquiring such devices can get expensive depending on how many you&#8217;re developing for. Some developers, and even companies, make sites to cater to iPhone or Blackberry and call it a day. I&#8217;m using a Palm Treo 700p, and limiting my development to Palm Devices would be bad, given the small audience. More importantly though, I want everyone to be able to use my websites.

So, I have a request. If you have mobile browser on your phone, could you send me some screenshots of what different pages on <a title="My homepage" href="http://andrewwoods.net">AndrewWoods.net</a> look like, in the next day or so? Here&#8217;s an example of a screenshot from my <a title="KA character" href="http://andrewwoods.net/flashcard/hiragana/ka">hiragana project</a>. I&#8217;d greatly appreciate it.

If you&#8217;re a web developer that makes mobile sites, I&#8217;d love to hear any tips you might have.]]></content:encoded>
			<wfw:commentRss>http://andrewwoods.net/blog/2009/05/19/mobile-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Mastodon Labs</title>
		<link>http://andrewwoods.net/blog/2009/03/12/introducing-mastodon-labs/</link>
		<comments>http://andrewwoods.net/blog/2009/03/12/introducing-mastodon-labs/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 00:49:21 +0000</pubDate>
		<dc:creator>Andrew Woods</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Start Up]]></category>

		<guid isPermaLink="false">http://andrewwoods.net/blog/?p=176</guid>
		<description><![CDATA[I&#8217;ve been in web development since 1999, when I started at Animated Designs as a contract Perl programmer. I spent 6 years there learning an array of web technologies in the areas of programming, databases, and Linux system administration. I left to seek out new adventures outside of California, which brought me to Seattle. Since [...]]]></description>
			<content:encoded><![CDATA[I&#8217;ve been in web development since 1999, when I started at <a title="Animated Designs homepage" href="http://www.anides.com">Animated Designs</a> as a contract Perl programmer. I spent 6 years there learning an array of web technologies in the areas of programming, databases, and Linux system administration. I left to seek out new adventures outside of California, which brought me to Seattle. Since arriving in Seattle, I&#8217;ve had the opportunity to work with great people at a variety of companies, both as a contractor and as an employee. I think now is time to take my next step. I enjoy the agency environment, and want to return to it. Also, since I was a teenager, it&#8217;s been a goal of mine to have my own business one day. I couldn&#8217;t imagine what form it might take. Now I can. Without further adieu, I&#8217;d like to introduce you to <a title="homepage of Mastodon Labs" href="http://mastodonlabs.com">Mastodon Labs</a>.

<strong>Mastodon Labs</strong> is a web development agency whose focus is to serve the needs of American small business. Yes there are many companies that build websites, but what&#8217;s different about this one?, you ask. There are 3 key differentiating factors. First, is to design every website to be accessible by all audiences. Companies in the United Kingdom are required to do this. However, it&#8217;s largely not done in the United States. The web standards movement has been making some headway in bringing it to the attention of developers, but it&#8217;s not pervasive yet in the industry. Secondly, I have a strong interest in the <a title="Wikipedia entry explaining mobile web." href="http://en.wikipedia.org/wiki/Mobile_Web">mobile web</a> and want to make that a key component of Mastodon Labs offerings. As mobile device manufacturers catch up, and consumers increasingly use their intelligent mobile devices, it will become essential for small business to participate. Thirdly, but not least, community is important. Within your local community is where you can have the greatest impact. Because we&#8217;re located in Seattle,  we&#8217;ll <a title="The Web Development Services of Mastodon Labs" href="http://mastodonlabs.com/services">serve the needs of small businesses</a> in the Pacific Northwest, but we&#8217;re open to helping everyone.

This will be a great adventure. The opportunities and challenges that lie ahead will make the journey fantastic, and I can&#8217;t wait for it to unfold.  I look forward to <a title="Contact Mastodon Labs" href="http://mastodonlabs.com/contact">working with you</a>.]]></content:encoded>
			<wfw:commentRss>http://andrewwoods.net/blog/2009/03/12/introducing-mastodon-labs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mystery In The UK</title>
		<link>http://andrewwoods.net/blog/2009/02/19/mystery-in-the-uk/</link>
		<comments>http://andrewwoods.net/blog/2009/02/19/mystery-in-the-uk/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 06:44:09 +0000</pubDate>
		<dc:creator>Andrew Woods</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://www.andrewwoods.net/blog/?p=160</guid>
		<description><![CDATA[I&#8217;m currently working on a webapp that will allow every country to participate. the content is locally consumed. I&#8217;m attempting to build a database to hold all the information, in a structured way. I&#8217;m confused by the  country relationships of the UK.  I&#8217;m in the USA, so I&#8217;m not sure what the typical experience [...]]]></description>
			<content:encoded><![CDATA[I&#8217;m currently working on a <acronym title="Web Application">webapp</acronym> that will allow every country to participate. the content is locally consumed. I&#8217;m attempting to build a database to hold all the information, in a structured way. I&#8217;m confused by the  country relationships of the UK.  I&#8217;m in the USA, so I&#8217;m not sure what the typical experience is for a UK citizen.

There are four countries: England, Wales, Scotland, and North Ireland. These four countries, have formed an entity called &#8220;United Kingdom&#8221;, or UK for short.  Plain old &#8216;Ireland&#8217; is a separate country. There is another entity called &#8220;Great Britian&#8221;, which refers to the countries England, Wales, and Scotland (<a title="Key facts about the United Kingdom" href="http://www.direct.gov.uk/en/Governmentcitizensandrights/LivingintheUK/DG_10012517" target="_blank">source: DirectGov</a>).  There&#8217;s an organization <acronym title="International Organization for Standardization">ISO</acronym> that maintains global standards. One of the standards is <a title="List of countries using English names." href="http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm">ISO 3166-2</a>, which is a list of country names, and their 2 character abbreviations. Looking at this list of country codes and names, the United Kingdom has the code of &#8216;GB&#8217;. Huh?  More confusingly, the countries  England, Wales, Scotland, and North Ireland are all without their own 2 character codes. I guess the real question is &#8220;<a title="Wikipedia entry for Who's on first routine" href="http://rds.yahoo.com/_ylt=A0oGklyAUJ5J07EA5PRXNyoA;_ylu=X3oDMTByZWgwN285BHNlYwNzcgRwb3MDMQRjb2xvA3NrMQR2dGlkAw--/SIG=124sgotsr/EXP=1235198464/**http%3a//en.wikipedia.org/wiki/Who%27s_on_First%253F">Who&#8217;s on first?</a>&#8220;.

Let&#8217;s hold off on that issue for a moment, and look back to my original problem. I&#8217;m unclear as to how I should model the relationship between the UK, the individual countries of the UK, and their cities. Let me give you an example. I live the United States, in the state of Washington(WA), in the city of Seattle. So my record would be like this: country=US, state=WA, city=Seattle. Given that, lets do an example for London. Three examples come to mind. The first captures the most information: country=UK, state=England, city=London. This one is appealing as it captures the most information in an existing structure. The second just removes England from the state field: country=UK, state=null, city=London. The third uses England for the country country=England, state=null, city=London. I&#8217;m considering this one because I know that England is a country, so it&#8217;s technically correct.

Do people who live in the UK, look on web forms for UK, then their own specific country? Or do they look for their specific country, then UK? What&#8217;s the convention most users expect? Is there another territorial breakdown I&#8217;ve missed?  I know of postal codes.

I appreciate any feedback you can provide.

<strong>UPDATE 2009-FEB-21</strong>: Everybody&#8217;s feedback was very helpful, particularly Gary Gale (<a href="http://twitter.com/vicchi">@vicchi</a>) who just happens to be Head of UK Engineering at <a title="Yahoo GeoPlanet" href="http://developer.yahoo.com/geo">Yahoo Geo Technologies</a> (<a href="http://twitter.com/yahoogeo">@yahoogeo</a>).

Let&#8217;s recap of the things I&#8217;ve learned. First &#8216;United Kingdom&#8217; is what users search for. It&#8217;s also the name that appears in the ISO 3166 list. So I can safely use it. Second, people never look for things by their individual country (England, Scotland, etc) &#8211; partly because of the previous point, and partly because postcodes are so informative, they can be used to pre-populate other fields like city and county. Third, the &#8216;county&#8217; is what people typically use to filter things.  There are actually two sets of county information &#8211; administrative and postal. The web apps I&#8217;m writing are for people and not the government, so I&#8217;m going to use the postal counties.

In summary, Mr Gale said &#8220;if you&#8217;re designing a web based mechanism for addresses you&#8217;d use the country, the county and the town followed by the street address and our Postal Code, the equivalent of the US ZIP&#8221;. Nice! Pragmatic and simple.

Thanks again everyone. It&#8217;s been illuminating.]]></content:encoded>
			<wfw:commentRss>http://andrewwoods.net/blog/2009/02/19/mystery-in-the-uk/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Architecting Your Dev Environment</title>
		<link>http://andrewwoods.net/blog/2009/02/15/architecting-your-dev-environment/</link>
		<comments>http://andrewwoods.net/blog/2009/02/15/architecting-your-dev-environment/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 08:31:05 +0000</pubDate>
		<dc:creator>Andrew Woods</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.andrewwoods.net/blog/?p=147</guid>
		<description><![CDATA[Every web developer has a particular way of working. This can be anything from using particular software applications, to storyboarding with construction paper, to drawing diagrams on paper napkins at their favorite local cafe. Whatever it may be, they learned at some point in their experience as a developer, that their technique works. But if [...]]]></description>
			<content:encoded><![CDATA[Every web developer has a particular way of working. This can be anything from using particular software applications, to storyboarding with construction paper, to drawing diagrams on paper napkins at their favorite local cafe. Whatever it may be, they learned at some point in their experience as a developer, that their technique works. But if you&#8217;re new to the business, you have nothing to draw from. So these next few posts are targeted to the newcomer. However, if you&#8217;ve been around for a while, you might learn a trick or two, that you can add to your own tool belt. The following is a list of the upcoming titles in this series
<ul>
	<li>Application Architecture on Localhost</li>
	<li>Source Code Control Architecture</li>
	<li>Hosting Architecture</li>
</ul>
Foreach of the items in the list above, I will discuss the technical aspects of setting up your environment. Setting things up the first time will seem like a lot of work. but every additional project will be very easy to set up, once you have the blue print. There are few technical constraints, as most of these concepts apply across environments. I am on a Mac OS X machine, so all command line items will use BSD syntax using the Bash shell. I&#8217;m approaching this from the perspective of a LAMP developer. PHP 5 is my language of choice.

<strong>Application Architecture on Localhost</strong>

This segment will give you a practical, scalable structure that will keep things organized. Also, you&#8217;ll be given some very useful bits for configuring your Apache server, as to how it relates to your day-to-day.  I&#8217;ll try to ensure that you get all the essential, plus a couple of cool bits.

<strong>Source Code Control Architecture</strong>

If you&#8217;re new to web development, you might need an introduction. However, that&#8217;s already been covered by many people smarter than myself. What I&#8217;ll give you are suggestions/strategies on how you might make the best of organizing your strategies.

<strong>Hosting Architecture</strong>

So you&#8217;ve got a working a site on your local box. Your next step is to put in on your hosting environment. You&#8217;ll need a staging environment, so you can let other people test your code, have clients preview updates that you&#8217;ve worked on. the things you learn for the staging environment, can also be applied in your production environment.

Stay tuned, as I plan to write a post every few days.

<strong>NOTE: As each post is written, I&#8217;ll update this one to link to it.
</strong>]]></content:encoded>
			<wfw:commentRss>http://andrewwoods.net/blog/2009/02/15/architecting-your-dev-environment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

