I work as a ServiceNow developer and spend my workday creating cloud applications with a lot of other programmers. When I write my own software in my spare time in Java, PHP and other languages, I've begun to miss the collaboration I experience at work. Having other eyeballs on my code is making me a better programmer.
In that spirit, I want to do more of my homebrew programming out in the open on my GitHub account under open source licenses.
I have a lot of old websites and other data I can't do anything with because they're contained in root files, the database format used by UserLand Frontier and related applications. Frontier is open source and after some tinkering I was able to get it to compile successfully in Microsoft Visual Studio.
There used to be a site for ongoing development of Frontier but it folded. Ted Howard also has his own Frontier release, but that has gone quiet in recent years.
This weekend I launched a new GitHub repo for Frontier in the hopes it might grow into something useful, particularly for Windows users since Howard's fixes have been focused on MacOS.
I'm going to start with cosmetic changes to make clear that it's a GPL-licensed open source release. Frontier doesn't currently fulfill this requirement of GPL 2.0:
If the program is interactive, make it output a short notice like this when it starts in an interactive mode: "Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details.
After that I'd like to ensure that all outbound and inbound Internet connections are being logged. Back when I regularly used Frontier I was never comfortable not knowing every server it was communicating with.
I don't know how much work I'll be doing in an old C codebase with several hundred thousand lines of code, but having my own version might give me some ideas for how to use the platform and the software and sites I created for it.
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."
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.
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.
When 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.
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."
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.
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.
Since 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."