<?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/"
	>

<channel>
	<title>Andrew's Blog</title>
	<atom:link href="http://andrewbredow.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewbredow.com</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Sun, 30 Aug 2009 00:16:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Compiling PHP on Snow Leopard</title>
		<link>http://andrewbredow.com/2009/08/compiling-php-on-snow-leopard/</link>
		<comments>http://andrewbredow.com/2009/08/compiling-php-on-snow-leopard/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 00:13:40 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
		
		<category><![CDATA[How-Tos]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[apple]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://andrewbredow.com/?p=125</guid>
		<description><![CDATA[I have been wanting to do a clean install on my laptop for the last couple of months and decided that I would just wait for 10.6 to avoid having too much downtime from work. I like to compile my dev stack from source, and as expected this turned out to be the only problematic [...]]]></description>
			<content:encoded><![CDATA[<p>I have been wanting to do a clean install on my laptop for the last couple of months and decided that I would just wait for 10.6 to avoid having too much downtime from work. I like to compile my dev stack from source, and as expected this turned out to be the only problematic area for my upgrade. As a whole the transition was very smooth - both MySQL and Apache compiled without a hitch. However, I had a couple of issues with PHP (5.2) that took a little more work (nothing some Google fu couldn&#8217;t solve).</p>
<p>Both of these problems are related to shared libraries that PHP relies on:</p>
<h3>libresolv</h3>
<p>Running make resulted in the following error:</p>
<p>
<pre>Undefined symbols:
  "_res_9_dn_expand", referenced from:
      _zif_dns_get_mx in dns.o
  "_res_9_search", referenced from:
      _zif_dns_get_mx in dns.o
      _zif_dns_check_record in dns.o
  "_res_9_dn_skipname", referenced from:
      _zif_dns_get_mx in dns.o
      _zif_dns_get_mx in dns.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1</pre>
<p><p>Thanks to a great StackOverflow <a href="http://stackoverflow.com/questions/1204440/errors-linking-libresolv-when-building-php-5-2-10-from-source-on-os-x">thread</a> I was able to get around this fairly easily by editing 2 lines in the Makefile after running the configure script:</p>
<p>
<pre>EXTRA_LIBS = -lresolv [... all of the other flags that are already here]
EXTRA_LDFLAGS = -lresolv [... all of the other flags that are already here]</pre>
</p>
<h3>libiconv</h3>
<p>An error was also thrown in reference to libiconv. Apparently there is something strange with Apple&#8217;s included libiconv libraries. I was pretty easily able to get around this by compiling a local copy of libiconv from the source at <a href="http://www.gnu.org/software/libiconv/#downloading">gnu.org</a>:
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># download source, extract, enter directory</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>Then, just add <strong>&#8211;with-iconv=/usr/local</strong> to your configure options so PHP will link to your copy instead of the Leopard one.</p>
<p>Final configure command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>php52 <span style="color: #660033;">--with-apxs2</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>apxs\
 <span style="color: #660033;">--enable-shared</span>=all <span style="color: #660033;">--with-zlib</span> <span style="color: #660033;">--with-curl</span> <span style="color: #660033;">--with-freetype-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span>\
 <span style="color: #660033;">--with-jpeg-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>lib <span style="color: #660033;">--with-png-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span> --with-gd\
 <span style="color: #660033;">--with-mcrypt</span> <span style="color: #660033;">--with-mysql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>mysql\
 <span style="color: #660033;">--with-mysqli</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysql_config\
 <span style="color: #660033;">--with-pdo-mysql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysql_config <span style="color: #660033;">--with-iconv</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span></pre></div></div>

<p>Note: I did find that these issues have <a href"http://bugs.php.net/bug.php?id=49267&#038;edit=2">been resolved</a> in the PHP 5.3.1 branch and will most likely be backported to 5.2 at some point, so make sure to check future versions before taking this route.</p>
<p>Hopefully this helps someone else out until these issues are resolved by either the PHP team or Apple. Do let me know if I have missed something stupid here or if there is an easier way to resolve these issues.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbredow.com/2009/08/compiling-php-on-snow-leopard/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Pipe text from terminal to clipboard</title>
		<link>http://andrewbredow.com/2009/05/pipe-text-from-terminal-to-clipboard-in-os-x/</link>
		<comments>http://andrewbredow.com/2009/05/pipe-text-from-terminal-to-clipboard-in-os-x/#comments</comments>
		<pubDate>Fri, 15 May 2009 03:06:56 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
		
		<category><![CDATA[How-Tos]]></category>

		<category><![CDATA[bash]]></category>

		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://andrewbredow.com/?p=114</guid>
		<description><![CDATA[Here is a cool little OS X tip that I stumbled upon a couple of weeks ago. I was writing documentation for the setup of one of our applications and I found myself copying the contents of configuration files into the wiki manually. If you have done this before, you know that it can be [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a cool little OS X tip that I stumbled upon a couple of weeks ago. I was writing documentation for the setup of one of our applications and I found myself copying the contents of configuration files into the wiki manually. If you have done this before, you know that it can be pretty annoying when you are working from the terminal and you end up cutting off the ends of lines because you don&#8217;t realize that they are chopped off in nano.</p>
<p>However, thanks to <a href="http://stackoverflow.com/questions/749544/pipe-to-from-clipboard" target="_blank">Stack Overflow</a>, I was able to find a very elegant solution for this situation when you are working from a Mac client: <strong>pbcopy</strong> (and the yen to it&#8217;s yang, <strong>pbpaste</strong>). These 2 little programs allow you to pipe text to and from your clipboard into your terminal. For example, pretend I have a configuration file that I need to copy into a blog post or wiki:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">cat</span> localhost.conf <span style="color: #000000; font-weight: bold;">|</span> pbcopy</pre></div></div>

<p>Now I can just use a standard paste command to insert the contents of the file into any input field. No need to open the file in an editor: easy. The inverse is also possible. Pretend you have copied a code snippet from an online tutorial to your clipboard and you need to create a file with the copied text as the content.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ pbpaste <span style="color: #000000; font-weight: bold;">&gt;</span> somefile.txt</pre></div></div>

<p>I am sure that there are some other cool uses for these commands, so put your ideas into the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbredow.com/2009/05/pipe-text-from-terminal-to-clipboard-in-os-x/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A couple of site changes</title>
		<link>http://andrewbredow.com/2009/05/a-couple-of-site-changes/</link>
		<comments>http://andrewbredow.com/2009/05/a-couple-of-site-changes/#comments</comments>
		<pubDate>Thu, 07 May 2009 23:30:54 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
		
		<category><![CDATA[Blogging]]></category>

		<guid isPermaLink="false">http://andrewbredow.com/?p=109</guid>
		<description><![CDATA[There are many reasons to have a personal blog. The most obvious (and frequent) reason is to have a place to keep your friends up-to-date with what you are doing. However, blogs are also a great tool for allowing potential employers or clients to know what you are passionate about and how you think. While [...]]]></description>
			<content:encoded><![CDATA[<p>There are many reasons to have a personal blog. The most obvious (and frequent) reason is to have a place to keep your friends up-to-date with what you are doing. However, blogs are also a great tool for allowing potential employers or clients to know what you are passionate about and how you think. While I am not currently looking for a change in either of those areas, I decided that it is important to lay the groundwork now.</p>
<p>To begin with, I have finally moved this blog to a permanent home at andrewbredow.com instead of a subdomain to a site that I have no intention of developing any time soon. Any old links to site will be redirected here with 301 (permanent) redirect for the time being, and I will probably get rid of the subdomain altogether in a couple of months.</p>
<p>Additionally, I have made the switch over to <a href="http://feedburner.google.com" target="_blank">Feedburner</a> (which is now owned by Google) for my RSS feed. This will provide me with some better metrics and additional exposure and it also allows the possibility of switching out blogging software while keeping the same feed address. If you are subscribed to the old feed it will continue to work as long as the redirect is in place. However, it would be great if you re-subscribed using the Feedburner feed!</p>
<p>That&#8217;s all for now; there are more exciting things coming soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbredow.com/2009/05/a-couple-of-site-changes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using multiple Apache virtual hosts on a development machine</title>
		<link>http://andrewbredow.com/2009/05/using-multiple-apache-virtual-hosts-on-a-development-machine/</link>
		<comments>http://andrewbredow.com/2009/05/using-multiple-apache-virtual-hosts-on-a-development-machine/#comments</comments>
		<pubDate>Mon, 04 May 2009 23:54:54 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
		
		<category><![CDATA[How-Tos]]></category>

		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://andrewbredow.com/?p=86</guid>
		<description><![CDATA[The problem
When I first developing web applications I was only responsible for one site. My typical workflow was to have a checkout of the application in my document root and to just use http://localhost to debug it before I checked in my changes. As I started working on other projects, I would just go into [...]]]></description>
			<content:encoded><![CDATA[<h2>The problem</h2>
<p>When I first developing web applications I was only responsible for one site. My typical workflow was to have a checkout of the application in my document root and to just use http://localhost to debug it before I checked in my changes. As I started working on other projects, I would just go into my Apache configuration and change my document root to another directory. This got rather annoying after a while since I had to edit files and restart Apache every time I switched gears.</p>
<p>Then the light bulb clicked on: I knew how to configure virtual hosts to run multiple sites on web servers, why didn&#8217;t I just do the same thing on my local machine? Once this is accomplished, it becomes very painless to switch contexts between multiple applications. As an added bonus it also makes it very easy to install open source web applications on your local machine, do some hacking, and learn how they work. While this same thing is technically possible just by adding new folders to your document root, this can really confuse some web applications that are expecting to handle all of their URLs as directly relative to your base path.</p>
<h2>Prerequisites</h2>
<p>The only prerequisite to this tutorial is that you have a relatively clean install of Apache on your local machine. You can use the default OS X install, or also also a vanilla copy installed via the Windows Apache installer. I am going to give instructions for a *NIX OS, but this setup also works fine in Windows.</p>
<h2>Set up</h2>
<ol>
<li>First, you will want to locate your Apache configuration directory (containing http.conf). On OS X or most other flavors of UNIX it is <em>/etc/apache2/</em>, or Windows: <em>C:/apache2/conf</em>. Next, open your terminal and cd into the directory:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>conf</pre></div></div>

</li>
<li>Add a &#8220;sites&#8221; subdirectory to your Apache configuration directory. This is the directory that will hold all of your virtual host configuration files.

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> sites</pre></div></div>

</li>
<li>Locate your httpd.conf file, open it up for editing

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">nano</span> httpd.conf</pre></div></div>

</li>
<li>Now, we want to edit a couple of configuration settings. You may find variations of these already in the file that you can either delete or modify.

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">NameVirtualHost *:<span style="">80</span>
Include conf/sites</pre></div></div>

<p>        The first line tells Apache to use name-based virtual hosts. This means that it will match virtual hosts based on the domain name of the request. The second line causes all files in the sites directory to be included when Apache reads in it&#8217;s configuration files. Note that this folder location is relative to your <strong>ServerRoot</strong> location which you will find elsewhere in httpd.conf if you search for it.</li>
<li>Next, you are going to go into your &#8220;sites&#8221; folder and create your first virtual host configuration file. It is helpful to name the files based on the domain that they reference (I am going to create http://local.andrew).

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> sites
$ <span style="color: #c20cb9; font-weight: bold;">nano</span> local.andrew.conf</pre></div></div>

<p>    The basic file contents are</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VirtualHost</span> *:80<span style="color: #000000; font-weight: bold;">&gt;</span></span>
  ServerName local.andrew
  DocumentRoot /Users/andrew/Sites/somecoolsite
&nbsp;
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Directory</span> /Users/andrew/Sites/somecoolsite<span style="color: #000000; font-weight: bold;">&gt;</span></span>
    Options +FollowSymLinks
    AllowOverride All
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Directory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>This is fairly self explanatory. In the first line you set the domain that you want to use with the <strong>ServerName</strong> directive. The document root of your files (they can be anywhere on your computer) goes after the <strong>DocumentRoot</strong> directive. Finally, the <strong>Directory</strong> block is where you can put any settings that are specific to this host (e.g. Rewrite rules).</li>
<li>Next, you will need to create an entry in your host file to direct all traffic sent to your custom domain to your local machine. On any *NIX system the file is <em>/etc/hosts</em>, and on Windows it is <em>C:\WINDOWS\system32\drivers\etc\hosts</em>. The format is the same on all systems, just add a line like:
<pre>127.0.0.1  local.andrew</pre>
</li>
<li>You are all done setting up your first virtual host. Restart Apache (you will probably need to use a hard restart - <em>apachectl restart</em> - for your vhost settings to be applied), and direct your browser to whatever hostname you created. You should see your site right away!</li>
</ol>
<p>Now that you have 1 host set up it is super easy to add more. Just copy your existing host file to a new name and edit the settings accordingly! This should greatly improve your workflow and help you be a more productive ninja developer.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbredow.com/2009/05/using-multiple-apache-virtual-hosts-on-a-development-machine/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What I&#8217;ve been up to</title>
		<link>http://andrewbredow.com/2009/04/what-ive-been-up-to/</link>
		<comments>http://andrewbredow.com/2009/04/what-ive-been-up-to/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 04:28:03 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andrewbredow.com/?p=82</guid>
		<description><![CDATA[Things have been a little crazy for the last couple of months. When I first started blogging in January, I had a big list of topics that I wanted to write about. However, in reality, I have been working on too many things to have time to develop and write any of these longer posts, [...]]]></description>
			<content:encoded><![CDATA[<p>Things have been a little crazy for the last couple of months. When I first started blogging in January, I had a big list of topics that I wanted to write about. However, in reality, I have been working on too many things to have time to develop and write any of these longer posts, so I think I am going to try to step back a bit and focus a little more on what I am working on and also try to bring a little more of a personal presence into this blog by sharing some of my musings and interests outside of technology.</p>
<p>My day job at Live Oak is has been great lately. I am continually reminded of how blessed I am to have a great job where I am surrounded by such smart people! On the project front, I have spent the last few months planning and beginning development on a large social networking application. I am not sure how much I can actually talk it about on here, but I hope to fill you all in as soon as possible. However, I will say that this is a unique project for me not only because it is technologically awesome and challenging, but also because I am excited about the  impact that it will make when it launches. For me, this is the height of career satisfaction: being able to use my abilities and intellect for a cause that I believe in.</p>
<p>Outside of work, I am continuing to work on SailboatConnection.com, a project that has been in the works since last summer. While it got off to a bit of a slow start, the pace has really picked up over the last couple of months, and we are nearing the first milestone that will accessed by select public users. This project has been really fun mostly because it is the first project that I started using Zend Framework (including the MVC stack) from the beginning. I will share more details about this project as soon as it is available to the public.</p>
<p>On the personal front, things at home have been good. Carrie is nearing the end of her last semester with classes! I am really looking forward to spending more time with her this summer, even though she has to start work on her comps for her dissertation (boo). We don&#8217;t have tangible plans yet, but I am guessing that we will make it up to Michigan to see family and friends at some point, in addition to branching out and seeing more of Texas than just Austin and the hill country (please leave any suggestions on the comments!)</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbredow.com/2009/04/what-ive-been-up-to/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Scripting successful migrations</title>
		<link>http://andrewbredow.com/2009/03/scripting-successful-migrations/</link>
		<comments>http://andrewbredow.com/2009/03/scripting-successful-migrations/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 13:00:30 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
		
		<category><![CDATA[Software development]]></category>

		<category><![CDATA[databases]]></category>

		<category><![CDATA[migration]]></category>

		<category><![CDATA[process]]></category>

		<guid isPermaLink="false">http://andrewbredow.com/?p=55</guid>
		<description><![CDATA[One of the first projects I inherited at Live Oak was a rather large custom CMS implementation with several modules for managing users and organizations in the nonprofit sector. The first iteration had some issues (I won&#8217;t get into them in this post, but they will most certainly be the topic of future posts on [...]]]></description>
			<content:encoded><![CDATA[<p>One of the first projects I inherited at Live Oak was a rather large custom CMS implementation with several modules for managing users and organizations in the nonprofit sector. The first iteration had some issues (I won&#8217;t get into them in this post, but they will most certainly be the topic of future posts on this blog), and for the last few months, I have been performing a massive overhaul of the data model and several of the frontend processes. It has been great to rip out some of the more obscure code and refactor the rough parts of the application.</p>
<p>However, there were some complications as well. New users have been registering and entering all kinds of valuable information for the last 7 months, and much of this data needed to be moved around to new tables and models. This presented some interesting challenges during development because the changes had to all be implemented in a one time application upgrade, eliminating the possibility of gradually moving the information into the new data model.</p>
<p>Thankfully, the upgrade went very smoothly, so I thought I would take a bit and summarize some of the principles that I utilized to make this happen. This should generalize pretty well to any web application that is heavily data-centric and needs to undergo significant model/schema changes with minimal downtime.</p>
<ul>
<li><strong>Automate as much as possible</strong> - For small changes to an application, it is acceptable to just keep a running list of steps you have completed in your development environment and then perform these in your live environment when you roll out your changes. However, this is hugely prone to human error, and cannot be tested with great reliability. Maintain a sql file with all of your schema changes, and begin generating a script to perform all data migration operations as early as possible in your development cycle. Ideally, these will encompass all of your data migration (with the possible exception of filesystem changes). You will be most in-tune with the changes that need to happen at the time of implementation - not right before you are ready to go live!</li>
<li><strong>Use your data models in your migration script</strong> - When I originally started working on my migration script for this project I thought I would write an old-school procedural &#8220;quick and dirty&#8221; script to just shuffle the data around. But as I thought about it, I realized that I was ignoring the dependencies that existed within the database. For example, whenever a new user is created, it is not as simple as just inserting a row in the users table. I needed to create a user group, the associated group memberships, assign permissions, etc&#8230; Of course, all of this already happens inside of the data models in the application. So instead of going in the back door, have your migration script utilize your application&#8217;s data models so you can rely on code that you have already verified (hopefully!) to follow your business rules.</li>
<li><strong>Simulate your migration, and then do it again!</strong> - Creating a comprehensive migration script during the development phase of your application affords you the awesome opportunity to be able to do some simulations before you actually run your script in the live environment. This is pretty simple. Do a dump of the database from your live environment and import it into your testing database (if your database is too large for this, just choose a representative sample). Now you can run your migration script until you feel comfortable that you are covering all of the different scenarios that exist in your live database. Once you have fixed an issue in the script, just re-import the data from your database dump and try again. I had tested my migration script like crazy before I started simulations, and I still found quite a few issues that only turned up when I encountered the live data that had been entered by real users and not programmers. Once you have run the simulation several times with success, you are ready to think about deploying your application.</li>
<li><strong>Stage your application in the live environment</strong> - I know that it is not possible for everybody to do this. However, I have encountered several ugly MySQL bugs that affected either my development server or my live server (but rarely both). It is not possible to anticipate environment variables such as these - so if it is at all possible, get your application running on a new virtual host in your live environment as soon as possible. This is the perfect place for your co-workers, testers, or even your clients to interact with the application. After a while, you can be sure that you will not encounter issues with your live environment when you go live with your changes, allowing you to focus on more important things.</li>
</ul>
<p>That should give you a good start on lowering the stress associated with large application changes in a production environment. Of course, I still ran into a couple of issues with the migration process - so don&#8217;t get down on yourself. The bottom line is that migrations are really ugly and almost always come accompanied with unexpected issues. The first goal of developers should be to minimize the chances that the affects of the resulting bugs will significantly affect the end user. Automation is a significant step in that direction.</p>
<p>So what have you learned about upgrades and migrations? Please share any stories and lessons that you have learned in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbredow.com/2009/03/scripting-successful-migrations/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The human side of software development</title>
		<link>http://andrewbredow.com/2009/02/the-human-side-of-software-development/</link>
		<comments>http://andrewbredow.com/2009/02/the-human-side-of-software-development/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 21:00:44 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
		
		<category><![CDATA[Software development]]></category>

		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://andrewbredow.com/?p=52</guid>
		<description><![CDATA[I have been spending some time today mentally preparing for the upcoming week. We are getting ready to begin planning and architecture on a big project at Live Oak, and it is bringing many new technical challenges that I have not directly dealt with before. I have been stressing for the last couple of weeks [...]]]></description>
			<content:encoded><![CDATA[<p>I have been spending some time today mentally preparing for the upcoming week. We are getting ready to begin planning and architecture on a big project at Live Oak, and it is bringing many new technical challenges that I have not directly dealt with before. I have been stressing for the last couple of weeks to figure these things out: which libraries and frameworks to use, issues with scalability and extensibility, the database layer and ORM, the list goes on. I want it to be utilizing only the newest and greatest techniques, but there are so many options out there that I don&#8217;t know where to begin.</p>
<p>As I think about it today though, I am feeling  better about these details. It is not that I have figured everything out in some kind of master plan. Rather, I have begun to think about this project from the other side of the screen: the end user. Like a novel, every line of code that we developers write translates into a unique experience for the end user. Applications, like philosophy or a work of poetry, can either take the end user to a place that is more clear and understandable or can lead to frustration or disconnect. The important thing to remember though is that no technology in and of itself necessarily creates this dynamic experience for it&#8217;s users.</p>
<p>Think of your favorite application - what does it convey to you? Gmail is one of my favorites. Gmail tells me that I can make sense of a barrage of information through filtering and tagging and stringing together threads of communication. Moreover, it is an inspiration in the sense that it is as fast and efficient as a desktop application because of the awesome architecture under the hood. I have been using Gmail since very early in it&#8217;s life in 2005, and have seen many different technical iterations that were inspired not just by new cutting-edge browser technology, but rather by painstaking attention to what would create the best user experience. That is to say, the client experience necessitated the cutting edge technology and not vice versa.</p>
<p>I think it is easy to forget this as a developer. We spend so much time working on the nitty-gritty details that make things work - which is essential, but often uninspiring. We want to see cutting edge techniques and elegance under the hood. But when this becomes frustrating to do, it is easy to become disillusioned with the whole process. In short, we often put the cart in front of the horse. I think this is less of a danger when the technology that we are utilizing has been carefully chosen to create a particular user experience. It is no longer an issue of technology as an end in and of itself, but rather as a means to something greater.</p>
<p>So I am going to try this week to remember the human side of the software that we are envisioning and architecting. The important thing to think about at this stage of the game is not the inevitably complex architecture of what we are about to do. Rather, we need to develop a clear understanding of the experience that we will be creating for the end user. Once we have paid adequate ettention to these big elements, the rest will be easier to conceptualize and architect.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbredow.com/2009/02/the-human-side-of-software-development/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using a Linksys WMB54G as a wireless bridge for your Xbox</title>
		<link>http://andrewbredow.com/2009/02/using-a-linksys-wmb54g-as-a-wireless-bridge-for-your-xbox/</link>
		<comments>http://andrewbredow.com/2009/02/using-a-linksys-wmb54g-as-a-wireless-bridge-for-your-xbox/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 00:35:52 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
		
		<category><![CDATA[How-Tos]]></category>

		<category><![CDATA[gaming]]></category>

		<category><![CDATA[how-to]]></category>

		<category><![CDATA[xbox]]></category>

		<guid isPermaLink="false">http://andrewbredow.com/?p=41</guid>
		<description><![CDATA[Background
I have been meaning to post about this for a while, and since I have talked to a few interested people lately, I think now is a good time. One of the biggest downsides to getting an Xbox over some other modern systems is that it does not come with built-in wireless. This is fine, [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>I have been meaning to post about this for a while, and since I have talked to a few interested people lately, I think now is a good time. One of the biggest downsides to getting an Xbox over some other modern systems is that it does not come with built-in wireless. This is fine, since I think most people have their router next to their television or, at the very least, are able to drop in an ethernet port. But, as you can imagine from the title of this post, I do not fall into either of these groups. I did a little research, and found good news: there is a <a title="Xbox wireless adapter" href="http://www.amazon.com/Xbox-360-Wireless-Network-Adapter/dp/B000B6MLV4/ref=pd_bbs_1" target="_blank">wireless card</a> for the Xbox. WIN! And then, I realized that the price tag on this little encapsulation of 1999 technology was $80! ULTRA FAIL!</p>
<p>Now I am not a notoriously cheap person, but I do have a small problem with this ridiculous price tag for what is undoubtably a cheap chip beneath the surface. So I set out to find a alternative; but not just any alternative, I wanted the cheapest alternative possible.</p>
<p>The obvious option is a wireless bridge. These tiny devices connect to your wireless router as a client and then bridge the connection to an ethernet port into which you can plug any device. And the good news is that these things only cost about $50. Getting warmer, but not quite there yet. After a little searching, I found yet another device. The <a title="WMB54G" href="http://www.amazon.com/Linksys-Wireless-G-Music-Bridge-WMB54G/dp/B000GQUMMO" target="_blank">Linksys WMB54G</a> &#8220;music bridge.&#8221; This thing is great. It is cheap (about $30 from the Amazon vendor that I got it from), and it can function as a wireless bridge. However, when I got it I realized that setup is a little difficult, particularly if you aren&#8217;t interested in running their P.O.S. setup program that will only run on windows.</p>
<h2>Instructions</h2>
<p>All you&#8217;ll need to get this running is any computer and the contents of from the box. Don&#8217;t be afraid to try anything, if you end up screwing up your device so you cannot communicate with it, just hit the reset button and start over.</p>
<ol>
<li>First, unbox everything and plug in the WMB54G. Plug the ethernet cable into the adapter and directly into the ethernet port on your computer.</li>
<li>While it boots (it is slower than hell), open up the wireless settings on your computer and change your ethernet connection settings to &#8220;Static&#8221; and assign the following IP addresses:<br />
<code>IP Address: 192.168.1.120<br />
Subnet mask: 255.255.255.0<br />
Router (&#8221;gateway&#8221; on Windows): 192.168.1.100</code><br />
You don&#8217;t need to worry about any DNS settings since we aren&#8217;t going to need an external connection during setup.
</li>
<li>Open your favorite browser and navigate to 192.168.1.210. This will bring up the web configuration utility for the bridge.
</li>
<li>Don&#8217;t do anything with the LAN settings at this point. Use the &#8220;search&#8221; button to find your wireless network information, and enter your wireless key. I had trouble getting it to work with WEP for some reason (shoot be an email if it works for you and I will update this post). Once I changed my network over to WPA it worked great. Also, don&#8217;t get confused if you see &#8220;PSK&#8221; for security type - they mean WPA.</li>
<li>Once your wireless information is all entered correctly, click &#8220;Apply&#8221; at the bottom. Go get yourself a cold one while it reboots - you are almost done.</li>
<li>Next, you are going to want to set a cusom password for the admin utility. Do this in the &#8220;Password&#8221; tab (pat on the back if you guessed that), and then click &#8220;Apply&#8221; to save. You will need to re-authenticate once the device reboots if you change the password.</li>
<li>Once it has rebooted, you can enter your LAN information. For 99% of you, leave it as &#8220;Automatic Configuration - DHCP.&#8221; If you have a manually configured network enter your settings. Click &#8220;Apply,&#8221; and wait again while it reboots.</li>
<li>Once it is rebooted, you will just want to test that everything is working. Change your ethernet settings on your computer back to their original settings (and disable your wireless adapter if you have one) and test that the connection works. You should be able to access the internet just like usual. If your computer cannot connect, neither will your Xbox be able to connect. Note: you may need to refresh or &#8220;repair&#8221; your network connection on your computer so it can get a new IP address.</li>
</ol>
<p>One last note: if your router supports Static DHCP, I would recommend making an entry for the MAC address of the WMB54G so you can easily access the admin in the future (it is printed on the bottom). If your router does not support this, you will need to log in to the router and try to figure out what address has been assigned to the WMB54G if you ever want to edit the settings again.</p>
<p>Hope that this helps some people! Let me know if there is anything on here that I can clarify!</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbredow.com/2009/02/using-a-linksys-wmb54g-as-a-wireless-bridge-for-your-xbox/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mentoring a programmer</title>
		<link>http://andrewbredow.com/2009/01/mentoring-a-programmer/</link>
		<comments>http://andrewbredow.com/2009/01/mentoring-a-programmer/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 13:43:42 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
		
		<category><![CDATA[Software development]]></category>

		<category><![CDATA[mentoring]]></category>

		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://andrewbredow.com/?p=26</guid>
		<description><![CDATA[As I was writing in my journal this morning, I started thinking about the many events in my life that led me to my current career. I&#8217;ll spare you the gory details of the typical &#8220;college grad meets the real world&#8221; story, but there is one factor that cannot be underrated in my journey to [...]]]></description>
			<content:encoded><![CDATA[<p>As I was writing in my journal this morning, I started thinking about the many events in my life that led me to my current career. I&#8217;ll spare you the gory details of the typical &#8220;college grad meets the real world&#8221; story, but there is one factor that cannot be underrated in my journey to become a software developer: mentoring.</p>
<p>Coming from a nontraditional background, I never learned programming in any kind of academic environment. I picked it up while working customer service at a small <a href="http://www.realsoftware.com" target="_blank">software company</a>, and played around for months before I tried writing some demo apps and then later started working on some of the internal applications that were used by only a few people. I found programming syntax to come pretty easily since it is just applied logic. However, it was the application architecture that started to get the best of me when I realized that I was running into common problems that had to have simpler solutions than the ones from which I was approaching them.</p>
<p>At this point there were several key people who I turned to when I got really stuck, but one in particular really took the time to actually mentor me and began to patiently sharpen my programming mind by teaching me about design patterns (or more importantly, how to use them to solve real life problems), showing me examples of code that he had written, and describing lessons that he had learned. I am not sure that I understood how important this was at the time, but looking back it is clear to say that I would not be where I am today were it not for his involvement at this pivotal point in my life.</p>
<p>This brings me to my reflection in my journal from this morning (and maybe a little call to action). I am no expert and most certainly have a long way to go still. However, I have learned a few lessons and am beginning to wonder if I may may be able to also play an important part in an upcoming programmers life. The most important thing about mentoring is not knowing every little detail, but rather, encouraging someone to stick with it and to either develop their love for it, or to realize that there is something better on the horizon. As such, I think there are a few key characteristics of successful mentoring in the world of software:</p>
<ul>
<li>Take risks - there is no reason to protect a new programmer from your code (that is what version control is for), assign real tasks that will stretch his or her abilities. It is this kind of real world trust that builds confidence.</li>
<li>Don&#8217;t give too much preemptive advice - Allow him or her to take a stab at a problem and then help when asked.</li>
<li>Frequent code reviews - Once the code is working, walk through it and spend time identifying patterns, pointing out optimizations, and talking about alternative approaches. This helps to frame all of the explanations in relation to problems that have been recently addressed by the programmer</li>
<li>Warn against pre-optimization - Teach that the first priority is to get something that works, second to that you figure out if there are any bottlenecks that need to be optimized. This one took me a long time to learn, as it was made apparent to me that I spent way too much time analyzing problems because I was so worried that I would slow down the application. I became much more efficient when I learned this simple lesson.</li>
</ul>
<p>I am sure that this list is not complete - so please add on in the comments if you have any other suggestions. In the meantime - get out there and see who you can encourage someone in their quest to become a good programmer!</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbredow.com/2009/01/mentoring-a-programmer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Blogs on paper</title>
		<link>http://andrewbredow.com/2009/01/blogs-on-paper/</link>
		<comments>http://andrewbredow.com/2009/01/blogs-on-paper/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 19:26:18 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
		
		<category><![CDATA[Blogging]]></category>

		<category><![CDATA[news]]></category>

		<category><![CDATA[social media]]></category>

		<guid isPermaLink="false">http://andrewbredow.com/?p=24</guid>
		<description><![CDATA[This was linked on The Daily Dish today along with the caption &#8220;the internet comes full circle&#8221;:
http://www.theprintedblog.com/
At first, I thought this is the dumbest idea I have heard in a while. I mean, isn&#8217;t the best part of the web that we have access to realtime information free from the constraints of the print publication [...]]]></description>
			<content:encoded><![CDATA[<p>This was linked on <a href="http://andrewsullivan.theatlantic.com/the_daily_dish/">The Daily Dish</a> today along with the caption &#8220;the internet comes full circle&#8221;:</p>
<p>http://www.theprintedblog.com/</p>
<p>At first, I thought this is the dumbest idea I have heard in a while. I mean, isn&#8217;t the best part of the web that we have access to realtime information free from the constraints of the print publication workflow? Isn&#8217;t it great that we don&#8217;t have to pay for paper that is simply thrown away? Isn&#8217;t the most revolutionary thing about the web as a news source that we have access to perspectives from around the world and we can choose the angle that we are reading on events (c.f. Drudge vs Huffington) or editorial (c.f. Daily Dish vs. Kos)?</p>
<p>The answer to all of these things is &#8220;yes.&#8221; And this is truly the thing that print media mostly misses. The Printed Blog definitely offers an interesting compromise between traditional print and electronic media. I think that people like me any many of my peers would never pay for a print publication like this, but there may be a portion of newspaper readers who would be turned on to the blogosphere and internet news for the first time if they could consume the content in the same way that they always have: in print. Furthermore, because the content of the paper is voted on according to region, the perspectives represented will more closely mirror that of the locals, as oppose to that of the editors of the paper.</p>
<p>The trickiest obstacle I see for The Printed Blog is getting the paper into the hands of people who don&#8217;t already read blogs. But if they are able to accomplish this feat, it could mean bringing a whole new audience to the blogosphere, further broadening the perspectives that are shared online. Thoughts?</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbredow.com/2009/01/blogs-on-paper/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
