28 March 2005

Population: Tire


The bicycle riding experiment came to an abrupt stop Wednesday night as my front tube popped rather loudly just before 5th & Mercer and my wheel rim sliced the tire up on the pavement as I came to a stop. I’ve got replacement tubes and tires in place now and should be ready to go for tomorrow, which will, according to forecasts, be a jaunt in the rain.


27 March 2005

It Came From Progress Report on WordPress-Pg 1.5


I just checked in a little more progress on making things work. Lots of stuff to report and more general thoughts here as well…


  • Fix the Category List order strangeness in wp-admin/categories.php

  • Change the default links in the install to not include every person who ever wrote a line of WordPress code and instead point to the project pages and useful resources like the WordPress Codex.

    • I do realize this is a little on the gratuitous side, but I think it’ll provide helpful resources to new users. I don’t think new users want to see my blog.



  • Page Parent in wp-admin/page-new.php fixed to work properly

  • Pages list on visitor facing pages working

  • Viewing of static pages working

  • Fixed various uses of SQL year() to use extract(year from col) instead

    • It’s worth noting that this isn’t necessary if the ODBC functions are installed in PostgreSQL. There is probably some room for argument that we should just require that instead.


I think Keenan has been working on the upgrade scripts as well. Certainly a braver man than I, the way the parent project handles upgrading the schema scares me a fair bit. Before I saw today’s changes I almost wanted to suggest putting the kibosh on the whole “upgrade” script thing and just having an import script that takes care of it instead. In any case I think an “import from WordPress-MySQL 1.5” script probably has enough utility that it should be added to the to do list.


  • Install from scratch

  • Upgrade from 1.2 (?)

  • New blog entries work

  • New comments work

  • New static pages work

  • New categories work

  • New links work

The redirect stuff doesn’t work for some pages due to more year() issues. It throws a database error that details the problem, so that should be easy enough to fix. The XMLRPC code still needs to be examined and from a mile high view it looks like a hornet’s nest or a hive of villany or something like that.

There is, of course, plenty left to be addressed, but once the WP-Pg 1.5 work is done, hopefully work can begin towards a happier database agnostic future. And even more hopefully, the developers of the WordPress parent project would embrace those sorts of changes. Right now I get the impression there is ambivalence about the kinds of changes that would be required. It may turn out that, like so many technical hurdles, the hardest work required is in soothing the feathers of the people involved.


22 March 2005

Preparing to Bicycle to Work


With some motivation from listening to a coworker in Las Vegas, I’ve decided to start bicycling the last few miles to work instead of catching a bus or the monorail. Apparently some parts of the government are getting worked up about the general lack of exercise people get nowadays. The exercise will supposedly help with midday fatigue, as well as the obvious weight benefits from burning the calories.

Taking your bicycle into the city is a different sort of adventure than my usual mountain biking back in the sticks or on country roads within reach of our home. Getting the bicycle into the city has to be dealt with, that old U-lock just can’t be trusted to keep a bike in one place in the city nowadays, and having knobby tires isn’t a lot of use on city streets. So here’s a quick run through things I’ve had to find to make this all happen…

Roof Rack

A trip to the Seattle REI took care of the bicycle rack part. My old Cannondale mountain bike frame has a pretty hefty center tube that normal wheels-on claw type bike racks just can’t seem to cope with. I can recall more than one occasion driving down the freeway with the bike up top and hearing a loud clunk as the old claw rack lost its grip and the bike fell sideways hanging over the side of the car. That didn’t exactly do wonders for the wheels it was hanging from at that point either. Wheels-off racks won’t work either, the hydraulic caliper brakes make wheel changes a real fiasco. They do however make braking on muddy, wet, or otherwise slippery rims real easy.

Street Tires

I have a pair of slick street tires that I had purchased for the purpose of riding around town when I was in college. There are some bicycle messengers on the web that recommend mountain bikes with click tires to people getting started doing that work. So hopefully I’ll be set along those lines.

Bike Lock

The trip to REI also included getting a more serious way to attach the bike to fixed objects so it doesn’t just wander away when I’m not around to pay attention. Luckily Seattle isn’t quite New York in terms of bicycle theft, but I’m still not going to trust the old Kryptonite U-lock I have which is vulnerable to the cold spray trick, the Bic pen trick, the crowbar trick, and heaven only knows what else. To solve this problem, I’ve got a new Kryptonite chain which is made with squarish links that apparently are not friendly to bolt-cutters and a padlock with a guard around the shackle to keep it from getting cut. They have some product information about it online.

Helmet

I already had this, but it probably bears mentioning. Bicycling around downtown Seattle without a helmet would be insane, not to mention illegal. I can’t count the number of times I’ve had some idiot in a car or truck nearly run me down when I was walking across a crosswalk or even just walking on the sidewalk. Being attentive while driving apparently isn’t a requirement nowadays, so it’s best to have some protection for my valuable intellectual property.

We’ll see how this adventure goes and I’ll probably say more about it at some point in the future.


21 March 2005

The Return of Progress Report on WordPress-pg 1.5


I spent some quality time in a local coffee shop this evening pounding out more work on the port. Without further rambling here is the good and bad side of where we’re at now:


  • Installs from scratch works in my test environment

    • The logo image on the install page depends on a remote image, probably should get fixed to be local

    • The table creation statements in step 2 interleave wrong in my browser

    • There are some errors thrown by the index manipulation code in step 2

    • Haven’t tested an upgrade scenario of any sort (this probably won’t work)

    • Haven’t tested an import scenario of any sort (this certainly won’t work)



  • Creating new posts works

  • Creating new comments works

    • Comment status code is probably broken (badness related to comment_approved growing a new “SPAM” status which I’ve wound up implementing using NULL since this was made a boolean in the 1.2.x ports)



  • Creating new categories works

  • Creating new links works

  • The front page as well as individual post pages display correctly

  • The admin pages display mostly correct

    • There is some weirdness with the categories list in Manage Categories where root items are displayed twice except for the id 0 “Uncategorized” entries.



  • I’m seeing some database error messages on creating a post but can’t determine where they are coming from due to wp-db being obtuse and various bits of WordPress code turning error reporting off for no good reason

  • Haven’t even begun to look at xmlrpc.php yet. Making that go seems like it is going to be a bit of an adventure


  • Got the posts and categories displaying correctly on the end user parts

  • Fixed places where LIMIT M,N needed to become LIMIT N OFFSET M for PostgreSQL

  • Fixed more badness where “SHOW TABLE STATUS” was used to get the auto_increment counter for new categories, which resulted in new category creation working properly.

  • Default post category is now the special “Uncategorized” category. Some weird stuff was happening where the post_category would be 0 but wp_post2cat would have 1 in it for some reason


  • Cleanup database error messages to be able to know when things go wrong without tailing PostgreSQL’s logs

  • Make install.php use local images only

  • Fix install.php step 2 to use reindex rather than dropping and recreating indexes (which may be necessary for MySQL but not us)

  • Figure out and fix what is throwing the SQL syntax errors in post.php on “save as draft”

  • Fix the Category List order strangeness in wp-admin/categories.php

  • Change the default links in the install to not include every person who ever wrote a line of WordPress code and instead point to the project pages and useful resources like the WordPress Codex.

  • Change the default hello world comment and text to have some “Lorem Ipsum” copy in them to fill out space better.

So I’m going to be checking this all into CVS in a few minutes. I also took the time to add my thoughts about database abstraction approaches on the Using Alternative Databases page over on the WordPress Codex wiki. The WordPress-specific abstraction layer is going to work out best in the long haul. Highly generic abstraction layers for database access generally do poorly from optimization, performance and ease of coding points of view. And as the time spent on the 1.5 port demonstrates, the existing database code is a total fiasco for trying to add new databases to.