I'm a Ruby developer in San Francisco. This is my programming blog.
|
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.
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.)
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"
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.
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.
…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.
Please post your comments here on my Teaching Kids article.
I wrote an article for the RailsBridge Teaching Kids site about my experience teaching Ruby to high school girls a few weeks ago. Go read it over there!
That site doesn’t have comments, though, so I’m linking back here because I’d like to hear your comments and suggestions for improving the program.
Thanks!
Women 2.0’s OSCON mixer hits San Jose tonight! It’s free if you have an OSCON badge (and you can get an exhibit hall pass for free if you go by the convention center). Here are all the details.
I’ve been going to Women 2.0 events on an off for a couple of years. Most of their events have focused on the business side of startups and entrepreneurship – at a wine & cheese mixer last year, I was the only developer in the room! But they are expanding their charter to include technical women, and particularly technical women as startup co-founders. If you’re interested in the small-company experience, or maybe even in launching your own, this is great opportunity to network with some amazing and energetic people who are out there doing it.
This is W2.0’s first technically-focused event, and their first event in San Jose too. Register here, and if you need a ride from San Francisco, leave a comment – I’m in the South Park area.
Registration is now open for the free Ruby workshop for women that Sarah Allen and I are running at the end of July. Please RSVP soon – the last workshop filled up less than 3 days after registration opened.
 LEARN ME
This is a two-day event open to total programming novices, system administrators, and developers in other languages. In other words – everyone! All the details are on the meetup pages.
RSVP yes for both Friday and Saturday to reserve your spot.
Day 1, Friday 7/31: http://www.meetup.com/sfruby/calendar/10804417
Day 2, Saturday 8/1: http://www.meetup.com/sfruby/calendar/10804438
As before, men are welcome to register as the +1 of a woman doing the workshop. So guys, I know there’s a woman somewhere in your life who you’ve always thought would make a great programmer. Recruit her and you can come along too.
The workshop includes dinner on Friday, and breakfast and lunch on Saturday. Child care and private space for nursing and/or pumping are available. Partners are welcome to stay with the kids but that’s not required.
We are looking for experienced Rails developers of all genders to volunteer at the event. This time we have a separate volunteer coordinator so that things run more smoothly. Volunteering will be fun and educational, plus it’ll be a great networking opportunity. Stay tuned for info on how to get on the volunteer list.
A few weeks ago, I co-hosted a Ruby on Rails workshop for women in San Francisco. High on my list of requirements, even before free lunch, was available childcare.
In the spirit of doing the simplest thing that could possibly work, I implemented it as my husband in a mildly baby-proofed conference room with a Wii, Mario Kart, a Shrek DVD, and an assortment of (analog) toys.
Out of 60+ attendees, three brought kids. (When they registered, we asked people if they were bringing kids, and we got several responses like “GOD, no.” I laughed.) So was it a waste of a conference room (and spousal brownie points) that might have been put to better use?
Well, it might appear so to some, but a dozen or so people – that’s about 20% of the attendees – told me they registered specifically because it was available. Ultimately, these parents found someone to watch their kids, or they arranged a playdate, but if those plans had fallen through, they had a backup plan.
“Childcare available” meant they could RSVP yes and mean it. That’s not a waste.
|