Archives » December, 2003

December 30, 2003

Y2K Redux

Who would have guessed Movable Type has a Y2K bug? I was importing comments, and you’re supposed to put them all into a text file and format them just right and shake your magic wand and spin around three times and do all this stuff to get them imported. Since I had written my own database and code to run the comments on my old site, and those comments were linked to the Blogger ID, but Movable Type needed to have the timestamp to associate them with, I had to bring together three separate systems, IDs, and timestamps into one database, and write a custom program to output a text file with all the information formatted just the right way for MT. Through all of that, I slipped up on the comment timestamps. Instead of 11/12/2003 I formatted them as 11/12/03. I didn’t even notice that I had missed that detail. I imported all the comments and rebuilt the site, and started looking through the pages. That’s when I noticed all the comments were from 1903! Ooops. I guess MT really is serious when it says it needs four-digit dates. So that’s when I started panicking about the prospect of having to edit 350 comments by hand, but a quick look in MySQL showed that MT uses a dirt simple database structure. I just had to delete the offending records from the mt_comments table, run a quick find-n-replace on the import file, and re-import them. It looks like it took this time. So now all of the old comments from my Blogger site are sitting comfortably in MT. Now I just have to go back and massage the archives to get the image links working again.

I’m running on the new host now, but the DNS change from the switch is still propagating. I know that for me it seems to alternate every few minutes between the old site (which has now been crippled and gives you an error) and the new site. Just hang in there, things will settle down.

December 29, 2003

Changes

I’m diving into it. The comments aren’t imported yet and the archives are still a mess, but I want to get it done before the new year and I’m 95% there anyway. So this week I’m switching hosts, from Windows-based Brinkster to Apache-based F2O. This also includes a switch from ASP to PHP, as well as from Blogger to Movable Type. I’ve been running both sites in tandem for a few weeks now, and everything seems to be running smooth over there. My hope is that there won’t even be a hiccup in service, just a switch as the DNS propagates. Everything will stay the same. My e-mail address will be the same, the URLs will remain unchanged, everything will happen behind the scenes.

The only changes will be for the better. One is that the errors I’ve been getting (and possibly some of you too) where the site won’t load should go away. About half the time when I try to look up my own site, I get a “Document contains no data” error in Mozilla. Brinkster Support didn’t even respond when I brought it up with them, and I can’t do with my site being unavailable so much. F2O is half the price anyway, and the money goes to subsidize free accounts for people who want to learn PHP or Movable Type. Like me! So it’s good all around. The changes to this site will be for the better too. This weblog, and Sammy’s Baby Blog, will have integrated comments and real permalinks. I’ve got the templates all ironed out, and pretty soon I’ll be launching an RSS feed.

Changing to PHP and Movable Type might lead to some other new projects down the road, ones I couldn’t do on my old Windows host. But I haven’t had time to deal with that yet. I need to be with little Sammy more than on the computer anyway, and right now he’s still a handful. He’s decided he wants to be a high-need baby, so things should still be slow around here until he gets more independent. Say, at age three. This conversion was my big project, though, and I’ll be glad when it’s over. It’s time to make new stuff, not keep massaging old stuff. Finishing this might even free up some time to work on some other things. Who knows!

December 26, 2003

Second Christmas

Christmas came twice this year. The first one was yesterday, the usual Christmas with the tree and the family and all of that. Second Christmas was today, when Jolly Ol’ St. Nick took the guise of a UPS man and dropped off his goodies at the front door of my office—a new HP server, and enough parts to build 10 new workstations.

As we grow, our tastes in toys drift from Legos and Erector sets to the more expensive (although I’m sure no 10-year old boy squealed as loudly as I did when I got a GameCube yesterday). Now, for me, the best thing I can get is a box of parts that have to be put together to make a computer. And due to my company wanting to make a lot of capital expenditures before the New Year, I was given a five-figure budget for the last two weeks in December. First order of business, sadly, was to get us up to speed on licensing. Fully half my budget went to Redmond so we’d be fully legal with 45 installations of Windows XP. That was heartbreaking, but necessary. The next part was more fun, buying the new hardware we’d need to bring everyone up to speed so they could run XP. This means the Pentium 233s had to go. This was not heartbreaking. I now have ten new Athlon 2.4GHz machines, the gift that keeps on giving. My new year will be filled with playing Santa Claus and upgrading almost half of the company. Ten people will get new computers (to add to the twenty I’ve already bought over the last year), and ten more will get good mid-level machines as hand-me-downs. Finally we’ll have a solid fleet of workstations, without any of the embarrassing stragglers we’ve always had at the end of the food chain. (I can still remember my joy in retiring the last 166MHz computer from my network. This, sadly, was only a year and a half ago.)

And the server. Our current server is the oldest piece of equipment in the company. It’s an old HP NetServer that’s been here at least five years. It’s still running Windows NT. Its twin 9GB hard drives are always inches away from filling up. I’ve built two Linux servers and a second NT server just to take the strain off of it. But its reign has almost ended. Today Santa brought my new HP tc2120, a 2.66GHz with scads of hard drive space and the latest 72GB backup technology. Being the hopelessly incurable system builder that I am, I bought it naked, with no operating system, and I ordered a copy of Windows 2003 to install on it myself. Toss Exchange 2003 into the mix to handle our e-mail, and you’ve got a setup that should last us the next five years. Or at least until Longhorn comes out and makes everything incompatible.

December 24, 2003

Christmas Wishes

Merry Christmas, from everyone here at the Computer Vet, as well as from the friendly mascot of the holiday season, Blackie the KittGuin.

December 22, 2003

Archives

Spiffy new archive page for my MT site. The dates link to the monthly archive for that month, but click on the little plus signs for the extra treat. It works in the latest IE, Mozilla and Opera, but there might be other browsers that it falls down on. It uses a simple piece of JavaScript to toggle the visibility of a <div>.

Here’s the Movable Type template:
<MTArchiveList archive_type="Monthly">
<h2><a href="" onclick="hideshow('arch<$MTArchiveDate format="%y%m" $>');return false;">[+]</a> <a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a></h2>
 <div class="list" id="arch<$MTArchiveDate format="%y%m" $>" style="display:none;">
  <MTEntries>
   <p><$MTEntryDate format="%Y-%m-%d" $> [<a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a>]</p>
  </MTEntries>
 </div>
</MTArchiveList>

And the JavaScript:
<script type="text/javascript" language="JavaScript1.2">
function hideshow(elementid){
if (document.getElementById){
which = document.getElementById(elementid)
if (which.style.display=="none")
which.style.display=""
else
which.style.display="none"
}
}
</script>

Add a little bit of CSS to adjust the font sizes and tighten up the margins, and you’ve got yourself a collapsable archive list for Movable Type.

P.S. Yes, I see the footer crawling up underneath the sidebars when the page is too short. That’s one drawback of absolute positioning. Gotta work on a fix.

December 21, 2003

Movable Me

I’m getting closer to the switchover to Movable Type. I have over 500 posts here, though, so I guess I can’t expect everything to happen overnight. I got the templates close to the way I want them (except for some details with the archives), and now I just have two big obstacles:

1. I have a separate directory for pictures. it’s the pictures directory under the weblog directory. With Blogger, all my archive files are in the weblog directory, so for two years now I’ve been using relative URLs to point to the pictures. <img src="pictures/photo.jpg" />. That worked fine with Blogger. With Movable Type, I’m screwed. I have a real directory structure now for archives, so that today’s posts will be in weblog/2003/12/21. But the posts still have the relative pointer to the images. So the browser tries to look for weblog/2003/12/21/pictures/photo.jpg, and of course it isn’t there. I also have monthly archive pages, that will be looking for weblog/2003/12/pictures/photo.jpg. Also, not there. The solution is to recode all my image links so they use root-relative URLs, ones that point to the same directory no matter what directory you’re pointing from. Like /weblog/pictures/photo.jpg. No problem. It works great. Now I have to go through 531 posts and change all the image tags. Yeah; sounds like fun to me too.

2. Comments. Blogger doesn’t have comments. So what you have to do is use a third-party tool that integrates into your page. I went a step further and wrote my own third-party tool in ASP. So now all my posts are held in Blogger’s database, and all my comments are in an Access database on my site. Now I have to merge them and import them both into Movable Type so that each comment gets associated with the correct post. I have to do this with over 300 comments. I have to do this when the only thing the Blogger and MT databases have in common are the timestamps. And for the last couple of weeks I’ve been double-posting everything, so those timestamps are all off by a couple of minutes. So much more fun.

So that I’m not overrun with new comments while I’m trying to wrangle the old ones, I’ve closed comments on this site. You can always head over to the Movable Type site at its temporary URL and post comments there, but comments here are now frozen. Hopefully I can get everything ready to go before the New Year, but the baby just seems to suck up all my free time lately. Which is how it should be, I guess. So let’s amend that estimate to New Year, 2005.

P.S. I’m also finally going to have comments for Sammy’s Baby Blog (sneak peek here). I’ll probably get more comments there then on this weblog!

December 20, 2003

Wal

Two Wal*Marts? Watch out world, Carson City’s moving up to first class!

December 17, 2003

Biculture

In Biculturalism, Joel Spolsky has written an insightful little article on the difference between Unix and Windows programmers, and by extension the reason Unix is so clunky to use on the desktop.

What are the cultural differences between Unix and Windows programmers? There are many details and subtleties, but for the most part it comes down to one thing: Unix culture values code which is useful to other programmers, while Windows culture values code which is useful to non-programmers.

This is, of course, a major simplification, but really, that’s the big difference: are we programming for programmers or end users? Everything else is commentary…

The cultural schism is so sharp that Unix has never really made any inroads on the desktop. Aunt Marge can’t really use Unix, and repeated efforts to make a pretty front end for Unix that Aunt Marge can use have failed, entirely because these efforts were done by programmers who were steeped in the Unix culture…So here we are, 20 years after Unix developers started trying to paint a good user interface on their systems, and we’re still at the point where the CEO of the biggest Linux vendor is telling people that home users should just use Windows.

December 16, 2003

Get Tufte on PPT

Edward Tufte attacks PowerPoint:

My research indicates that for maybe 10 or 20 percent of users, PowerPoint improves the presentation, because the users are so disorganized or inept it forces them to have points. But for the other 80 percent there’s some significant degree of intellectual corruption.

No permalink to the interview, so if there’s a different one there when you visit, use the drop-down on the right to find Tufte.

Image Maps Live

In the newest edition of A List Apart, Night of the Image Map, or, How to make image maps in CSS. The technique’s pretty simple once you sit down and think about it: use a large image on your page, and for each of the links, absolutely position an <a> in just the right spot. Use :hover and background-image to create rollover effects. Usually I don’t like relying so completely on absolute positioning, just because it can be wonky from browser to browser, but if it’s tested thoroughly and made accessible, which this one is by using well-known image replacement techniques, it can be made workable. Like all image replacement, it suffers when images are turned off in a CSS-compatible browser, but I don’t think anyone’s worked through that one yet.

Of course my own attempts at creating pretty graphics are so weak that I don’t like using them even in a small corner of the page. For me to design an entire page in Photoshop? Ain’t nobody would want to see that.