Tuesday, March 07, 2006 

Awww! Ain't he cute!

Via Emma, from CuteOverload.com, a cornucopia of terminally cute animal photos.

A couple of months ago, the Science Times section of the New York Times had an article on the Cute Factor.

Scientists who study the evolution of visual signaling have identified a wide and still expanding assortment of features and behaviors that make something look cute: bright forward-facing eyes set low on a big round face, a pair of big round ears, floppy limbs and a side-to-side, teeter-totter gait, among many others.

Cute cues are those that indicate extreme youth, vulnerability, harmlessness and need, scientists say, and attending to them closely makes good Darwinian sense. As a species whose youngest members are so pathetically helpless they can't lift their heads to suckle without adult supervision, human beings must be wired to respond quickly and gamely to any and all signs of infantile desire.

And if you do overload on cuteness, head over to Dependable Renegade for some really snarky, political photoblogging.

posted on Tuesday, March 07, 2006 8:35:45 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Wednesday, March 01, 2006 

I needed to add some declarative error checking to some XSLT templates recently. Specifically, I wanted to throw an error if my selects yielded an empty string, indicating that the input XML was wrong.

Unfortunately, there seems to be no easy way of doing this in XSLT, nor in XslTransform. The approved way is to validate against an XSD schema, but for various reasons, I didn't want to go to the hassle of creating one.

I found a partial solution using xsl:message with the terminate="yes" attribute. Under XslTransform.Transform() the following code throws an exception if the XPath expression is empty.

 <xsl:if test="not(/some/xpath/expression)">
     <xsl:message terminate="yes">Missing expression</xsl:message>
 </xsl:if>
 <xsl:value-of select="/some/xpath/expression" />

It doesn't do anything, however, in XMLSpy.

The downside, of course, is that you have to maintain the expression in two places, and the template becomes littered with those annoying tests.

posted on Thursday, March 02, 2006 5:43:08 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]

A very interesting piece in last Sunday's New York Times magazine: A Talib at Yale. Sayed Rahmatullah Hashemi is the former "roving ambassador" for the Taliban, now studying at Yale. An interesting and improbable life story.

The right-wing blogosphere is furious about it. I say it's better to co-opt moderate former Talibs than to freeze them out.

Besides, his B grades at Yale are better than George Bush's "Gentleman's C".

posted on Thursday, March 02, 2006 4:44:10 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Saturday, February 18, 2006 

Anyone who knows me, knows that I have no use for organized sports. Watching baseball or basketball bores me. I seem to be constitutionally incapable of being a sports fan. I'm too much of a watchful outsider to want to throw myself into rooting for a team.

I actively despise American football. It reminds me far too much of the rugby of my youth. I spent 11 years at an Irish rugger-bugger school, so I come by it honestly. The ugly jock culture that permeates football repels me. The veneration of football in small-town America annoys me. The fans are obnoxious; the players, thugs.

I exaggerate, of course. There are plenty of agreeable people who (incomprehensibly) like football, and other sports cultures are often obnoxious. But I was not pleased when Seattle went to the Super Bowl, and not disappointed when they lost.

My dislike of organized team sports doesn't automatically extend to individual sports. Not that I spend any time watching other sports.

Normally.

I've spent a lot of time in the last week watching the Winter Olympics. The drama of Frode Estil, the Norwegian cross-country skier, who stumbled in the first second, leaving himself at the back of the field of 77, and pulled all the way back to win the silver. Shaun White flubbing an earlier round in the snowboarding half-pipe, and then going on to win the gold. Apolo Ohno touching a competitor's skate and spinning out of control. Lindsay Jacobellis showing off in the final stretch of her snowboard cross, squandering the gold. Lindsey Kildow taking a really bad fall during training, then coming back a couple of days later to compete. Defrasne pulling past Bjoerndalen in the last few seconds after 12.5km of skiing and shooting in the biathlon.

And of course the high drama of the pairs figure skating, where each of the three medals couples had a compelling personal story. The Russian couple, where the woman concussed herself after a bad fall a couple of years ago and the man took months to regain his confidence. The Chinese couple where the man had barely recovered from ripping his Achilles tendon last year. And the other Chinese couple, where the woman took a hard fall seconds into their routine and had to be helped off the ice. Five minutes later, they came back out and skated their hearts out, winning the silver.

I'm amazed at how many of the sports have results that are incredibly tightly clumped, even when they're not competing at exactly the same time. The long-track skating: they skate in pairs, but all the top times are within a second or so of each other after thousands of metres. The point spread in the freestyle moguls. Likewise for the figure skating.

It's especially true in the downhill skating. Darren Rahlves came in ninth in today's event, a mere 0.72 seconds behind the winner. Think of it. Nine skiers hurtling down a hill one at a time at high speed for 90 seconds, and their times are less than three-quarter of a second apart. There's no margin for error. None. The slightest misstep and you're an also-ran.

Makes for great watching.

posted on Sunday, February 19, 2006 7:54:09 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]

A friend sent me a Word document with a parody of the Department of Homeland Security's Ready.Gov website. I googled and found an HTML copy of the parody here.

If you are sprayed with an unknown substance, stand and think about a cool design for a new tattoo.

Seriously, there is some useful information on Ready.Gov. Which reminds me that Emma and I are long overdue in putting together some disaster planning.

Here are some links that I put together a while back:

If there's any lesson that should be learned from Katrina, it's that you need to have your own disaster plan in place.

posted on Sunday, February 19, 2006 3:13:58 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [1]
Wednesday, February 15, 2006 
posted on Thursday, February 16, 2006 5:41:08 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]

I've been using Beta 1 of Microsoft's AntiSpyware for the last year. Beta 2 is finally out, and it's now known as Defender.

Paul Thurrot has a favorable review.

Download Defender.

posted on Thursday, February 16, 2006 3:42:14 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Friday, February 10, 2006 

I've been hanging out on the dasBlog developers' mailing list for the last couple of months, and I've made some minor contributions to the code.

I sent the following email to the developers' list last night.


My wife has decided to start a blog for Team Ireland in the 2006 Knitting Olympics, and she asked me to install dasBlog on her site. I decided that this was an excellent opportunity to do some usability testing on the installation instructions for dasBlog. I asked her to try installing dasBlog, while I watched. I promised that I would bail her out if she got mired too deeply.

Emma has worked as a black-box software tester for several years. She writes SQL scripts by hand, but is not otherwise a programmer. I figured that she could probably install a project like dasBlog, with an intended audience of Advanced End Users.

First, we obtained a graphical FTP client (FileZilla) and checked that she could successfully upload a one-line ASP.NET program to her website:

 The time is <% = DateTime.Now %>

Then it was time to start installing dasBlog. I told her to start at http://dasblog.info and figure out how to get dasBlog and how to install it.

She totally ignored the alphabetical table of contents on the left-hand side, which is formatted as a rather large set of RSS feeds. Instead, she read through the long blogpost on the right-hand side, which didn't enlighten her. After a while, I pointed to the left column. Her reaction: why do I want to subscribe to feeds? I pointed out to the Install/Setup feed. (Reviewing the frontpage post now, I see that the Install/Setup link also appears there.)

There needs to be a prominent link on the front page to a Getting Started guide. http://dasblog.info and http://dasblog.us are a huge improvement on the state of the documentation a couple of months ago, but they still need work.

She found the Install/Setup instructions confusing. They don't cover well the case of doing a remote install to a commercial host provider. Obviously, it's not possible to write a comprehensive guide on this, as providers have many different configuration utilities. Our provider is using Ensim's WEBppliance, which I find painful to use.

There needs to be a Point #0 on the Install/Setup instructions: download the files. After some more headscratching, she found her way to the download page. She was pretty sure that she didn't want to download DasBlog-1.8.5223.2-Source.zip, but she wasn't too sure if she should download DasBlog-1.8.5223.2-Web-Files.zip.

She created a local directory, C:\dasblogce and unzipped the files there. That of course meant that the files she needed to upload were in C:\dasblogce\dasblogce.

Point #1 of Setup/Install is unhelpful to the uninitiated. Point #2 isn't all that clear either.

Using FileZilla, she uploaded the files from C:\dasblogce\dasblogce to \inetpub\wwwroot\dasblogce on her server. Then, with some help from me, she figured out enough of the horrible Ensim interface to create a virtual directory, TeamIreland, pointing to the dasblogce folder.

At this point, we went to http://thewheel.biz/TeamIreland but we weren't able to get in. We got some fairly unfriendly ASP.NET errors. I had to wade through the Ensim UI and grant write access to the content, siteconfig, and logs subdirectories, per the Install page.

Finally, we saw the default page provided by dasBlog!

She had read enough of the Install instructions earlier to know that she needed to modify site.config and siteSecurity.config, but she wasn't sure how to modify them on the server. I suggested modifying the local copies and uploading them.

Her first reaction on seeing site.config was that there needs to be some paragraphs (blank lines) for readability. She nearly overlooked the <Root> setting, but got that configured correctly.

The default installation of site.config needs some comments. The stuff that you really have to modify should be in a clearly delimited block at the top. Something like this:

 <!-- Modify this section before installing -->

<!-- Important: set this to the base URL of this blog, such as
http://example com/joeuser/blog/ -->
<Root>http://localhost/DasBlog/</Root>
<!-- Banner text. (Note: not all themes show the Subtitle or Description.) -->
<Title>My DasBlog!</Title>
<Subtitle>newtelligence powered</Subtitle>
<Description>A blog about my interests: computers, games, beer, etc.</Description>
<!-- Email address of blog adminstrator -->
<Contact>dasblog@example.com</Contact>
<Copyright>Your Name Here</Copyright>
<!-- Default visual theme -->
<Theme>dasBlog</Theme>
<!-- End of essential modifications -->

She was less sure what to do with siteSecurity.config. She thought she needed to use the same Name and Password as she uses to log in to the server. (No. It's arbitrary.) She also needed to add a few additional Users, since it's going to be a group blog.

There should be a commented-out example of a contributor user in siteSecurity.config:

 <!-- example of a non-administrator user
<User>
<Name>SomeOtherUser</Name>
<Password>blog-password</Password>
<Role>contributor</Role>
<Ask>true</Ask>
<DisplayName>Some Other User</DisplayName>
<EmailAddress>SomeOther@example.com</EmailAddress>
</User>
-->

She uploaded the modified site.config and siteSecurity.config. It failed horribly when she went to log in. I had to download the events.log file to realize that she had deleted the </Users> in siteSecurity.config.

That fixed, she was able finally log in and create a post. I won't detail the pain we went through to upload images via FreeTextBox.

The dasBlog admin interface has not been working for her. It's unable to write to the siteconfig directory. At some point last night, the content directory somehow became unreadable and the site started throwing ASP.NET errors.

I was able to fix that tonight by blowing away the content directory in FileZilla and uploading a backup. I think I've fixed everything, by explicitly granting read and write to the siteconfig and content directories and everything contained therein.


Epilogue: Every new entry in the TeamIreland blog is being created with the wrong permissions, causing dasBlog to puke. It can be fixed by setting the permissions for each new file to read/write through the Ensim interface, but it's hardly a good experience for a group blog. I'm still waiting for iHostSites' support people to set the ACLs properly.

posted on Friday, February 10, 2006 8:10:41 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [1]
Wednesday, February 08, 2006 

I installed dasBlog at Emma's The Wheel site, so that she and the other knitters in Team Ireland can blog during the 2006 Knitting Olympics. What an ordeal that was! But that's a post for another time. (It's not working yet, due to permissions issues that require the intervention of support at our hosting site.)

I decided today to create a favicon for The Wheel, based on the logo that I drew last year with Inkscape.

A favicon is a 16x16 icon which shows up in the tab in a tabbed browser, such as FireFox or IE with MSN Search. For example, the little gvr icon that shows up if you're reading this on my personal blog. I think I created this with a trial copy of Microangelo Creation, but I've repaved my laptop since then, so I'm not sure.

Initially, I drew the favicon by hand with the icon editor in Visual Studio, since it was the only tool that I had handy at work. It looked like crap.

This evening, I remembered about the automated FavIcon from Pics service over at HTML-Kit. I stripped the wording off the logo and submitted that. Much better! And much easier than using Visual Studio's horrible icon editor.

If you look at it with Magnifixer, you can see that this image has effectively been heavily anti-aliased. Or rather, FavIcon from Pics did a good job of shrinking the original image.

I had to flush Firefox's cache before it would pick up the new favicon, whereas IE picked it up after Ctrl+F5. Score one to IE.

posted on Thursday, February 09, 2006 4:54:44 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Tuesday, February 07, 2006 

I consider myself to be an expert WinDbg user, when it comes to debugging unmanaged x86 code. I haven't used WinDbg much on managed code, and when I did, I found it quite painful.

Via Scott Guthrie's blog, I discovered Tess Ferrandez's blog. Tess is an escalation engineer in PSS who specializes in ASP.NET and a WinDbg virtuoso. Scott has a list of her best posts. Mind-blowing stuff, but not for the faint of heart.

posted on Tuesday, February 07, 2006 8:58:37 PM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Monday, February 06, 2006 

I blogged before about KeePass, a free password manager utility. A few minutes ago, I added the 200th entry to my password database, when I registered to download VMware Server.

200 entries! At one point or another, I've registered on a hell of a lot of websites. I also use KeePass to keep track of credit card numbers, software registration keys, and so on. KeePass not only lets me use distinct, strong passwords for each site, but it also lets me remember which sites I've registered on. Some sites want me to use my email address; others prefer an alphanumeric username.

One friend reliably informs me that KeePass runs just fine under Wine, giving him a cross-platform way to manage his passwords.

posted on Monday, February 06, 2006 10:06:14 PM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Saturday, February 04, 2006 
posted on Sunday, February 05, 2006 5:33:32 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Friday, February 03, 2006 

Back in October, I joined Atlas Solutions as a senior software engineer. The company just held its first "partner summit", to educate some of our key partners on the kind of work we're doing and new developments. An attendee blogged it. I'm working on video on demand, the stuff that Scott Ferris talked about.

I saw some of the presentations being rehearsed last week, but a lot of this is stuff that I've never seen before. I come from a software background, after all, not an advertising background.

posted on Friday, February 03, 2006 5:53:52 PM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Tuesday, January 31, 2006 
posted on Tuesday, January 31, 2006 11:14:08 PM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Monday, January 30, 2006 

The Onion interviews Stephen Colbert on the Colbert Report, politics, and improv.

posted on Monday, January 30, 2006 10:00:08 PM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Sunday, January 22, 2006 

This application to join the Republican National Committee arrived in the mail the other day. Hell hasn't frozen over yet, so I won't be joining the Republican party.

I don't know how the RNC came up with my name, though I got another solicitation from them a few years ago. Usually, I get solicitations from the Dems and from a variety of progressive causes, but then I have a track record of supporting them.

The previous owner of our house, Harry Korrell, is a made man in local Republican circles. He was a member of Dino Rossi's legal team when Rossi was trying to overturn the last gubernatorial election in Washington state. Feh!

posted on Monday, January 23, 2006 6:16:40 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [1]

I've been trying to make Vim 7 compile with the Microsoft Visual C++ 2003 Toolkit, as a favor to Bram Moolenaar, the primary author of Vim. He wants to be able to use the free compiler as the primary build tool for the Win32 version of Vim.

Oh. My. God.

The VC2003 toolkit may include a full optimizing compiler, but it's certainly far from a complete system for building Windows binaries.

First, I discovered that it came only with the C library headers, but not the Windows headers. That was easily rectified. Download the Platform SDK. Just the Windows Core SDK subset. This also got me nmake.

At this point, I was able to compile Vim, but not to link it. The linker required cvtres.exe, to link some resources. Some googling showed me that this is included in the .NET Runtime.

The main Vim executable now linked, but the shell extension DLL didn't. I didn't have msvcrt.lib! It took me more detective work to learn that I'd have to install the .NET Framework SDK to get msvcrt.lib. There are several clever hacks out there that generate msvcrt.lib from msvcrt.dll, with the help of link -dump -exports and a sed script, but these do not include the all-important _DllMainCRTStartup@12, the real entrypoint for DLLs linked with msvcrt.

All the necessary steps for getting the downloads are summarized on the Code::Blocks wiki. Code::Blocks is an open-source IDE that can host the VC2003 toolkit, GCC, and a number of other compilers.

So why bother with the VC2003 toolkit, since Visual C++ 2005 Express Edition is freely downloadable?

The main reason is that it's free only for the first year, and Bram wants something that will still be available after November 2006, so that anyone can compile it.

I have also ported Vim 7 to compile with VC2005 Express. It was fairly straightforward, after I had added the following

 #if _MSC_VER >= 1400
# define _CRT_SECURE_NO_DEPRECATE
# define _CRT_NONSTDC_NO_DEPRECATE
#endif

to shut up the warnings about deprecated CRT functions. I also had to make it link with libcmt.lib (multithreaded) instead of libc.lib, as the single-threaded static library is gone.

I still need to make sure that everything continues to work with the retail compilers, VC6, VC7.1, and VC8, before passing my changes back to Bram. Sigh.

Update #1: I almost forgot. VC2005 Express also requires the Platform SDK to build Vim.

I'll send the diffs to Bram in about a week. I'm too busy to clean everything up this week.

Update #2 (2006/03/12): I sent updates to Bram a week ago and he's checked them into the Vim7 source tree. Be sure to read src/INSTALLpc.txt, section 1, for details on compiling Vim with VC5-VC8.

Update #3 (2006/04/22): VC2005 Express is now free forever. Vim7 is in beta and will be released soon, and Bram doesn't want to switch compilers at this point.

posted on Sunday, January 22, 2006 9:17:05 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Wednesday, January 18, 2006 

A useful compendium of health risks associated with excessive computer usage: Is Your Computer Killing You? RSI, eye strain, deep-vein thrombosis, insomnia, etc.

A little app that I find useful in reminding me to take occasional breaks is Workrave. Though I've gotten all too good at ignoring it.

Time for a break.

posted on Thursday, January 19, 2006 5:36:22 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]