Outlook Reminders on top of other windows using AutoHotKey

I actually paid for a tiny piece of software that ensured that my Outlook reminders really stayed on top when the window popped up. My license still works, but the web site is long gone, and yet, in Outlook Options > Advanced > Reminders, the “Show reminders on top of other windows” only works intermittently and initially, so it’s easy to inadvertently hide it.

So, this setting does not really work. My solution was to install AutoHotKey and after quite a bit of searching and adaptation of similar solutions, this simple script installed in my startup folder seems to do the trick. Every 10 seconds it checks for the window title using a regular expression and locks it on the top of other windows if it exists.


SetTitleMatchMode, Regex

SetTimer CheckReminders, 10000

if (WinExist("^[0-9]+ Reminder\(s\)") && !WinActive("^[0-9]+ Reminder\(s\)"))
	WinSet, AlwaysOnTop

Zotero Plugins

I wrote a couple of Zotero (https://zotero.org) plugins to solve some problems. First was to preview a citation in a tab.

The second is to fix line endings in abstracts, which seems to be a problem for me when I copy/paste from PDF files.

I was starting from scratch in learning how to do this, but basically copied some bits and pieces from other plugins. There was more than a little head-scratching. What was interesting to learn is that Zotero is a web page / application under the hood and so is basically written in JavaScript.

Word and Acrobat Mail Merge with field-based file names

I was asked to create certificates for several hundred people in such a way that the files would be readily identifiable. The challenge with this is that Mail Merge in MS Word (2016) doesn’t allow you to use a field name for the output, so you can’t create

  • bob.docx
  • nancy.docx
  • grace.docx

You can only create:

  • some-stem-1
  • some-stem-2
  • some-stem-3

Based on some Googling this is quite a common problem. Here’s how I solved it, and it’s a variation on what I learned here.

  • Create the Document in Word, in this case using the certificate as a background image
  • Use the Mail merge wizard with the Excel file data source
  • Add an invisible Heading 1 for the eventual file name using the fields I wanted as the file name stem, in this case “college”-“email”
  • Perform mail merge in Word. This should create a single file with a page (in my case) for each row of the spreadsheet
  • Separately Create the PDF. The trick kicks in here because each Heading 1 is converted to a top-level bookmark in Acrobat
  • In Acrobat -> Organize pages-> Split -> Using top-level bookmarks with the output option of “Use bookmark names for file names”

The result is a folder of individual files with custom names based on the bookmarks/headings.

Becoming a Soccer Referee

This post refers to some specifics to the New River Valley and the Roanoke Valley, but I’m writing it because I found the process very confusing and figure this might help someone. My understanding is that the issues are broader than this locality though.

Many of the web sites you encounter feel like they were designed in the 90’s and there are a lot of different systems to log in to with minimal or very weird integration between them. They really are so, so, very bad.

It is worth going through the somewhat tortuous process. The pay is solid. You get to move around. And it’s fun.

If, like I was last year, you are a complete beginner, here is what you need to do:

Get Certified

In Virginia, training is organized through the Metro DC-VA State Referee Program.  The short version is:

  1. Sign up for a local in-person clinic
  2. Complete the online instruction
  3. Attend the in-person session

When you pass the test at the in person session, you’ll get your badge.

A heads-up that during the online training you have to sign up at a different web site (the US Soccer Digital Learning Center), create a profile, log out, and then log back in via the Metro DC-VA site. Yes, seriously, that is really what you have to do. Read the rest of the instructions carefully…yes, it really does tell you to clear an error code and wait 20 seconds. You are not nuts. The design and technology is really just awful.

Buy Gear

I bought most of my gear on Amazon including my starter kit with flags, whistle, etc. There’s an official site where everything is a little bit more expensive if you want to do that. You absolutely need the yellow shirt, and at least one other color. For a beginner, it’s probably overkill to get all the colors. You have to have black shoes. You need black socks with three stripes. 

Sign up on the assignment web site

The Roanoke Valley Soccer Officials Association uses Arbitersports for almost everything, including regular communications. It’s functional, but, like others you’ll have to use, feels like it was designed by a DOS programmer. I do recommend getting the mobile app. I use it for match reports and just having key game information right on hand.

What you use ArbiterSports for:

  1. Indicate you’re ready to be assigned games on your profile
  2. Games are assigned to you and you have to accept or reject them. The sooner you do this, the better.
  3. Block your schedule so that you don’t get assigned games and have to reject them, annoying the assigner.
  4. You get paid through Arbitersports/Arbiterpay.


You will have to recertify yearly. It’s the same awful web sites from before, but you will receive email communications about this from the Roanoke Valley organization. This year I recertified by attending a Law Change meeting and doing the online instruction.

USSF vs VHSL vs FIFA Rules and Laws

Wait, what? The rules are the laws of the game, aren’t they? …oh, you have so much to learn!

You’re a beginner, so you probably don’t have to worry about this too much yet.

There are different rules for different games and different rules for different organizations. I have no idea why. Very broadly, I think USSF follows FIFA, and VHSL follows NHSL rules which decides not to follow the laws of the game. There is no good reason for this that I’m aware of.  College Soccer is its own thing and has yet another set of rules

There are however different badges and certifications, so you have to train and certify separately for VHSL if you want to referee those games. Again there is an online component (the VHSL Whistle web site) and an in person component. 

Unfortunately, you will not learn much at the web site for the Roanoke Valley Soccer Officials Association. They are good people, but the web site is not. It’s not updated. It’s mostly a red herring. The best thing you can do is get the email address of the primary assigner who will help you if you have questions.

The Oddness of American Yard Signs

I don’t “get” American yard signs.

2010 Yard Signs St. Paul, Mn by Mpls55408 via Attribution Engine. Licensed under CC NC.

Do you know which parties these candidates stand for? What their policy positions are? Can you believe that it’s quite likely that both candidates pictured represent the same party?! This is standard American political campaigning (this page is a pretty fair representation).

If you consider that Americans almost overwhelmingly vote along party lines, why does name recognition matter? It’s not surprising to me that there’s possibly no real evidence that yard signs “work”, despite claims to the contrary. What don’t I know? I feel like I must be missing something.

If you consider that Americans often support Democratic policies, why do Democrats not campaign on policy? Why do they not use consistent branding and messaging?

I got a political mailing today with a bumper sticker that was “Kick out the GOP”. If you are trying to persuade  voters who have voted Republican, and identify as such, to support your policies, how does that help? Why do Democrats not try to drive a wedge between Republican politicians and voters who identify as Republican? I don’t think, for example, that it’s a particular stretch to say that Republican politicians don’t actually care about reducing abortion, and that Democratic policies are more effective in that.

Wayfinding in Food Lion is really bad

Wayfinding in Food Lion (my local grocery store) is really bad. It’s surprisingly bad. The most egregious fault is that the list of items you’ll find in an aisle is different depending on which direction you’re coming from! To know what’s in an aisle you have to stand at the end and look up to the right and left to see what’s in it. Looking for cereal? You’ll only see it listed if you’ve not started with the fruit and vegetable section.

Surely someone made a conscious decision to do this. What on earth were they thinking?

Federal GSA Per Diem Calculator

In my spare time recently I’ve been working on a small programming project, which is now live at http://www.perdiemcalc.net/. It’s an extension of work I began many years ago when I was at Wytheville Community College (WCC).


As I describe on the About page, the issue I had at WCC was a constant back and forth with my business office as I struggled to get the travel documentation correct for the Per Diem allocation.

Finally I dug into the regulations and wrote a web page with a bunch of JavaScript to make the process easier for me and others at the institution. It turned out to be very useful to other state agencies in Virginia, so it has followed me into my current position and to various urls over time. Around October each year as the rates are due to change, I tend to start hearing from anyone from the Attorney-General’s office to the most obscure agency you can probably think of.

The genesis of this new version is that some institutions in Virginia have started to use the Federal GSA rates for travel reimbursement and wrote to me to ask for a version of the calculator that used these rates. There are a lot more localities in the GSA rates and the pop-up approach I’d used before just wasn’t going to work. It seemed like an opportunity to create something with a much wider audience and do some of the re-architecture that had bubbled in my head for many years. With the permission of my employer I embarked on this as an external project.

New Skills

Technically, in the very first version it was completely self-contained JavaScript. I’d been tinkering with JavaScript since it first was made available for Netscape, and this was a continuation of that work. My initial data structures were pretty naive and I had to include a lot of cross-browser hacks, but it worked. I modernized and simplified over the years, but the basic approach didn’t change.

This new version, however, is more or less a complete rewrite. I used it as an opportunity to refresh some skills and revisit the state of the art in some technologies.

agile programming - i'm glad it has a name

My first rewrite was on Google App Engine or more accurately as a Google Apps Script. I got it working pretty well, but ran into some limitations in terms of deployment. I couldn’t for example, deploy it to a custom url. I junked some of that work, but in the process became more familiar with json and how I wanted the design to work.

In the current version there’s some use of JQuery and a fair amount of json. I’ve also taken the raw data from the GSA and put it into a backend database. That part is a simple MySQL backend, with PHP for the dynamic requests. The code is also written in such a way that I can extend it to other data sets and much more easily update the data as new rates are issued each year.

Other technologies I’m tinkering with include Google Analytics (although I have a lot of experience with that already), and Google AdSense. I’m also tracking my work in Trello. I don’t have the code in version control, but I do have a test and production instance for my development work, and keep the code on Dropbox. I’ve become more familiar with my web host in the process too.

Looking Forward

Nothing is ever finished. I have a feature card in Trello prompting me to add Recent Searches as an option for people. At the same time, I’m always looking for something to subtract, to simplify, or to uncomplicate.

I’ve not entirely worked out a support model yet for questions, comments and feedback. For now, I’m happy with less being more. I welcome feedback, but this is a solid design that has worked well over the years. I’m curious to see if people will find this useful. If they do, that’s great, and even if they don’t I’m glad I had a reason to learn some new things.

Selling My Car: 1996 Honda Accord

1996 Honda Accord side viewI’m selling my car. It’s a silver (officially Heather Mist!) 1996 manual Honda Accord with 326,000 miles on it. It’s in pretty good shape. It was in an accident in the late 90s when someone pulled out in front of it, but otherwise it hasn’t had any accidents that I can recall. There are no significant dents. I’ve owned it since new. Maintenance has been regular. For the past five years or more, I’ve been using Auto Experts on Main Street (Blacksburg), so you can always ask there about it.

1996 Honda Accord front view

You don’t get to over 300,000 miles without some issues. Things have been replaced over the years, and I have most of the maintenance records. I honestly don’t recall what’s been done, but it’s the original engine. There are things that need work:

  • The radio mostly doesn’t work.
  • The A/C doesn’t work. Pretty sure this is a simple leak, but I’ve never got around to getting it fixed.
  • It burns (not leaks) a bit of oil, so you have to keep an eye on the oil.
  • Third gear sometimes requires double-clutching. This means it probably needs a new transmission fairly soon.
  • There is no rust, but the paint has faded in places.
  • The automatic door locking is flaky.
  • The engine light stays on, but it’s been on for the past five years!

The miles are mostly highway miles. State inspection was done January, 2014.

I will only sell it in person, to someone local, in cash for $2,000 (or thereabouts). I will not provide the VIN online, but will provide it in person if you stop by.

540-200-8630 or david@carter-tod.com

Reverend Sam Franklin

This is the Reverend Sam Franklin. This guest book doesn’t have long left, and while the messages are heartfelt, there’s not a lot there. He went by “Uncle Tom” apparently.

I met him once last year, just before he passed away.

I’ve been meaning to write this post for a while and have had the crumbs of it sitting in a draft since I met him. Last year I was at the mall in Christiansburg, VA with my kids. I had left them to their own ends for a while, grabbed a coffee and had sat down in a mildly comfortable chair in the middle of the mall. The seating made a small square with a couple of chairs on each side.

On one side an old man sat in a wheelchair. Opposite me another man sat. After a minute or two the old man spoke up, “If I was to ask one of these people here how old they thought I am, what do you think they would say?”

So, a couple of thoughts went through my head if I’m being entirely honest. Firstly, that I might be in for a crazy old man diatribe that I’d need to gently extricate myself from, and secondly that there was no way I was going to give a straight answer.

The man across from me smiled, but didn’t say much, umm-ing and ah-ing in a jokey kind of way. The old man insisted, “Go on, guess.” I hazarded a silly guess, “Fifty-five?” We bantered a bit more. I guessed a little closer, “Seventies?” I smiled, “You know, I’m not going to even try to get it right. It’s not very polite, is it?”

“I’m one hundred and four.”

Crikey…definitely crazy old man territory. There’s no way a man this articulate and seemingly healthy is that old, despite the wheelchair. We chatted some more and I don’t really remember why, but I moved over to sit next to him. I do remember that his fingers were thick, swollen and mottled with the years.

An hour and a half later, his middle-aged granddaughter and her husband (from Maryland?) came back to pick him up, and I was wiser. “You wouldn’t believe he’s one hundred and four, would you?!” they said. “Oh, I would” I replied.

I’ll admit to not understanding everything he told me. A Southwest Virginia accent, old age, and my own transatlantic origins made some things hard to grasp, but I still remember some of the stories he told me. I wish I remembered more, and I wish I’d written this last year when I intended, but I also hope that maybe one day someone will find this and he’ll be remembered. I’m sure I’ll get some of this wrong too.

In July 1916, the New River flooded. He would have been ten years old then. His family was living in Carroll County at the time, as best I can tell, right down by the river on the flood plain. It came at night. They barely had time to get him and his siblings out of bed, and to let the animals loose before the house was filled. The waters came well up to the second floor.

I wish I remember more, but I’m thinking that they found a friendly farmer and slept in a barn for a while after that.

The next year (1917), the river froze (here too), and the ice dammed up the river destroying bridges.

Some time after that they moved to Radford, VA, and I’d guess around then he started at the Radford pipe works which was owned by the Lynchburg Foundry (his obituary implies he worked in Lynchburg, but I don’t think he did). He worked in Radford for thirty-six years. At some point, perhaps during the war, he went to Tennessee to train to make aircraft parts, which should have enabled him to make a bit more money.

He took himself and his training to Atlanta after that, where I think he had some kind of supervisory role. He told me some tales of a crazy ex-con who he took a chance on. That was a bet that didn’t work out.

During all this time, he was a minister at various places, including a church in Ellett Valley, and they had ten kids. When we spoke his younger brother was still alive and living by himself. He had buried his son recently. I didn’t want to ask about his wife.

He did tell the tale of the time he saw one man shoot another six times. It was connected to his church, and he was the one who ended up taking the gun off the man who did the shooting. There was a court case of course. I seem to recall though that there was a sense that the shooting may have been justified and as a result the Reverend may have been careful with the truth when the time came.

…and that’s it. One hundred and four years. One and a half hours last year. It really cannot have been long before he passed away. It was a great conversation that meandered a fair bit, and was hard work sometimes, but so worth it. I couldn’t quite convey it to my kids when they came to find me, nor to my friends and colleagues.

He seemed a decent man who lived a decent life.

It was a pleasure to meet Sam. I’m glad I had that time to sit and listen to him. I’m glad he persisted in talking to me and shared some of his life with me. When my race is run, I hope someone takes the time to tell a tale or two about me. I hope there are some good tales to tell.

Batch Move Users to Organizations in Google Apps

Just a quick note. I write our own integration code for Google Apps in part because of our scale, and in part because I started integrating our systems before GADS (Google Apps Directory Sync) existed. The code mostly just works, so I don’t look at it very often, and I’m not a strong python coder.

Recently I need to move a fairly large number of users into an organization, but there’s no way to do this in the GUI as a batch job, so I needed to code it. I found the docs, but mostly I have to go through a lot of trial and error. Here’s the ultimate shape of the code I came up with, and an explanation. I’m just writing a quick utility script here so it’s nothing fancy:


import gdata.apps.organization.client

# get a client and log in as an integration user
ouclient = gdata.apps.organization.client.OrganizationUnitProvisioningClient(domain='yourdomain.com')
ouclient.ClientLogin(email='adminuser@yourdomain.com', password='adminuserpassword', source ='apps')

# grab the customerId of the integration account - this is new
clientid = ouclient.RetrieveCustomerId()
customer_id = clientid.customer_id

# you need the customer id to do anything, I think. Read the provisioning docs.
# Objects that are camelCase in the XML, change to underscore in python
# I have never found that documented anywhere so I figure it is something you just know!

ouclient.move_users_to_org_unit(customer_id=customer_id, org_unit_path='nameorpathofOU', users_to_move=['username@yourdomain.com'])

#users_to_move is a list, up to 25 email addresses. See the docs on move_users_to_org_unit.