Rails, 64-bit MYSQL, and Mac OS X 10.4.3 incompatible

Saturday, November 26th, 2005

A bit of Google fodder. After several hours of futzing and debugging I have determined that the combination of Ruby on Rails 0.14.3, Mac OS X 10.4.3, and the 64-bit version of MySQL 5.0.16 are incompatible. The problem is most likely in MySQL/Ruby 2.7.1, but it could also be in the Mac’s build tools, or it could be in MySQL. I’m not sure. But this combination definitely does not work together. Reverting to the 32-bit version of MySQL makes everything work.

Addicted to Blogging

Saturday, November 26th, 2005

WordPress is surprisingly addictive. I’ve always been an active writer: e-mail, Usenet, the Cafes, 12+ books, so I’m probably more susceptible than most. I’m always astonished at people who say how much work it is to update their site every day. My problem is ususally how to write less, not more. Still maybe the people who said you shouldn’t be writing XML by hand were right.

On the other hand, I just discovered that WordPress’s editor doesn’t recognize CDATA sections. Very annoying. I’m going to have to manually escape all my markup examples. Bleah. I should probably file an RFE. Let me dig out the password they e-mailed me. There. Done.

Interesting. That’s only bug #1965. I would have expected a lot more. Either WordPress is even cleaner code than I thought, or they’re not really logging everything into the bug tracking system. I suspect the latter. They seem to prefer IRC and Wikis to a more formal issue tracker.

Why This Site?

Wednesday, November 23rd, 2005

About a year ago I launched a The Cafes with some fanfare to host shorter writings on a variety of subjects that didn’t already fit into Cafe au Lait or Cafe con Leche. That site was a partial response to my feelings about the shortcomings of a lot of existing weblog management and CMS software. In several ways I think it’s still superior to a lot of what’s out there, including the WordPress engine that hosts this blog. But not in all ways.

For The Cafes I spent a lot of time thinking about the front end and the user interface to the site, and I think I did a very good job there. It works and it works well. The Cafes is still a very nice site design. I spent a lot of time working on comments in particular, because that was the main feature Cafe au Lait and Cafe con Leche were always missing. I not so humbly think the comment system is second to none (though perhaps it could be a tad more obvious how to find it.)

Unfortunately I was so focused on the comments and the overall reader experience, that I neglected the other side of the user interface: how posts were uploaded, written, and managed. The process of writing and posting new articles was so involved that I tended not to do it. Adding a new article requires editing and manually uploading at least three separate pages. Consequently I’ve written very few articles specifically for The Cafes over the last several months. In a few cases I’ve actually written fairly long articles, but not gone to the trouble to upload them. (The negligible AdSense revenues haven’t really inspired me either.) Most of the recent articles on The Cafes started as long posts on Cafe au Lait or Cafe con Leche that grew past what I like to put on those sites.

By contrast, WordPress isn’t just nice for readers. It’s also nice for authors. In fact, it’s so nice, I’ve actually drafted one article for The Cafes in WordPress rather than BBEdit. WordPress makes it much easier to dash out quick notes on a variety of subjects, organize them, and catalog them.

There are some issues I have not yet addressed. I would love to rip out the cookies and replace them with decent HTTP Digest authentication, though that’s a bigger task than I feel comfortable undertaking just yet. I want to replace the Atom 0.3 and RSS feeds with a single Atom 1.0 feed. Possibly WordPress 1.6 will offer that option. And I absolutely must get rid of the hideous HTML escaped markup in the feeds. That’s too gross to be believed. It has to go. It is an embarrassment to have it here.

But I can do all that, sooner or later. The WordPress code is well enough designed that I can hack this all together. I’ve already made one change. I hacked the WordPress software to generate RSS/Atom feeds for the different categories subcategories, so you can subscribe, for example, just to the Software Development feed or just to the Testing feed. So far I haven’t even needed to ask for help on IRC or the mailing list. The combination of Google and the WordPress Codex has answered all my questions, though I still have a few doubts about whether my hacks are the right solutions to my problems or whether there are easier ways to accomplish what I want to accomplish. I may have to ask the mailing list for their judgment on that.

I’m not abandoning The Cafes. I still plan to publish my longer more focused articles there (Indeed I’m dual publishing this article on The Cafes and on Mokka mit Schlag) but I think Mokka mit Schlag is likely to see a lot more activity going forward.


P.S. Mokka mit Schlag is a form of German coffee covered in whipped cream I first encountered at Borsodi’s coffee house in New Orleans about 20 years ago. This site is dedicated to the memory of its proprietor, Robert Borsodi. If I’ve skipped an umlaut or doubled consonant or some such, I apologize to any germanophones reading this; but that’s how Bob spelled it.

SQL Date Types and Ranges in No Year

Monday, November 21st, 2005

in XML Schema there is a gMonthDay type which represents dates such as October 31; that is, Halloween but not in any particular year. How is this typically handled in SQL? The date type requires a year? Do I just have to define separate INT fields for month and day?

A related question: how are date ranges handled? e.g. the range from Halloween to Christmas (10-31 to 12-25)? Two columns for the start and two for the end? Or a start date followed by a number of days? Leap years make this tricky though.

And still a third question: ranges may extend for the entire year or a part thereof. Furthermore they may extend across the New Year’s boundary. e.g. their could be a range that goes from 11-3 to 3-15. How is that handled?

And finally, to really complicate matters the range may be discontiguous. That is, it could cover March 15 to May 15 and September 15 to October 15, but not the intervening dates. However, the potential discontiguity is limited. In my application, there are never more than two contiguous ranges within a year.

I can hack this together, but surely I’m not the first person to need something like this. Has anyone seriously worked through a problem like this and published a detailed analysis of the different approaches for modelling this in SQL tables, and the advantages and disadvantages of each? References appreciated.

Union Types in SQL

Monday, November 21st, 2005

XML schemas support a union type. For instance, you can say that an element must be an int or one of the strings “large”, “small”, or “huge”. Does SQL have any equivalent? That is, is it possible to type a field as containing either an int or one of an enumerated list of strings? Or do I just have to create two fields, one of which is null? How is this customarily handled in SQL?

Top 20 Geek Novels?

Monday, November 21st, 2005

The Guardian has published a list of the Top 20 Geek novels. (More specifically “the best geek novels written in English since 1932.”) The list seems mostly correct to me except for the omission of the Lord of the Rings and perhaps To Your Scattered Bodies Go. One of the books on the list was a life changing and mind altering experience for me (The Illuminatus Trilogy!).
(more…)