Someone to Watch Over Mimi Rogers

Actors Mimi Rogers and Tom Cruise in the 1980s

Today is Mimi Rogers' birthday. I interviewed her in 1987 for the UT-Arlington student newspaper during her press tour for the movie Someone to Watch Over Me. It was at her hotel in Dallas with four other reporters. She had married Tom Cruise earlier that year.

As the rest of us asked questions about the movie, one of the other reporters only wanted to ask questions such as "What is it like to be married to Tom Cruise?" and "What is it like to look up at a movie screen and see the giant face of your handsome husband Tom Cruise?"

He also didn't wait for her to finish answering questions. He kept interjecting what he anticipated she would say. So when she started a response, "Doing a movie for Ridley Scott was a great chance for me to grow," he said "as an actress?"

I left the interview with a notepad full of useless sentence fragments and the full quote, "I don't have to see him on the screen because I can see him at breakfast."

Jasper Scott's First Encounter: A First Contact Nightmare

Cover of Jasper T. Scott's novel First Encounter

I love old paperbacks but am beginning to think I'm allergic to them. While I was recovering from a Defcon 1 sinus attack that might have been caused by a yellowing 1993 Francesca Lia Block fantasy novel, I dusted off my Kindle Oasis and read Jasper T. Scott's First Encounter, a science fiction novel about humanity's first contact with intelligent extraterrestrial life.

The book begins with the sunny utopian optimism of early Star Trek and then proceeds to crush the hopes and dreams of the spacefarers sent by Earth to boldly go to new planets for a meet-and-greet with their inhabitants.

I don't want to spoil plot details in a very plot-driven novel, but as things went fubar I was reminded of Stephen Hawking's warning that it might be a calamitous idea to make contact with other civilizations -- since they could be so advanced they "may not see us as any more valuable than we see bacteria."

The novel is the first in the Ascension Wars trilogy and focuses almost entirely on moving forward a fast-paced plot, leaving characterizations on the thin side. There are only four characters I could describe in detail after finishing the novel: the ship's captain, two crew members in a romantic relationship who deal with an unexpected pregnancy and the child who is born. The pregnancy occurs while the ship is heading home, which takes less than a year from their perspective but spans 180 years on Earth. (Those are some long trimesters!)

This time difference was one of the engaging elements of the story, but it did make me quizzical about one thing. When a crew member dies the anguished captain asks himself, "What will I tell their family?"

After 180 years, there wouldn't be any family to tell.

The next book in the series is Occupied Earth. Though I'd like to know the protagonists better I have enough investment in the story to continue reading the trilogy.

The Night Arthur Godfrey Fired a Singer On Live Radio

Cover of 1953 vinyl album Christmas with Arthur Godfrey and the Little Godfreys
Christmas with Arthur Godfrey and All the Little Godfreys (1953 album)

I'm a fan of old time radio, in particular the wise-cracking detective shows like Yours Truly, Johnny Dollar and Rogue's Gallery. Some of the series are getting well-deserved criticism today for their offensive racial and gender depictions -- Wisconsin Public Radio just cancelled its old time radio program after 31 years over such concerns -- but among the thousands of shows preserved at places like the Internet Archive, there's still a lot of entertainment for the ears.

While looking over archival publications on old time radio shows for Winnetoba Radio, I found a great story I hadn't heard before: The night Arthur Godfrey fired a singer on live radio.

In 1952 Archie Bleyer formed Cadence Records and had [Julius] La Rosa recording for him. La Rosa then hired a manager after his first hit record. This didn't go over too well with Sir Arthur, since none of Arthur's friends were allowed managers. La Rosa also refused (unlike all the other male stars on the show) to take dance lessons ordered by Godfrey. On top of this all, La Rosa had a thing for Dorothy McGuire. Godfrey himself also had a soft spot for McGuire. Finally on Oct. 19, 1953, La Rosa was canned right after singing "Manhattan." Godfrey called it La Rosa's "swan song."

The link includes audio of the firing, an act of public humiliation from which Godfrey's folksy reputation never recovered.

Running MySQL Without a Password on the Command Line

MySQL dolphin logoWhen you run a webserver there's always things that could be set up better, for reasons of security, reliability or speed. One of my undone tasks for an embarrassingly long time has been to stop backing up MySQL databases by passing along the username and password to a script at the command line.

I was regularly using the mysqldump program to make a backup of each database via a script that contained these commands:

  
    OF=/home/[username]/backup/$3-$(date +%Y%m%d).gz
mysqldump --user=$1 --password=$2 $3 | gzip > $OF

The arguments $1, $2, and $3 are a username, password, and database name, respectively. The script creates a copy of the database with the current date in the filename and ends with .gz because it compresses the file with GZIP.

MySQL hates being run this way. Every single time I used the script, I got an email with the message, "Warning: Using a password on the command line interface can be insecure." Getting 12 of these warnings a day made me ignore the server's inbox entirely.

To do something about that security warning, I found several suggestions on this Stack Overflow post.

The one I liked best was to create an extra configuration file for each database that contained the access credentials. It takes this form:

  
    [client]
user = [username goes here]
password = [password goes here]
host = [hostname or localhost goes here]

With this file, the mysqldump command can be rewritten to get the credentials from the new file using the defaults-extra-file argument:

  
    mysqldump --defaults-extra-file=/home/[username]/mysql-$1.cnf $2 | gzip > $OF
  

The configuration files are accessible only by the user running the script.

This Blog Has Been Around for 7,500 Days

As of today, I've been publishing this weblog for 7,500 days. Workbench began on Nov. 7, 1999, on the Blogger platform under the name Referer_Log. The name comes from webserver files that reveal the link someone clicked to reach your site, which could be used to find out what other people were saying about what you wrote. Since I viewed blogs largely as a vehicle for ego gratification it seemed appropriate. The homepage had this kidding-but-not-kidding purpose: "Make People Like Me."

A screen capture of this blog from November 1999

Later I renamed it Workbench because I wanted the blog to be about the programming and publishing projects I was working on instead of a bunch of personal yammering about my life and opinions.

That plan, of course, failed. There has been yammering as well as jibber-jabber, folderol and even a little malarkey.

This milestone comes as the blog is in the process of coming back to life after a long period of quiescence. I have written six posts in two weeks to shake off the dust and start thinking like a blogger again.

I'd like to state some grand ambitious purpose but this is still what it was in 1999: an odd experiment writing for an audience of nobody in particular to see what happens.

Fixing 'Call to Undefined Function' Filter_Var() in PHP

I host a lot of websites in the Amazon cloud on EC2. I recently discovered that all email one site was sending was being rated as spam and never seen by the recipient. This meant that new users didn't get the verification email required to complete signup. It appears that EC2 IP addresses can have a dodgy reputation among email providers. Another web publisher described these problems on AWS Developer Forums.

PHP elephant iconSince then I've been rewriting my code to deliver emails with SendGrid, a service designed to avoid all that agita. SendGrid has an API and PHP library that are simple to implement.

While converting a mail script on a non-EC2 server I encountered the following error:

PHP Fatal error: Call to undefined function SendGrid\Mail\filter_var() in sendgrid-php/lib/mail/Mail.php on line 1008

This occurred because the SendGrid PHP library uses filter_var(), a function that was introduced in a later version of PHP than the one on my server.

I'm retiring the server soon, so I didn't want to upgrade PHP just to fix the problem. Rewriting SendGrid's PHP code to replace the missing function also would be difficult. Fortunately I found an ingenious solution from a Joomla developer who encountered the same problem: Create your own filter_var() function that does nothing but return the text it was supposed to filter:

if (!function_exists('filter_var')){
    function filter_var($value, $filter_type) {
        return $value;
    }
}

Putting this in the mail script caused my version of filter_var() to be called instead of the built-in one that SendGrid's code expected. When I move to a new server with PHP 7, it will use the real function again.

I had no idea you could do this in PHP. I thought there was a wall between built-in functions and user-defined functions.

There's at least one aspect of being a programmer that's like being Tony Hawk. You sometimes experience the elation of "I never knew you could do this and now that I can I want to do it all the time."

Working from Home? Welcome to My World

Jake Savin has a blog post up about working from home, something he began doing as a developer at UserLand Software in 2000 coding the blogging platform Manila and other products. Though it wasn't a remote position when he began the job, that soon changed:

The company actually had an office when I was hired, and I had my own space with a desk and a door, a desktop computer, etc. There were only two of us in the office though, and it quickly became clear to me that the value of driving 35-40 minutes each way from my apartment to the office and back just wasn't worth it. So a few weeks in, I drove there one Saturday, packed up the computer and took it home, and never went back. From that point my productivity and focus increased. By a lot.

I've been working from home for decades, first as a computer book author and web publisher and now as a ServiceNow application developer. My morning commute is the thirteen steps I take from the master bedroom to my keyboard.

Jake has some good advice for those new to the experience of being at work while being at home, in particular the call to remember to stop working.

Working from home can erode the boundary between work time and off time. At first you might just fire up the computer occasionally to complete a task or catch up on something you couldn't get done on a day packed with long conference calls. But at some point you start feeling like your extra time is fair game, so you make different decisions about what to get done during the workday. I find this particularly true of programming, which often has blocks of time where you're writing a piece of code and don't need more input from coworkers until it's ready to show them.

Losing the boundary can make all time seem like work time and lead to burnout. I once worked at a startup that had a product launch at an industry conference considered make-or-break for the company. I worked 12 hours a day for 40 consecutive days to get that done along with my other projects. By the time of the event, I was debugging JavaScript in my dreams and had the pallor of an extra on the Walking Dead who died of scurvy.

That's not an experience I recommend. You can't outrun the law of diminishing returns.

Things are better these days. I hear the five o'clock whistle no later than six.