Thoughts on two months of pairing

Previous to joining Pivotal Labs, I didn’t do a whole lot of pair programming.

Hoo boy.

It’s been a little over two months since I started, and the number of hours I’ve spent solo programming since then would all fit in one workday. I’ve had some surprising realizations – about myself, my style, and my abilities – and more than a few DUH moments. This post is more a collection of anecdotes than a coherent essay, but if you’ve wondered what full-time pairing is like, I hope it gives you a few insights.

It does contain some profanity. I blame my co-workers for that.

Read more »

SCALE 8x Slides Posted

Yesterday I did a talk at SCALE 8x called “Moving the Needle: How SF Ruby Got to 18%.” Broadly, the topic was how to get more women into a technical community. I talked about how, specifically, we took the SF Ruby monthly meetups from 2% women to 18% women over the past year.

Short version: it was a lot of work.
Read more »

LARubyConf Slides Posted

Just finished my LA Ruby Conf talk on teaching Ruby to kids. Here are a few further resources:
Read more »

The First 2010 Ruby Outreach Workshop

Copyright 2006 by Yukihiro Matsumoto

LEARN ME

…is now open for registration. Last year Sarah Allen and I did three workshops for women and this year we’re going for four. So, if you’d like to learn Rails and can come BOTH Friday, February 26th in the evening AND Saturday, February 27th during the day, go sign up! There are only a few spots left.

And yep, still free.

We’re also seeking Rails developers (of any gender) to assist as TAs. Tell us about that here. Past TAs and teachers have found it quite rewarding. Plus you get a drink ticket for the afterparty. :)

And finally, some logistics: it’ll be in an office space in downtown San Francisco, near transit. Next week we’ll send out the exact address. We’ll have informal childcare and space for pumping or nursing – please tell us if you think you’ll be using those services when you register.

See you there!

New job

I haven’t had time to finish part 2 of the SQL vs. Relational Model cage match. Instead, I’ve been working on convincing the guys at Pivotal Labs to hire me, and it seems to have finally worked! I start February 1st.

I can’t even tell you how thrilled I am. I try to choose jobs based on how much I’ll learn from the people there, and everyone I know from Pivotal is amazing in that respect. Plus, although I’ve enjoyed my last four months of unem^H^H^H^H consulting…I’m ready to go back.

Cage match: SQL vs the Relational Model (part 1)

The relational model underlies all modern relational databases, and it is a thing of beauty.

It defines relations (tables), attributes (columns), tuples (rows), and a whole relational algebra that spells out in detail what you can and cannot do to them. It is logically consistent, and in an odd way almost fractal in the way it treats its entities – subtables are tables, subrows are rows, and so forth.

It’s too bad, then, that no modern database implements more than a bastardized version of the relational model, isn’t it? Even SQL, the most standard and common method of accessing databases is a twisted orc to the relational model’s Galadriel.

The most glaring difference is that the SQL standard allows duplicate rows if there’s no unique constraint on the table. Under the relational model, tables are properly sets (as in the mathematical concept) of rows, which means no duplication. Most people who design SQL databases know, of course, that duplicate data is bad (mmmkay) and thus set unique constraints, but it’s really easy to get duplicate rows in a query result (which is also, technically, a table), especially when joining or unioning.

The other major difference between the relational model and its implementation in SQL is that the SQL standard allows null values. In other words, a row doesn’t have to have values in every column. Under the relational model, though, rows are properly tuples, another dusty math concept (for me anyway). Tuples can’t have null values.

One might reasonably ask why these differences matter. Would we be better off if SQL were a full implementation of the relational model, or would we all just be cranky because we had no way to represent lack of data in a row? Come back tomorrow for part 2 to find out.

(You should buy CJ Date’s book. It is all sorts of awesome.)

Travails with readline

Applies to: Ruby 1.8.7, compiled from source, on OS X 10.6 (Snow Leopard).

I’ve been working on a side project that deals with Japanese text in Ruby. I installed rtranslate, a gem that gives me programmatic access to Google Translate. I wanted to try it out in irb.

>> require 'rtranslate'
=> true

So far so good.

>> Translate.t("

Here’s where I started to run into problems. I changed the input mode to Japanese and tried to enter はい (hai). All I got was beeping – irb wouldn’t let me enter any Japanese characters at all. I tried pasting from somewhere else – also a no go.

Long story short: by default, Ruby links against editline instead of GNU readline, and editline doesn’t support multi-byte characters. If I started irb with the –noreadline option, it worked fine, but then none of the arrow keys worked. Highly annoying.

I read five different articles [1] [2] [3] [4] [5] that fixed variants of the problem; none of the solutions worked fully for me. My machine is running Snow Leopard, and I had installed Ruby 1.8.7 from source following the Hivelogic directions. So if you’re in the same boat, here’s how you get multi-byte input working:

1. Install GNU readline.

cd ~/src
curl -O ftp://ftp.gnu.org/gnu/readline/readline-6.0.tar.gz
tar xzvf readline-6.0.tar.gz
cd readline-6.0
./configure --prefix=/usr/local
make
sudo make install

The –prefix in the configure line is crucial.

2. Recompile Ruby, pointing at the new readline. I still had the Ruby source directory in ~/src from when I compiled it the first time (this is a relatively new laptop). If you don’t, you can just download it again.

cd ~/src
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.gz
tar xzvf ruby-1.8.7-p174.tar.gz
cd ruby-1.8.7-p174
make clean
autoconf
./configure --enable-shared --with-readline-dir=/usr/local
make
sudo make install

3. My profile had gotten out of whack, so I had to add this line (again) to ~/.bash_profile:

export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH

Now I can enter multi-byte characters into irb, or copy them in from elsewhere. Now I can get on with what I was actually going to do. :)

>> require "rtranslate"
=> true
>> Translate.t("はい", "JAPANESE", "ENGLISH")
=> "Yes"

ob_year_end_wrap_up

In 2009, over 200 women and girls (and some men!) learned to program in Ruby at my workshops in San Francisco. We’re planning another outreach workshop in the new year, a few weeks after She’s Geeky. Stay tuned for details.

In 2009, I co-founded a nonprofit, and lost my corporate job.

In 2009, my baby turned one and my preschooler turned four. Life at home was…chaotic. Sometimes work was a haven. Nobody there ever asked me to feed them.

I’m looking forward to 2010. I hope I’ll reach more people with the workshops, find engrossing work, and get more sleep than I did last year. I hope you get more of what you want and need too.

Is Agile Too Slow?

You’re Asking The Wrong Question.

I’m in Hawaii for the Aloha on Rails conference. The last session on Monday was a panel moderated by l4rk that included Obie Fernandez, Pat Maddox, Blake Mizerany, and Tammer Saleh. The topic: “Is Agile Too Slow?”

Ostensibly we were there to talk about whether there were any circumstances under which agile practices actually take too much time. As Obie, Pat, and Tammer talked about their preferred set of agile development practices, and how they’d never take a client who didn’t want to use them, it hit me that the whole premise of the question they were answering was just…wrong.

Agile is not about checking off every entry on a checklist of practices. Agile is about adapting your process to fit the project you’re on. If you think that every project absolutely must have tests, you’re not agile. If you think that every project absolutely must be storycarded, you’re not agile.

If you can’t adapt your process and add or drop practices as appropriate – including dropping down to no process at all when it makes sense – then you might as well be doing waterfall.

Agile is never too slow. Dogmatic adherence to practices, on the other hand, is.

It’s official…

…I’m looking for a new job.

I’d love to find a job where I could write complex, interesting Ruby and/or Rails code four days a week, and work on growing the Ruby community (via the RailsBridge workshops, hackfests, and other new stuff!) one day a week.

I and the rest of the organizers of the Ruby workshops have already made a measurable impact on the SF Ruby community. At the last monthly meetup, we had about 9% women, compared to the 2-3% that was previously typical. We have lots of great ideas for programs that build on these workshops and other stuff we’ve been doing. But since we all squeeze this stuff in on nights, weekends, lunch hours, etc., it’s been hard to find the time to get anything new started while keeping the workshop momentum going.

Is it crazy to ask a company to sponsor me at 20% time to grow and amplify this work? Possibly, and it certainly has to be coupled with something fun and challenging to work on the other 4 days. But I think this job exists, or could exist. There are quite a few companies out there who’ve bet the farm on Ruby. I’m sure they’re interested in making the community stronger. That’s what I’m interested in too. Let’s find some way to work together.

sarah mei at gmail is the place to go.