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

<channel>
	<title>Jordan.Liggitt(.net) &#187; Programming</title>
	<atom:link href="http://jordan.liggitt.net/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://jordan.liggitt.net</link>
	<description>A slice of Liggitt life</description>
	<pubDate>Thu, 13 Nov 2008 03:50:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>The Legal Code</title>
		<link>http://jordan.liggitt.net/2007/12/31/the-legal-code/</link>
		<comments>http://jordan.liggitt.net/2007/12/31/the-legal-code/#comments</comments>
		<pubDate>Mon, 31 Dec 2007 04:56:33 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
		
		<category><![CDATA[Misc]]></category>

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

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

		<guid isPermaLink="false">http://jordan.liggitt.net/2007/12/31/the-legal-code/</guid>
		<description><![CDATA[The accumulation of laws that have been passed over our nation&#8217;s history have a striking resemblance to a crufty code base:

	Dead code → Obsolete laws
	Bugs in border cases → Legal loopholes
	Patches and workarounds → Exhibit A: The AMT fiasco
	Unanticipated side-effects → Pretty much every law ever passed
	Spaghetti code → Insane cross-references which make reading some [...]]]></description>
			<content:encoded><![CDATA[The accumulation of laws that have been passed over our nation&#8217;s history have a striking resemblance to a crufty code base:
<ul>
	<li>Dead code → Obsolete laws</li>
	<li>Bugs in border cases → Legal loopholes</li>
	<li>Patches and workarounds → Exhibit A: The AMT fiasco</li>
	<li>Unanticipated side-effects → Pretty much every law ever passed</li>
	<li>Spaghetti code → Insane cross-references which make reading some statutes almost impossible</li>
</ul>
The major difference, of course, is that most crufty code bases don&#8217;t run people&#8217;s lives.]]></content:encoded>
			<wfw:commentRss>http://jordan.liggitt.net/2007/12/31/the-legal-code/feed/</wfw:commentRss>
		</item>
		<item>
		<title>None Too Soon</title>
		<link>http://jordan.liggitt.net/2007/10/31/none-too-soon/</link>
		<comments>http://jordan.liggitt.net/2007/10/31/none-too-soon/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 20:28:26 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
		
		<category><![CDATA[Programming]]></category>

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

		<guid isPermaLink="false">http://jordan.liggitt.net/2007/10/31/none-too-soon/</guid>
		<description><![CDATA[Q: When does the form &#8220;if(null == $x)&#8221; not save you from accidentally mixing up comparison (==) with assignment (=)?

A: When the language you are working with has no constants, and allows changing the value of keywords.

In version 2.4, Python has actually stopped letting you change the value of None. Don&#8217;t think that they&#8217;ve gone [...]]]></description>
			<content:encoded><![CDATA[Q: When does the form &#8220;if(null == $x)&#8221; not save you from accidentally mixing up comparison (==) with assignment (=)?
<br /><br />
A: When the language you are working with has no constants, and allows <a href='http://mail.python.org/pipermail/python-list/2001-October/110058.html'>changing the value of keywords</a>.
<br /><br />
In version 2.4, Python has actually stopped letting you change the value of None. Don&#8217;t think that they&#8217;ve gone all soft on the &#8220;why would you ever do that&#8221; scene - True and False may still be modified.]]></content:encoded>
			<wfw:commentRss>http://jordan.liggitt.net/2007/10/31/none-too-soon/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Let Me Hear Your Version</title>
		<link>http://jordan.liggitt.net/2007/10/31/let-me-hear-your-version/</link>
		<comments>http://jordan.liggitt.net/2007/10/31/let-me-hear-your-version/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 19:47:04 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
		
		<category><![CDATA[Programming]]></category>

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

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

		<guid isPermaLink="false">http://jordan.liggitt.net/2007/10/31/let-me-hear-your-version/</guid>
		<description><![CDATA[ If you don&#8217;t know or care about the tooling platform Eclipse, stop reading. If do you care, you may have had this problem:

You install a new version of a feature you already have installed by copying the files into the &#8220;features&#8221; and &#8220;plugins&#8221; folders, and Eclipse doesn&#8217;t recognize the newer version. This usually happens [...]]]></description>
			<content:encoded><![CDATA[<img src='http://jordan.liggitt.net/wp-content/uploads/2007/10/debug.jpg' alt='debug.jpg' align='right' /> If you don&#8217;t know or care about the tooling platform <a href='http://www.eclipse.org'>Eclipse</a>, stop reading. If do you care, you may have had this problem:
<br /><br />
You install a new version of a feature you already have installed by copying the files into the &#8220;features&#8221; and &#8220;plugins&#8221; folders, and Eclipse doesn&#8217;t recognize the newer version. This usually happens on Windows machines with a FAT32 filesystem. That filesystem doesn&#8217;t update folder timestamps nicely when the content of a folder changes, so Eclipse doesn&#8217;t know to rescan for newer versions.
<br /><br />
To enable a newer version of a feature you manually installed, start Eclipse, go to &#8220;Help > Software Updates > Manage Configuration&#8221;. Select the existing version of the feature, click &#8220;Replace With Another Version&#8221;, then choose the newer version.
<br /><br />
The good news is that <a href='http://bugs.eclipse.org/66120'>this bug</a> will go away after Eclipse 3.3. If you start a newer version of Eclipse using the command-line argument &#8220;-clean&#8221;, it will force a rescan of the features on the disk, regardless of timestamp.]]></content:encoded>
			<wfw:commentRss>http://jordan.liggitt.net/2007/10/31/let-me-hear-your-version/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Catching static from your archives page?</title>
		<link>http://jordan.liggitt.net/2007/03/02/catching-static-from-your-archives-page/</link>
		<comments>http://jordan.liggitt.net/2007/03/02/catching-static-from-your-archives-page/#comments</comments>
		<pubDate>Sat, 03 Mar 2007 01:52:24 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
		
		<category><![CDATA[Programming]]></category>

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

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

		<guid isPermaLink="false">http://jordan.liggitt.net/2007/03/02/catching-static-from-your-archives-page/</guid>
		<description><![CDATA[I&#8217;m using the Tarski theme, and loving it. It does a lot of things really well, which makes the one or two awkward bits stand out that much more. If you have Tarski create &#8220;Archives&#8221; and &#8220;Tags&#8221; pages, make sure they are viewable by anonymous users. When I logged out and viewed those pages, 404 [...]]]></description>
			<content:encoded><![CDATA[I&#8217;m using the <a href="http://tarskitheme.com/">Tarski</a> theme, and loving it. It does a lot of things really well, which makes the one or two awkward bits stand out that much more. If you have Tarski create &#8220;Archives&#8221; and &#8220;Tags&#8221; pages, make sure they are viewable by anonymous users. When I logged out and viewed those pages, 404 errors (Page not found) were shown.
<br /><br />
Apparently, WordPress 2.1+ doesn&#8217;t display pages with any post_status other than &#8216;publish&#8217; to anonymous users. The pages Tarski creates are created with the post_status &#8217;static&#8217;. This needs to be changed from &#8217;static&#8217; to &#8216;publish&#8217; before anonymous users can see your Archives and Tags pages. However, those pages won&#8217;t even appear in the Manage section of the administrative interface.
<br /><br />
To change the post_status on those pages, you have to change the database directly, using phpMyAdmin or some other database editing tool. Open the wp_posts table, and find the entries that Tarski created. The easy way to do this is to search for all the entries whose post_status is &#8220;static&#8221;. Those are the ones you want to fix. Simply edit those entries and change post_status to &#8220;publish&#8221;.
<br /><br />
Now those pages will appear in the Manage interface, and anonymous users will be able to see them.]]></content:encoded>
			<wfw:commentRss>http://jordan.liggitt.net/2007/03/02/catching-static-from-your-archives-page/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Access denied</title>
		<link>http://jordan.liggitt.net/2007/03/01/access-denied/</link>
		<comments>http://jordan.liggitt.net/2007/03/01/access-denied/#comments</comments>
		<pubDate>Fri, 02 Mar 2007 03:46:37 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
		
		<category><![CDATA[Programming]]></category>

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

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

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

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

		<guid isPermaLink="false">http://jordan.liggitt.net/2007/03/01/access-denied/</guid>
		<description><![CDATA[My company is making everyone upgrade to the latest Symantec firewall/antivirus combo. The upgrade to Symantec Client Security worked fine on my desktop (other than the three reboots required to uninstall the existing antivirus and firewall pieces), but weird things started happening on my laptop after I upgraded.

The first thing I noticed happening was that [...]]]></description>
			<content:encoded><![CDATA[My company is making everyone upgrade to the latest Symantec firewall/antivirus combo. The upgrade to Symantec Client Security worked fine on my desktop (other than the three reboots required to uninstall the existing antivirus and firewall pieces), but weird things started happening on my laptop after I upgraded.
<br /><br />
The first thing I noticed happening was that Gmail Notifier couldn&#8217;t connect. It kept failing to connect to the server, returning error 12029, &#8220;Can not log in to mailbox&#8221;. Firefox could open Google Mail without a problem, but Internet Explorer could not. I looked in the new firewall log to see if some new rule was messing things up, and sure enough, access was being blocked due to the rule &#8220;Block access to secure sites&#8221;. That turned out to be a spectacularly unhelpful rule.
<br /><br />
<span id="more-93"></span>
What really happened is that the Windows SSL service was somehow disabled by the SCS install. Instead of being set to automatically run, it was set to manually run, and was stopped by default. Changing this service back to &#8220;automatic&#8221; and rebooting restored access to secure (https) sites.]]></content:encoded>
			<wfw:commentRss>http://jordan.liggitt.net/2007/03/01/access-denied/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I&#8217;m starting to see a theme here</title>
		<link>http://jordan.liggitt.net/2007/02/27/im-starting-to-see-a-theme-here/</link>
		<comments>http://jordan.liggitt.net/2007/02/27/im-starting-to-see-a-theme-here/#comments</comments>
		<pubDate>Wed, 28 Feb 2007 00:20:44 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
		
		<category><![CDATA[Programming]]></category>

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

		<guid isPermaLink="false">http://jordan.liggitt.net/2007/02/27/im-starting-to-see-a-theme-here/</guid>
		<description><![CDATA[I hit this one after installing the Simpla theme, but you could hit this with any theme.

Symptoms (after switching to a new Wordpress theme):

	The screenshot for the theme doesnt show up in the theme selector
	The pages on the blog are unstyled
	Theme images don&#8217;t load correctly
	Trying to manually open the URL&#8217;s for the stylesheets, images, etc, [...]]]></description>
			<content:encoded><![CDATA[I hit this one after installing the <a href="http://ifelse.co.uk/simpla">Simpla</a> theme, but you could hit this with any theme.

Symptoms (after switching to a new <a href="http://www.wordpress.org">Wordpress</a> theme):
<ul>
	<li>The screenshot for the theme doesnt show up in the theme selector</li>
	<li>The pages on the blog are unstyled</li>
	<li>Theme images don&#8217;t load correctly</li>
	<li>Trying to manually open the URL&#8217;s for the stylesheets, images, etc, gives you a 404 page</li>
</ul>
<span id="more-92"></span>
The problem was that permissions were not set correctly on the unzipped theme folder. I had to make sure there was read and execute access granted on the folder and all the theme files (chmod 755 for you command-line junkies). You could probably do this through your FTP client, if it&#8217;s a decent one (I recommend <a href="http://www.smartftp.com">Smart FTP</a>).]]></content:encoded>
			<wfw:commentRss>http://jordan.liggitt.net/2007/02/27/im-starting-to-see-a-theme-here/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cache me if you can</title>
		<link>http://jordan.liggitt.net/2007/02/27/cache-me-if-you-can/</link>
		<comments>http://jordan.liggitt.net/2007/02/27/cache-me-if-you-can/#comments</comments>
		<pubDate>Tue, 27 Feb 2007 22:44:39 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
		
		<category><![CDATA[Programming]]></category>

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

		<guid isPermaLink="false">http://jordan.liggitt.net/2007/02/27/cache-me-if-you-can/</guid>
		<description><![CDATA[It&#8217;s ironic that the second post on this blog is about fixing the software the blog is running on. Oh well, such is software. When I first set up this site, I wanted to make it as performance-friendly as possible, so I set up the Wordpress WP-Cache plugin. Everything seemed to work fine. However, I [...]]]></description>
			<content:encoded><![CDATA[It&#8217;s ironic that the second post on this blog is about fixing the software the blog is running on. Oh well, such is software. When I first set up this site, I wanted to make it as performance-friendly as possible, so I set up the Wordpress <a href="http://mnm.uib.es/gallir/wp-cache-2/">WP-Cache plugin</a>. Everything seemed to work fine. However, I wasn&#8217;t quite finished messing with some other plugins, and I ran into issues with cached versions of pages not reflecting tweaks I was making in some of the core files.
<br /><br />
Not a problem, says I&#8230; I&#8217;ll just deactivate the WP-Cache plugin until I&#8217;m finished developing. As it turns out, that doesn&#8217;t work. Once you activate (on the plugins page) and enable (on the WP-Cache settings page) the WP-Cache plugin, to turn it off, you have to disable it (on the WP-Cache settings page). Deactivating the plugin does not disable caching.]]></content:encoded>
			<wfw:commentRss>http://jordan.liggitt.net/2007/02/27/cache-me-if-you-can/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Here we go</title>
		<link>http://jordan.liggitt.net/2007/02/26/here-we-go/</link>
		<comments>http://jordan.liggitt.net/2007/02/26/here-we-go/#comments</comments>
		<pubDate>Tue, 27 Feb 2007 03:33:40 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
		
		<category><![CDATA[Programming]]></category>

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

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

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

		<guid isPermaLink="false">http://jordan.liggitt.net/2007/02/26/here-we-go/</guid>
		<description><![CDATA[Enough time has been spent fixing bugs and getting basic things working. Hopefully, this site will help fix that.

I mostly work with Java and Eclipse, but do enough web stuff to beat my head against a wall every once in a while. This site will have tips, tutorials, bug workarounds, and anything else I can [...]]]></description>
			<content:encoded><![CDATA[Enough time has been spent fixing bugs and getting basic things working. Hopefully, this site will help fix that.
<br /><br />
I mostly work with Java and Eclipse, but do enough web stuff to beat my head against a wall every once in a while. This site will have tips, tutorials, bug workarounds, and anything else I can think of that people might find worthwhile.
<br /><br />
I suppose I could start with the simplest and most embarrassing debugging problem I ever hit&#8230;
<br /><br />
<span id="more-88"></span>
In Eclipse (and most interactive debuggers), you can set up expressions that are evaluated whenever the debugged process halts. Because these expressions are evaluated in the current thread context, they have full access to read (or write to) local variables. I happened to put a typo in one of these expressions, and did the ol&#8217; &#8220;assign instead of compare&#8221; trick, evaluating &#8220;str = null&#8221; instead of &#8220;str == null&#8221;.
<br /><br />
I didn&#8217;t really notice the bug, and didn&#8217;t end up needing to see whether str was null or not, so I went back to another view, hiding the debug expressions I had set (out of sight, out of mind, right?). It was about that time I started noticing a bizarre new bug&#8230; whenever I would hit a breakpoint, str would be null, even if the code I was stepping through didn&#8217;t do a <em>thing</em> with str! Fancy that!
<br /><br />
Lesson 1: If there is weird behavior when debugging, check to see if expressions are being evaluated without you knowing.
<br /><br />
Lesson 2: Use &#8220;null == str&#8221; instead of &#8220;str == null&#8221; to avoid assignment vs. compare bugs. (this actually doesn&#8217;t work in all languages&#8230; wait for a future post)]]></content:encoded>
			<wfw:commentRss>http://jordan.liggitt.net/2007/02/26/here-we-go/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
