How Listening to NPR Helped Me At Work

I’m building a really neat little project at work: the ability for users to contact their state or federal legislators for a campaign that my company is running to advocate for/against some issue. A big part of my job includes evaluating specs and making both technical and business recommendations. Here’s a quick list of feedback […]

Hiding Exposed View Filter Form Elements

I have a task in which I need to create an exposed filter for a View and then set its value via code based on the value of another field. Here’s how to hide a View’s exposed filter form element, which is slightly different than how you do it for other forms. /** * Implements […]

Converting Relative Links to Absolute

I was recently given the task of adding a new API call to syndicate some articles from our site, articles that contain links to other content on our site. The question when writing site content is whether to make intra-site links absolute or not. If you do (e.g. you’re tied to a specific domain […]

Nodequeues, subqueues, and conditional display

My company reviews and rates media such as mobile apps, video games, movies, etc in detail for parents and teachers to find appropriate content for their kids and students. We’re currently in the process of upgrading our site from Drupal 6 to 7, which includes a redesign and some new functionality. I was asked to […]

Emacs: converting existing tabs to spaces

So you already know to use spaces instead of tabs for indenting. But what about those files that already have them? Here’s how to untabify an entire file at once. Note that you’ll still have to align anything that is out of whack because of the old tabs, but at least they’ll be spaces now. […]

Don’t Be That Guy

So we interviewed someone today for a developer position. I gave him a simple weeding out question, one that I explicitly told him was just for that purpose. The question was: given an integer greater than zero, write a function to determine if it’s a power of 2. I also told him I didn’t care […]

Data Syncing Fun

This happens to be about Drupal sites, but isn’t really Drupal-specific. If you must know, the custom classes I refer to later are Migrate module migration classes, with the JSON source plugin. I’m working on a project (let’s call it Satellite site) that shares data with the Parent site. Content editors on the parent site […]