<?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>zobie's blog &#187; Software Development</title>
	<atom:link href="http://blog.zobie.com/category/software_development/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zobie.com</link>
	<description>I write software, I like music and I'm mildly(?) OCD.</description>
	<lastBuildDate>Mon, 21 Dec 2009 19:02:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using P4Merge with Team Foundation Server</title>
		<link>http://blog.zobie.com/2009/04/using-p4merge-with-team-foundation-server/</link>
		<comments>http://blog.zobie.com/2009/04/using-p4merge-with-team-foundation-server/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 10:04:49 +0000</pubDate>
		<dc:creator>zobie</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tfs]]></category>

		<guid isPermaLink="false">http://blog.zobie.com/?p=157</guid>
		<description><![CDATA[I&#8217;ve found that the best way to deal with merging is to avoid it completely! Unfortunately that is rarely realistic. So, assuming you don&#8217;t want to take any radical measures to completely avoid merging in TFS, you should at least use the best tools available. My favorite merge tool is the freely available (and cross-platform) [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve found that the best way to deal with merging is to avoid it completely! Unfortunately that is rarely realistic. So, assuming you don&#8217;t want to take <a href="/2009/04/using-git-to-avoid-problems-with-tfs">any radical measures</a> to completely avoid merging in TFS, you should at least use the best tools available. My favorite merge tool is the freely available (and cross-platform) <a href="http://www.perforce.com/perforce/downloads/platform.html">P4Merge</a>.</p>
<p>Getting TFS to use P4Merge isn&#8217;t difficult but neither is it intuitive. For a merge operation P4Merge expects four files to exist:</p>
<ol>
<li>the original, base file</li>
<li>file with conflicting change #1</li>
<li>file with conflicting change #2</li>
<li>final, merged file</li>
</ol>
<p>Unfortunately TFS doesn&#8217;t create the merged file (#4) until after the merge tool is invoked. A simple batch script will solve the problem though. Save this as <code>p4merge.bat</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;"><span style="color: #66cc66;">@</span>ECHO <span style="color: #0080FF; font-weight: bold;">OFF</span>
COPY <span style="color: #66cc66;">/</span>Y NUL <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">%</span>4<span style="color: #ff0000;">&quot;&quot;</span>
START <span style="color: #66cc66;">/</span><span style="color: #0080FF; font-weight: bold;">WAIT</span> <span style="color: #66cc66;">/</span>D <span style="color: #ff0000;">&quot;C:\Program Files\Perforce\&quot;</span> p4merge.exe <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">%</span>1<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">%</span>2<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">%</span>3<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">%</span>4<span style="color: #ff0000;">&quot;&quot;</span></pre></div></div>

<p>This script will create the merge file and invoke p4merge.exe.</p>
<p>Now you can configure TFS to use P4Merge by running this command from a Visual Studio command prompt: <code>tf diff /configure</code></p>
<p><a title="Visual Studio Command Prompt" href="http://www.flickr.com/photos/zobrist/3464483878/"><img src="http://farm4.static.flickr.com/3520/3464483878_e82493ea2e.jpg" alt="Visual Studio Command Prompt" width="500" height="253" /></a></p>
<p>That will bring up a dialog:</p>
<p><a title="Configure User Tools" href="http://www.flickr.com/photos/zobrist/3464483882/"><img src="http://farm4.static.flickr.com/3553/3464483882_f839fe46e4_o.png" alt="Configure User Tools" width="402" height="247" /></a></p>
<p>If an entry already exists for the Merge operation you can add it. Otherwise just modify the existing entry to point to the batch file we created:</p>
<p><a title="Configure Tool" href="http://www.flickr.com/photos/zobrist/3464483884/"><img src="http://farm4.static.flickr.com/3494/3464483884_c1dea28349_o.png" alt="Configure Tool" width="355" height="196" /></a></p>
<p>Note that you must set the command to be your batch file, not the executable.</p>
<p>And that&#8217;s it! Next time TFS launches a merge tool, it will use P4Merge.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zobie.com/2009/04/using-p4merge-with-team-foundation-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using git to avoid problems with TFS</title>
		<link>http://blog.zobie.com/2009/04/using-git-to-avoid-problems-with-tfs/</link>
		<comments>http://blog.zobie.com/2009/04/using-git-to-avoid-problems-with-tfs/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 05:29:24 +0000</pubDate>
		<dc:creator>zobie</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tfs]]></category>

		<guid isPermaLink="false">http://blog.zobie.com/?p=148</guid>
		<description><![CDATA[For the past few months I&#8217;ve been using Team Foundation Server (TFS) at work. I&#8217;m certainly not a TFS expert; I probably don&#8217;t even quality as a power-user. But I&#8217;ve used TFS enough to have found a handful of things that I like about it. Revision control is not among those things.
As a software version [...]]]></description>
			<content:encoded><![CDATA[<p>For the past few months I&#8217;ve been using <a href="http://en.wikipedia.org/wiki/Team_Foundation_Server">Team Foundation Server (TFS)</a> at work. I&#8217;m certainly not a TFS expert; I probably don&#8217;t even quality as a power-user. But I&#8217;ve used TFS enough to have found a handful of things that I like about it. Revision control is <strong>not</strong> among those things.</p>
<p>As a software version control system, I dislike TFS intensely.</p>
<p>In the short time I&#8217;ve been using TFS I&#8217;ve had several problems with code that was merged incorrectly. I&#8217;ve seen problems where TFS silently allowed older versions of code to overwrite newer versions. I could probably fill an entire blog post airing grievances with TFS but I thought it would be more interesting to describe how I use git on top of TFS to solve some of these problems.</p>
<p>First, to use git to track a TFS repository it is really important that all your source code be on a Fat32 partition. TFS locks files and NTFS respects that lock. Fat32 will track the lock but doesn&#8217;t enforce it. This allows git to modify files (change to different versions of files) without necessarily having those files checked out in TFS.</p>
<p>Using TFS I checked out all my code into <code>s:\src</code>. I then created a new git repository in that same directory and added everything into the git repository.</p>
<p>For working I maintain at least two branches. My <code>master</code> branch always matches TFS. When I need the latest code from TFS I switch to the git <code>master</code> branch, pull from TFS then commit all changes into git. My <code>working</code> branch contains my current code changes. I also have one branch <code>dev</code> that contains a single commit consisting of all my debug code that should never be checked in to TFS.</p>
<p>When I&#8217;m ready to start coding I get the latest code from TFS and commit those changes into git&#8217;s master branch. I create a new git branch, <code>working</code>. I cherry pick my development code from <code>dev</code> into <code>working</code>. Then I do all my coding on that branch. When I need to get code from TFS I can swtich to <code>master</code>, update from TFS, check that code in to git then either merge or rebase the changes back into <code>working</code>.</p>
<p>Once all of my changes in <code>working</code> are complete I need to merge the changes back into <code>master</code> so that I can commit them to TFS. I can&#8217;t do a straight merge becuase my cherry-picked dev code would be included. So I have two ways of doing this:</p>
<ol>
<li>cherry-pick changes from <code>working</code>, applying them to <code>master</code></li>
<li>backout the development code (using <code>git rebase -i</code>) then merge changes back into <code>master</code></li>
</ol>
<p>After going through one of these two options I end up back on <code>master</code> with all of my code changes. I then commit the changes to TFS. Once that is done I delete <code>working</code> and recreate it from <code>master</code> next time I need it.</p>
<p>Working like this has been great for me. If there are conflicts when merging my code changes, git takes care of it. This way I can almost always avoid having to let TFS merge anything.</p>
<p>This is my general way of working but you can easily see how to apply these same principles when you want to work on multiple different changes using multiple different branches in git.</p>
<p>One thing to note: When you&#8217;re working like this git&#8217;s history isn&#8217;t great. This isn&#8217;t like git-svn where you get a seperate git revision for every svn revision. For me, using git with TFS isn&#8217;t about being able to track my changes over time. I just want to make sure that my changes aren&#8217;t lost and I don&#8217;t want to clobber anyone else&#8217;s changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zobie.com/2009/04/using-git-to-avoid-problems-with-tfs/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Thoughts on Doing Contract Work as a Software Developer</title>
		<link>http://blog.zobie.com/2009/03/thoughts-on-doing-contract-work-as-a-software-developer/</link>
		<comments>http://blog.zobie.com/2009/03/thoughts-on-doing-contract-work-as-a-software-developer/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 07:07:21 +0000</pubDate>
		<dc:creator>zobie</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[job search]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[startup]]></category>

		<guid isPermaLink="false">http://blog.zobie.com/?p=131</guid>
		<description><![CDATA[As I was recently looking for new employment I spent quite a bit of time deciding wether I might enjoy doing contract work full-time. I enjoy working on different projects and learning new things but there is one major roadblock to becoming a full-time contract developer. My personality doesn&#8217;t let me write software that is [...]]]></description>
			<content:encoded><![CDATA[<p>As I was recently looking for new employment I spent quite a bit of time deciding wether I might enjoy doing contract work full-time. I enjoy working on different projects and learning new things but there is one major roadblock to becoming a full-time contract developer. My personality doesn&#8217;t let me write software that is anything less than my best.</p>
<p><strong>WARNING:</strong> Gross generalizations and simplifications below. I&#8217;m not trying to offend anyone, just describe my experiences.</p>
<p>Most of the contract work I&#8217;ve done has been for people who are not technically savvy. They come to me with a <em>very</em> vague idea of the software they want. They expect me to tell them how much it will cost before we&#8217;ve discussed specific requirements. When the requirements are incomplete or incorrect they expect that I&#8217;ll just fix it without additional cost to them.</p>
<p>Not all of my contract experience has been negative. In fact, most of it has worked out quite well. Usually both my client and myself are pleased with the software and the cost of building it. But I&#8217;ve had enough negative experiences to be careful when considering a new job.</p>
<p>Part of the problem is that it is nearly impossible for anyone to completely define the scope of a project. There is always some miscommunication or misunderstanding, there is always some unforseen problem.</p>
<blockquote><p>&#8220;You want me to setup a blog for your company? No problem, I can get WordPress setup for you in an hour.&#8221;</p>
<p>&#8220;Wait, I didn&#8217;t realize that by &#8216;blog&#8217; you meant store front application that can accept payments, handle accounts payable, accounts receivable and inventory tracking. That will take slightly more than an hour.&#8221;</p>
</blockquote>
<p>That kind of situation actually isn&#8217;t bothersome to me. As a contractor it is part of my job to understand what you want before making a bid. If a potential client obviously doesn&#8217;t know what they want, I can either decline to bid on that job or I can adjust my bid to account for a large amount of unknown. I don&#8217;t love it, but that type of risk is manageable.</p>
<p>The part of contract work that I dislike is being forced to compromise quality. When I&#8217;m working on a fixed cost contract, it is in my best interest to deliver exactly what is specified, as quickly as possible. As long as my client is reasonably happy with the deliverable, I am going to get paid $20k regardless of whether it took two days, two weeks or two months to create. I don&#8217;t get additional money for clean code. I don&#8217;t get extra for having good test coverage.</p>
<p>When I complete a project more quickly than I had anticipated there is no problem. I can spend time verifying that the code is tight and that everything is working as expected. But if I am running behind schedule, it becomes more difficult to care about testing the code or fixing &#8220;little&#8221; bugs.</p>
<p>There may be a bug in the code where order totals aren&#8217;t calculated correctly, but what are the odds that my client will notice the bug before he signs off on the project? If he does find the problem and I correct it, will he think to test for that same bug in every release?</p>
<p>This is the dilemma that makes contract work difficult for me. If I see a bug in my code, I&#8217;m going to fix it. If I&#8217;m writing a tricky or important calculation (like calculating totals), I&#8217;m going to write a test. I need to have confidence that my code is doing what I expect. I&#8217;ve never shipped any software that didn&#8217;t have a list of known bugs but I have also never shipped any software in which I didn&#8217;t have a high level of confidence that it was working correctly.</p>
<p>For me, doing the bare minimum isn&#8217;t an option for two reasons:</p>
<ol>
<li>Quality is <em>extremely</em> important to me. I can&#8217;t just hack something together that meets the contract requirements. When I write software, I want to deliver my personal best.</li>
<li>Most of the time, the fast/crappy way of implementing something simply doesn&#8217;t occur to me.</li>
</ol>
<p>I understand a company&#8217;s need to understand cost before approving custom softare. But if you want me to do contract work, pay me on an hourly basis. I&#8217;ll give you a projected timeline for project completion.</p>
<p>With an hourly rate, you only pay me for the time I actually spend working. With an hourly rate I know that I won&#8217;t lose money just because I insist on high-quality code. We&#8217;ll both be happier in the long run.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zobie.com/2009/03/thoughts-on-doing-contract-work-as-a-software-developer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Rest of My Development Environment</title>
		<link>http://blog.zobie.com/2009/02/the-rest-of-my-development-environment/</link>
		<comments>http://blog.zobie.com/2009/02/the-rest-of-my-development-environment/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 07:22:01 +0000</pubDate>
		<dc:creator>zobie</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.zobie.com/?p=126</guid>
		<description><![CDATA[As a professional software developer the vast majority of my experience has been working on C#.NET WinForm applications. I started using .NET shortly before the 1.0 framework was released. I can&#8217;t remember if I ever did .NET development under Windows 2000; I generally use Windows XP. If you&#8217;re wondering why I don&#8217;t use Vista I [...]]]></description>
			<content:encoded><![CDATA[<p>As a professional software developer the vast majority of my experience has been working on <a href="http://en.wikipedia.org/wiki/C_Sharp_(programming_language)">C#</a><a href="http://en.wikipedia.org/wiki/.NET_Framework">.NET</a> <a href="http://en.wikipedia.org/wiki/Windows_Forms">WinForm</a> applications. I started using .NET shortly before the 1.0 framework was released. I can&#8217;t remember if I ever did .NET development under Windows 2000; I generally use Windows XP. If you&#8217;re wondering why I don&#8217;t use Vista I have to assume that you&#8217;ve never tried Vista yourself. It&#8217;s not good. I&#8217;m waiting for Windows 7 and hoping for the best.</p>
<p>The tools that I use for C#.NET are pretty standard:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Microsoft_Visual_Studio#Visual_Studio_2008">Microsoft Visual Studio 2008</a> (with <a href="http://www.jetbrains.com/resharper/">ReSharper</a>)</li>
<li><a href="http://en.wikipedia.org/wiki/SQL_Server_Management_Studio">SQL Server Management Studio</a></li>
<li><a href="http://memprofiler.com/">.NET Memory Profiler</a> to chase down memory leaks</li>
<li><a href="http://www.automatedqa.com/products/aqtime/">AQtime</a> to help locate performance problems</li>
<li><a href="http://en.wikipedia.org/wiki/Microsoft_Outlook">Outlook</a> and <a href="http://skype.com">Skype</a> to stay connected to coworkers</li>
<li><a href="http://en.wikipedia.org/wiki/Team_Foundation_Server">Team Foundation Server</a> (TFS) for tracking work items and for version control</li>
<li><a href="http://www.cygwin.com/">cygwin</a> to make the command line in Windows behave somewhat normally</li>
</ul>
<p><a href="http://www.flickr.com/photos/21254914@N04/3314417978" title="View 'C# Development' on Flickr.com">
<div style="text-align:center;"><img src="http://farm4.static.flickr.com/3298/3314417978_72c581d0ce.jpg" alt="C# Development" border="0" width="500" height="313" /></div>
<p></a></p>
<p>The one thing that is sorta strange about how I do my C#.NET work is that I do everything on a Mac Pro with XP running in <a href="http://www.vmware.com/products/fusion/">VMWare Fusion</a>. I&#8217;ve had a similar setup at home for a couple of years but I&#8217;ve only had this setup at work since January.</p>
<p>There are definitely a few quirks that I had to get used to, working in Windows running in a VM on OS X. But the benefits of this setup <em>far</em> outweigh any inconvenience. The ability to take snapshots of the entire VM is awesome! If a program screws with my registry and Windows starts acting funky I just roll back to the last snapshot!</p>
<p>The other huge benefit to working in VMWare is memory. Unless you&#8217;re using 64-bit Windows (which can be problematic for many reasons) you are limited to 2 GB of memory. Windows sucks at managing virtual memory so I always try to keep my open applications below that 2 GB limit. Since my Mac has 12 GB of memory, if I need to do something else, I can just boot up a second VM.</p>
<p>Most of the software that I&#8217;ve written for OS X has been personal projects. Nothing fancy, just various tools to scratch some itch. Since getting my iPhone I&#8217;ve been doing more work in <a href="http://en.wikipedia.org/wiki/Objective-C">Objective-C</a> and <a href="http://en.wikipedia.org/wiki/Cocoa_(API)">Cocoa</a>.</p>
<p>Because I&#8217;ve done so much work with managed and interpreted languages, it feels a little weird to work in unmanaged C/ObjC. But it is kinda cool too. Objective-C is a fairly simple language and Cocoa is a very nice framework. There are some things that I don&#8217;t like about Obj-C (not having namespaces and gimpy string manipulation come immediately to mind) but I <em>really</em> appreciate being able to actually use Cocoa controls for UI work. It is almost unthinkable to do GUI development for Windows without buying a set of <a href="http://devexpress.com/">third-party controls</a>.</p>
<p>My must-have software for writing Mac/iPhone applications:</p>
<ul>
<li><a href="http://developer.apple.com/TOOLS/xcode/">XCode</a> and <a href="http://developer.apple.com/tools/interfacebuilder.html">Interface Builder</a></li>
<li><a href="http://www.apple.com/macosx/developertools/instruments.html">Instruments</a></li>
<li><a href="http://www.macports.org/">MacPorts</a> to install all of the software that is missing from the base OS X install</li>
<li><a href="http://www.apple.com/macosx/features/mail.html">Mail.app</a>, <a href="http://www.mrrsoftware.com/MRRSoftware/Syrinx.html">Syrinx</a>, <a href="http://www.adiumx.com/">Adium</a> and <a href="http://colloquy.info/">Colloquy</a> to keep in touch with other developers</li>
</ul>
<p><a href="http://www.flickr.com/photos/21254914@N04/3312845171" title="View 'Cocoa Development' on Flickr.com">
<div style="text-align:center;"><img src="http://farm4.static.flickr.com/3616/3312845171_b6fbb0c611.jpg" alt="Cocoa Development" border="0" width="500" height="313" /></div>
<p></a></p>
<p>And finally, a few additional pieces of software that are invaluable to me. These are helpful regardless of what type of software I am writing.</p>
<ul>
<li><a href="http://www.omnigroup.com/applications/omnifocus/">OmniFocus</a> to help me Get Things Done</li>
<li><a href="http://git-scm.com/">git</a> for source control (don&#8217;t tell anyone but I keep my TFS repositories checked into git too)</li>
<li><a href="http://en.wikipedia.org/wiki/Apple_Terminal">Terminal.app</a> for a whole bunch of things</li>
<li><a href="http://www.cocoatech.com/">PathFinder</a> because Finder doesn&#8217;t always cut it</li>
<li><a href="http://projects.tynsoe.org/en/geektool/">GeekTool</a> to keep an eye on logs</li>
<li><a href="http://www.vim.org/">vim</a></li>
<li><a href="http://www.gnu.org/software/screen/">screen</a></li>
<li><a href="http://en.wikipedia.org/wiki/Photoshop">Photoshop</a></li>
<li><a href="http://www.apple.com/itunes/">iTunes</a> to help keep me in <a href="http://www.randsinrepose.com/archives/2006/07/10/a_nerd_in_a_cave.html">The Zone</a>!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.zobie.com/2009/02/the-rest-of-my-development-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Development Environment</title>
		<link>http://blog.zobie.com/2009/02/web-development-environment/</link>
		<comments>http://blog.zobie.com/2009/02/web-development-environment/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 07:13:33 +0000</pubDate>
		<dc:creator>zobie</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.zobie.com/?p=121</guid>
		<description><![CDATA[During 2008 I spent most of my time doing web development. There was some Java, PHP and Python, but most of my time was spent working in Ruby on Rails. Rails is a lot of fun and (I know this sounds cheesy, but&#8230;) it helped me to enjoy doing web development again.
When I&#8217;m working in [...]]]></description>
			<content:encoded><![CDATA[<p>During 2008 I spent most of my time doing web development. There was some Java, PHP and Python, but most of my time was spent working in Ruby on Rails. Rails is <em>a lot</em> of fun and (I know this sounds cheesy, but&#8230;) it helped me to enjoy doing web development again.</p>
<p>When I&#8217;m working in Java I always prefer to use <a href="http://www.jetbrains.com/">JetBrains&#8217;</a> excellent <a href="http://www.jetbrains.com/idea/">IntelliJ IDEA</a>. However, this past year I didn&#8217;t have a license for IntelliJ. I tried every free IDE I could find and wound up choosing <a href="http://www.eclipse.org/">Eclipse</a>. I&#8217;ve used Eclipse periodically over the last several years. I don&#8217;t really like it but I dislike it less than the other free alternatives.</p>
<p>My work was completely server-side and didn&#8217;t involve developing a database component. Most of my development was done on OS X but I was deploying to Ubuntu so I did work there also. I used <a href="http://maven.apache.org/">maven</a> to build, test and deploy. I&#8217;m not a unit-test fanatic but, in this case unit testing was invaluable.</p>
<p><a href="http://www.flickr.com/photos/21254914@N04/3283428513" title="View 'Java Development' on Flickr.com">
<div style="text-align:center;"><img src="http://farm4.static.flickr.com/3287/3283428513_cef4107e92.jpg" alt="Java Development" border="0" width="500" height="313" /></div>
<p></a></p>
<p>My setup for both PHP and Python is the same. When I&#8217;m working on Mac I use either <a href="http://macromates.com/">TextMate</a> or <a href="http://www.vim.org/">vim</a>. I haven&#8217;t done a great deal of Python work but over the past several years I&#8217;ve tried to find a PHP IDE that I like&#8230; I&#8217;m still looking.</p>
<p><a href="http://www.flickr.com/photos/21254914@N04/3284249898" title="View 'PHP Development' on Flickr.com">
<div style="text-align:center;"><img src="http://farm4.static.flickr.com/3453/3284249898_9d15fb09fb.jpg" alt="PHP Development" border="0" width="500" height="313" /></div>
<p></a></p>
<p>I started out doing my Ruby work using TextMate and Terminal.app. I didn&#8217;t have any major complaints. There are some nice plugins and various tricks that are handy. But personally, I prefer an IDE. I&#8217;ve heard some people say that IDEs make us lazy. Ok, I&#8217;m lazy. But I&#8217;m also far more productive when I have a good IDE. When JetBrains started issung beta releases of <a href="http://www.jetbrains.com/ruby/">RubyMine</a>, TextMate was history!</p>
<p>RubyMine&#8217;s GUI for easily stepping through code in the debugger is great. The inline code analysis is nice for quickly catching typos and the code completion can be useful too. But for me, the best part about having RubyMine is the navigation and documentation.</p>
<p>When I&#8217;m working with other developers (or even with frameworks that I didn&#8217;t write), I don&#8217;t always know exactly what a method does. Being able to instantly bring up documentation is awesome! If I need more information, I hate wasting time trying to hunt down a method buried in code that I am not familiar with. With one key-stroke RubyMine takes me to the code I&#8217;m looking for.</p>
<p><a href="http://www.flickr.com/photos/21254914@N04/3284249934" title="View 'Rails Development' on Flickr.com">
<div style="text-align:center;"><img src="http://farm4.static.flickr.com/3513/3284249934_1cab946dfd.jpg" alt="Rails Development" border="0" width="500" height="313" /></div>
<p></a></p>
<p>I am definitely a fan of JetBrains&#8217; production. IntelliJ is awesome, RubyMine is awesome, and VisualStudio is just broken without <a href="http://www.jetbrains.com/resharper/">ReSharper</a>. There is certainly a learning curve to these tools but once you&#8217;ve memorized the key strokes, the code you need is always right in front of you. And the best part part is that the key bindings are the same across each of JetBrain&#8217;s products!</p>
<p>One last application that deserves to be mentioned is <a href="http://mysql.navicat.com/">Navicat</a>. Navicat is by far the best application that I&#8217;ve found for working with MySQL or PostgreSQL. Unfortunately, that&#8217;s not saying much. I have spent a lot of time using SQL Server and Microsoft&#8217;s related tools and, as far as I can tell, there is nothing for MySQL that is even in the same league.</p>
<p>Don&#8217;t misunderstand me. Navicat is a great tool. Allowing me to save connections to different servers with many different login credentials is a lifesaver, especially the ability to tunnel the connections over ssh. Being able to do basic server management via a GUI is nice too. But when I need to design a database, I always turn back to <a href="http://en.wikipedia.org/wiki/SQL_Server_Management_Studio">SQL Server Management Studio</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zobie.com/2009/02/web-development-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Development Environment</title>
		<link>http://blog.zobie.com/2009/01/my-development-environment/</link>
		<comments>http://blog.zobie.com/2009/01/my-development-environment/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 08:11:06 +0000</pubDate>
		<dc:creator>zobie</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.zobie.com/?p=112</guid>
		<description><![CDATA[Last month I found something new on Facebook, it&#8217;s called Puzzle Master. I don&#8217;t know for certain, but Puzzle Master seems to be run by Facebook (the corporation) as a way to find new development talent.
When I first discovered Puzzle Master the running contest was:
To enter the contest, upload to our fan photo album, a [...]]]></description>
			<content:encoded><![CDATA[<p>Last month I found something new on Facebook, it&#8217;s called <a href="http://www.facebook.com/jobs_puzzles">Puzzle Master</a>. I don&#8217;t know for certain, but Puzzle Master seems to be run by Facebook (the corporation) as a way to find new development talent.</p>
<p>When I first discovered Puzzle Master <a href="http://www.facebook.com/home.php#/note.php?note_id=38587514414">the running contest was</a>:</p>
<blockquote><p>To enter the contest, upload to our fan photo album, a screenshot of your desktop and development environment (including as many editors and tools as you can, and your desktop wallpaper) along with a short essay of 250 words or less explaining why and how you use it.</p></blockquote>
<p>I don&#8217;t generally participate in this type of contest but I always find it interesting to see how other developers work. There were some cool prizes available and not many entrants so I decided to upload a <a href="http://www.facebook.com/home.php#/photo.php?pid=1620204&#038;op=1&#038;view=all&#038;subj=15325934266&#038;id=669671291">screenshot of my desktop</a>.</p>
<p>I was disappointed because the picture was scaled down so much that the apps were indistinguishable. So, I decided that it might be fun to do a few posts on my development environments.</p>
<p>First up&#8230; my physical setup!<br />
<a href="http://www.flickr.com/photos/21254914@N04/3175003022" title="View 'My Desk' on Flickr.com">
<div style="text-align:center;"><img src="http://farm4.static.flickr.com/3095/3175003022_7dc2bdffa9.jpg" alt="My Desk" border="0" width="500" height="375" /><br /><em>The picture is a link to flickr where I&#8217;ve attached some notes to the image.</em></div>
<p></a></p>
<ul>
<li>MacPro (2 x 2.66GHz Dual-core Xeon) with 8 GB and ~2.5 TB</li>
<li>Two 24&#8243; Dell monitors, both at 1920&#215;1200</li>
<li>Mac OS X 10.5</li>
<li>VMWare Fusion running XP SP3</li>
</ul>
<p>This is my home office but my work setup is similar. At work my MacPro is 2 x 2.8 GHz Quad-core. It has 12 GB memory and a single 500 GB disk. Maybe I&#8217;ll try to update this post later with a picture of my desk at work.</p>
<hr />
<p><strong>Update:</strong><br />
Here&#8217;s my desk at work!<br />
<a href="http://www.flickr.com/photos/21254914@N04/3254045787" title="View 'My Desk at Work' on Flickr.com">
<div style="text-align:center;"><img src="http://farm4.static.flickr.com/3334/3254045787_707b5f5c5c.jpg" alt="My Desk at Work" border="0" width="500" height="375" /></div>
<p></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zobie.com/2009/01/my-development-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s so great about git?</title>
		<link>http://blog.zobie.com/2009/01/whats-so-great-about-git/</link>
		<comments>http://blog.zobie.com/2009/01/whats-so-great-about-git/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 06:00:46 +0000</pubDate>
		<dc:creator>zobie</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://blog.zobie.com/?p=93</guid>
		<description><![CDATA[Over the last few days, I have been asked several times why I like git. Many explanations and detailed comparisons exist that discuss how git compares to other version control systems. I&#8217;m not going to try and duplicate any of that work. These are just some thoughts about features in git that allow me to [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last few days, I have been asked several times why I like git. <a href="http://git-scm.com/about">Many</a> <a href="http://www.youtube.com/watch?v=4XpnKHJAok8">explanations</a> <a href="http://www.youtube.com/watch?v=8dhZ9BXQgc4">and</a> <a href="http://git.or.cz/gitwiki/GitSvnComparsion">detailed</a> <a href="http://whygitisbetterthanx.com">comparisons</a> exist that discuss how git compares to other version control systems. I&#8217;m not going to try and duplicate any of that work. These are just some thoughts about features in git that allow me to work more productively.</p>
<p>I didn&#8217;t immediately grok git because it is fundamentally different from subversion. Subversion tracks the history of files whereas Git tracks the history of content. That difference may seem minor, but the shift brings a lot of flexibility. You can expect a small learning curve, but don&#8217;t give up! If git works as well for you as it does for me, you will not want to go back to subversion.</p>
<p>So, what are my favorite things about git?</p>
<ul>
<li><strong>Branching:</strong> Coming from a CVS/SVN background, I didn&#8217;t think git&#8217;s &#8220;cheap branching&#8221; would matter to me. I am not exaggerating when I say that it has dramatically changed the way I work. Because branching and merging are so easy, I create a new branch for each feature or bug I&#8217;m working on. I am never tempted to check in broken code just because I want a checkpoint.</li>
<li><strong>The index:</strong> It is really nice to be able to just check in a portion of the changes in my code rather than having to commit the entire file.</li>
<li><strong>git stash:</strong> If I&#8217;m in the middle of some big change and need to fix a small bug, I can hide my outstanding changes, make the fix and restore my changes without a checkin.</li>
<li><strong>git rebase:</strong> Sometimes it is really handy to be able to rewrite history.</li>
<li><strong>Git is a <a href="http://en.wikipedia.org/wiki/Distributed_revision_control">DVCS</a>:</strong> My work isn&#8217;t crippled when I am not connected to the network. I can check code in and out. I can branch and merge. I have a full history of the repository. Awesome!</li>
<li><strong>Very flexible workflow:</strong> With git I can push/pull to a central server like CVS or SVN. Alternatively, changes can bypass the server and be sent directly between working repositories.</li>
<li><strong>Git is fast:</strong> Neither CVS nor SVN come close to git&#8217;s speed.</li>
</ul>
<p>Is git perfect? No. Off the top of my head, here are some things that I would really like to have in git:</p>
<ul>
<li><strong>git checkout -i:</strong> Sometimes I want to rollback a few changes in a file. I imagine this would work very similarly to &#8216;git add -i&#8217;.</li>
<li><strong>git stash -i:</strong> Sometimes I only want to stash some of my changes. This too would work like &#8216;git add -i&#8217;.</li>
<li><strong>Local tags:</strong> Local branches are great; local tagging would be too.</li>
<li><strong>Track empty directories:</strong> I understand why this doesn&#8217;t currently happen, but it can be obnoxious.</li>
<li><strong>Comments on branches:</strong> It is easy to make a lot of branches but unless your branch names are super descriptive (and therefore super long), it is also easy to forget what each of them is for.</li>
<li><strong>Better/more documentation:</strong> In general I am able to find what I&#8217;m looking for, but I still don&#8217;t know what the &#8220;fetch-all&#8221; in <code>git svn fetch --fetch-all</code> actually does.</li>
<li><strong>Windows support:</strong> Not that I&#8217;ve actually tried it, I&#8217;ve just heard that it doesn&#8217;t work well.</li>
<li><strong>GUI options:</strong> Most of the time I work in the cli but sometimes a gui is more convienent. I&#8217;ve heard multiple people ask for a tool that would allow them to branch and tag without checking out code. <a href="http://www.kernel.org/pub/software/scm/git/docs/gitk.html">gitk</a> and <a href="http://wiki.github.com/pieter/gitx">gitx</a> just don&#8217;t offer all the flexibility that some other tools do (e.g. <a href="http://www.wincvs.org/">WinCVS</a>, <a href="http://www.syntevo.com/smartsvn/">SmartSVN</a>, <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a>, etc.).</li>
</ul>
<p>Why do you like (or hate) git?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zobie.com/2009/01/whats-so-great-about-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Read-only Models in ActiveRecord</title>
		<link>http://blog.zobie.com/2009/01/read-only-models-in-activerecord/</link>
		<comments>http://blog.zobie.com/2009/01/read-only-models-in-activerecord/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 06:26:40 +0000</pubDate>
		<dc:creator>zobie</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.zobie.com/?p=75</guid>
		<description><![CDATA[I recently worked on a project that was built around several hundred GB of data. Several large databases were populated by one team and then consumed by several other applications.
The project I was working on needed to access that data but would never need to modify it. Perhaps I was being overly paranoid, but I [...]]]></description>
			<content:encoded><![CDATA[<p>I recently worked on a project that was built around several hundred GB of data. Several large databases were populated by one team and then consumed by several other applications.</p>
<p>The project I was working on needed to access that data but would never need to modify it. Perhaps I was being overly paranoid, but I wanted to specify that everything from those databases was read-only to make sure nothing was accidently changed.</p>
<p>ActiveRecord is one of the coolest things about rails. With almost no work I get data models, including dead-simple CRUD, in my applications. But the inability to designate a model as being read-only is really frustrating to me.</p>
<p>I know that rails can mark individual instances with <code>:readonly</code>, but I wanted to ensure that <em>every</em> instance of these objects was read-only. Here&#8217;s what I came up with:</p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> FooBar <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>
  <span style="color:#008000; font-style:italic;"># Prevent creation of new records and modification to existing records</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> readonly?
    <span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#0000FF; font-weight:bold;">true</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># Prevent objects from being destroyed</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> before_destroy
    <span style="color:#CC0066; font-weight:bold;">raise</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::ReadOnlyRecord</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>And that&#8217;s all there is to it! FooBar objects are now read-only.</p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># You will not be able to create new records</span>
<span style="color:#006600; font-weight:bold;">&gt;&gt;</span> fb = FooBar.<span style="color:#9900CC;">create</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:name</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;zork&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#6666ff; font-weight:bold;">ActiveRecord::ReadOnlyRecord</span>: <span style="color:#6666ff; font-weight:bold;">ActiveRecord::ReadOnlyRecord</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># You will not be able to save modified records</span>
<span style="color:#006600; font-weight:bold;">&gt;&gt;</span> fb = FooBar.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:first</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#006600; font-weight:bold;">&gt;&gt;</span> fb.<span style="color:#9900CC;">name</span> = <span style="color:#996600;">&quot;plugh&quot;</span>
<span style="color:#006600; font-weight:bold;">&gt;&gt;</span> fb.<span style="color:#5A0A0A; font-weight:bold;">save</span>
<span style="color:#6666ff; font-weight:bold;">ActiveRecord::ReadOnlyRecord</span>: <span style="color:#6666ff; font-weight:bold;">ActiveRecord::ReadOnlyRecord</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># You will not be able to destroy existing records</span>
<span style="color:#006600; font-weight:bold;">&gt;&gt;</span> fb = FooBar.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:first</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#006600; font-weight:bold;">&gt;&gt;</span> fb.<span style="color:#5A0A0A; font-weight:bold;">destroy</span>
<span style="color:#6666ff; font-weight:bold;">ActiveRecord::ReadOnlyRecord</span>: <span style="color:#6666ff; font-weight:bold;">ActiveRecord::ReadOnlyRecord</span></pre></div></div>

<p>For the sake of simplicity the code here is in a regular rails model. But if you&#8217;re working with a large number of models like I was, you might consider extracting these methods into a new class &#8220;ReadOnlyActiveRecord&#8221; which can then used as the parent for the other models. DRY, right?</p>
<p>Depending on your situation, you may need to lock down the record more tightly. With this code you could still create and manipulate new FooBar objects in your code. The exception isn&#8217;t thrown until you try to persist to the database.</p>
<p>I certainly don&#8217;t consider myself an expert on rails. If anyone knows a better solution to this problem I&#8217;d love to hear it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zobie.com/2009/01/read-only-models-in-activerecord/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>I&#8217;m not an idiot&#8230; I promise!</title>
		<link>http://blog.zobie.com/2008/12/im-not-an-idiot-i-promise/</link>
		<comments>http://blog.zobie.com/2008/12/im-not-an-idiot-i-promise/#comments</comments>
		<pubDate>Sat, 27 Dec 2008 22:18:39 +0000</pubDate>
		<dc:creator>zobie</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[job search]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://blog.zobie.com/?p=71</guid>
		<description><![CDATA[I hate new jobs. I like getting to work on new projects, I like learning new things and I like meeting new people, but I hate the actual &#8220;new job&#8221; stuff. I don&#8217;t like looking for jobs, I don&#8217;t like interviewing, I don&#8217;t like being the new guy who doesn&#8217;t know anything. Due to circumstances [...]]]></description>
			<content:encoded><![CDATA[<p>I hate new jobs. I like getting to work on new projects, I like learning new things and I like meeting new people, but I hate the actual &#8220;new job&#8221; stuff. I don&#8217;t like looking for jobs, I don&#8217;t like interviewing, I don&#8217;t like being the new guy who doesn&#8217;t know anything. Due to circumstances related to the recent economic turmoil, I decided that regardless of my aversion, it would be a good idea to start searching for new employment.</p>
<p>I started looking and, on one of my first phone interviews, was asked, &#8220;What is an interface?&#8221;</p>
<p>I know what an interface is. I&#8217;ve written new interfaces; I can create a class that implements IComparable, IDisposable and IMakeMillionsFromCrazyIdeas without breaking a sweat. I can talk at length about why multiple-inheritance is pure evil and how single-inheritance, combined with interfaces, will solve every problem known to man. If you would prefer, I can argue the inverse. But, when asked, &#8220;What is an interface?&#8221; I babble like an idiot:</p>
<blockquote><p>Oh, an interface is a thing that classes have and they start with an &#8216;I&#8217; in C# anyway but it&#8217;s by convention not a requirement and they come after the class name and a colon and they help us to do things so that when other classes want to do something they know that our class can be used to do that thing because our class implements the interface.</p></blockquote>
<p>I&#8217;s a rel gud programur. I got teh 1337 h@X0r skillz. yeah&#8230; </p>
<p>I knew the answer, but on the spot, I couldn&#8217;t figure out how to intelligently convey that knowledge. I hadn&#8217;t been asked to verbalize that knowledge for a long time. Since I don&#8217;t like feeling like an idiot, I spent some time googling &#8220;interview questions.&#8221; I don&#8217;t remember which site recommended the book, but I ended up buying <a href="http://www.amazon.com/gp/product/047012167X?ie=UTF8&#038;tag=zobie-blog-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=047012167X">Programming Interviews Exposed: Secrets to Landing Your Next Job, 2nd Edition</a><img src="http://www.assoc-amazon.com/e/ir?t=zobie-blog-20&#038;l=as2&#038;o=1&#038;a=047012167X" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.</p>
<p><em>Programming Interviews Exposed</em> was a good purchase. If you you&#8217;re not already familiar with some basic concepts of computer science I doubt this book would be very useful. But for me it was a great refresher on concepts I use regularly, but hadn&#8217;t consciously thought about for a while. Who thinks about the nuts and bolts of programming when you&#8217;re in the zone, and it&#8217;s just flowing?</p>
<p>As you would expect from a job hunting book, there are chapters on the basics of job hunting: how to decide what companies you want to work for, how to find job opportunities, how to work with headhunters, how to negotiate offers, etc. I wouldn&#8217;t necessarily consider myself an interview-pro but, many of these tips just seemed like common sense.</p>
<p>The book describes methods for solving riddles and how to answer questions. It doesn&#8217;t just provide a bunch answers to memorize but discusses ways to convey your knowledge and experience to the interviewer (hint: keep talking and explain what you are thinking). The chapters that I found most useful were the computer science topics: linked lists, trees and graphs, arrays and strings, concurrency, etc. The book gives questions that might be presented in an interview then explains the answers.</p>
<p>To date, I haven&#8217;t been asked any of the questions presented in <em>Programming Interviews Exposed</em>. Reading examples of various ways to traverse trees and reverse strings was useful. The interviewer does <strong>not</strong> want <code>return new string (Array.Reverse ("xyzzy".ToCharArray()));</code>. It was useful enough that, when asked to calculate the weight of tree nodes and return a specific node in O(n) time, I felt confident in my answer.</p>
<p><a href="http://www.amazon.com/gp/product/047012167X?ie=UTF8&#038;tag=zobie-blog-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=047012167X">Programming Interviews Exposed</a><img src="http://www.assoc-amazon.com/e/ir?t=zobie-blog-20&#038;l=as2&#038;o=1&#038;a=047012167X" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> will most likely benefit those who are already familiar with basic computer science concepts. It&#8217;s a quick read and quite effective. Good luck with your next interview!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zobie.com/2008/12/im-not-an-idiot-i-promise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Managing WordPress Updates with Git</title>
		<link>http://blog.zobie.com/2008/12/managing-wordpress-updates-with-git/</link>
		<comments>http://blog.zobie.com/2008/12/managing-wordpress-updates-with-git/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 06:00:35 +0000</pubDate>
		<dc:creator>zobie</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.zobie.com/?p=64</guid>
		<description><![CDATA[WordPress 2.7 was recently released so I started the process of updating the handful of WP instillations that I manage. Git has made this process a breeze! Here&#8217;s how I do it.

To start a new project, use subversion to download the latest stable release of WordPress
Add that entire directory, including the .svn folders, to git. [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress 2.7 was recently released so I started the process of updating the handful of WP instillations that I manage. Git has made this process a breeze! Here&#8217;s how I do it.</p>
<ul>
<li>To start a new project, use subversion to download the latest stable release of WordPress</li>
<li>Add that entire directory, including the .svn folders, to git. To keep subversion happy, make sure that all of the svn tmp directories are in git (use an empty .gitignore file to force git to add empty directories)</li>
<li>Before you make any changes, create a new branch in git called wordpress_base. You should never do anything with this branch other than update the WordPress code from subversion.</li>
<li>Switch back to master and change whatever needs changing (e.g. add themes, plugins, etc.). To make upgrades go as smoothly as possible you shouldn&#8217;t modify the base WordPress files more than you absolutely have to but, adding themes and plugins should be no problem.</li>
<li>When everything is tested and ready to deploy, commit everything to git and push to the webserver</li>
</ul>
<p>The command line will look something like this:</p>

<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>Downloads
$ <span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> http:<span style="color: #000000; font-weight: bold;">//</span>svn.automattic.com<span style="color: #000000; font-weight: bold;">/</span>wordpress<span style="color: #000000; font-weight: bold;">/</span>branches<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2.6</span><span style="color: #000000; font-weight: bold;">/</span> new_blog
$ <span style="color: #7a0874; font-weight: bold;">cd</span> new_blog
$ git init
$ git add .
$ git commit <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;Import WordPress 2.6&quot;</span>
$ git branch wordpress_base
<span style="color: #666666; font-style: italic;">## Get the site completely setup, commit everything to git and</span>
<span style="color: #666666; font-style: italic;">## push everything up to the server.</span></pre></div></div>

</p>
<p>When you&#8217;re ready to update WordPress:</p>
<ul>
<li>Checkout the wordpress_base branch</li>
<li>Either &#8217;svn up&#8217; or &#8217;svn switch&#8217; to get the newest code</li>
<li>Check all of the changes in to git</li>
<li>Merge wordpress_base back in to master (I generally rebase then merge)</li>
<li>After everything in git has been committed, push, pull or do whatever fits your process to get the updated code from your development machine to the server</li>
<li><strong>Don&#8217;t forget to upgrade your blog database</strong> after the new code has been deployed by going to: http://myblog.com/wp-admin/upgrade.php</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ git checkout wordpress_base
$ <span style="color: #c20cb9; font-weight: bold;">svn</span> switch http:<span style="color: #000000; font-weight: bold;">//</span>svn.automattic.com<span style="color: #000000; font-weight: bold;">/</span>wordpress<span style="color: #000000; font-weight: bold;">/</span>branches<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2.7</span>
$ git add . <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> git ls-files <span style="color: #660033;">--deleted</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> git <span style="color: #c20cb9; font-weight: bold;">rm</span>
$ git commit <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;Updated WordPress to version 2.7&quot;</span>
$ git checkout <span style="color: #660033;">-b</span> integration
$ git rebase master
$ git checkout master
$ git merge integration
$ git branch <span style="color: #660033;">-d</span> integration
<span style="color: #666666; font-style: italic;">## Make sure all conflicts have been resolved, test the new site and</span>
<span style="color: #666666; font-style: italic;">## update plugins. Commit changes to git and push them to the server.</span></pre></div></div>
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zobie.com/2008/12/managing-wordpress-updates-with-git/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
