<?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>blog.sudosu.net &#187; Programming</title>
	<atom:link href="http://blog.sudosu.net/category/computers/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sudosu.net</link>
	<description>Got root?</description>
	<lastBuildDate>Mon, 21 Dec 2009 18:27:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>File &#8220;Created Date&#8221; Under OS X &#8212; Harder Than You Think</title>
		<link>http://blog.sudosu.net/2009/file-created-date-under-os-x/</link>
		<comments>http://blog.sudosu.net/2009/file-created-date-under-os-x/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 21:28:57 +0000</pubDate>
		<dc:creator>schof</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.sudosu.net/?p=290</guid>
		<description><![CDATA[A client had an OS X server with tens of thousands of files in a directory tree, and wanted to move some of them based on their creation date. I put together a Python script that worked perfectly on my test system, but failed in production. (I put in a &#8220;&#8211;dryrun&#8221; option, so no harm [...]]]></description>
			<content:encoded><![CDATA[<p>A client had an OS X server with tens of thousands of files in a directory tree, and wanted to move some of them based on their creation date. I put together a Python script that worked perfectly on my test system, but failed in production. (I put in a &#8220;&#8211;dryrun&#8221; option, so no harm was done.)</p>
<p>The modification date the script reported was correct, but the creation date the script reported was different from the creation date that doing &#8220;Get Info&#8221; in the OS X Finder reported. Hmm. Not good. I did some investigating.</p>
<p>Let&#8217;s look at a test file. The Finder reports the following creation and modification dates:<br />
<code>Created: Monday, April 10, 2006 17:04<br />
Modified: Thursday, April 13, 2006 15:54</code></p>
<p>Python reports a different creation date and the same modification date:<br />
<code><br />
&gt;&gt;&gt; import os.path<br />
&gt;&gt;&gt; import time<br />
&gt;&gt;&gt; stamp = os.path.getctime('datetest.txt')<br />
&gt;&gt;&gt; time.ctime(stamp)<br />
'Fri Apr 10 15:51:10 2009'<br />
&gt;&gt;&gt; stamp = os.path.getmtime('datetest.txt')<br />
&gt;&gt;&gt; time.ctime(stamp)<br />
'Thu Apr 13 15:54:43 2006'<br />
</code><br />
Hmmm. What does &#8220;ls&#8221; in the Terminal report? The standard &#8220;ls -l&#8221; reports creation date. Adding &#8220;-T&#8221; makes it report the full date in all cases. And &#8220;-c&#8221; counter-intuitively means &#8220;display modification date.&#8221;<br />
<code><br />
$ ls -lT datetest.txt<br />
-rwxr-xr-x@ 1 schof  schof  2448091 Apr 13 15:54:43 2006 datetest.txt<br />
$ ls -lcT datetest.txt<br />
-rwxr-xr-x@ 1 schof  schof  2448091 Apr 10 15:51:10 2009 datetest.txt<br />
</code><br />
The plot thickens. The modification date matches the Finder and Python, but both Python and ls are reporting an incorrect (according to the Finder) creation date.</p>
<p>Quite a bit of Googling showed me the &#8220;<a href="http://developer.apple.com/documentation/Darwin/Reference/Manpages/man1/mdls.1.html">mdls</a>&#8221; tool &#8212; or &#8220;metadata ls.&#8221; Very useful. This shows the complete set of metadata for a file. Including the OS X creation date. Actually, two creation dates, one for the file, and one for the file content. (I&#8217;m not sure what circumstances would make those creation dates differ. The <a href="http://developer.apple.com/macosx/spotlight.html">documentation I&#8217;ve been able to find</a> has been unclear and <a href="http://developer.apple.com/documentation/Carbon/Reference/MetadataAttributesRef/Reference/CommonAttrs.html">contradictory</a>.)</p>
<p><code><br />
$ mdls datetest.txt<br />
kMDItemContentCreationDate     = 2006-04-10 17:04:34 -0700<br />
kMDItemContentModificationDate = 2006-04-13 15:54:43 -0700<br />
...<br />
kMDItemFSContentChangeDate     = 2006-04-13 15:54:43 -0700<br />
kMDItemFSCreationDate          = 2006-04-10 17:04:34 -0700<br />
...<br />
kMDItemLastUsedDate            = 2009-04-11 11:48:03 -0700<br />
kMDItemUsedDates               = (<br />
2009-04-11 00:00:00 -0700<br />
)<br />
</code></p>
<p>Now that we&#8217;ve got all that information, what does it tell us? The Unix/Linux standard for &#8220;creation date&#8221; is to show you the date on which a particular file was created. If you copy file &#8220;a&#8221; to file &#8220;b,&#8221; those are two different files, and the &#8220;creation date&#8221; for file &#8220;b&#8221; will be the date you made the copy.</p>
<p>OS X metadata travels with the file, so if you copy file &#8220;a&#8221; to file &#8220;b&#8221; using ditto on the command-line or using the Finder, the Unix creation date will be the date the copy was done, but the OS X creation date of file &#8220;b&#8221; will be the same as file &#8220;a.&#8221;</p>
<p>There&#8217;s good arguments for handling &#8220;creation date&#8221; the Unix way, and there are good arguments for doing &#8220;creation date&#8221; the OS X way, but mixing them as OS X does is kind of frustrating.</p>
<p>I&#8217;ve written a quick-and-dirty Python example script that reports the Unix creation date and the OS X creation date for any particular file. Since it&#8217;s released under the open-source MIT license, feel free to use it in your own programs. You can download it here: <a href="http://www.sudosu.net/getcreationdate.safe">http://www.sudosu.net/getcreationdate.safe</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sudosu.net/2009/file-created-date-under-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Joel On Software&#8221; By Joel Spolsky</title>
		<link>http://blog.sudosu.net/2008/joel-on-software-by-joel-spolsky/</link>
		<comments>http://blog.sudosu.net/2008/joel-on-software-by-joel-spolsky/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 22:23:41 +0000</pubDate>
		<dc:creator>schof</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.sudosu.net/?p=273</guid>
		<description><![CDATA[If you&#8217;re in the business of developing software, you should read the &#8220;Joel On Software&#8221; book. Period.
(Shortest review I&#8217;ve ever written.)
While I don&#8217;t agree with everything Joel has written, I find most of what he writes to be a clear exposition of common-sense approaches to managing software development. No BS, just simple stuff that works. [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re in the business of developing software, you should read the &#8220;Joel On Software&#8221; book. Period.</p>
<p>(Shortest review I&#8217;ve ever written.)</p>
<p>While I don&#8217;t agree with everything Joel has written, I find most of what he writes to be a clear exposition of common-sense approaches to managing software development. No BS, just simple stuff that works. A small percentage of &#8220;Joel On Software&#8221; is mind-changing, opening your eyes to new ways of doing things or new ways of thinking about old software.</p>
<p>Highly recommended.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sudosu.net/2008/joel-on-software-by-joel-spolsky/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Job Interviews; Personality Does Matter</title>
		<link>http://blog.sudosu.net/2008/job-interview-feedback-personality-does-matter/</link>
		<comments>http://blog.sudosu.net/2008/job-interview-feedback-personality-does-matter/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 01:43:40 +0000</pubDate>
		<dc:creator>schof</dc:creator>
				<category><![CDATA[Management]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.sudosu.net/?p=264</guid>
		<description><![CDATA[I recently interviewed a very intelligent, capable programmer who was near the start of his career. I decided not to make him an offer, and he sent a very nice follow-up e-mail asking for tips on how to present himself better. I figured my reply might be very useful to other applicants, so I&#8217;m posting [...]]]></description>
			<content:encoded><![CDATA[<p>I recently interviewed a very intelligent, capable programmer who was near the start of his career. I decided not to make him an offer, and he sent a very nice follow-up e-mail asking for tips on how to present himself better. I figured my reply might be very useful to other applicants, so I&#8217;m posting most of it here:</p>
<blockquote><p>First, lose the headphones. That didn&#8217;t affect our decision at all, but I could imagine it affecting it at other companies.</p>
<p>Second, you&#8217;re obviously intelligent and capable. You messed up on the unit test, but I&#8217;m attributing that to interview nerves &#8211; I&#8217;m reasonably certain you could handle the technical demands of the job. But that&#8217;s only the first hurdle.</p>
<p>The next is personality and fit with the company &#8212; and this is a sticky one. In an interview, I&#8217;ve got about an hour to decide if you&#8217;re the kind of person I want to spend the next three or more years with, in relatively close quarters. Can you argue a position strongly, but lose gracefully? You may be right about the technical merits of something, but the business reality means we have to do something else &#8212; can you live with that? On a good day, we go two steps forward and one step back &#8212; bad days it&#8217;s one step forwards and two steps back. Can you deal with that frustration? I received certain cues from you &#8212; interrupting, hitting the table during the coding test, etc. &#8212; that you might have been hard to work with. Is that true? I can&#8217;t tell in an hour. But saying &#8220;no&#8221; to a candidate who would have been terrific is a smaller risk than saying &#8220;yes&#8221; to a candidate who turns out to be a bad hire.</p>
<p>I hope you appreciate my honesty in writing this, rather than brushing you off with &#8220;not a good fit.&#8221; I did so because I think your question about your interview performance is sincere, and I&#8217;m hoping my answer helps.</p></blockquote>
<p>If it&#8217;s not obvious from reading the e-mail, <a href="http://www.randsinrepose.com/" target="_blank">Rands</a> has been a big influence on my management style.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sudosu.net/2008/job-interview-feedback-personality-does-matter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Working on the spec for SPBS</title>
		<link>http://blog.sudosu.net/2008/working-on-the-spec-for-spbs/</link>
		<comments>http://blog.sudosu.net/2008/working-on-the-spec-for-spbs/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 18:23:03 +0000</pubDate>
		<dc:creator>schof</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[SPBS]]></category>

		<guid isPermaLink="false">http://blog.sudosu.net/2008/working-on-the-spec-for-spbs/</guid>
		<description><![CDATA[I&#8217;ve been working on the spec for SPBS &#8212; it&#8217;s slow going, as my real job has been taking most of my focus. But I realized that in designing the templating system for the blog, I&#8217;m actually designing a domain-specific mini-language. I think I&#8217;m going to reread that chapter of The Art of Unix Programming.
But [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on the spec for <a href="http://code.google.com/p/spbs/" target="_blank">SPBS</a> &#8212; it&#8217;s slow going, as my real job has been taking most of my focus. But I realized that in designing the templating system for the blog, I&#8217;m actually designing a <a href="http://catb.org/~esr/writings/taoup/html/minilanguageschapter.html" target="_blank">domain-specific mini-language</a>. I think I&#8217;m going to reread that chapter of <a href="http://catb.org/~esr/writings/taoup/html/" target="_blank">The Art of Unix Programming</a>.</p>
<p>But in general, I&#8217;m finding SPBS both challenging and a hell of a lot of fun. It&#8217;s turning into a bigger project than I expected &#8212; or perhaps, a better way of saying it is that SPBS is slowly revealing its complexity to me. I could get this done a lot fast by adapting pyBloxsom. But where&#8217;s the fun in that? {grin}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sudosu.net/2008/working-on-the-spec-for-spbs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Announcing The Launch Of SPBS &#8212; the Simplest Possible Blogging System</title>
		<link>http://blog.sudosu.net/2008/announcing-the-launch-of-spbs-the-simplest-possible-blogging-system/</link>
		<comments>http://blog.sudosu.net/2008/announcing-the-launch-of-spbs-the-simplest-possible-blogging-system/#comments</comments>
		<pubDate>Thu, 07 Feb 2008 07:24:27 +0000</pubDate>
		<dc:creator>schof</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[John Mark Schofield Meta]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.sudosu.net/2008/announcing-the-launch-of-spbs-the-simplest-possible-blogging-system/</guid>
		<description><![CDATA[And by &#8220;Launch,&#8221; I mean &#8220;I&#8217;m starting to write it.&#8221; There&#8217;s a long way between that and a completed program. But you can check my progress at SPBS&#8217; Google Code site: http://code.google.com/p/spbs/
I&#8217;ve written an introduction to SPBS, and the reasons I&#8217;m writing it here, at http://code.google.com/p/spbs/wiki/SPBSIntroduction
]]></description>
			<content:encoded><![CDATA[<p>And by &#8220;Launch,&#8221; I mean &#8220;I&#8217;m starting to write it.&#8221; There&#8217;s a long way between that and a completed program. But you can check my progress at SPBS&#8217; Google Code site: <a href="http://code.google.com/p/spbs/" target="_blank">http://code.google.com/p/spbs/</a></p>
<p>I&#8217;ve written an introduction to SPBS, and the reasons I&#8217;m writing it here, at <a href="http://code.google.com/p/spbs/wiki/SPBSIntroduction" target="_blank">http://code.google.com/p/spbs/wiki/SPBSIntroduction</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sudosu.net/2008/announcing-the-launch-of-spbs-the-simplest-possible-blogging-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google FTW: Fixing Arrow Problems in OS X Python</title>
		<link>http://blog.sudosu.net/2007/google-ftw-fixing-arrow-problems-in-os-x-python/</link>
		<comments>http://blog.sudosu.net/2007/google-ftw-fixing-arrow-problems-in-os-x-python/#comments</comments>
		<pubDate>Fri, 16 Nov 2007 00:38:35 +0000</pubDate>
		<dc:creator>schof</dc:creator>
				<category><![CDATA[Broken]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.sudosu.net/2007/google-ftw-fixing-arrow-problems-in-os-x-python/</guid>
		<description><![CDATA[I lived with it for ages. I tried to fix it on my own, by selecting different emulation types. Finally I Googled for it. And pretty much instantly found the answer:
 python `python -c &#8220;import pimp; print pimp.__file__&#8221;` -i readline
Moral? If at first you don&#8217;t succeed, Google. If Google fails, try, try again.
Update: And to [...]]]></description>
			<content:encoded><![CDATA[<p>I lived with it for ages. I tried to fix it on my own, by selecting different emulation types. Finally I Googled for it. And <a href="http://forums.macosxhints.com/archive/index.php/t-64151.html" target="_blank">pretty much instantly</a> <a href="http://simplygenius.com/geekblog/2005/08/30/readline-for-python-on-osx/" target="_blank">found the answer</a>:</p>
<blockquote><p> python `python -c &#8220;import pimp; print pimp.__file__&#8221;` -i readline</p></blockquote>
<p>Moral? If at first you don&#8217;t succeed, Google. If Google fails, try, try again.</p>
<p><strong>Update:</strong> And to make forward-delete work, <a href="http://www.macosxhints.com/article.php?story=20050525040921189" target="_blank">try this.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sudosu.net/2007/google-ftw-fixing-arrow-problems-in-os-x-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Correction to Ubuntu Geek&#8217;s &#8220;How To Check Your External IP Address From The Command Line&#8221;</title>
		<link>http://blog.sudosu.net/2007/correction-to-ubuntu-geeks-how-to-check-your-external-ip-address-from-the-command-line/</link>
		<comments>http://blog.sudosu.net/2007/correction-to-ubuntu-geeks-how-to-check-your-external-ip-address-from-the-command-line/#comments</comments>
		<pubDate>Thu, 08 Nov 2007 02:20:26 +0000</pubDate>
		<dc:creator>schof</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Shell Scripting]]></category>

		<guid isPermaLink="false">http://blog.sudosu.net/2007/correction-to-ubuntu-geeks-how-to-check-your-external-ip-address-from-the-command-line/</guid>
		<description><![CDATA[I follow the Ubuntu Geek blog, and have found some very useful tips there. However, there&#8217;s a problem with their latest tip, &#8220;Howto Check you (sic) external IP Address from the command line.&#8221;
Some background: There&#8217;s a very useful website located at whatismyip.com, which reports the IP you used to connect to the site. If you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>I follow the <a href="http://www.ubuntugeek.com/" target="_blank">Ubuntu Geek</a> blog, and have found some very useful tips there. However, there&#8217;s a problem with their latest tip, &#8220;<a href="http://www.ubuntugeek.com/howto-check-you-external-ip-address-from-the-command-line.html" target="_blank">Howto Check you (sic) external IP Address from the command line</a>.&#8221;</p>
<p>Some background: There&#8217;s a very useful website located at <a href="http://whatismyip.com" target="_blank">whatismyip.com</a>, which reports the IP you used to connect to the site. If you&#8217;re on a computer behind a router which does NAT (<a href="http://en.wikipedia.org/wiki/Network_address_translation" target="_blank">Network Address Translation</a>), you can&#8217;t find out what your external IP is by issuing commands on the computer. Your computer&#8217;s address is (for instance) 192.168.1.5, but when traffic reaches the router, the router translates (with NAT) your address to an external IP address, such as 34.23.64.9 (an IP address I just made up).</p>
<p>WhatIsMyIP.com (and other sites like it) sprang up to  fill that void, and give you a simple way of finding out what external IP address you&#8217;re using.</p>
<p>Ubuntu Geek&#8217;s script fetches the whatismyip.com page with wget, parses it to find the IP address, and prints the IP address.</p>
<p>I tried it on my OS X box, and it didn&#8217;t work, because wget isn&#8217;t installed on OS X &#8212; but curl, a similar tool, is.</p>
<p>So I started modifying the script to use curl &#8212; and discovered an interesting comment in the source code to whatismyip.com&#8217;s page:</p>
<blockquote><p> &lt;!&#8211;Please set your code to scrape your IP from www.whatismyip.com/automation/n09230945.asp Please set your code to hit this page at a REASONABLE pace.  For more info, please see our &#8220;What&#8217;s New&#8221; page.&#8211;&gt;</p></blockquote>
<p>Hitting that link gets you just your IP address, which has two benefits over Ubuntu Geek&#8217;s implementation &#8212; it means you have no parsing to do, and it gives a SIGNIFICANTLY lower load to WhatIsMyIP&#8217;s servers. (It&#8217;s rude to slam someone else&#8217;s servers with an automated script &#8212; even though a script that simply fetches a web page once doesn&#8217;t slam a server, 10,000 people running that script would.)</p>
<p>Here&#8217;s my take on Ubuntu Geek&#8217;s BASH script:</p>
<blockquote><p>#!/bin/bash</p>
<p>echo -n &#8220;Your external IP Address is: &#8221;<br />
curl http://www.whatismyip.com/automation/n09230945.asp<br />
echo &#8220;.&#8221;</p></blockquote>
<p>For comparison&#8217;s here&#8217;s Ubuntu Geek&#8217;s original script:</p>
<blockquote><p>#!/bin/bash</p>
<p>echo Your external IP Address is:<br />
wget http://Www.whatismyip.com -O &#8211; -o /dev/null | \<br />
grep &#8216;&lt;TITLE&gt;&#8217; | sed -r &#8217;s/&lt;TITLE&gt;WhatIsMyIP\.com \- //g&#8217; | \<br />
sed -r &#8217;s/&lt;\/TITLE&gt;//g&#8217;<br />
exit 0</p></blockquote>
<p>Moral of the story? Always look for a simpler way of doing things.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sudosu.net/2007/correction-to-ubuntu-geeks-how-to-check-your-external-ip-address-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing Software Is Hard (Duh!)</title>
		<link>http://blog.sudosu.net/2007/writing-software-is-hard-duh/</link>
		<comments>http://blog.sudosu.net/2007/writing-software-is-hard-duh/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 17:13:03 +0000</pubDate>
		<dc:creator>schof</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.sudosu.net/2007/writing-software-is-hard-duh/</guid>
		<description><![CDATA[Great article by Kyle Wilson on why software is hard to create:
Talking about a software development schedule more than a year out is like talking about where we go after we die.  Everyone has some idea where we&#8217;ll end up, but those ideas differ wildly, and there&#8217;s a lack of solid evidence to support any [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gamearchitect.net/Articles/SoftwareIsHard.html" target="_blank">Great article</a> by Kyle Wilson on why software is hard to create:</p>
<blockquote><p>Talking about a software development schedule more than a year out is like talking about where we go after we die.  Everyone has some idea where we&#8217;ll end up, but those ideas differ wildly, and there&#8217;s a lack of solid evidence to support any of them.</p></blockquote>
<p>(<a href="http://ivory.idyll.org/blog/oct-07/software-is-hard-link" target="_blank">Via</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sudosu.net/2007/writing-software-is-hard-duh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Remove All Subversion Folders From A Directory Tree</title>
		<link>http://blog.sudosu.net/2007/how-to-remove-all-subversion-folders-from-a-directory-tree/</link>
		<comments>http://blog.sudosu.net/2007/how-to-remove-all-subversion-folders-from-a-directory-tree/#comments</comments>
		<pubDate>Sat, 23 Jun 2007 22:20:10 +0000</pubDate>
		<dc:creator>schof</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://blog.sudosu.net/2007/how-to-remove-all-subversion-folders-from-a-directory-tree/</guid>
		<description><![CDATA[Say you&#8217;ve got a Subversion source code tree checked out, and for whatever reason you want to remove all Subversion directories inside that tree. (The thing that makes a Subversion tree a Subversion tree is the presence of a &#8220;.svn&#8221; folder in every folder of the tree. If you had a complicated source tree with [...]]]></description>
			<content:encoded><![CDATA[<p>Say you&#8217;ve got a <a href="http://subversion.tigris.org/" title="Subversion Version Control System" target="_blank">Subversion</a> source code tree checked out, and for whatever reason you want to remove all Subversion directories inside that tree. (The thing that makes a Subversion tree a Subversion tree is the presence of a &#8220;.svn&#8221; folder in every folder of the tree. If you had a complicated source tree with lots of subdirectories, it would take you forever to remove each one.)</p>
<p>You can remove all &#8220;.svn&#8221; directories starting below &#8220;~/svn/exampleproject&#8221; &#8212; change this to suit your system &#8212; with the following command:</p>
<blockquote><p>find ~/svn/exampleproject -name &#8220;\.svn&#8221; -exec rm -rf  {} \;</p></blockquote>
<p>To make sure that the above command is going to do what  you want it to do, you may want to first generate a list of what it will delete (I highly recommend it).</p>
<blockquote><p>find ~/svn/exampleproject -name &#8220;\.svn&#8221; -exec echo &#8220;rm -rf  {}&#8221;  \;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.sudosu.net/2007/how-to-remove-all-subversion-folders-from-a-directory-tree/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Workflow: TextMate, Subversion, and Python</title>
		<link>http://blog.sudosu.net/2007/my-workflow-textmate-subversion-and-python/</link>
		<comments>http://blog.sudosu.net/2007/my-workflow-textmate-subversion-and-python/#comments</comments>
		<pubDate>Mon, 02 Apr 2007 01:33:49 +0000</pubDate>
		<dc:creator>schof</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Macintosh Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.sudosu.net/2007/my-workflow-textmate-subversion-and-python/</guid>
		<description><![CDATA[I&#8217;m focusing in on some very important parts of my workflow. Version control is Subversion. I&#8217;m most of the way through the book on it.
Text editing is TextMate. I was trying to use vim, because it&#8217;s one editor I can use both on my OS X desktop and SSH&#8217;d across the network to linux boxes. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m focusing in on some very important parts of my workflow. Version control is Subversion. I&#8217;m most of the way through the book on it.</p>
<p>Text editing is TextMate. I was trying to use vim, because it&#8217;s one editor I can use both on my OS X desktop and SSH&#8217;d across the network to linux boxes. I will continue to use vim remotely &#8212; though I may look at emacs as well. But for local editing, it&#8217;s TextMate for sure. Its functionality when dealing with large source code files and trees with many different files is impressive &#8212; I can see myself working significantly more efficiently with TextMate.</p>
<p>I&#8217;m used to working on the command-line with Subversion, but TextMate integrates with it, so I can commit changes by hotkey, etc.</p>
<p>And Python is rapidly becoming my system administration language of choice. All of this seems to fit together really well.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sudosu.net/2007/my-workflow-textmate-subversion-and-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Install Subversion in OS X</title>
		<link>http://blog.sudosu.net/2007/how-to-install-subversion-in-os-x/</link>
		<comments>http://blog.sudosu.net/2007/how-to-install-subversion-in-os-x/#comments</comments>
		<pubDate>Mon, 05 Mar 2007 00:28:41 +0000</pubDate>
		<dc:creator>schof</dc:creator>
				<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Macintosh Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://blog.sudosu.net/2007/how-to-install-subversion-in-os-x/</guid>
		<description><![CDATA[The folks behind Subversion don&#8217;t produce an OS X binary, so they link to a third party who produced one. Unfortunately, the current regular version is 1.4.3, and the latest OS X binary is 1.3.
I found a different binary at Martin Ott&#8217;s site. I have no idea why his site isn&#8217;t linked from Subversion&#8217;s, but [...]]]></description>
			<content:encoded><![CDATA[<p>The folks behind <a href="http://subversion.tigris.org" target="_blank">Subversion</a> don&#8217;t produce an OS X binary, so they link to <a href="http://metissian.com/projects/macosx/subversion/" target="_blank">a third party who produced one</a>. Unfortunately, the current regular version is 1.4.3, and the latest OS X binary is 1.3.</p>
<p>I found a different binary at <a href="http://www.codingmonkeys.de/mbo/articles/tag/subversion" target="_blank">Martin Ott&#8217;s site</a>. I have no idea why his site isn&#8217;t linked from Subversion&#8217;s, but his binary is 1.4.3, the latest.</p>
<p>Simply run the installer in his package, and it will do ALMOST all that&#8217;s needed. However, you still won&#8217;t be able to run svn from the command-line, because the package installs it in /usr/local/bin, and that path isn&#8217;t in Apple&#8217;s default.</p>
<p>For those new to the terminal, the path variable is a list of directories where OS X should look for applications. This applies only to the command line. For instance, if you type &#8220;ls&#8221; on the command line, it will look for the &#8220;ls&#8221; program in each directory listed in the path. Since it finds it in /bin, it will run ls. The path is why running &#8220;ls&#8221; is the same as running &#8220;/bin/ls&#8221;.</p>
<p>To find out what your path is currently, enter the following command: &#8220;echo $PATH&#8221;</p>
<p>(Capitalization does matter.)</p>
<p>To add /usr/bin/local to your path, copy and paste the following line into your terminal:</p>
<p>echo &#8220;export PATH=$PATH:/usr/local/bin&#8221; &gt;&gt; ~/.profile</p>
<p>This will not affect the shell you&#8217;re running now, so type &#8220;exit&#8221; to leave the shell. Then hit CMD-N to get a new terminal, and type &#8220;svn&#8221;</p>
<p>You should get a message telling you to type &#8220;svn help&#8221; for more information. Success, svn is installed and configured properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sudosu.net/2007/how-to-install-subversion-in-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Becoming A Code Ninja</title>
		<link>http://blog.sudosu.net/2006/becoming-a-code-ninja/</link>
		<comments>http://blog.sudosu.net/2006/becoming-a-code-ninja/#comments</comments>
		<pubDate>Wed, 07 Jun 2006 16:34:18 +0000</pubDate>
		<dc:creator>schof</dc:creator>
				<category><![CDATA[Hiking]]></category>
		<category><![CDATA[Lifehacks]]></category>
		<category><![CDATA[Macintosh Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Santa Monica Mountains]]></category>

		<guid isPermaLink="false">http://blog.sudosu.net/2006/becoming-a-code-ninja/</guid>
		<description><![CDATA[It&#8217;s time to become a code ninja.
I&#8217;ve been looking at the long list of technologies I need to master for work. (And quickly!) I&#8217;ve also been looking at the even longer list of technologies I&#8217;m interested in and would like to study in depth.
Clearly, I can&#8217;t do it all. Not immediately, at least. (And certainly [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s time to become a code ninja.</p>
<p>I&#8217;ve been looking at the long list of technologies I need to master for work. (And quickly!) I&#8217;ve also been looking at the even longer list of technologies I&#8217;m interested in and would like to study in depth.</p>
<p>Clearly, I can&#8217;t do it all. Not immediately, at least. (And certainly not at the same time.) I need to be selective about what subjects I choose to tackle. But I also need to maximize my chances of being able to tackle these subjects.</p>
<p>As far as I can tell, that boils down to two main areas where I need work:</p>
<p>1) Time Management<br />
2) Life Management</p>
<p>This was all brought about, by the way, by an excellent article I read by <a href="http://www.unixwiz.net/about/" target="_blank">Steve Friedl</a> about the process he went through <a href="http://www.unixwiz.net/techtips/sql-injection.html" target="_blank">penetration-testing a web app using SQL injection</a>. Great article, but reading Steve&#8217;s site really brought home some areas where I need to update my skills.</p>
<p><strong>Time Management</strong></p>
<p>In poker, there&#8217;s the concept of &#8220;plugging leaks in your game.&#8221; Poker is a game of percentages, of making the best decisions possible given incomplete information, stress, and a variety of complicating factors. You can play well (even be a winning player) but have certain situations where you habitually don&#8217;t make the optimum choice. Maybe you don&#8217;t recognize the value of a certain pair of cards. Or you are easily bluffed when you&#8217;re short on chips. In any case, it&#8217;s a leak that, if plugged, can increase your overall win rate, sometimes significantly.</p>
<p>I feel I&#8217;m generally very productive, but I need to plug my leaks. I use <a href="http://www.newsgator.com/NGOLProduct.aspx?ProdID=NetNewsWire" target="_blank">NetNewsWire</a> to keep up on a variety of tech news sites &#8212; and I&#8217;ll have to keep doing that, because knowing what&#8217;s coming (or what&#8217;s here right now) is vital to my current job performance and to my career in general. But I also have a number of non-tech-related feeds in NNW. Things like Slate.com. Warren Ellis. Others. I keep them segregated in an &#8220;Entertainment&#8221; folder, and don&#8217;t read them during work hours. But I want to maximize the return on effort I get while sitting at my computer &#8212; so I can use my non-computer time for things like hiking with K., my girlfriend. So all the non-workish feeds go. That&#8217;s a start.</p>
<p>I&#8217;ll have to work on disciplining my appetite for tech feeds, as well. Cutting out the less-vital ones, and making a list of the longer articles to read later, instead of reading an article on SQL Injection when I could be doing work with more of an immediate payoff.</p>
<p>In general, I&#8217;ll just have to be aware of how I&#8217;m spending my time.</p>
<p><strong>Life Management</strong></p>
<p>In terms of optimizing my life, I need to eat better, sleep better, and exercise more. Spend more time with my friends, as well. (Although right now much of my non-work time is spent with K. &#8212; I need to make an effort to keep my other relationships well fed as well.)</p>
<p>Right now I eat well on weekends with K., but my weekday diet is strictly bachelor-squalor &#8212; cheeseburgers, burritos, and sandwiches. (I&#8217;ll be sad if I have to give up <a href="http://losangeles.citysearch.com/profile/157551" target="_blank">Bay Cities Deli</a>.) If I can make time to pick up some vegetables-in-a-bag before work, and perhaps some chicken or fish, I&#8217;ll be able to have nutritious lunches and dinners at work. (I&#8217;ll be sad again if I give up my bagel-and-cream-cheese breakfasts. Not sure what I&#8217;ll do there.)</p>
<p>I&#8217;ll need to get to sleep a little earlier too. I get home from work usually between 8:30 and 9:30 PM &#8212; and it often takes me a while to run down before I&#8217;m tired enough to sleep. I think exercise will help with that, though.</p>
<p>I love taking hikes when I get home from work (I live in the Santa Monica Mountains, and there&#8217;s lovely parks for hiking within walking distance of my house.) but I&#8217;m not crazy about hiking at night. I&#8217;ve done it, and it&#8217;s quite calm and peaceful &#8212; but sometimes a bit creepy, too. And even though I stick to fairly well-maintained trails, there is a slightly greater chance of losing my footing and breaking something, with nobody likely to come by until morning. And if I&#8217;m getting home from work at 9:30, there&#8217;s just no way I&#8217;m going for an hour&#8217;s hike.</p>
<p>So that leaves mornings. (Just hiking on weekends isn&#8217;t going to do much for my overall energy level. You need exercise 3-5 times a week for that.) I get up at 7:30 normally. Tonight I’ll set the alarm for 6:30, and get a short hike in before breakfast. If I can keep that up every morning (or at least most mornings) I&#8217;ll be in good shape for the rest of things I&#8217;m trying to do.</p>
<p>It&#8217;s a pretty ambitious plan I&#8217;ve set out for myself here. I&#8217;ll keep you posted on how I do. <a href="http://blog.sudosu.net/2006/ive-been-putting-off-reading-procrastinationdoc/" target="_blank">It took me almost two months to read a 5-page document on procrastination.</a> Don&#8217;t hold your breath. But do cross your fingers for me.<br />
<strong> UPDATE</strong>: I wrote this last night but didn&#8217;t post it until this morning. In the meantime, I went for an hour hike in my neighborhood &#8212; on a trail straight up a hill for 40 minutes, then 20 minutes back down to home. My calves are sore but I feel great! I&#8217;ll post more about my hikes and my general progress with the non-technical aspects of this plan<a href="http://coyotehighway.com/" target="_blank"></a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sudosu.net/2006/becoming-a-code-ninja/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
