<?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>Beer vs Man &#187; Programming</title>
	<atom:link href="http://www.beervsman.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.beervsman.com</link>
	<description>As nerdy as you want it</description>
	<lastBuildDate>Tue, 19 Apr 2011 23:07:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Vim, MiniBufExpl, NERDTree and the QuickFix window</title>
		<link>http://www.beervsman.com/2010/10/19/vim-minibufexpl-nerdtree-and-the-quickfix-window/</link>
		<comments>http://www.beervsman.com/2010/10/19/vim-minibufexpl-nerdtree-and-the-quickfix-window/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 14:53:55 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.beervsman.com/?p=123</guid>
		<description><![CDATA[<a href="http://www.beervsman.com/2010/10/19/vim-minibufexpl-nerdtree-and-the-quickfix-window/" title="Vim, MiniBufExpl, NERDTree and the QuickFix window"></a>Vim has been my editor of choice for many years now, but only recently have I really started tweaking and fine-tuning my configuration and plugins. I was inspired by this HackerNews thread and I now keep my vim configuration in &#8230;<p class="read-more"><a href="http://www.beervsman.com/2010/10/19/vim-minibufexpl-nerdtree-and-the-quickfix-window/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.beervsman.com/2010/10/19/vim-minibufexpl-nerdtree-and-the-quickfix-window/" title="Vim, MiniBufExpl, NERDTree and the QuickFix window"></a><p>Vim has been my editor of choice for many years now, but only recently have I really started tweaking and fine-tuning my configuration and plugins.  I was inspired by <a href="http://news.ycombinator.com/item?id=1710702">this HackerNews thread</a> and I now keep my <a href="http://github.com/pix0r/dotvim">vim configuration</a> in GitHub and synchronized between all my machines.  You can even check out a <a href="http://github.com/pix0r/dotvim/blob/master/.gitmodules">list of my Vim plugins</a>.  Some of my favorites, and the ones I&#8217;m writing this post about in particular, are:</p>
<ul>
<li><a href="http://www.vim.org/scripts/script.php?script_id=1658">NERDTree</a>, a filesystem explorer</li>
<li><a href="http://www.vim.org/scripts/script.php?script_id=159">MiniBufExpl</a>, an omnipresent buffer list enabling you to easily see what buffers are open and easily switch to and close them</li>
<li><a href="http://www.vim.org/scripts/script.php?script_id=2572">Vim Ack</a>, a plugin that provides a simple interface to the excellent <a href="http://betterthangrep.com/">Ack</a> utility.</li>
</ul>
<p>Life is great. Or it was, at least, until I started having strange problems with window layouts when I was waist deep in code.  The first lesson I learned is that using Vim&#8217;s <code>:bd</code> command to close a buffer causes problems, namely that if you close the buffer in the current window, it will close the window as well.  There are two fixes for this.  First, after some Googling, I learned about <a href="http://vim.wikia.com/wiki/Deleting_a_buffer_without_closing_the_window">bclose.vim</a>. I mapped &lt;leader&gt;bd to run :Bclose and all was good.  I later learned that MiniBufExpl included this functionality all along &#8211; simply place your cursor over a buffer in the buffer list and press &#8220;d&#8221;.</p>
<p>The second problem I ran into was that after using Ack to search through my project, MiniBufExpl would start opening buffers in unpredictable locations such as the NERDTree left vertical window.  This was very frustrating and I was only able to get back to a sane editing environment after restarting the Vim session all together.  It turns out that the problem was being caused by the way I closed the QuickFix window after browsing through the Ack search results.  I was simply using <code>:q</code>, which is my reflex method of closing a window I don&#8217;t want around any longer.  Some debugging and research shows that the QuickFix window has its rich set of commands, including an open (<code>:copen</code>) and close (<code>:ccl</code> or <code>:cclose</code>).  Using <code>:ccl</code> to close my Ack results has solved this problem entirely.</p>
<p>Life with Vim is better than ever.  If you&#8217;re a Vim user or have even considered it, I&#8217;d really recommend checking out some sample vimrc files, finding and installing some plugins you love, and most importantly keeping your configuration synchronized between all of your development machines.</p>
<p><strong>UPDATE:</strong> It turns out that <code>:ccl</code> was not the simple fix I was hoping it would be.  After using Ack, MiniBufExpl still sends buffers to the NERDTree window. HALP!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beervsman.com/2010/10/19/vim-minibufexpl-nerdtree-and-the-quickfix-window/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tidy JSON for PHP</title>
		<link>http://www.beervsman.com/2010/10/18/tidy-json-for-php/</link>
		<comments>http://www.beervsman.com/2010/10/18/tidy-json-for-php/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 02:54:41 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.beervsman.com/?p=113</guid>
		<description><![CDATA[<a href="http://www.beervsman.com/2010/10/18/tidy-json-for-php/" title="Tidy JSON for PHP"></a>I wrote a simple PHP utility that will convert ugly, convoluted JSON into a nicer, standard format. It doesn&#8217;t perform any validation and is not optimized whatsoever &#8211; but maybe it&#8217;s just what you&#8217;re looking for. You can find it &#8230;<p class="read-more"><a href="http://www.beervsman.com/2010/10/18/tidy-json-for-php/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.beervsman.com/2010/10/18/tidy-json-for-php/" title="Tidy JSON for PHP"></a><p>I wrote a simple PHP utility that will convert ugly, convoluted JSON into a nicer, standard format.  It doesn&#8217;t perform any validation and is not optimized whatsoever &#8211; but maybe it&#8217;s just what you&#8217;re looking for.  You can find it over on <a href="http://github.com/">github</a>: <a href="http://github.com/pix0r/tidyjson">Tidy JSON</a>.</p>
<p>Usage:</p>
<pre class="brush: php; title: ; notranslate">&lt;?php

require 'tidyjson.php';

$json = '{&quot;foo&quot;:&quot;bar&quot;,&quot;baz&quot;:[1,2,5]}';
$tidy = TidyJSON::tidy($json);

?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.beervsman.com/2010/10/18/tidy-json-for-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Growl Notification for Subversion</title>
		<link>http://www.beervsman.com/2010/05/04/growl-notification-for-subversion/</link>
		<comments>http://www.beervsman.com/2010/05/04/growl-notification-for-subversion/#comments</comments>
		<pubDate>Tue, 04 May 2010 19:15:07 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.beervsman.com/?p=86</guid>
		<description><![CDATA[<a href="http://www.beervsman.com/2010/05/04/growl-notification-for-subversion/" title="Growl Notification for Subversion"></a>I&#8217;ve written a little shell script that can be used to poll a Subversion repository and notify you via Growl when new revisions are added. To start using it, download svn-growlnotify from github, copy svn-growlnotify.sh somewhere so you don&#8217;t lose &#8230;<p class="read-more"><a href="http://www.beervsman.com/2010/05/04/growl-notification-for-subversion/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.beervsman.com/2010/05/04/growl-notification-for-subversion/" title="Growl Notification for Subversion"></a><p>I&#8217;ve written a little shell script that can be used to poll a Subversion repository and notify you via Growl when new revisions are added.</p>
<p>To start using it, download <a href="http://gist.github.com/gists/389816/download">svn-growlnotify</a> from github, copy svn-growlnotify.sh somewhere so you don&#8217;t lose it, make sure it is executable (chmod +x svn-growlnotify.sh), and set up a crontab entry to run it with your repository URL:</p>
<p><code>* * * * * /path/to/svn-growlnotify.sh -s http://your.repository.url/ 1>/dev/null 2>&#038;1</code></p>
<p>Here&#8217;s the source code:</p>
<p><script src="http://gist.github.com/389816.js?file=svn-growlnotify.sh"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.beervsman.com/2010/05/04/growl-notification-for-subversion/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Subversion with LDAP on Windows Vista</title>
		<link>http://www.beervsman.com/2009/02/16/subversion-with-ldap-on-windows-vista/</link>
		<comments>http://www.beervsman.com/2009/02/16/subversion-with-ldap-on-windows-vista/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 19:55:53 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.beervsman.com/?p=68</guid>
		<description><![CDATA[<a href="http://www.beervsman.com/2009/02/16/subversion-with-ldap-on-windows-vista/" title="Subversion with LDAP on Windows Vista"></a>At 2Advanced we are using Subversion to manage project files, using LDAP for authentication on our Windows domain and Exchange server. This system works very well, but when we switched to Windows Vista we started having intermittent issues on various &#8230;<p class="read-more"><a href="http://www.beervsman.com/2009/02/16/subversion-with-ldap-on-windows-vista/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.beervsman.com/2009/02/16/subversion-with-ldap-on-windows-vista/" title="Subversion with LDAP on Windows Vista"></a><p>At <a href="http://www.2advanced.com/">2Advanced</a> we are using <a href="http://subversion.tigris.org/">Subversion</a> to manage project files, using LDAP for authentication on our Windows domain and Exchange server.</p>
<p>This system works very well, but when we switched to Windows Vista we started having intermittent issues on various workstations.  <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a>, our svn client of choice, will occasionally fail with an &#8220;Unauthorized&#8221; error or other similar error message when doing a commit.  We noticed that this normally happens during a longer commit, and TortoiseSVN will usually re-prompt for a username/password partway through the commit before failing.  I&#8217;m not sure why, but sometimes Tortoise will use the Windows user&#8217;s credentials to access the repository, but sometimes it will prompt you to enter a username/password.  In order to avoid getting the error message, you need to ensure that, if you are prompted to re-enter your username/password, you use the exact same string (matching case) that was used initially.  If the strings dont&#8217; match exactly, the commit will fail because it thinks two separate authors are sending the same commit.</p>
<p>I&#8217;m mostly posting this for my own reference because I keep forgetting exactly what&#8217;s causing this strange problem.</p>
<p>Another key when setting up SVN with LDAP on a Windows domain is to create a group for each user &#8211; including all possible permutations of that user&#8217;s username</p>
<p><code>username = DOMAIN\Username, DOMAIN\\Username, Username, DOMAIN\username, DOMAIN\\username, username</code></p>
<p><code>MyGroup = @username, @otherusername</code></p>
<p><code>[/MyClient/MyProject]<br />
@MyGroup = rw<br />
* =</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.beervsman.com/2009/02/16/subversion-with-ldap-on-windows-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FavTwits, a Twitter tool</title>
		<link>http://www.beervsman.com/2009/02/12/favtwits-a-twitter-tool/</link>
		<comments>http://www.beervsman.com/2009/02/12/favtwits-a-twitter-tool/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 23:40:45 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.beervsman.com/2009/02/12/favtwits-a-twitter-tool/</guid>
		<description><![CDATA[<a href="http://www.beervsman.com/2009/02/12/favtwits-a-twitter-tool/" title="FavTwits, a Twitter tool"></a>FavTwits is a tool I just wrote that explores your relationships with other Twitter users through your and their use of @username tweets. Find out who you are tweeting with the most, and plot the results on a weekly activity &#8230;<p class="read-more"><a href="http://www.beervsman.com/2009/02/12/favtwits-a-twitter-tool/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.beervsman.com/2009/02/12/favtwits-a-twitter-tool/" title="FavTwits, a Twitter tool"></a><p><a href="http://favtwits.com/">FavTwits</a> is a tool I just wrote that explores your relationships with other Twitter users through your and their use of @username tweets.  Find out who you are tweeting with the most, and plot the results on a weekly activity chart.</p>
<p>Comments, suggestions?  Let me know.  Want to help me out w/ a decent design?  Go for it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beervsman.com/2009/02/12/favtwits-a-twitter-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>That&#8217;s What She Said iPhone App</title>
		<link>http://www.beervsman.com/2009/02/09/thats-what-she-said-iphone-app/</link>
		<comments>http://www.beervsman.com/2009/02/09/thats-what-she-said-iphone-app/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 15:49:32 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.beervsman.com/?p=60</guid>
		<description><![CDATA[<a href="http://www.beervsman.com/2009/02/09/thats-what-she-said-iphone-app/" title="That&#039;s What She Said iPhone App"></a>I recently released my first iPhone app: That&#8217;s What She Said iPhone App. Visit the site, download it through the App Store, and let me know what you think. Here is the Direct Link to the iTunes App Store. Enjoy!]]></description>
			<content:encoded><![CDATA[<a href="http://www.beervsman.com/2009/02/09/thats-what-she-said-iphone-app/" title="That&#039;s What She Said iPhone App"></a><p>I recently released my first iPhone app: <a href="http://www.thatswhatshesaidiphoneapp.com/">That&#8217;s What She Said iPhone App</a>.  Visit the site, download it through the App Store, and let me know what you think.  Here is the <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=304087797">Direct Link to the iTunes App Store</a>.</p>
<div id="attachment_61" class="wp-caption alignnone" style="width: 330px"><a href="http://www.thatswhatshesaidiphoneapp.com/"><img src="http://www.beervsman.com/wp-content/uploads/2009/02/screenshot.jpg" alt="It&#039;s never been easier to turn any discussion into a funny and usually obscene joke!" title="That&#039;s What She Said screenshot" width="320" height="480" class="size-full wp-image-61" /></a><p class="wp-caption-text">It's never been easier to turn any discussion into a funny and usually obscene joke!</p></div>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beervsman.com/2009/02/09/thats-what-she-said-iphone-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Email masking with Javascript</title>
		<link>http://www.beervsman.com/2009/01/19/email-masking-with-javascript/</link>
		<comments>http://www.beervsman.com/2009/01/19/email-masking-with-javascript/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 01:12:17 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.beervsman.com/?p=51</guid>
		<description><![CDATA[<a href="http://www.beervsman.com/2009/01/19/email-masking-with-javascript/" title="Email masking with Javascript"></a>Really simple code for hiding your email address: &#60;a href="mailto:mike-at-pixor.net" onclick="this.href=this.href.replace(/-at-/,'@')"&#62; email me &#60;/a&#62; Probably lots of other, better ways around but this is easy enough to remember without needing to search every time. Pretty sweet that I didn&#8217;t post &#8230;<p class="read-more"><a href="http://www.beervsman.com/2009/01/19/email-masking-with-javascript/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.beervsman.com/2009/01/19/email-masking-with-javascript/" title="Email masking with Javascript"></a><p>Really simple code for hiding your email address:</p>
<p><code>&lt;a href="mailto:mike-at-pixor.net" onclick="this.href=this.href.replace(/-at-/,'@')"&gt; email me &lt;/a&gt;</code></p>
<p>Probably lots of other, better ways around but this is easy enough to remember without needing to search every time.</p>
<p>Pretty sweet that I didn&#8217;t post all of 2008 and now I&#8217;ve posted two days in a row huh?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beervsman.com/2009/01/19/email-masking-with-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Developing iPhone Software</title>
		<link>http://www.beervsman.com/2009/01/18/developing-iphone-software/</link>
		<comments>http://www.beervsman.com/2009/01/18/developing-iphone-software/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 17:41:24 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.beervsman.com/?p=50</guid>
		<description><![CDATA[<a href="http://www.beervsman.com/2009/01/18/developing-iphone-software/" title="Developing iPhone Software"></a>I&#8217;ve recently started writing iPhone Software and it is a frustrating yet satisfying process. Objective-C is an interesting language and was actually a lot of fun to learn. The Cocoa Touch SDK seems more frustrating because there is somewhat of &#8230;<p class="read-more"><a href="http://www.beervsman.com/2009/01/18/developing-iphone-software/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.beervsman.com/2009/01/18/developing-iphone-software/" title="Developing iPhone Software"></a><p>I&#8217;ve recently started writing <a href="http://flyingyeti.us/iphone">iPhone Software</a> and it is a frustrating yet satisfying process.  Objective-C is an interesting language and was actually a lot of fun to learn.  The Cocoa Touch SDK seems more frustrating because there is somewhat of a lack of example code and open source software due to the <a href="http://www.macworld.com/article/135826/2008/10/nda_dead.html">Apple&#8217;s iPhone NDA</a> that was recently lifted.  Thankfully Apple&#8217;s documentation is fairly complete and there are a few great resources such as <a href="http://iphonedevelopment.blogspot.com/">Jeff LaMarche&#8217;s iPhone Development Blog</a>.</p>
<p>I hope to start releasing some simple free apps and maybe even a more complex game or application in the near future.  I have a few ideas bouncing around in my head but if you&#8217;ve got something in mind that you&#8217;d like to see on the iPhone, please <a href="mailto:mike-at-pixor.net?subject=iPhone App Ideas" onclick="this.href=this.href.replace(/-at-/, '@')">drop me a line</a>.</p>
<p>iPhone Programming Resources:</p>
<ul>
<li>&#8220;The Hillegass Book&#8221;: <a href="http://www.amazon.com/Cocoa-Programming-Mac-OS-3rd/dp/0321503619/">Cocoa Programming for Mac OS X</a>.  Not specific to Cocoa Touch, but this is a great introduction to the Objective C language and the Cocoa framework (which is very similar to Cocoa Touch)</li>
<li>Apple&#8217;s <a href="http://developer.apple.com/iphone">iPhone Dev Center</a> has lots of sample code and full documentation of Cocoa Touch and other Apple frameworks</li>
<li>Jeff LaMarche&#8217;s <a href="http://iphonedevelopment.blogspot.com/">iPhone Development Blog</a> is a great resource and has some interesting OpenGL demos with sample code</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.beervsman.com/2009/01/18/developing-iphone-software/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

