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.

Brief update on the Adult Recreational Soccer League

An update to this post: For the past couple of seasons, we’ve been playing on the VT (artificial) Turf fields, which are frankly amazing compared to what we used to play on. The price has gone up a small amount, but personally I consider it worth it. You can also find pick-up games at the Turf fields which are open at least to dusk, but often with the floodlights on late. No-one checks ID, so if you’re not affiliated with VT, you’re generally fine to play. The fields and floodlights have made scheduling much easier too, and weather-related cancellations just don’t happen generally.

Also, TechSportsPlex closed down, but NRU is running indoor leagues in the off seasons.

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?

BBWorld 2015

Just arrived at the hotel. DevCon starts tomorrow.

I’m in a bit of a bad mood. The drive up was horrendous. Dense traffic the whole way from Blacksburg, with multiple slow-downs all the way, and stoppages at Staunton and of course on 95 from Fredericksburg on up. Near DC it just got worse, but really from Roanoke, I was never more than a hundred yards from cars and trucks the whole way.

I got here around 7pm. Self-parked my car, which was interesting. That’s around the back. The first set of elevators in the parking lot didn’t work and you have to walk a way and go down a floor to get to the front desk. Definitely felt like a second class citizen. Oh, and parking is $26 a day, which was not mentioned on my reservation.

At 9pm it was still over 90 degrees outside and incredibly humid. DC is a swamp and Vegas is an oven. I’m not sure why Blackboard chooses these places.

Back to my room to relax and my TV isn’t working. The engineer had to reboot it at least three times. Yes, that’s reboot, not turn if off and on again.

Emails my daughters’ school might have sent…but didn’t

I have no clue what’s going on…

I’ve always assumed that part of the reason I have no clue what is going on at my daughters’ schools is that we’re in separate households. It’s becoming clearer that no, it’s not that. Our local school system is just pretty awful at communicating with parents….I mean, really, really bad…so bad, you second guess yourself and, as in my case, go into the school offices multiple times every year to make sure that this time they really do have my contact information. Continue reading Emails my daughters’ school might have sent…but didn’t

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.