Interactive Highlighting and Annotations with Annotator
Over a year ago, I wrote about JavaScript-driven interactive highlighting that emulates the behavior of physical highlighting and annotating text. It’s interesting how much technology can change in a short time. This spring, I’ve been busy at work for on a major upgrade of both Rails (2.3 to 4.1) and of the annotation capabilities for H2O. As I explained in the original post, this highlighting functionality is one of the most interesting and core features of the platform. Here I’ll go through a brief history and the latest round of changes.

Example digital highlighting of sample content.
History
My original post explains the challenges associated with highlighting content on a per-word basis, as well as determining color combinations for those highlights. In the past implementations, each word was wrapped in a single DOM element and that element would have its own background color based on the highlighting (or a white background for no highlighting). In the first iteration of the project, we didn’t do allow for color combinations at all – instead we tracked history of highlights per word and always highlighted with the most recent color if it applied. In the second iteration of …
javascript ruby rails
Liquid Galaxy installation at Sparkassen-Finanzportal Forum 2014
In May, End Point and Google organized a Liquid Galaxy installation at Sparkassen-Finanzportal Forum 2014 in Düsseldorf, Germany.
For this event End Point installed the Liquid Galaxy and also prepared custom tours for the Liquid Galaxy showing different Sparkasse localizations across Germany.
We arrived at Düsseldorf a day before the event, and assembled the whole Liquid Galaxy without any problems. The system consists of 7 displays and 6 computers, so the potential for issues is pretty great, but we’ve done this a number of times, and have worked out a good stable build. After assembly, the system worked pretty well. Our US-based team then finalized the custom tours and uploaded the most recent software and content.
The next morning when we arrived at the event place, everything was working great, and the system was ready for people to explore and discover. As per usual, people were interested not only in the prepared tours, but also were looking for the places they know (usually, their house!). The overall user experience is great, especially when people were able to see places they hadn’t seen for quite a long time, like the places where they grew up.
This is another successful …
visionport
Facebook, Twitter, Google+ sharing with the URL
This blog post is intended for the folks who spent way more time displaying social sharing buttons on their websites than originally planned. My buttons were supposed to bring up the Share Dialog for Facebook, Twitter and Google+ platforms. I had the requirement to display a custom logo and a custom description. It seemed easy… until it turned out to be rather difficult.
The appropriate format for Twitter is:
<a href="http://twitter.com/share?text=<%= desc %>&url=<%= url %>">Twitter</a>
Note that Twitter dialog does not include the picture, only the description.
Trouble started with Facebook when I learned that custom parameters in Facebook’s sharer.php url are officially not supported anymore: https://developers.facebook.com/bugs/357750474364812. I tried the format widely suggested on forums, and while custom image was successfully displayed, neither title, not description showed.
<a href="http://www.facebook.com/sharer.php?u=<%= url %>&p[images][0]=<%= img %>&description=<%= desc %>">Facebook</a>
Facebook documentation hinted that addition of the OpenGraph Protocol standard tags to the of …
social-networks api
Interchange 5.8.2 Release with Bcrypt Encryption Support
The most recent release of Interchange contains support for adding encryption to user passwords with bcrypt. This provides for a significant improvement over the previously supported encryption options. Whether you are starting with a new user table, or have a long-established user table with any of the other supported encryption types, you can take advantage of this enhancement to Vend::UserDB.
In order to utilize bcrypt, you will need to have successfully installed the Digest::Bcrypt and Crypt::Random modules. Once installed, it is recommended (though not required, ironically) you add these as Required modules to interchange.cfg to ensure Interchange can find them and will report back immediately if not:
Require module Digest::Bcrypt
Require module Crypt::Random
To use bcrypt, configure your UserDB directive with the following options:
- bcrypt—set to 1
- cost—desired cost between 1 and 31 (optional; current default is 13)
- bcrypt_pepper—random string used to apply a unique padding pattern (also optional, but strongly recommended)
To encourage adoption of bcrypt, there are two mechanisms available that allow a user table already using another encryption type to convert to using …
bcrypt ecommerce interchange security sysadmin
Version differences via GitHub from the command line
I work with a lot of open source projects, and I use the command-line for almost everything. It often happens that I need to examine a file from a project, and thanks to bash, Github, and curl, I can do so easily, without even needing to have the repo handy. One of the things I do sometimes is compare a file across versions to see what has changed. For example, I needed to see what changes were made between versions 1.22 and 1.23 to the file includes/UserMailer.php which is part of the MediaWiki project. For this trick to work, the project must be on Github, and must label their versions in a consistent manner, either via git branches or git tags.
MediaWiki exists on Github as wikimedia/mediawiki-core. The MediaWiki project tags all of their releases in the format X.Y.Z, so in this example we can use the git tags 1.22.0 and 1.23.0. Github is very nice because you can view a specific file at a certain commit (aka a tag), and even grab it over the web as a plain text file. The format is:
https://raw.githubusercontent.com/PROJECTNAME/BRANCH-OR-TAG/FILE
Note that you can use a tag OR a branch! So to compare these two files, we can use one of these pairs: …
git mediawiki postgres shell
Class is in Session: CartoDB

A few weeks ago, some members of our Liquid Galaxy content team headed to Gilt which hosted a class on CartoDB.
Since we deal with location-based data for our work with Liquid Galaxy, it seemed like the ideal class to learn more about this popular geospatial mapping tool. CartoDB is a cloud-based solution for mapping where users can easily manage data and create maps with them. The true allure of CartoDB is its ability to produce beautiful visualizations, which is why it’s often referred to as the “Instagram of mapping”.
The platform is built on open source software including PostGIS and PostgreSQL. There is extensive use of JavaScript in the front end, and Node.js for the back-end APIs. CartoDB is packaged in a way where the user doesn’t need to have much coding experience, yet options still exist for those who want to go further with it using SQL and CSS.
Andrew Hill from CartoDB led the 4-hour class and provided us with a detailed summary of CartoDB’s origins, and its current wide use among companies like Twitter, the New York Times, and several nonprofit organizations. Every dataset uploaded becomes an API endpoint, and SQL processes and packages data any way you want and …
gis postgres
YAPC::NA 2014, Day Three (and wrap-up)
My final day at YAPC::NA (Yet Another Perl Conference, North American flavor) summarized below. (For Day Two and Day One, see the links.)
The conference organizers know their audience: day one started at 8 AM, day two at 9 AM, and the final day at 10 AM. (I took advantage of this lenient schedule to go for a swim in the hotel pool and grab a nice off-site breakfast.—Oh, dear, does my boss read this blog? :-)
I attended several medium-sized sessions during the day:
- Designing and Implementing Web Data Services in Perl
Michael McClennen, who programs for the Geology Department at the University of Wisconsin, outlined a flexible approach to providing an API to a complex data store. This supports a front-end used for displaying the location of fossils around the world, which is actually quite impressive. A typical URL for a data request looks like:
http://paleobiodb.org/data1.1/colls/summary.json?lngmin=-180&lngmax=180&latmin=-90&latmax=90&limit=all&show=time&level=3&interval_id=14
(The URL above is wrapped for our blogger format; there should be no whitespace anywhere in it.)
This identifies a specific version of the service (“data1.1”), so that any …
conference perl
Rails Performance with Skylight
Back at RailsConf, I met a couple of the creators of Skylight.io, a recently launched Ruby on Rails profiler. I was anxious to try it out after having unconvincing experiences with New Relic, but first I had to get through a pretty big upgrade of Rails 2.3 to 4.1 on H2O. I survived the upgrade and moved on to profiling.
Installation of Skylight.io was super simple and the installation screen provided real-time feedback during gem installation and configuration. The web-app had data to share within a minute or so. At the moment, Skylight offers a free month trial to get started, and paid plans after that month. Skylight reports metrics requests (referenced by controller#action) per minute and time per request and allows you to sort results by those metrics combined (Response time x Requests Per Minute = Agony), individually or alphabetically. The Agony-sorted option highlights methods that are candidates for the most impactful changes. One interesting note here is because our application uses full page caching, the requests recorded by Skylight do not include those static cached requests, so the Skylight data is a representation of the work the Rails application is doing to generate …
performance ruby rails