Monday, September 26, 2005

Hot Pavement

Today, I prepared the RV for the trip to Archon in the St. Louis area, as I've done for several years now. Usually, this is just one stop on an extensive journey through the state, starting in late summer and ending in late November or early December. This year, however, family events and hurricanes (plus gas prices) have conspired to keep the RV sitting in the back yard under one of the pecan trees. I hadn't minded too much, watching the various wildlife that lives on our property. In particular, I enjoyed sliding open the side window and yelling at the squirrels who were systematically removing every pecan from the trees before they were human-ripe.

But the clock was ticking, and in spite of everything else, I had to get to Collinsville on the eastern side of the river before my first event at the convention. Our scheduled departure day kept slipping, but it's 1000 miles to get there, and the RV can travel only so fast.

Sunday, Mary Ann apologized because she had to do some special shopping with Debra on Monday (it has to do with particularly elaborate white dress (I did mention family events, didn't I)) and so I packed my gear and cleaned the RV, expecting Mary Ann to frantically get her stuff together at the last minute, as usual.

But then she called. The Dress was more difficult than she'd expected. Mary Ann wouldn't be able to come with me.

We talked it out. It would be another solo trip for me, only this time with the RV -- we'd need it on the return leg.

So in Austin's 106 degree heat, I headed out of town with the generator running and both of the roof airconditioner units running full blast.

They weren't enough. I have a temperature and humidity gauge, and the air conditioners did keep the humidity down, but it was 6 pm before the temperature inside the RV dropped below 100.

Once I stopped for the night, I changed my weather widget to Collinsville. It predicts a high temperature of 75 up there. I can't wait.

Saturday, September 24, 2005

My Schedule at Archon

Henry Melton:

Thu, 7:00pm GC - Cahokian (Young Adult) Round Robin Reading & Discussion - Harry Potter & The Half-Blood Prince, Chapter 14; After Reading Aloud, Discuss Whether It Was Cheating (2 hours)
Fri, 6:00pm GC - Illini B (Young Adult) Patronizing Youth - Your Chance To Speak Up - Share Your Opinion With Someone Who Might Make A Difference
Sat, 10:00pm GC - Illini A (Writing) Research Makes It Work
Sun, 2:30pm GC - LaSalle Lobby Autographs (1/2 hour)

Archon in Collinsville, Illinois (St. Louis area) and begins on September 29

Thursday, September 15, 2005

Trashy Experiment

In a story I wrote some years ago, I blue-skied a computer system owned by a nomadic TV advertising guru. He roamed the roads in a custom RV, producing TV commercials, completely computer generated, and uploading them via a satellite link to his customers. Well the story was never published, but one detail of this wish-list computer system has stuck with me for a long time. The operating system kept the the trash away from the user.

Fast forward to this year, when I upgraded by laptop to a Powerbook 12" with a 100 GB hard drive -- a considerable increase from the 30 GB iBook I'd been using before. For the first time in memory ... for the first time ever, I had enough disk space.

My work is text documents. Yes I use photos and have tinkered with video, but until I have a bit more free time, I'm not generating more than a few hundred kilobytes per day. I found myself staring at that trash icon at the end of the dock and remembering the trash system I really wanted.

Like a trained rat, I've been conditioned to 'Empty Trash' the instant my eye catches the trash icon with stuff in it. Running out of disk space is no light matter, especially on a system that grows the swap space as needed. But here I was, deleting potentially useful backup items well before I really needed to.

So, I wrote a script that runs under cron to check how much free space exists on my system, and if it ever gets too tight ( I have it set at 2GB ) then it will walk the trash files and delete the oldest ones until free space is back under control. I'd never have to manually 'Empty Trash' again.

So I thought. However, there is the other situation when you need to clear out the trash. When I plugged in an external hard drive, like my iPod, I often had to clear up space on it. However if I used 'Empty Trash' it would delete old trash files everywhere. To fix that situation I wrote a script that deleted trash only on externally mounted drives, used Platypus to wrap a Application icon around it and put that on my dock.

It took six weeks or so to de-condition myself. I no longer notice the trash icon at all, and if I need to empty the external drive, I can just click on the other trash icon up in the application section of the dock.

It's worked very well. Currently I have half a year worth of old trash (1.54 GB) waiting if I need it. There's no penalty in my day by day operations. I'm much more likely to actually throw marginal things away, like old downloads, now that I more comfortable I'll have days, week, months, (maybe years) to change my mind. I've recovered a couple of things, much less than I would have thought. But should a Serious Fumblefinger happen, it's just one more safeguard.

Now I know that this philosophy is in direct contradiction with the current concerns about privacy. I have a few items I don't want public -- a few experimental stories that should never see light of day even if I die famous, for example. Those are created and kept on an encrypted disk image, with a pass phrase that exists only in my head. The very idea of creating a sensitive item in the clear and then counting on the trash system to get rid of it later is unreliable. People get hit by lightning, and at most inconvenient times, too.

So I intend to run my trash experiment until I find a flaw, or until I find something better. A couple of scripts is all it took.

Scripts follow. Errors are likely and I don't recommend anyone else duplicate my experiment unless they have a deathwish. I'm including them here just to show that it's not magic. Scripts are placed in the public domain.

autotrash runs under cron once an hour.

hmpbg4:~ hmelton$ cat /Users/hmelton/bin/autotrash
#!/usr/bin/perl -w
use strict;

my $quota=2e6; # Keep 2gig free
# Check for free space on the volume containing the user's home directory
my $available=&df();
while($available < $quota){ exit if ($available == -1); # df error if (open(LS,"ls -at $ENV{'HOME'}/.Trash|tail -1|")){ my $trashfile=;
close LS;
chomp($trashfile);
my $command="rm -rf $ENV{'HOME'}/.Trash/$trashfile";
# print $command."\n";
system($command);
}
$available=&df();
}
exit;

sub df{
if (open(DF,"df -k $ENV{'HOME'}|")){
my $info=;
$info=;
my @parts=split(/\s+/,$info);
close DF;
return($parts[3]);
}
return(-1);
}

emptyext is the dock application for emptying the external drive's trash. Platypus wraps an application around it and I've added the option to display the text the script generates so I can see the external files being deleted.

hmpbg4:/Applications/emptyext.app/Contents/Resources hmelton$ cat script
#!/bin/bash
find /Volumes/*/.Trashes/501/* -print -exec rm -rfd {} \;
sleep 3

Thursday, September 08, 2005

I've Been Busy

With Mary Ann having done a few blog entries in quick succession, I feel guilty for not having done my regular Blog chores.

But when I'm in the middle of a writing project (actual writing, not just research) I tend to let everything else back up. I haven't been mowing the grass, cleaning my office, or keeping all my stories in circulation to the editors either. Only the hurricane has had the clout to knock me off my schedule.

For what it's worth I'm currently on page 115 of my 'first draft' of the new novel ROSWELL OR BUST.

For those of you who are interested in writing, let me show you one of my self-discipline tools:



This is a spreadsheet that I update each day with the wordcount of the project. As you can see for today, I need to write another 622 words to reach my official goal of 1000 words a day (green). I'm sufficiently in the groove that my weekly rolling average is above the 1000 word mark. You can also see that watching too much Weather Channel and CNN knocked me from from the healthy 1700 word range to barely functioning. I'm having to work my way back.

What I'd like to achieve for today is get the wordcount to near 21000. That'd make todays wordcount the highest in the last seven days (blue) and push my average word count ever closer to my preferred level of 2000 words a day.

I've got a lot to do, so I'll get back to work and quit blogging.