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.

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.

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.

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.

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.

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):

Stunted Intelligence

I have a theory. At birth, each person is given a specific allotment of intelligence. This intelligence can be used for less complex matters or for more complex matters. Some people may waste all of their intelligence on mindless activities, and others may use it on higher, more profitable endeavors. I, for example, have ceased to plod the never-ending path of memorizing multiplication tables; now I am working on multivariable calculus. I no longer spend endless hours playing addictive games such as minesweeper; now I concentrate on solving such puzzles using linear-algebraic tactics.

It must be noted, however, that different people are given different levels of intelligence. Some people will never be able to follow logical arguments containing more than five or so premises; some people will not be able to enjoy fireworks shows without constantly calculating trajectories and temperatures. Ultimately a balance must be struck between simplicity and erudition, and between blissful simplicity and abysmal ignorance.

I bring all of this up because I seem to have misallocated my intelligence. These days I can understand simple harmonic oscillation with ease, which is more refined knowledge. But in so doing, I deflect my intelligence away from the more fundamental things. Let me illustrate: while leaping around the house yesterday, I slammed my head into a doorframe. I can tell you, it hurt. But it hurt even more once I calculated the force to be about 100 newtons.

“We need people of intelligence on this mission. Quest. Thing.”