Caleb Brown

Caleb Brown

Full-stack Engineer

Read all about it.

Don't Hijack A User's Intent - An Exercise In JavaScript Usability

Comments

I was working on the NYC.gov's new payment system forms recently and a lot of the interactions were done in overlays. A common convention when writing JavaScript is to listen for an event on an anchor tag, like a click, and cancel the default behavior in the click handler. This allows us to take over the default behavior of the anchor tag and do what we want. For example, we may want to open a gallery in a lightbox instead of navigating to the tag's href. ...

Continue >

Sorting Strings With Django Haystack And Solr

Comments

I've been working on the grants database of the Mellon Foundation's new website, a large database with information about all of the grants distributed by the Mellon Foundation since 1969.

The site is built in Django and I'm using Django Haystack with Solr for easy indexing and searching of our grant records. Solr does a few things for us that a lot of other search servers don't; it is flexible, it returns searches quickly and with fairly sophisticated logic, and has a lower barrier to entry from other search applications. Also, with the grant data, we needed to be able to search by latitude and longitdue points and quickly sum large dollar amounts, and Solr gives us both of those things.

...

Continue >

Enums In Rails 4.1 Forms

Comments

I've been working on upgrading Passkeep this weekend which includes a complete overhaul of the UI, a re-write of all the code, and an upgrade to the latest version of Rails. One of the new features of RoR 4.1 is enums which I've used for a long time in other languages like C#, but haven't been supported in Rails before. ...

Continue >

Google Maps Marker Cluster Not Working

Comments

I recently had to map a large number of points on a map for a large arts foundation to display their grants for the last 45 years. I looked into a few mapping and clustering options and since PostgreSQL was not an option, we couldn't use PostGIS due to a technical requirement by their hosting provider. With that in mind, I found the Marker Cluster Plus which seems to do exactly what we need, map a large dataset while keeping it legible for the user. ...

Continue >

For my old blog posts, check out Grits.