The AADL Developer's Blog. Technical info about what new features we're working on, releasing, and playing with.

AADL Developer Blog

Welcome to the AADL Developer Blog! Software Development is a big part of what we do here at AADL, and this section of is the place to keep up with our new features, see what our developers are working on, and find out what kind of tools we're playing with.

We also have open-source software that we've developed available for download, and you can find that here. Please feel free to comment on our posts or contactus if you have any other questions, and thanks for your interest!


Summer Game Tech: QR Code Generator

The Summer Game is a really busy time for us at the library; many of us are involved with producing special events, writing up Game Codes & Badges, and processing and filling your orders for prizes. The Summer Game season each summer gives us an opportunity to develop improvements to the game from year to year. One of the new features for our fourth season of the Summer Game is QR Codes on the Game Code posters around the branches and displayed at events. The QR Code has a link embedded that goes directly to the code submission form with the code in the text field, ready to submit and receive points.

Finding a QR code reader for your device is usually a pretty easy affair (I use Red Laser), but getting one generated can be a hassle, especially if you're trying to integrate it with a script. After looking at some hefty looking libraries to integrate with our sign PDF generation script, I found the QR Code API from You can pass in your QR code parameters via a URL with GET or POST variables, and it will return a QR Code image in your desired format. It was a very simple matter at that point to embed the image in our PDF generation script, no additional libraries required.

For example:

Generates the following image:

The service is currently provided free of charge, with no limit. They do request you contact them if you will use more than 10,000 requests per day.

Enjoy the Summer Game, and keep entering those Game Codes!

QR code API:
Red Laser:
AADL Summer Game:

Dev Tools: Modern IE

One of the most challenging aspects of web development is making sure your site works on multiple platforms. Firefox and Chrome are available for most every system where you develop, but tracking down one of the different versions of Internet Explorer to try to reproduce a bug can be an exercise in frustration. Luckily, Microsoft has generously created Virtual Machines containing versions of Internet Explorer from the current IE 11 all the way back to IE 6, and made them freely available. These can run in another piece of freely available software, VirtualBox, which will run on your development system.

modern.IE currently provides the following Virtual Machines:

  • IE 11 on Windows 8.1
  • IE 10 on Windows 8
  • IE 11 on Windows 7
  • IE 10 on Windows 7
  • IE 9 on Windows 7
  • IE 8 on Windows 7
  • IE 7 on Windows Vista
  • IE 8 on Windows XP
  • IE 6 on Windows XP

Getting all these Virtual Machines downloaded and installed properly can be difficult, but luckily there is a terminal script which will do the downloading and initial config for you. Running the bash script from the IEVMS repository on Github will automatically download all or just selected versions of the modern.IE VMs and get them installed in your VirtualBox. Just run the following command in a terminal:

curl -s | bash

If you've got VirtualBox up and running you can even see your new VMs being created and booted up by the script. Look at the IEVMS page for more information and options.

modern.IE Virtual Machines
VirtualBox //

Dev Tools: Regex101

Analyzing text is an essential function of computing. Searching, copying and replacing text happens frequently and can be a source of frustration trying to get your code to find exactly what you want.

In PHP, if you're looking for whether a specific piece of text is included within a larger piece of text, it's quickest to use the strpos() function, but if you don't know the exact text you're looking for, sometimes the only tool for the job is to use regular expressions. Regular expressions allow you to define a pattern that will return matches without knowing the exact text beforehand. But getting that expression pattern just right can take multiple tries and can be increasingly frustrating to make a change in your code, run it, see if it worked, then go back and change it again.

The best tool I have found for designing regular expression patterns is Regex 101. It allows you to create your Regular Expression outside of your code. Paste an example of the test text you will be searching, and start typing in your expression at the top. Regex101 will update live with an explanation of any special characters in your pattern as well as highlighting the matches in your test string. You can even change "flavors" of your Regex between PCRE (Perl-style), Javascript, and Python.

Don't be a chump and write your Regexes in your code. Use Regex101 to be sure and then cut n' paste into your code.

Regex 101:
Regular Expressions:

Developer Tools: JQuery Mobile

The JQuery Mobile framework allows you to easily create HTML elements that are optimized for mobile, touch interface devices. It allows you to give a mobile-friendly user experience in a single generic interface, accessible on iOS, Android or any other mobile device that you may want to display to the user. It supports animated transitions and recognizes swipe gestures within your web app. All you need to do is add a line of Javascript to your HTML page to include the library, and then place identifiers on your page elements to apply the framework's features to your page.

Check out demos here:
Download the library:
Learn more about JQuery Mobile:

Talking to CalDAV from PHP

Our internal room reservation system runs as multiple bookable calendar resources on our Zimbra email system. In order to reserve rooms for our website events, I have created a custom drupal module that hooks into the drupal node save process and places the event information on the correct calendar. The full module is not ready for the public (yet), but here's a sample of how we use the caldav-client PHP library from the Davical open source project.

In this PHP example, I will include the library, create an object of the CalDAVClient class, connect to a CalDAV Calendar, and get details about the calendar:

$cal_url = '';
$cal_user = 'username';
$cal_pass = 'password';
$cdc = new CalDAVClient($cal_url, $cal_user, $cal_pass);

$details = $cdc->GetCalendarDetails();

If you are able to connect to your calendar correctly, you should see something like this:

CalendarInfo Object
    [url] => /dav/
    [displayname] => Calendar
    [getctag] => 1-98765
    [calendar-timezone] => BEGIN:VTIMEZONE


The CalDAVClient library includes functions to get specific events from the calendar, place new events on the calendar, and additional functions to interact and modify your calendar from your PHP script. It's an excellent foundation for building more specific calendar interactions in your script.

DAViCal source code:
DAViCal project:
Zimbra email server:

Tool Evaluations: Code Editors

I've recently switched away from a two-computer desktop (Linux workstation with a Mac laptop on the side), to a single Mac laptop with multiple monitors. As part of the transition, I've been looking into the new possibilities for my primary code editor on OS X coming from Ubuntu. I primarily write PHP code, and am frequently working on Drupal modules. Here's a list of some of the apps I've been evaluating:

Komodo Edit (Free)

My longtime favorite, which I've been using as my primary code editor for the last 7 years.

Pros: cross platform, free, autocomplete, code hints, extendable, New Source Tree sidebar module.
Cons: Some display bugs with multiple monitors make the autocomplete and lookup popups appear on the wrong desktop, autocomplete not working

Some of the bugs I'm seeing while using Komodo Edit on my new machine may be configuration errors on my part, but the popups appearing on the wrong monitor are a known issue. I have a feeling I may end up coming back around to Komodo Edit eventually, just because it's so familiar and it does the things I need so well.

Coda ($75 in the App Store)

Coda comes from Panic software, creators of high quality OS X software. Aimed primarily at the Web Development audience, Coda looks great and makes it easy to work on a remote set of files.

Pros: native OS X interface, clear grouping of projects into "sites", custom autocomplete, extendable with plugins
Cons: price, autocomplete is local to current file only

Coda is very easy on the eyes, I just wish it was easier to get site-wide autocomplete with hints. I need to be able to call custom functions from one drupal module to another without having to open the file and copy the function name.

Sublime Text ($70)

Sublime Text is my current goto for code editing, is a strong favorite for OS X developers and has a great feature set.

Pros: Extensive and powerful keyboard shortcuts to get around your code quickly, edit multiple selections simultaneously (e.g. change all instances of a variable name to another name on the fly), large selection of packages for extention
Cons: bit of a steep learning curve for keyboard commands and package installation. Only local autocomplete

I'm still learning how to get around in Sublime Text, but I'm optimistic that I'll be able to get it to do the things that I want it to with a bit of time and experimentation with some of the custom packages. While it does cost $70 to register, there's no set limit on an evaluation copy, so go give it a try.

Komodo Edit:
Sublime Text:

Partner Project: UMS Rewind

Congratulations to the University Musical Society for the recent launch of their online performance archive, UMS Rewind. We were partners on the project, providing the back end infrastructure for the data entry and editing. The project has grown over the years with many people putting in many hours of hard work. It's great to see it online and accessible to the public.

The archive contains thousands of performances, artists and works from 135 years' worth of concerts, and will be updated every season. Many of the performances link to programs and photographs in our collection of UMS materials.

The site is currently in beta, so let them know what you'd like to see.

UMS Rewind
AADL's UMS materials

Stuff We Like: littleBits Synth Kit

We have a ton of cool music tools here at the library and during some down time last week I was able to play with one of our latest acquisitions for evaluation: The littleBits Synth Kit. littleBits are awesome circuit building pieces, held together with magnets. They've partnered with synthesizer giant Korg to offer a kit that contains authentic synth modules that can be chained together to create custom sounds. Here's a little sample of what I was able to put together:

This particular kit is still under evaluation, but you should explore our ever-growing collection of Music Tools!

AADL Music Tools:
littleBits Synth Kit:

Custom Barcode Scanning from your iPhone

We have a lot of items on our shelves, and each one of them contains a wealth of related information within our catalog system. But it's a pain to have to physically carry a item from the shelf to a computer to look up that data, which pales in comparison to hundreds of items on a cart or shelf. It'd be great to have a way to look up that information on a mobile device, ideally by entering the item's unique barcode number with a scanner.

First I built a drupal module that displayed the basic information we wanted for each item, and I added the barcode as an argument at the end of the page's URL. As a result, if you knew the item's barcode, you could open a web browser and type in the address + the barcode to automatically go to a page with the information you wanted.

Secondly, I looked for an App in the iTunes App Store which could do actual scanning of the barcode using the iPhone's camera. There are a TON of barcode scanners in the App Store, but the vast majority of them are tailored to scanning UPC codes and redirecting you to online retailers for the corresponding product, or to decode custom QR codes.

After checking about a dozen free Apps with no luck, the App I finally settled on was mobiscan, which cost $3. But it fulfilled the two requirements for this simple project:

  1. Scan a barcode in the codabar format
  2. Redirect to a custom URL with that barcode's value

There are other, similar apps that offer even more custom functionality, or even integration with your own iOS app. But for the quick and simple scan and go functionality, mobiscan worked the best.

mobiscan App:

Syndicate content