Using Pg_dumpall to Move All Postgres Databases to a New Laptop

I recently upgraded laptops because it’s been 2 years and my business lease on it was up. Which: cool to have the new MacBook Air with the day-long-battery TM, but moving computers is a pain.

Except: I have dot files and that makes it easier. After copying my home directory over, re-dotfiling, things seemed good.

Except: my postgres databases. How to get them all from Air A to Air B without copying every.single.one.

Enter: pg_dumpall. It’ll dump every database into a file, with which you import on new computer.

When moving to a new computer

$ pg_dumpall > db.out

(Move file to to new computer)

$ psql -f dbout postgres

if you have trouble with “database $username not found”, type in “createdb”

To confirm,

psql

And then \l to list the databases

Excitement! I’m Teaching Rails at the Iron Yard Houston

Teaching Ruby has been awesome. It’s been so awesome that I want more. I want to meet the students face to face, and help change their lives for the better. To make that happen, I’m going to teach Rails at Houston’s first open-source stack code school. The Iron Yard Houston. Classes start June 2nd.

In March, I flew to Greenville, South Carolina, to experience a course first hand. The cohorts were 8 weeks into their JavaScript course, and amazed me with their abilities. This was the real deal (discussing how to make Backbone models more maintainable). The Iron Yard came to Houston, and asked me to teach the Rails Engineering course. I kept looking for a reason to say no …

Reminder to Hand-craft Your Whenever Files

Day 5: crash. Day 6: crash. Each day, we were receiving notifications from Rackspace that the server had exceeded its memory allocation and was thrashing too hard; it rebooted our server for us.

My initial reaction: Increase the memories!

I looked deeper into the problem, and along with some colleagues, discovered that at midnight our server was kicking off 9 different processes at the same time. 9x Rails is just about 8x too many.

RailsBerry Rejected My Talk and I Am Happy About It

I received the greatest email this weekend: RailsBerry had rejected my talk for their 2013 conference. Normally: another “oh well, they must have found really great talks to reject mine” and a sigh. Why did I like this rejection email?

RailsBerry gave me personalized, actionable feedback on making my future submissions better.

Easy, Light Weight, and Magical Parallel Processing in Ruby

Ever had a set of tasks in Ruby take too long?

We’ve all been there – you have code that needs to be run, and it’s taking forever. You wish there was a way to speed things along, but you can’t tweak the algorithm. You read about multi-threading but hear tales of dragons, pirates, and warnings of people who have ventured before you never to return.

Worry Not, Celluloid is here! (And celluloid-pmap is an easy way to get started)

But fear not! Celluloid exists, and is awesome. It’s an actor based implementation, but all you need to know is that it’s awesome. You can process an array of things in parallel, and continue when it’s complete.

The One Where I Have to Explain Why I Want Diversity in Our Field

@RellyAB tweeted:

If you are a guy and you want to help fight the good fight, tell people why you want diversity and not dickery, from your point of view.

This comes after:

And this is in the last week.

So. Why do I want diversity (and not dickery) in our field? a) it makes economic sense, b) we need to create better software and more of the same probably isn’t going to help, and c) it’s the human thing to do.

The One Where You Run Rake Commands With Capistrano

Simple Enough, right? Run some rake tasks on your servers. You think it’d be built in, but nope. Drink some sake and let capistrano do the work!

The One Where You Take Your Deploy to 11: Asset Pipeline

Things I love: the asset pipeline in Rails. Things I detest: Long deploys caused by recompiling the asset-pipeline when I KNOW NOTHING HAS CHANGED. It makes it hard to deploy constantly if each takes 2 minutes.

RubyOffRails Scholarship for Women

I have an opportunity to do something, and I want to do it. Ruby is awesome, and I’ve been inspired by RailsGirls and Kids Code Camp. I want to bridge the gender gap in software development, and this is an initial step for me to do something.

RailsConf 2012 Ignite Talk: ActiveRecord and Velveeta

My ignite talk (5 minutes, auto-advancing slides) talk from RailsConf 2012 is online.