<?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>Michael Conigliaro &#187; Programming</title>
	<atom:link href="http://conigliaro.org/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://conigliaro.org</link>
	<description>cat /dev/brain &#124; grep technology &#62;&#62; blog</description>
	<lastBuildDate>Wed, 06 Jan 2010 02:37:22 +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>Finally, Someone Agrees with me About ORM</title>
		<link>http://conigliaro.org/2009/10/12/finally-someone-wagrees-with-me-about-orm/</link>
		<comments>http://conigliaro.org/2009/10/12/finally-someone-wagrees-with-me-about-orm/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 16:33:27 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://conigliaro.org/?p=767</guid>
		<description><![CDATA[Way back in 2006, I spent a week or so trying to use ORM in a project I was working on, only to discover that rather than making my life easier, it constantly prevented me from doing what I wanted to do. I spent an inordinate amount of time trying to convert SQL queries into [...]]]></description>
			<content:encoded><![CDATA[<p>Way back in 2006, I spent a week or so trying to use ORM in a project I was working on, only to discover that rather than making my life easier, it constantly prevented me from doing what I wanted to do. I spent an inordinate amount of time trying to convert SQL queries into ORM, but I kept ending up with slower, more complicated messes. And since this particular project required me to pull information out of very large databases very quickly, I was never completely comfortable trusting an abstraction layer to optimize SQL queries as well as I could.</p>
<p>It&#8217;s been a few years since I&#8217;ve developed software full-time, but since I still encounter articles about how great ORM is, I figured that either the situation has improved since then, or maybe I was just too stupid to harness the power of ORM. But then I found <a href="http://www.hatfulofhollow.com/posts/code/farewell-to-orms.html">someone who has come to the same conclusions I did way back in 2006</a>, and has written about them a lot more eloquently than I did in <a href="/2006/10/11/fuck-orm/">my original rant</a>. At least I&#8217;m not alone anymore!</p>
]]></content:encoded>
			<wfw:commentRss>http://conigliaro.org/2009/10/12/finally-someone-wagrees-with-me-about-orm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xen-vm-autosnapshot.py 1.2</title>
		<link>http://conigliaro.org/2009/08/07/xen-vm-autosnapshot-py-1-2/</link>
		<comments>http://conigliaro.org/2009/08/07/xen-vm-autosnapshot-py-1-2/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 17:14:45 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://conigliaro.org/?p=440</guid>
		<description><![CDATA[The xen-vm-autosnapshot.py script has been updated with an important new option: &#8211;snapshot-tag. I still can&#8217;t believe I made such a silly oversight, but previous versions of this script had no way of differentiating between snapshots created automatically and those that were created manually. So if you happened to have some old manual snapshots lying around, [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="/projects/wiki/Xen">xen-vm-autosnapshot.py</a> script has been updated with an important new option: &#8211;snapshot-tag. I still can&#8217;t believe I made such a silly oversight, but previous versions of this script had no way of differentiating between snapshots created automatically and those that were created manually. So if you happened to have some old manual snapshots lying around, the snapshot-rotate routine would have rotated them along with all the rest.</p>
<p>The &#8211;snapshot-tag option fixes this by allowing you to &#8220;tag&#8221; each snapshot as it&#8217;s created. Then the snapshot-rotate routine will only consider snapshots with the correct &#8220;tag.&#8221; This also allows for more advanced snapshot/rotation schedules.</p>
<p>Thanks to Adam Adamou at <a href="http://www.njedge.net/">NJEDge.Net</a> for his input.</p>
]]></content:encoded>
			<wfw:commentRss>http://conigliaro.org/2009/08/07/xen-vm-autosnapshot-py-1-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NagiosPluginsNT 0.4.2</title>
		<link>http://conigliaro.org/2009/07/30/nagiospluginsnt-0-4-2/</link>
		<comments>http://conigliaro.org/2009/07/30/nagiospluginsnt-0-4-2/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 17:50:27 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://conigliaro.org/?p=438</guid>
		<description><![CDATA[I&#8217;ve just updated NagiosPluginsNT for the first time in a long time. I don&#8217;t really get to spend much time on this project anymore, since my current employer has moved away from Nagios.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just updated <a href="http://conigliaro.org/projects/wiki/NagiosPluginsNT">NagiosPluginsNT</a> for the first time in a long time. I don&#8217;t really get to spend much time on this project anymore, since my current employer has moved away from Nagios.</p>
]]></content:encoded>
			<wfw:commentRss>http://conigliaro.org/2009/07/30/nagiospluginsnt-0-4-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SMTP Tester 1.2</title>
		<link>http://conigliaro.org/2009/07/10/smtp-tester-1-2/</link>
		<comments>http://conigliaro.org/2009/07/10/smtp-tester-1-2/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 20:22:31 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://conigliaro.org/2009/07/10/smtp-tester-1-2/</guid>
		<description><![CDATA[A bug fix version of SMTP Tester has been released.
]]></description>
			<content:encoded><![CDATA[<p>A bug fix version of <a href="http://conigliaro.org/projects/wiki/SmtpTester">SMTP Tester</a> has been released.</p>
]]></content:encoded>
			<wfw:commentRss>http://conigliaro.org/2009/07/10/smtp-tester-1-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xen-vm-autosnapshot.py 1.1</title>
		<link>http://conigliaro.org/2009/06/25/xen-vm-autosnapshotpy-11/</link>
		<comments>http://conigliaro.org/2009/06/25/xen-vm-autosnapshotpy-11/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 19:51:05 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://conigliaro.org/?p=411</guid>
		<description><![CDATA[The xen-vm-autosnapshot.py script has been updated. It can now accept strings for &#8211;log-level (e.g. &#8211;log-level=debug), and the &#8211;test option has been renamed to &#8211;dry-run (since that&#8217;s the convention everyone else in the world seems to be used to).
Some of you have been asking about the problem where snapshots get locked and can&#8217;t be deleted from [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="/projects/wiki/Xen">xen-vm-autosnapshot.py</a> script has been updated. It can now accept strings for &#8211;log-level (e.g. &#8211;log-level=debug), and the &#8211;test option has been renamed to &#8211;dry-run (since that&#8217;s the convention everyone else in the world seems to be used to).</p>
<p>Some of you have been asking about the problem where <a href="http://forums.citrix.com/thread.jspa?threadID=242299">snapshots get locked and can&#8217;t be deleted from NetApp volumes</a>. Unfortunately, this appears to be related to the way the XenServer API interacts with NetApp&#8217;s DATA OnTap API. Unless someone out there can enlighten me, I don&#8217;t think there&#8217;s much we can do, other than wait for Citrix to fix their API. =(</p>
]]></content:encoded>
			<wfw:commentRss>http://conigliaro.org/2009/06/25/xen-vm-autosnapshotpy-11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SMTP Tester 1.1</title>
		<link>http://conigliaro.org/2009/06/12/smtp-tester-11/</link>
		<comments>http://conigliaro.org/2009/06/12/smtp-tester-11/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 15:28:30 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://conigliaro.org/?p=386</guid>
		<description><![CDATA[A new version of SMTP Tester has been released with some minor bug fixes and miscellaneous code refactoring.
]]></description>
			<content:encoded><![CDATA[<p>A new version of <a href="http://conigliaro.org/projects/wiki/SmtpTester">SMTP Tester</a> has been released with some minor bug fixes and miscellaneous code refactoring.</p>
]]></content:encoded>
			<wfw:commentRss>http://conigliaro.org/2009/06/12/smtp-tester-11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SMTP Tester 1.0</title>
		<link>http://conigliaro.org/2009/05/22/smtp-tester-10/</link>
		<comments>http://conigliaro.org/2009/05/22/smtp-tester-10/#comments</comments>
		<pubDate>Fri, 22 May 2009 21:05:30 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://conigliaro.org/?p=365</guid>
		<description><![CDATA[Since I keep finding SMTP Tester so useful, I figured I should finish it up, create the obligatory Win32 installer, and release it to the world. The only issue I&#8217;m having right now is that the Win32 executable created by py2exe is HUGE (~17MB). Luckily, the resulting NSIS package is only ~4MB, but even that [...]]]></description>
			<content:encoded><![CDATA[<p>Since I keep finding <a href="http://conigliaro.org/projects/wiki/SmtpTester">SMTP Tester</a> so useful, I figured I should finish it up, create the obligatory Win32 installer, and release it to the world. The only issue I&#8217;m having right now is that the Win32 executable created by py2exe is HUGE (~17MB). Luckily, the resulting NSIS package is only ~4MB, but even that seems pretty ridiculous for what the tool is/does. Needless to say, I&#8217;m very interested in suggestions for compressing this down further.</p>
]]></content:encoded>
			<wfw:commentRss>http://conigliaro.org/2009/05/22/smtp-tester-10/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Get the Absolute Location of the Currently Running Program or Script</title>
		<link>http://conigliaro.org/2009/05/20/how-to-get-the-absolute-location-of-the-currently-running-program-or-script/</link>
		<comments>http://conigliaro.org/2009/05/20/how-to-get-the-absolute-location-of-the-currently-running-program-or-script/#comments</comments>
		<pubDate>Wed, 20 May 2009 15:37:40 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://conigliaro.org/?p=356</guid>
		<description><![CDATA[Okay, It&#8217;s about time I document this trick since I use it so often and have to keep looking it up!
I like to make life easy for my successors, so whenever I write a program that needs to access files in or below its current directory, I avoid absolute paths like the plague. I find [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, It&#8217;s about time I document this trick since I use it so often and have to keep looking it up!</p>
<p>I like to make life easy for my successors, so whenever I write a program that needs to access files in or below its current directory, I avoid absolute paths like the plague. I find that it&#8217;s almost always better to use a relative path, so that if the program needs to be moved someday, it will continue to run with the expected behavior, regardless of where it lives on the filesystem.</p>
<p>The problem is that when a program is executed, all relative paths are relative to the current working directory of the user who executed it instead of the directory that the program actually lives in. To work around this, you just need to prefix your relative paths with a variable containing the absolute location of the program itself:</p>
<p><strong>PHP:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$cwd</span> <span style="color: #339933;">=</span> <span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p><strong>Python:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">cwd = <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">abspath</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">path</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Note that the above won&#8217;t work when your program is &#8220;frozen&#8221; (e.g. <a href="http://www.py2exe.org/index.cgi/WhereAmI">compiled with py2exe</a>).</p>
<p><strong>Windows Shell:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">set CWD=<span style="color: #66cc66;">%~</span>dp0</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://conigliaro.org/2009/05/20/how-to-get-the-absolute-location-of-the-currently-running-program-or-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Automatic, Rotating VM Snapshots on Xen with xen-vm-autosnapshot.py</title>
		<link>http://conigliaro.org/2009/05/19/automatic-rotating-vm-snapshots-on-xen-with-xen-vm-autosnapshotpy/</link>
		<comments>http://conigliaro.org/2009/05/19/automatic-rotating-vm-snapshots-on-xen-with-xen-vm-autosnapshotpy/#comments</comments>
		<pubDate>Tue, 19 May 2009 14:47:40 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://conigliaro.org/?p=352</guid>
		<description><![CDATA[My new Xen Tools project page is up, and my first tool is ready for wide-spread use.  xen-vm-autosnapshot.py is a command line program (written in Python, of course) that will take automatic, rotating snapshots of virtual machines running on a Xen host. Enjoy!
]]></description>
			<content:encoded><![CDATA[<p>My new <a href="/projects/wiki/Xen">Xen Tools</a> project page is up, and my first tool is ready for wide-spread use.  <a href="/projects/browser/xen/trunk/xen-vm-autosnapshot.py">xen-vm-autosnapshot.py</a> is a command line program (written in Python, of course) that will take automatic, rotating snapshots of virtual machines running on a Xen host. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://conigliaro.org/2009/05/19/automatic-rotating-vm-snapshots-on-xen-with-xen-vm-autosnapshotpy/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Dreamweaver is Dying?</title>
		<link>http://conigliaro.org/2009/03/07/dreamweaver-is-dying/</link>
		<comments>http://conigliaro.org/2009/03/07/dreamweaver-is-dying/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 16:23:43 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://conigliaro.org/?p=252</guid>
		<description><![CDATA[So apparently, Dreamweaver is dying. This article is interesting to me for a couple reasons. First of all, I&#8217;m happy that other people are finally saying what I&#8217;ve been thinking since I started making dynamic websites with Perl and PHP in the late nineties! I&#8217;ve played around with HTML editors a bit, but I&#8217;ve never [...]]]></description>
			<content:encoded><![CDATA[<p>So apparently, <a href="http://www.pcpro.co.uk/blogs/2009/03/05/dreamweaver-is-dying/">Dreamweaver is dying</a>. This article is interesting to me for a couple reasons. First of all, I&#8217;m happy that other people are finally saying what I&#8217;ve been thinking since I started making dynamic websites with Perl and PHP in the <strong>late nineties</strong>! I&#8217;ve played around with HTML editors a bit, but I&#8217;ve never found them to be of much use on a dynamic Internet. I guess I just assumed that some people were using HTML editors for rapid prototyping, and I figured that maybe they could be helpful when editing the HTML template files used to dynamically create pages. But this article makes it sound like HTML editors are <strong>still</strong> mostly used to create <strong>static</strong> websites (static as in &#8220;just a bunch of .html files&#8221;). Seriously? It&#8217;s 2009, and web &#8220;developers&#8221; are still doing that? Holy shit, I am shocked, saddened and completely baffeled at the same time!</p>
]]></content:encoded>
			<wfw:commentRss>http://conigliaro.org/2009/03/07/dreamweaver-is-dying/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
