Saturday, February 20, 2010

Nonsexual Transmission of Internet Syphillis

John Hornor Jacobs infected me. I was asleep at the time, which in a counter-intuitive way makes it slightly less perverse. I don't know what the circumstances were between him and Daniel O'Shea, but I feel no responsibility to track this back to Kent Gowran, who I don't even fucking know, or any of the other predecessors. Patient zero is probably in the eighth grade. It is somewhat of a mystery why we all seem so susceptible to this particular infection, but I can only assume that writers - even part-time hacks such as myself - have little immunity when it comes to talking about ourselves, whether self-gratifying or not.

For both of you reading this who are not clan Jacobs or O'Shea, here are the rules of this meme:
  • Tell up to six outrageous lies about yourself, and at least one outrageous truth – or – switch it around and tell six outrageous truths and one outrageous lie. (See below.)
  • Nominate some more “Creative Writers” who might have fun coming up with outrageous lies of their own. (Check the end of this post.)
  • Post links to the blogs you nominate.
  • Leave a comment on each of the blogs letting them know that you have nominated them.
I will follow suit with those what came afore me and withhold whether truths outnumber lies or vice versa:
  1. My great great great great Grandfather's brother was Jethro Tull. Not the band – like Luke Wilson in Armageddon, I also get annoyed when people think "Jethro Tull" is just a member of the band – but the Irish agrarian for whom the band is named.
  2. When I was 19 I was toweled dry after a shower by a gay night clerk at a ritzy hotel in Innsbruck, Austria, who gave me a room for free because my hair was long and blond and because I was wearing a "San Francisco" sweatshirt.
  3. More than 10,000 people in Japan know my face because they have seen me die on screen. I have received fan mail, though not for many years.
  4. I was arrested, but not charged, for criminal mischief and disorderly conduct in San Marcos, TX. Even though I had been plenty disorderly that evening, it was a case of mistaken identity for the incident they had in mind at the time.
  5. I know 13 computer languages, 3 spoken tongues, and the universal language of love.
  6. I was once a member of a communal cult whose leader believes that he can cure cancer and change the weather.
  7. In 1986 I got drunk on Jim Beam and Orange Crush with the members of the Delaware Destroyers backstage after a show in Little Rock, AR. George Thorogood made an appearance, but didn't stick around; I'm 95% sure he had a girl from the audience waiting for him in the hall.
I'll add another twist: these might all be true... or they might all be lies.

Scott Osborn and Chuck Plunkett, step to the podium please.

Thursday, February 18, 2010

Things I Miss The Most

I hired a guy a few years ago who was a Jehovah’s Witness and was very careful to tell me that he didn’t want doughnuts on his birthday, which is what our custom was at the place I worked before this one. Except I didn’t know why he was telling me that, because he’d never said what his faith was and of course I didn’t ask - I did have that much Personnel Policy sense - and anyway I wouldn’t have known that they eschew birthday celebrations in the first place.

I told him in what I thought was good humor that it was okay: we’d just have doughnuts without him in his honor, which he didn’t think was all that funny. So then he had to tell me why he didn’t celebrate birthdays and why he’d rather the rest of us not celebrate his birthday, either, and it caused a Big Panic about religious discrimination and what would happen if we ever had to fire him – which we did, though pretty clearly for performance issues.

On the rare occasions that I miss being a manager, I think about things like this and feel better.

Friday, January 29, 2010

Big Jesus


The Christ of the Ozarks stands on a hill beside a scenic overlook near Eureka Springs, AR. It’s sort of the same thing as the Christ the Redeemer monument in Rio de Janeiro, except that its proportions are all wrong and it’s not quite big enough to be impressive. Maybe it’s a holdover from my childhood, maybe it’s a fascination with the spectacle of the monument, but I’ve always had this thing for Big Jesus.

I was in Eureka Springs a few years ago doing Quicktime VR photography for some of my web clients there. I used to really enjoy QTVR work – that’s where you stitch a dozen or more photos together into a panorama that can be moved around and zoomed on a web page – both because it’s technologically cool and because you get to be a photographer, kind of. Along with my thing for Big Jesus, I’ve also always had a thing for photography. Photographers, even in this advanced age, still seem to retain some of their romantic image from days past, Paparazzi or not. Maybe it’s just me.

I had been meaning to QTVR Big Jesus for some time, ever since I started doing it, really. (By “doing it” I refer to QTVR, not Big Jesus.) So I was finally there, waiting patiently for the pedestrians to clear the scene. Tourists can be such a pain.

Truthfully, it wasn’t so much that they were in the shot as it was that I didn’t want anyone to see what I was about to do. I had finished all but the last few shots, which were the ones that had BJ Himself in frame. What I intended to do was set the 10 second timer and make a mad dash up the hill and stand in that Big Jesus palms-forward, arms-outstretched pose. I thought it would be pretty funny to see that in a QTVR, but I was also almost certain that anyone else who came to see Big Jesus would think that was a vaguely sacrilegious thing to do.

So being neither very bold nor wont to offend, I just waited. For a long, long time. There weren’t really that many people, but they were spaced out just right not to give me the right window of time. But it was a nice day and all so I took the role of amateur tour guide, standing beside my tripod, pointing out the tops of buildings in Eureka Springs that you can see from the overlook. I’m sure people thought I was a little strange there, but at least they didn’t think I was sacrilegious.

I waited until I had just about had enough, when these four people came down the hill and started asking about the buildings, etc. Obviously one of them, a middle-aged looking woman, was a local with three out-of-staters she was showing around. We talked for a while about what I was doing and wasn’t it a great day and all and when they got ready to leave, the hostess said she wanted to get a picture of the others out in front of BJ.

She pulled out what looked like one of those handy but pathetic little film-and-camera-all-in-a-box jobs and had them pose in front of the hill. I felt absurdly self-conscious of my $1500+ camera equipment waiting patiently for me to get up the nerve to pull off an admittedly pretty childish photographic stunt. These really nice people were using a $6 disposable camera to record what, to them, was a pretty significant moment in their visit.

I have a thing for Big Jesus. It’s earnest. And kitchy. And so, so oddly shaped. But I’ve never been, you know, moved by it. They were.

So I said to hell with it and pulled the camera off the tripod and trotted up to them. I told them to pose and fired off 10 or 12 exposures with the haze filter to bring out the puffy clouds and the polarizer to make the trees nice and green. Then I told the Native to write her name and address down on the back of one of my business cards and I’d just send the prints to her.

They were kind of startled at first, but then really happy, and then really grateful. They made the de rigeur gesture of offering to pay for the film, postage, etc. I said no, of course, that I had to finish the roll anyway and that postage wasn’t worth the effort.

I developed and printed them, and they really did come out pretty well. I sent them off to the address she gave me, a rural PO box in St. Paul, Arkansas, and I suppose the visitors got a copy too. Maybe they thought something nice about our fine state because of it. I never got to shoot my disrespectful but good-natured parody. But what I want to say about this whole situation is this:

I’ve always had good hearing. As I was carrying my equipment back up the hill I heard the guy of the foursome say “That’s about the nicest thing I’ve ever seen anybody do.” It was just one of those things people do, using superlatives where they don’t really belong, as in “You’re just about the cutest thing!” But it still made me feel good. I had that moment of self-indulgent pride that you feel when you know you’ve done someone a good turn.

But then I heard one of the women repeat what he had said, you know the way people will sometimes communicate agreement. But from her it sounded … sincere. Like maybe she meant it. My God, maybe it really was the nicest thing a stranger had ever done for her.

As I lugged my equipment up the hill under Big Jesus’ left arm, I was filled with a sadness I still can’t explain.

Thursday, January 28, 2010

SQL Function to quote for CSV

MSSQL doesn't provide any way to text-qualify fields with quotes for CSV output. The SSIS filters will do this for you, but if you're using BCP or something even more primitive :) it can be a pain.

Use this function to throw double-quotes around text fields if they contain a comma:


ALTER function fn_QuoteCSV
(
@input varchar(4000)
)
RETURNS varchar(4000)
AS
BEGIN
declare @rtn varchar(4000)
select @rtn=@input

IF CHARINDEX(',',@input) > 0
BEGIN
select @rtn = QUOTENAME(@input,CHAR(34))
END

return @rtn

END

Monday, December 28, 2009

Change Background on Invalid Fields

.NET doesn't provide a way to change the background color (or other attributes) of fields that fail validation when using the built-in validators. I think color prompting is a nice way to indicate bad user input, so rather than going to a whole lot of code-behind nonsense you can just shim on to the .NET validation display routine by putting this javascript on your ASPX page:


var OriginalValidatorUpdateDisplay = null;

function NewValidatorUpdateDisplay(val) {
OriginalValidatorUpdateDisplay(val);
if (val.controltovalidate) {
var ctrlIsValid=true;
var ctrl = document.getElementById(val.controltovalidate);
for (var i = 0; i < ctrl.Validators.length; i++) {
if (!ctrl.Validators[i].isvalid) {
ctrlIsValid = false;
}
}
if (ctrlIsValid) {
ctrl.style.backgroundColor = '';
ctrl.style.color = '';
}
else {
ctrl.style.backgroundColor = '#FF0000';
ctrl.style.color = '#FFFFFF';
}
}
}

if (typeof (ValidatorUpdateDisplay) == 'function') {
OriginalValidatorUpdateDisplay = ValidatorUpdateDisplay;
ValidatorUpdateDisplay = NewValidatorUpdateDisplay;
}


That's it!

The only downside is that as-written there is only one "pass" and one "fail" attribute per page. You could change classes on the fly and accomplish more customization, but that sort of violates the elegance of this approach.

Friday, December 18, 2009

Visual Studio GridView designer bug

There is a bug in Visual Studio 2008 that prevents property changes in design view from being reflected back to source code when controls are embedded in wizards or master pages. For simple controls this is not a big deal, but for complex controls, like DevExpress's ASPxGridView, the designer is a huge time saver -- which is the only reason you pay good money for a nice RAD toolkit in the first place.

Luckily, there is a hotfix:
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=17185

Get it.

Thursday, August 27, 2009

Move around a transparent AIR window

Some things are made out to be more complex than they have to be. If you want an Adobe AIR application without a standard window frame ("chrome" as they call it) then you have to manage allowing the user to move the window around yourself, as well as a way to close the app. It's harder to find a simple example than it should be.


// $background and $close can be any mouse-active
// display object on the stage, of course

// close the app on clicking a button
$close.addEventListener(MouseEvent.CLICK, closeApp);
function closeApp(ev:MouseEvent)
{
var myWindow:NativeWindow = this.stage.nativeWindow;
if (myWindow) myWindow.close();
}

// drag app around
$background.addEventListener(MouseEvent.MOUSE_DOWN, startMove);
function startMove(ev:MouseEvent)
{
var myWindow:NativeWindow = this.stage.nativeWindow;
if (myWindow) myWindow.startMove();
}


You can do a lot more than that, of course.