Proper Git Commit Messages and an Elegant Git History

What should I include in my commit message?

The three basic things to include are a summary or title, a detailed description, and a tracking or ticket number, if it’s applicable.

via Proper Git Commit Messages and an Elegant Git History.

As we get started with using Git more regularly for our projects, I’m noticing a whole lot of merges. This article describes the value of using rebase instead of merge as well as giving some best practices for writing commit messages.

Drush aliases on your Vagrant dev environment

Note: This blog post is intended for members of the U of L web team and has some details specific to our own working environment. These instructions won’t work for everybody.

Drush aliases provide a handy way to run Drush commands on remote servers without having to ssh into that machine and navigate to the Drupal environment in which you want to work. When working in our Vagrant-controlled development environment, vagrant ssh isn’t a huge barrier, but if you want to be able to just reference your dev environment from your local Drush interface, this is how I’ve gone about it.

First of all, you need to make sure you have Drush running locally. If you try running drush at the command line and get -bash: drush: command not found, you need to install it. Homebrew will handle that quickly and easily with a simple brew install drush

Next, make sure that your virtual machine is running. If not, give it the ol’ drush up. Once you’ve done that, you’ll need to copy an SSH key over to your virtual machine with this command (You will need to repeat this step on each virtual machine that you are doing development on):

scp ~/.ssh/ vagrant@

Now, create a Drush alias file on your local machine in the ~/.drush folder. Mine is ~/.drush/dev.aliases.drushrc.php. Copy and paste this code block in there:

$aliases['dev'] = array(
'root' => '/vagrant/public',
'remote-host' => '',
'remote-user' => 'vagrant',

(Remember to start that file with an opening php tag … WordPress seems to think I’m doing something fishy and keeps stripping it out.)

Now, you can run Drush commands and include @dev to specify the Vagrant development environment as the target of your command, like so:

$ drush @dev status Drupal version : 7.26
Site URI : http://default
Database driver : mysql
Database username : root
Database name : drupal
Database : Connected
Drupal bootstrap : Successful
Drupal user : Anonymous
Default theme : bartik
Administration theme : seven
PHP executable : /usr/bin/php
PHP configuration : /etc/php5/cli/php.ini PHP OS : Linux
Drush version : 6.0-dev
Drush configuration :
Drush alias files :
Drupal root : /vagrant/public
Site path : sites/default
File directory path : sites/default/files
Temporary file directory path : /tmp

For more information on Drush aliases, check out the inline documentation in this example file:

Download DrupalCon session recordings for offline viewing | Janez Urevc

If you didn’t get to make it to DrupalCon or there were some sessions you wanted to see, but missed, YouTube is the answer. The Drupal Association has all of the session videos conveniently in a single playlist at

Via @DrupalCon on Twitter, Janez Urevc shares how he scripted the download of session videos he was interested in:

In order to download videos I just needed get video’s URL and this command:

youtube-dl -f 35 -t “”

  • -f 35 tells I wanted to download 480p flv version (see manpage for other codes)
  • -t filename of downloaded file should illustrate video’s title instead of ID
  • “” video’s URL (script know how to follow redirects, …)

Now I created shell script with an array of all videos that I wanted to download and loop that was running youtube-dl for each of them. Script did it’s job during my last night in hotel and I was all set for my flight.

If you’re using a Mac with Homebrew (which I recommend), you can install youtube-dl using brew install youtube-dl

via Download DrupalCon session recordings for offline viewing | Janez Urevc.

DrupalCon: Farewell Portland

Our memorable week at DrupalCon has come to an end, so it’s time for me to reflect on the experience and what I learned during the trip to Portland.

Giant Druplicon

With DrupalCon sessions wrapping on Thursday, that left Friday for code sprints and contribution workshops. I spent the morning in the core mentoring workshop. Unfortunately, I had some troubles with my local development environment that kept me from getting up and running with Drupal 8 right away. It seems there was also some trouble with the volume of traffic hitting the core mentoring web site that was slowing the group down in the morning.

After a train ride across the river to Old Town, Jay, Trevor, and I had lunch at Old Town Pizza and took a walk along the water.

Old Town Pizza

Bridges in Portland

Union Station

I spent the afternoon working some more on getting Drupal 8 running on my laptop. While waiting for various virtual machine images to download I also found time for updating my own contributed module to fix some community reported bugs. Floating Manager Menu now has a 1.4 release on the Drupal 7 branch.

The final evening in Portland featured a fireworks show that was part of the Rose Festival opening celebration. I had a nice view of the show from my hotel room.


It was a fun week at DrupalCon, but I’m happy to be back home.

Re-posted from Josh’s personal blog at

DrupalCon: Thursdays Are Memorable

Thursdays at DrupalCon are an interesting time. With everyone at least three days into it, fatigue starts to take its toll. Then the good stuff happens.

DrupalCon at the conference center

Writing this post in the wee hours on Thursday night, I’m starting to realize that the week in Portland has gone by too quickly. I guess that’s typical when we have so long to anticipate an exciting event like this. Plenty of excitement and build-up, and then you blink and it’s gone. Fortunately the team has learned a ton, been inspired, and made some memories. We will return home tired, but excited about applying what we’ve learned to our current projects.

It was another rainy day in Portland right from the time we left the hotel in the morning. The response from the locals seems to be pretty much a unanimous “well, that’s Portland for you.”

Rain. In Portland.

This morning opened with a keynote session by Michael Lopp, best known for his blog Rands in Repose. I often read his work, and appreciate his thoughtfulness. Today’s talk was about the three kinds of people that are needed for software projects: the engineer, the designer, and the dictator. It was an interesting exploration of the characters who drive excellence in projects and what is needed to balance them.

I next attended Josh Koenig’s session on maintaining development swagger after site launch. Next to Jeff Eaton, Josh Koenig may be my favourite DrupalCon presenter, and once again I got a lot of value from his entertaining talk. His topic, more specifically, was about application lifecycle management and how to ensure that it’s possible for sites to evolve after they launch. Drupal developers face the challenge of having difficult time of development/testing/production environments and keeping everything in sync. Josh described some of the ways to address these headaches using continuous integration and version control.

After lunch Trevor and I got a look at Pantheon in a vendor presentation. My interest in Pantheon was largely a result of Josh Koenig’s earlier session, and seeing it in action was very impressive. The whole system is made to help keep that development swagger throughout the application lifecycle. We then attended a birds of a feather session about Open Atrium 2, the completely re-built collaboration tool built on Drupal. The Drupal 7 branch of the project has taken a very different direction than version 1 did, so it was enlightening to be introduced to that. I may spend Friday at the Open Atrium hackathon to learn how to build plugins for the system.

My final session was a team of presenters discussing mapping in Drupal. There were some exciting demonstrations using OpenLayers and some Solr integrated clustering tools. Mapping is something that I’ve found intriguing in Drupal for a while now, so these tools and techniques are something I’d like to learn more about, even if just on my own time.

Between sessions we made sure to get together for a group photo in front of Druplicon, and then a few of us encountered Dries for a photo with him as well.

Team photo in front of Druplicon


And since this was the final day of the conference sessions, it was also the last day for collecting swag. My collection is meagre compared to Dan’s, but I think there are a few tchotchkes that the girls will have some fun with.

DrupalCon swag

Dan and I made a quick stop at the hotel to drop off our bags before heading to Open Sourcery for the kick-off of the pinball pub crawl. Some tasty pizza and locally brewed beer (is there any other kind of beer in Portland?) was followed by a pinball tutorial from Greg Dunlap and some free play on a variety of old and new tables.

Pinball at Open Sourcery

We met some folks from VoyageurWeb at Open Sourcery and headed over to a pub with them for a while before determining that the pinball tables at that location were in use for a tournament of some sort. We decided to then embark on the twenty minute walk to Ground Kontrol, an arcade and lounge where the pub crawl was to end. At our destination we found a line-up outside the door of folks waiting to get in to the full venue. Rather than wait with them we continued on our way to Voodoo Doughnuts, because who wouldn’t want another doughnut, right?

Eec9d67ac42f11e2aea022000a9d0ee7 7

And before the night was out, we decided we needed more pizza, too, so we shut down Old Town Pizza, enjoying some delicious pizza with, you guessed it, locally brewed beer. The night didn’t go quite as expected, but we met a fun group of people and had a great time hanging out with them, and that’s what makes DrupalCon truly memorable.

Re-posted from Josh’s personal blog at

DrupalCon: Lovely Portland Weather

For the first three days here we’ve been telling everyone what a beautiful city Portland is. Now we’re learning what makes it so green. Fortunately, there are plenty of good sessions to enjoy while we stay indoors and dry.


Wednesday was day two of sessions at DrupalCon, kicking off with Karen McGrane’s keynote on future-friendly content. Much like Jeff Eaton’s session the day before, this content strategy discussion was focused largely on creating structurally semantic content that is decoupled from display intent. Karen describes content in semantic chunks versus formatted blobs. At the heart of these sessions has been the importance of not treating the web like print or allowing content creators to think of the web version of their content as the real version. We need to describe what content means rather than what it looks like, since we may have a need to display it on anything from a Pebble watch to a stadium video screen.

Several of us then took in a demonstration of some of the new features in Drush 6. Drush is a Drupal tool that is near and dear enough to me that I’ve presented on it at Drupal Camp Alberta and COSSFEST in past years, so I like to stay current with its new features. One of the cool new features that is being introduced is output formats like JSON or CSV, allowing for machine readable output. An example from the session was sending a list of user accounts to a Google Drive document in a single Drush command. New commands like quick-drupal and runserver should give us even more options in how we set up development environments as well.

I spent some time after lunch in a core conversations session about making Drupal 8 a powerful REST server, and then Lorna Mitchell’s session on REST for web developers. This was a really good introduction to how to interact with and design RESTful API’s. Unfortunately, my note taking app suffered a substantial hiccup during this session and lost all of my notes, so I’m going to have to go back and re-watch that session video.

Next up was a session on the Twig template engine that is being introduced in Drupal 8. I am excited about Twig because it creates a clearer separation between the theme and code layers. This will make theming easier and with fewer opportunities for security vulnerabilities. The syntax is also similar to other common template engines, like Liquid tags and filters used in my own Jekyll-powered blog. In addition to describing how Twig works and why it’s awesome, this session identified some of the areas that still need work to get Twig into Drupal 8. For Friday’s code sprints, I may attempt to make a contribution to that effort.

Dan, Jay, and I finished off the day in a birds of a feather session for DevShop, a development environment tool built on Aegir. It’s a pretty cool way to spin up development environments, but I’m not sure that it fits into our processes right now.

Between sessions I also made a quick call home to chat with the girls. Julia was happy to see me.

Video chat

I expected that lunches would just be bagged sandwich lunches, but Wednesday was a tasty Mexican buffet.

Lunch line


As we were winding down at the end of the day with a game of foosball in the exhibition hall, we were gifted some Voodoo doughnuts. I enjoyed this Oreo one.

Oreo doughnut

Starting to feel the conference fatigue and not wanting to spend too long exploring in the rain, I had enjoyed a nice local lager out of an aluminum bottle before going to bed early.

In-Tents Ale

Last day of sessions is Thursday, which will begin with a keynote from Michael Lopp, who is certain to be good because he plays hockey and used to work for Apple. That’s logical, right?

Re-posted from Josh’s personal blog at

DrupalCon: Decoupling My Eardrums

DrupalCon sessions kicked off Tuesday morning, and it’s a good thing I found a few good sessions throughout the day, because I’m not sure I’ll be able to hear any of the speakers on Wednesday.

Welcome to DrupalCon

DrupalCon is officially here and fully underway in Portland. Our entire team had a great interest in kicking off the conference with a session from Oregon State University about how they manage large scale Drupal and what some of their plans are moving forward. It was interesting to see how they have faced many of the same technical challenges that we continue to face with regard to deployment and maintenance of Drupal sites and how they’ve dealt with those challenges. Like us, they use external scripts to automate some of these tasks, although in what appears to be a little more elegant way than us. An approach that did intrigue me was how they have created a distribution that is updated every six to eight weeks that is symbolically linked as the core Drupal source for each site. There is no multi-site architecture being used there at all. There are certainly some ideas from this session that I’d like to test out in our environment and see if we can make our maintenance workflow a little smoother and more automated.

Dries took to the main stage for his State of Drupal keynote address later in the morning. As usual, Dries was entertaining as he delivered his well polished presentation. Highlighting the keynote was a demonstration of what’s in store for Drupal 8 and what the release timeline may look like. Once again, Dries showed why I appreciate his leadership on the Drupal project, saying several times that Drupal is a tool that allows us to do well, and do good.

Do well, do good

The theme of my afternoon’s sessions was apparently decoupling since all three sessions I attended included it as a major theme. As any computer science (or in my case, management information systems) student out to have drilled into their head, loosely coupled code is a good thing. Beyond just decoupled code, though, content should be decoupled from presentation, as Jeff Eaton discussed in his session, Building for a Post-Mobile World. Jeff is one of my favourite presenters, since I find him engaging, funny, and smart. Frankly, I probably shouldn’t have gone to this session, since I already agree with most of what was presented, and I probably could have learned more in a different room; however, the entire session was filled with quotable moments that left me with copious notes. It’s worth taking the hour to watch this session recording.

After the sessions let out for the evening, we dropped by Burgerville for a quick dinner and a visit to an amazing soft drink dispenser. We need to determine how to source one of these things for the office.

Amazing Coke machine

After that we headed up to the Wonder Ballroom for Lullabot’s DrupalCon party and Orbit concert.

Lullabot party

Jeff Robbins making lots of noise

I don’t go to a whole lot of concerts anymore, and it’s definitely been a while since I last took in a show from right in front of the stage. As anticipated, I really enjoyed the music and performance.

We met up with Michael and Robin at the show and decided to go from there with them to Voodoo Doughnuts Too. Voodoo Doughnuts are apparently legendary, and I’ve overheard a few people talking about the long lines one must wait in to get a turn at these tasty treats. Fortunately, the wait isn’t so bad at 11:30pm. We may have overindulged.

Voodoo Doughnuts

And somebody had to be crazy enough to try the maple bacon doughnut, right? It sure wasn’t going to be me, but it got Michael’s approval.

Maple bacon doughnut

Wednesday morning kicks off with a keynote by Karen McGrane about future-friendly content. Having heard her speak in Las Vegas last year and read some of her work online, I am expecting her to cover a fairly similar ground to what Jeff Eaton did in his talk. As someone who appreciates well structured semantic content, it should appeal to me. That is if I can hear what she’s saying. I’ve still got the sound of Orbit ringing in my ears.

Re-posted from Josh’s personal blog at

DrupalCon: My Dogs Are Barking

Day two in Portland was all about putting our FitBits through the paces. It felt like we were walking all day, and to quote Kevin Malone from The Office after wearing Kleenex boxes for shoes, “my dogs are barking”.

Located at the Rose Quarter Transit Center, this sign seemed very DrupalCon and Portland appropriate to me. It was a good way to start the day.

Do not feed the nerds

Mission number one for Trevor and I today was to play some disc golf at Pier Park, and before we went out Dan decided to join us as well. In hopes of finding some other DrupalCon attendees to join us for a round, we posted an event to the DrupalCon web site. After the half hour bus ride up to Pier Park we played a round in the dewey morning that left some part of the course a bit muddy. A couple of other DrupalConners, Dan and Derek, joined us for a second round at 11:30.

Pier park is a beautiful course with some challenging holes due to the trees and elevation changes that we don’t typically contend with in Lethbridge. Here are a few photos of the course taken during our round:

Hole three, from tee to basket

Big, big trees

I’m pretty sure I parred this hole both times:

Very tight

Shortly after getting back from disc golf we embarked on a shopping excursion, heading first to Next Adventure for some discs, and then to the Lloyd Center mall for a snack in the food court and some browsing the shops (or in Dan’s case, buying all the Arduino shields he could carry from Radio Shack).

The evening finally wound down by meeting up with Jay for a late dinner at Red Robin and then joining Angelsea at the movie theatre where we all took in the new Star Trek movie. There was talk of a late night visit to Voodoo Doughnut but the consensus was in favour of returning to the hotel to rest our weary feet. Final step tally for me came to 30,759.

Final step tally: 30,759

Tuesday morning we jump into sessions at 9:00 when most of us will learn about how Oregon State University manages large scale Drupal to kick off the conference. Time to pack in some shut eye before the morning arrives in order to get the most out of tomorrow’s sessions.

Re-posted from Josh’s personal blog at

DrupalCon: Travel Day

We made it to Portland! After a relatively stress free bit of travel, we got settled in to the city and got started with our exploring.

DrupalCon t-shirt

Six adults with luggage fills a mini-van pretty tightly, but we managed to fit everything we needed in there and made our way to Calgary with Michael at the wheel. At the airport we ran into Marc Ingram from who is also on his way to DrupalCon and was on the same flight as us.

Once we arrived at PDX it was straight to the TriMet MAX line for a quick ride down to the Oregon Convention Center. Our hotel, the Red Lion, is literally right across the street from the convention center.

The hotel as seen from near the conference center: The Red Lion

The convention center as seen from the hotel: Oregon Conference Center

After getting checked into the hotel, we killed a bit of time waiting for the conference early registration to open. That consisted of a saunter around the outside of the building and then a few blocks north to a 7-Eleven for the first Cherry Coke of the trip.

With registration complete, Dan, Jay, Trevor and I headed off to look for a Clear store to pick up a cellular hotspot to help keep us connected. Along the way we discovered that Lloyd Center Mall has an ice rink in the middle of it, reminiscent of West Edmonton Mall. The ice looked a little slushy, though. I was looking for a linesman with a squeegee to appear and start clearing puddles away. Doubling as a curling rink is a nice touch, too.

Skating rink at Lloyd Center

Once we got all set up with the wireless hotspot, we visited a dining establishment recommended to us by the Clear salesman. McMenamins on Broadway was the destination. Dan and I enjoyed a barbecue chicken pizza while I also enjoyed a half pint each of Hammerhead pale ale and Terminator stout. Tasty pizza and tasty beer.

McMenamins on Broadway

BBQ chicken pizza

Terminator stout

At some point in the day Dan had suggested that he’d like to go bowling. This came to mind on the way back to the hotel, so rather than retreating back to our rooms early after dinner, I searched for a bowling alley that may be open late on a Sunday night. Lo and behold, Grand Central Bowl, open until 11pm, and only $3/game on Sunday nights.

Grand Central Bowl

Sunday nights are Soul Bowl, no less, which meant we were downing pins to classics from James Brown while the enormous disco ball turned above.

Bowling at Grand Central

On the way back we took a brief detour back to the convention center for a few quick photos. I’ll leave you with those for tonight. Tomorrow is our day to get to know Portland a little before the conference gets rolling in earnest on Tuesday.

DrupalCon in lights

Oregon Convention Center

Convention center and American flag

Re-posted from Josh’s personal blog at