- 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 statutes almost impossible
You are currently browsing the archive for the Programming category.
The accumulation of laws that have been passed over our nation’s history have a striking resemblance to a crufty code base:
Q: When does the form “if(null == $x)” 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’t think that they’ve gone all soft on the “why would you ever do that” scene - True and False may still be modified.
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’t think that they’ve gone all soft on the “why would you ever do that” scene - True and False may still be modified.
If you don’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 “features” and “plugins” folders, and Eclipse doesn’t recognize the newer version. This usually happens on Windows machines with a FAT32 filesystem. That filesystem doesn’t update folder timestamps nicely when the content of a folder changes, so Eclipse doesn’t know to rescan for newer versions.
To enable a newer version of a feature you manually installed, start Eclipse, go to “Help > Software Updates > Manage Configuration”. Select the existing version of the feature, click “Replace With Another Version”, then choose the newer version.
The good news is that this bug will go away after Eclipse 3.3. If you start a newer version of Eclipse using the command-line argument “-clean”, it will force a rescan of the features on the disk, regardless of timestamp.
I’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 “Archives” and “Tags” pages, make sure they are viewable by anonymous users. When I logged out and viewed those pages, 404 errors (Page not found) were shown.
Apparently, WordPress 2.1+ doesn’t display pages with any post_status other than ‘publish’ to anonymous users. The pages Tarski creates are created with the post_status ’static’. This needs to be changed from ’static’ to ‘publish’ before anonymous users can see your Archives and Tags pages. However, those pages won’t even appear in the Manage section of the administrative interface.
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 “static”. Those are the ones you want to fix. Simply edit those entries and change post_status to “publish”.
Now those pages will appear in the Manage interface, and anonymous users will be able to see them.
Apparently, WordPress 2.1+ doesn’t display pages with any post_status other than ‘publish’ to anonymous users. The pages Tarski creates are created with the post_status ’static’. This needs to be changed from ’static’ to ‘publish’ before anonymous users can see your Archives and Tags pages. However, those pages won’t even appear in the Manage section of the administrative interface.
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 “static”. Those are the ones you want to fix. Simply edit those entries and change post_status to “publish”.
Now those pages will appear in the Manage interface, and anonymous users will be able to see them.
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 Gmail Notifier couldn’t connect. It kept failing to connect to the server, returning error 12029, “Can not log in to mailbox”. 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 “Block access to secure sites”. That turned out to be a spectacularly unhelpful rule.
Read the rest of this entry »
The first thing I noticed happening was that Gmail Notifier couldn’t connect. It kept failing to connect to the server, returning error 12029, “Can not log in to mailbox”. 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 “Block access to secure sites”. That turned out to be a spectacularly unhelpful rule.
Read the rest of this entry »
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’t load correctly
- Trying to manually open the URL’s for the stylesheets, images, etc, gives you a 404 page
It’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 wasn’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.
Not a problem, says I… I’ll just deactivate the WP-Cache plugin until I’m finished developing. As it turns out, that doesn’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.
Not a problem, says I… I’ll just deactivate the WP-Cache plugin until I’m finished developing. As it turns out, that doesn’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.
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 think of that people might find worthwhile.
I suppose I could start with the simplest and most embarrassing debugging problem I ever hit…
Read the rest of this entry »
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.
I suppose I could start with the simplest and most embarrassing debugging problem I ever hit…
Read the rest of this entry »

Jordan Liggitt is a