Installing PostgreSQL via Homebrew

This is mostly for my edification only with little potential value for any one other than the Google overlords but maybe it will come in handy in the future.

Today, I thought I’d do some Rails dev on my football website but when I fired up rails s, I got an error related to PostgreSQL and the associated gem file. I haven’t done any rails work in 3 months but I’m pretty sure when I last left things, Postgres was working just fine. I rooted around a little in the path from the exception and apparently, Postgres had disappeared from the location the gem expected it to be in. I have no idea how that happened but that was the situation I found myself in. I spent an hour or two trying to find an installation for Postgres with little luck and finally just gave up and went to installing it with Homebrew.

I followed steps 1, 2, 4 and 5 from this link on upgrading PostgreSQL via Homebrew. One difference was because I wasn’t upgrading, I actually did a clean install with Homebrew. When I did this, the default user created was the same as my logged in user account instead of the standard “postgres” account. I couldn’t connect to the database server via pgAdmin because it wasn’t running so steps 4 and 5 came in handy. Homebrew installed Postgres in /usr/local/var/postgres. Once I copied my plist file from that location to Library/LaunchAgents and ran pg_ctl -D /usr/local/var/postgres/ start, the server was back in business and I could connect with pgAdmin.

I then created the postgres login role and was back in business. rails s started fine and after several hours of learning about things like ps, launchctl and psql, I should be able to start writing some code.

Bamboo CI and Git Branches

On the off chance that Google even indexes my blog anymore, I thought I’d write a short post about an issue we resolved with Bamboo and Git branches last week that doesn’t seem to be documented anywhere. We are using Bamboo to do continuous building (we’re not doing continuous integration because we use feature branches – that’s a topic for an entirely different post). Last week, we needed the branch name to create packages for the build artifacts. The Bamboo documentation doesn’t have anything related to git and branch name though it does say that ${repository.hg.branch} will get you the branch if you’re using Mercurial.

As it turns out, if you prefix the variable with bamboo, things start working. As in ${bamboo.repository.git.branch}. This successfully returned the branch name. As far as I can tell, this isn’t in the Bamboo documentation anywhere so it can live here for posterity (or obscurity, whichever).

A Significant Place

I stand beside a gravelly, sand packed road. I kneel down and touch the ground with my hand. The sun threatens to pound me into the ground, its blazing rays like pieces of glass against my face. Breathing is difficult here and the heat is choking in its intensity. Yet small brown skinned children play a derivative of soccer with a duct tape ball in the empty field opposite where I stand. Children rarely seem to notice the elements. Only the old and the despondent comment on the weather. I have been talking about the weather for a long time. Sand blows around my feet. Cars and diesel trucks of indeterminate make and model creep along the road disappearing into the walled city like giant ants coming in from the hunt. In the distance, a jet roars into the sky. Sweat pours down the side of my face. I wear a bandana around my throat and mouth which does little to protect me from the blowing sand. It gets in my teeth and the corners of my eyes and I taste the destruction of this place. It tastes like gunpowder and death and a quiet despair. Just outside the walls of the city, two old men lie on reed pallets and watch me. They speak to each other in a tongue I don’t pretend to understand. They don’t appear to be lepers but they have been shunned by the citizens within the walls. Occasionally, as a car drives past the gate, it slows enough for a hand to shoot out through the dust clouded window and toss change into a basket at their feet. The pair seem neither thankful nor embarrassed by the alms. They only continue to talk and watch me. If I walked over and kicked them, I do not think they would be surprised or angry. They lack concern for their situation. I have been standing here for the better part of an hour. There is no memorial cross posted here, no makeshift memorial with pictures or rosaries, nothing to mark this spot where three years ago a woman my son had never met walked up to his checkpoint and punched buttons on the cell phone connected to the bomb under her cloak. True to the end, they both believed in their causes, each thinking a difference could be made through action. Neither action means anything now. The world remains unchanged. Yet my world, a world neither were trying to affect, is radically different. I have come here to find the family of that woman, to know them, to understand what drove her to the action that stole my son from me. I turn and walk towards the gates of the city.

On Fundraising

Last weekend, I took part in CrossFit for Hope, a fundraising event by CrossFit to raise money for St. Jude Children’s Research Hospital. The goal across all participants was $1.7 million, one day’s operating costs for St. Jude. As with most things CrossFit, it revolved around a workout aptly named CrossFit for Hope (we’re nothing if not consistent). The fundraising efforts could be done on a flat donation rate or a per repetition basis. The workout was like Fight Gone Bad in format but with different, harder exercises. The event had been announced and planned for quite awhile but it took me until Thursday night to work it into my consciousness enough to consider participating.

Once it did, the idea of raising money in 24 hours appealed to me. My initial brainstorming set a personal goal of $1000 which didn’t seem like that much when I considered my network of possible donees. I have 125 odd Facebook friends and 120 or so Twitter followers. I also have a reasonably extensive network of people I know in general. I thought if I could get a decent number of them to chip in $5-10, $1000 was completely doable. Luckily, I rethought that plan by the time I woke up Friday and scaled back to a goal of $500. I didn’t do this out of any concern as much as sometimes it’s nice to surpass lower goals than it is to fail at loftier ones.

First thing Friday, I signed up for the site and then sent out an email to everyone at work. Except that I didn’t have permission to do that. My initial dreaming involved people with lots of disposable income in the corner offices chipping in a lot and that dream came rapidly crashing down. So I sent a request out to two internal lists that I had access to. Immediately, I got a generous donation of $50 from a coworker. “Hey, 10% there already, this is going to be easy” I thought. And then things got a lot harder. I sent out notices to Facebook, Twitter and via email. I got a couple of immediate donations, also very generous, immediately but then things basically stopped.

Throughout the day, I checked in on my profile to check my progress. Donations came in at a trickle but given the fact that I had asked upwards of 300 people, I got a little downhearted. Even late Friday, when I got a few retweets on Twitter to more and more people, the totals didn’t change. This is what makes fundraising so hard. My initial expectations were that lots and lots of people would chip in $5 when I asked them. Initially I focused on the money but the real issue is that if a cause isn’t meaningful to someone they aren’t going to donate. Plus in our attention deprived world, pleas for cash come across feeds all day long. There is both a recency effect and familiarity effect that have to work in tandem for fundraising success and even then, people may ignore the pleas because they all just start to run together.

In the real world, outside my narcissistic viewpoint where everyone contributes if I ask them to, the effort of fundraising must be immense. It was hard enough for me. I followed up, cajoled, pleaded and bothered the hell out of people for the waking hours between 9 AM Friday and 9 AM Saturday. In the end, I’m absolutely thrilled with results. Fifteen people responded to my request with generous donations. I raised over $650 in 24 hours which is a phenomenal response. On a personal level, it looks like once all my donations have been attributed, I’ll be in the top 250 of all participants and I only worked for one day. That is truly exciting.

From a more theoretical level, my experience illustrates the fundamental difficulty of grassroots fundraising. The Friday night retweets resulted in 800-1000 more people seeing my request. Of those people, exactly zero contributed. Once the familiarity effect fell outside one level of my network, the impact was essentially zero. People who don’t know you really aren’t that interested in your problems. Shocking news, I know but it’s highlighted by my nascent efforts at fundraising. The power from grassroots fundraising is in the number of people motivated to ask for money from their immediate circle. With a large base, that familiarity effect can be focused on a large number of immediate potential donors without having to worry about branching out to second and third levels.

Several people have asked if I thought more time would have resulted in more money. I think I would have been able to find more people but I don’t think it would have changed the final total appreciably. Having that artificial deadline enabled people to act quickly without having to put it off and wait for the weekend or the next pay day. I would have had to work harder for less return with a longer time period. If I participate in something like this again, I think I’ll impose the artificial deadline again.

Overall, I’m certainly thrilled with the end result and actually learned something in the process. It was fun to participate in such a large scale, grassroots fundraising effort. It’s incredibly fulfilling to actually feel like you’ve made a difference as a part of something important.