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).
History
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.
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.