More Database Cleaning

Rounded up all my personal comments and attached them to my WordPress user. Went through all my internal links and pointed them to the correct pages. Things are feeling quite clean around here. Time for dinner.

Posted in Uncategorized | Leave a comment

Permalinks Updated

Added month to URLs — I feel like I may duplicate a title within a year. Also updated the link slugs for all my old imported posts — now they’re all nice and pretty.

I didn’t 301 all my old links — felt like too much of a hassle for such a low-traffic site.

Boy, I’m using dashes a lot — because they’re awesome.

Time to scan through my old comments and link them to my current profile, and then correct various links in my old posts.

Posted in Uncategorized | Leave a comment

Comments Sorted

Well, that was easier to fix than it seemed…

A ton of my old comments were sorted apparently randomly. It took a little digging, but I finally discovered that at some point, WordPress added a comment_date_gmt field in wp_comments, and during some import most comment dates had been initialized to the default (’0000-00-00 00:00:00′). The comment query sorted by this field with identical values for every comment, so the resulting order appeared random (it was actually sorted by the comment_id, which was not chronologically ordered due to various imports in the past).

Anyhow, I added 8 hours to the comment_date to get to the normal PST/MDT time and fixed this nicely:

UPDATE wp_comments
SET comment_date_gmt = comment_date + INTERVAL 8 HOUR
WHERE comment_date_gmt = '0000-00-00 00:00:00'

If anyone finds this, run a query first to see if any posts have some comments with null gmt values, and some with initialized values. You’ll have to manually look through those to figure out correct comment order.

Posted in Uncategorized | Leave a comment

Titling Untitled

I just went through my archives and added titles for the oldest. I noticed that the URLs were inconsistent still, and some old comments are apparently out-of-order. I’ll have to work on those another day…

Posted in Uncategorized | Leave a comment

Minesweeper App

I’ve started writing a Minesweeper app. I finished the basic logic to generate a grid — next up I’ll be doing click handling and styling it.

I’m building this myself because I have some ideas for improving/enhancing the game I’d like to try out. The thing that annoys me the most about minesweeper is that it’s not always solvable. In fact, I’d estimate at least 80% of the time in Advanced, you encounter a situation where you cannot logically deduce which cell is safe. You are forced to make one of a set of guesses, and you must analyze which guess will be wrong least often, and/or which guess will most likely provide useful information if it turns out to be a safe cell.

I’m interested in testing out alternate grid generation algorithms, ideally landing on one that guarantees sweepability.

Also, I have a few social play ideas I’d like to try out eventually.

Posted in Uncategorized | Leave a comment

HTML5 Sectioning

I just rebuilt Chasing Hats, removing a lot of old markup bloat and replacing it with lovely HTML5 sectioning elements. I had a lot of old voice-family hacks in my code also for I guess IE 5.5 — anyway, I gave it a CSSectomy.

Not sure if I want to redesign it — my old hardcore black and white concept makes the links pretty hard to see. I played around with the CSS3 flexbox stuff today, might be fun to throw some of that in there.

I threw in Modernizr and IE9.js for IE peeps. It’s pretty nice to be able to code how I want these days without worrying about old IE (unless they have javascript disabled).

In other news, I’ve been watching Season 1 of Prison Break. Sweet show.

Posted in Uncategorized | Leave a comment

Go Daddy: Multiple Domains in Economy Plan

Go Daddy charges more to host multiple domains on their hosting plans. They will allow you to point unlimited domains to your html root in the base plan, but they charge extra to point these domains to their own directories.

Well, this is easy to circumvent with a little code in your .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^YOURDOMAIN.COM$ [NC]
RewriteCond %{REQUEST_URI} !^/SUBDIRECTORY/
RewriteRule ^(.*)$ /SUBDIRECTORY/$1 [L]
</IfModule>

Simply replace YOURDOMAIN.COM and SUBDIRECTORY with your alternate domain and a subdirectory you create in your root. Voila! Requests to your alternate domain will serve the requested document from their own directory.

Posted in Uncategorized | Leave a comment

Chasing Hats Republished

Quick note: I just republished the Chasing Hats archives.

Surprised to see my old template was XHTML 1.1. That was a pretty ballsy move back when these were up. I dropped it back to XHTML 1.0 at any rate, because I really don’t feel like serving as xhtml+xml and tracking down all the bugs.

Posted in Uncategorized | 2 Comments

Exhaustive Blog Import

Ok, I want to start writing again. I’m not exactly sure what I’ll start with — probably movie reviews, and a lot of nerdy talk about various aspects of web development. And I don’t want to be lazy and start tweeting again (yet).

Anyhow, I imported all my old posts and comments into this fresh WordPress installation. It was a fairly trivial task — years ago, I’d already done the tedious work of scraping old content from Blogspot and all the independent commenting services I’d used. The WordPress tables were woefully out-of-date, however — the exports used to be raw SQL, instead of the new XML exports WordPress provides. So I just DROPped all the fresh WordPress tables, imported the old ones, upgraded the database, and then ran a fresh XML export to bring into a clean install. A bit of php hackery to reset a lost password, and I’m good to go.

I still need to go back and validate all my posts — trimming 404 images, correcting character set issues, adding titles, etc. — but I’m running out of steam for today. I’ll clean the data tomorrow, and begin customizing the markup and styles.

I think I’ll also compile a list of my old URLs here for reference (thanks Internet Archive):

Posted in Uncategorized | Leave a comment

Billy Collins Action Poetry

Steve McCoy shares some really great animations of Billy Collins poetry. These are well worth checking out.

Tagged , | Leave a comment