Archive for January, 2008

Google Docs

January 28th, 2008 by daryl

I’m usually pretty leery of using online services that I don’t administer for things that matter to me. For example, I’ve resisted a number of times using Google’s calendar for work purposes because there’s potentially sensitive information being posted to the calendar. So not only do I not have control over leaks of the data, but I don’t have control over backups, uptime of the service, etc., and this seems a lot of liability for something I need to make sure I’ve got access to. (Honestly, though, I think the smart folk over at Google are probably generally more competent than I am to guarantee uptime, backups, etc. — comparative benefits packages would suggest as much, at least.)

I’m very satisfied with one aspect of Google’s online service, however, and I’m consistently able to put aside my paranoia to use Google Docs for collaboration. Now I’d never store an important sensitive prose/text document there, but for planning server maintenance, the spreadsheet application is hard to beat. You share a document with everybody who’s involved, and everybody can view and edit the document at the same time. This past weekend, I was tasked with taking another shot at setting up replication between some mysql servers. We’ve set this up in the past but have lost confidence in the validity of the replication. So a coworker and I made another go of it this weekend. In preparation, I made a punch list of our steps, from putting up downtime pages and blocking access to the database at the firewall to pasting in commands for dumping data and resetting meta-data. I was able to color-code the steps by server so that it was easy to tell at a glance on what hardware to perform a step. And then as we went through the steps, we could update columns describing who performed a step and when. Of course, we’re coordinating this in a chat window as we’re doing the work, but it’s neat to watch the spreadsheet being updated interactively as we go, and this method provides a really simple, nice way to collaborate and keep a record of the process. Since the data’s not terribly sensitive (provided you don’t put passwords in), hosting it elsewhere doesn’t give me the heebie jeebies, and it’s nice to have a centralized repository of past maintenance events to build on for future maintenance. If there were a version you could download and install on your own hardware, I’d do it in a heartbeat and even use the apps for sensitive data, but then how would Google watch your every move and deliver search results based on the documents you create?

Blogged with the Flock Browser

Network Solutions squatting

January 21st, 2008 by daryl

Last night, I was poking around to try to find a domain name for a little hobby project I’m working on. I’ve always found Network Solutions’s domain search tool to be pretty useful because it comes back with a grid of all common TLDs and their availability, and it keeps a list of all the ones you’ve searched for in your session, which is handy if you’re having to try a lot of fairly similar versions of the name you’re looking for. Finally, last night, I found a name I liked, but I wanted to sleep on it to make sure. This morning, I went to my usual registrar of choice (GoDaddy) to buy the domain, and it was listed as unavailable. I went back to NetSol’s tool to see if they had the same result (surely somebody hadn’t purchased the name in the few hours since I had discovered it). NetSol showed the domain available. Hmmm. So I looked at the whois info and found the domain registered to NetSol with a creation date of yesterday. I’ve always been a little suspicious that registrars might log domains searched for and hold them or sell them to squatters for a hefty fee, but I’ve never personally been bitten by the practice. But here we have confirmation that NetSol is essentially squatting on domains that people express interest in. So, why is this a big deal? Two reasons. One, it’s a pain to have accounts with multiple registrars. I did it for years and have finally in the last couple of years managed to consolidate my domains with one registrar that has proven to be a good vendor. Two, there’s a substantial price difference. NetSol charges $35 per year for a domain, while GoDaddy charges around $10. I went ahead and bought the domain through NetSol and immediately did a transfer request to move the domain to GoDaddy. I guess NetSol sort of has the right to do this, but it seems pretty crappy. I searched on a bunch of names last night, and a few that were available, I wound up deciding not to get. That means that the next time somebody searches for those domains through another registrar, they’ll show as unavailable and won’t be purchased. I guess I paid a $15 service fee for using NetSol’s tool. Had I known that a search constituted license to squat and gouge, I wouldn’t have used the service, and henceforth I won’t.

Chocolate Stout

January 20th, 2008 by daryl

Last weekend, I discovered that Earthfare has a decent selection of beers I hadn’t previously found elsewhere. I picked up a Fort Collins Brewery chocolate stout and a Left Hand Brewing Company milk stout (Gabe, I won’t let your derision keep me from trying these!). It turned out that Dave came over on Saturday or Sunday, and he stopped at Leaf and Ale on the way over to pick up a few more stouts (they’ll let you mix and match) to round out a full-on tasting party. (Incidentally, here I’ve been hankering for a year or two for a place to get beers not available at Ye Olde Kroger, and it turns out that Leaf and Ale, which I thought was way down in Fountain City or somewhere, is within about three miles of my own front door.) I jotted down the list of beers we tried, but I’ve misplaced the list and forgotten the names. One of them stands out to me still because it tasted like it was brewed with red wine in it, and that was a little gross (sort of the way brandy is gross because it tastes like whiskey and wine; don’t get me wrong — I like red wine, but these combinations just don’t do it for me — it’s sort of like pouring orange juice over your cereal; speaking of breakfast, it occurs to me that among my favorite beers these days are a milk stout and an oatmeal porter: if I could find a bacon brew or an egg lager, I’d have a pretty well-rounded breakfast beer trio). By far (and I believe by consensus), the best of the beers we had was the Fort Collins chocolate stout, with the Left Hand milk stout probably a respectable second. It looks life Leaf and Ale’s got a number of other stouts I haven’t tried (though not even they seem to carry the Rogue Shakespeare and Chocolate stouts). Once I get those under my belt, I don’t know what I’ll try next. Pale ales have never been my favorite (then again, I used to have trouble stomaching a stout), so maybe I’ll explore them next.

Phpbb3 import error: bbcode_uid truncation

January 17th, 2008 by daryl

I recently upgraded an install of phpbb to phpbb3. Shortly thereafter, I moved the site that the forum runs on to different hardware after several days of downtime on the original hardware (and an unresponsive vendor). To move to the new hardware, I dumped the database to a text file, compressed it, and shot the database and all site files across the network to the new hardware. Then I uncompressed the database and slurped it into mysql. Simple enough. What I hadn’t considered in advance was the fact that I was moving from mysql4 to mysql5. Accordingly, some weird things started happening when I started testing the site on the new hardware. I googled around a bit to discover that some of the problems were a result of the mysql upgrade, and I finally found this script, which purports to solve the problems by modifying the database structure. The script seemed to work just fine. The problems I had seen went away, and I figured the migration was a success.

But then somebody in the forums pointed out that bbcode throughout the site was messed up. And sure enough, all posts that had been imported had weird extra characters appended to bbcode blocks, which kept the bbcode from being converted into the appropriate html. For example, a block of bbcode might look like this: [quote=”username”scd]stuff[/quote:scd]. But the characters were never consistent across posts. A bit more googling turned up the fact that phpbb has a field called bbcode_uid that is supposed to allow eight characters, but either when moving from mysql4 to mysql5 or as part of that nifty script I ran (I’m not sure which), the field gets truncated to five characters, which lops off the last three characters of an eight-character bbcode_uid, which ultimately results in the weird display we found.

What’s going on is that parsing nested tags (e.g. “[quote][b][url][/url][/b][/quote]”) can become laborious for the server, especially when tags don’t get closed properly. To make it more surefire and to simplify the process, phpbb appends a bbcode_uid to any bbcode inserted. So when you type “[url]http://daryl.learnhouston.com[/url]”, what actually gets inserted into the database is something like “[url:d98cJ1pv]http://daryl.learnhouston.com[/url:d98cJ1pv]”. This makes it so that you’re not having to figure out arbitrary nesting, because every opening tag has a corresponding unique end tag; you don’t have to find a beginning tag’s mate by parsing a string recursively, in other words. It’s a really cool idea. Of course, to remove the bbcode_uids from posts as a page is built, you need to store the bbcode_uid associated with a given post, so that it can be stripped out once tags are matched to one another. This is the bbcode_uid field in the posts table. And this field has just been truncated to five characters by the database move. Which means that when phpbb tries to find the bbcode_uid value within a given post, it finds and strips out only the first five characters, which results in three weird characters being appended to bbcode tags and the improper display of bbcode. In every single post and every single signature of your forums, which in my case was nearly 200,000 posts.

The fix is rather daunting to implement. Basically, you have to script something that looks at every single post and every single signature, finds bbcode_uids therein, matches the first five characters to the bbcode_uid field in the posts table (just as a check), and then updates the bbcode_uid for each post to the match found (this is after altering your table to make the bbcode_uid column accommodate eight characters, of course). If you get this wrong, you’ve basically wrecked your whole database, and bbcode for posts in the past will never render correctly. Of course, if you’ve discovered this problem before anybody has posted to your site, then you can alter the database and reimport the data, but this isn’t an option if people have been using the site for a few days before the issue was reported. Luckily, I was able to come up with a pretty simple script to fix the issue. Of course I was terrified to push the start button, so to speak, but push it I did, and it worked.

If you’re having the same issue, you can try my fix at your own risk.

His Dark Materials, Zadie Smith

January 17th, 2008 by daryl

I spent much of my 11-day holiday break either horizontal or wishing I was horizontal thanks to a back strain that’s still giving me fits. I took advantage of the time to get some reading done. Mleeka and I had gone to see The Golden Compass, and in anticipation of it, she purchased and read the trilogy of which that movie composes roughly one third. She was somewhat disappointed in how the movie chopped off the end of the first book and how it left out some of the back story about Dust. Having not read the books yet, I thought it was a pretty engaging movie, if it was a little slow at times (especially when Kidman was onscreen). In any case, watching the movie and hearing Mleeka talk about the books prompted me to read the books. Steinbeck they’re not, but I enjoyed the whole set. Oddly, where Mleeka found the second book to suffer from what she calls second book syndrome (wherein a second book in a set serves primarily to set up the more involved politics and relationships that drive subsequent books but are of limited interest on their own in terms of actually moving the plot along), I found it to be pretty interesting. On the whole, not a bad bunch of books for a quick read.

I had heard about an author named Zadie Smith. She made waves a few years ago with her first novel (published when she was 24, I think), and I’ve been meaning for a while to pick up some of her stuff. Her On Beauty was on my amazon wish list, and Ashley got it for me for Christmas. It was a good book, though somewhat different from what I had expected based on comparisons of her work to other authors I like. It felt a bit like a modern day take on the old comedies of manners. I don’t mean to pigeon-hole Smith here in the almost patronizing way it’ll probably come off, but the book felt a bit like Pride and Prejudice or Sense and Sensibility for the 20th century (which probably isn’t terribly flattering given that I find those sorts of books tedious and dull and light). And yet it wasn’t tedious or dull or light, and in fact, there was much to appreciate. Smith writes really great dialogue, and especially argument dialogue. So the book wasn’t quite what I expected, but it was well-done enough that I decided to get her first novel, White Teeth. This I finished reading last night, and it’s the sort of book I expected based on what I had read about Smith. It was different than any of the old white guy fiction I’ve read, and it dealt with its subjects in what felt like really honest, informed ways across cultures, religions, races, genders, and ages. And it did so with wit and beauty and absurdity and sometimes sadness. On Beauty isn’t a book I’ll likely read a great many times in my life, but White Teeth I can imagine myself re-reading every few years, as I do with most of my favorites. (Uh, which is not to detract from the gift itself of the former book; had I not read that one, I might never have gotten around to reading the other.) If you happen to like reading contemporary literary fiction, this one should go on your list.

Next up I think is George R. R. Martin. I’ve never been much on sci-fi or fantasy, and I guess he’s a fantasy author. Three or four people have separately recommended him to me even knowing that I’m not much of a fantasy reader. Mleeka gobbles the stuff up, so I got her the first in his big series for Christmas, and she dug it and has since read the rest of the series that’s been published to date. She seems to validate what others have told me about him, so I’m thinking I might broaden my horizons a bit and see what I think of his books.

Milk Stout

January 3rd, 2008 by daryl

A couple of months ago, I wrote about the Knoxville Brewer’s Jam and mentioned in particular the Duck-Rabbit Craft Brewery’s milk stout, a type of beer I hadn’t tried before and found pleasing. I had never seen this beer (or any milk stout) around town (not that I’m really a mover or shaker in Knoxville beer circles) and figured I’d next have a bottle of it at next year’s Brewer’s Jam. I recently went to Three Rivers Market (otherwise known as the Food Coop) to stock up on inexpensive spices and honey, and when I checked their beer selection, they had at least two milk stouts, of which one was the Duck-Rabbit (the other was from Left Hand Brewing) and a number of other beers that will be new to me when I try them. So if you’re in the Knoxville area and want take-home beer that’s not Bud or Coors, be sure to swing by the Food Coop to sample their selection. At a glance, it looked like the beers were priced about the same, and this makes me wonder if one could build a mixed six-pack. Next time I’m there, I’ll be sure to ask.