Posted Monday, August 17, 2009 | View Comments | Tagged: ruby
Including one with a kitty-kat. Check them out here.
Posted Monday, August 17, 2009 | View Comments | Tagged: ruby
Including one with a kitty-kat. Check them out here.
Posted Sunday, August 2, 2009 | View Comments | Tagged: ruby
One of the things we’ve been doing at Diversion is migrating the Sling admin codebase from using ActiveScaffold to using admin_assistant. That work had necessitated a number of small API changes, which can be a bit tricky given that admin controllers, or really anything built heavily on somebody else’s library, tend to be under-tested a bit.
The Sling transition is finished now, and admin_assistant runs more than 20 admin controllers for us there. So I’m happy to release admin_assistant 1.0.0, which is available as a gem. 1.0 gives you a fixed API, and further 1.0.x releases will only fix issues with bugs, stability, and speed. So it’ll be a more stable place to develop. If you want to live life dangerously, you can keep pulling from master on github.
admin_assistant documentation site
Posted Sunday, July 12, 2009 | View Comments | Tagged: ruby
Just to prove to you kids that admin_assistant is not vaporware, I’ve just released a new documentation site, complete with a full API reference. It’s complete as of now, though of course, I’m adding a lot of features quickly so it could end up slipping out of sync within the next week.
Posted Wednesday, May 13, 2009 | View Comments | Tagged: ruby
“It ain’t easy bein’ greazy in a world full of cleanliness.” —Method Man
migreazy is a tool that helps manage git branches and Rails migrations.
http://github.com/fhwang/migreazy/tree/master
Right now it support three actions:
Diff will compare two sets of migrations and tell you what the differences are.
Show the differences between my development DB and the git branch called my_branch:
$ migreazy diff my_branch
Show the differences between my development DB and my working copy:
$ migreazy diff
Show the differences between the git branches master and my_branch:
$ migreazy diff master my_branch
Down will apply down migrations to get your development DB to be a suitable state so you can switch branches. For example, let’s say you have the branch “master” and the branch “my_branch”, with the following migrations (using the old-fashioned migration numbers for purposes of illustration):
| master | my_branch |
|---|---|
| 1 | 1 |
| 2 | |
| 3 |
If you’re working in “my_branch”, your development DB will have migrations 1 and 2, but not 3. If for some reason you have to go back to “master” to do a quick bugfix or something, you can do this:
$ migreazy down master # this rolls back migration 2 $ git checkout master $ rake db:migrate # this runs migration 3
Find takes a migration number as an argument and digs through your git branches to see which branches contain this migration.
$ migreazy find 20090512132032
This can come in handy if you do a ton of branching and then occasionally make the mistake of switching a branch without first migrating down from that branch’s migrations.
For example, let’s say you’re in master but you’re getting test failures that you think are being caused by having your migrations out of sync. Here’s how you might fix that:
$ migreazy diff Missing in development DB: (none) Missing in working copy: 20090512132032 $ migreazy find 20090512132032 Migration 20090512132032 found in my_branch $ git checkout my_branch $ migreazy down master
More reax on Ruby & Rails & women
Posted Friday, May 1, 2009 | View Comments | Tagged: ruby, gender
Martin Fowler weighs in:
My observation is that most men in the software business think that there isn’t much sexism left in the profession – that this curse is a memory from a previous generation. Yet when I talk to women, I hear a different story. Nearly every one can tell me recent stories where they were clearly expected to feel degraded and belittled because of their gender. So some sexually suggestive pictures aren’t a joke to them, they are a pointed reminder of disturbing behavior, and a reminder that such events can happen again at any time. One of the great difficulties for white guys like me is that we haven’t been in that position; where prejudice can appear out of any corner, reinforced by the fact that every other face looks different.
As does Tim Bray:
I’m a technology generalist who attends every flavor of gathering. It’s impossible to avoid noticing that, even by the lopsided standard of high-tech culture, the Ruby and Rails communities are dramatically, painfully short of female members.
Josh Susser apologizes, though I’m not sure if he has anything to apologize for:
First off, I want to apologize. The technical program at GoGaRuCo was my responsibility. I could have done a better job and prevented this from happening. Everyone had the best of intentions and there are good reasons why things happened the way they did, but that doesn’t excuse the lapse. As a first-time conference organizer there was a lot that I had to learn as I went, and this is definitely an important lesson. I haven’t yet figured out the best way to prevent this from happening again, but I’m determined to find a way to do better next time.
And Sarah Allen proposes some plans.
I think that if we had monthly events, specifically targeted at women, and were able to effectively spread the word, then we could make it so the SF Ruby events has a more balanced audience and that at next year’s Golden Gate Ruby Conference, half the audience and speakers could be women. I’m not saying every person who attended a workshop or meetup would fall in love with Ruby, but some of them would. It would bring in all sorts of new energy to the community drawing from all different areas of tech.
Fifty percent female attendees in one year sounds, well, impossible, but what do I know?
On diversity, and whether it's worth the trouble
Posted Thursday, April 30, 2009 | View Comments | Tagged: ruby, gender
Let me try to put this in terms that might be of interest to your average guy programmer: So let’s say you have a girlfriend, and from time to time you say something that upsets her, when that wasn’t even what you intended. This is a bit of a sitcom cliche, but I dare say that life is gendered enough that this sort of thing happens a lot in the real world too. There are basically three ways you can deal with this:
1. You can say “what’s the big deal”, and not try to change at all, and try to convince her that she’s being oversensitive or uptight or she’s overreacting or whatever. You’ll probably get further with this tactic without actually using the words “oversensitive” or “uptight” or “overreacting” in the conversation. This might work a few times in the short term, but if you do it a lot, it’s not inconceivable that one day she’ll say to herself “he doesn’t care about my feelings” and break up with you.
2. You can say “bitch, you crazy” and break up with her. Always an option, and some differences are genuinely irreconcilable.
Continue reading “On diversity, and whether it's worth the trouble” »
Posted Wednesday, April 29, 2009 | View Comments | Tagged: ruby
Some interesting reactions to Matt Aimonetti’s talk.
... effective immediately, I’m resigning my position with the Rails Activists.I realize that some people will see this as an act of prudery on my part, or a lack of a sense of humor, or some other personal failing. That’s OK, I don’t mind. Other people (who I have a good deal of respect for) have attempted to convince me that I could do more good by staying involved with the Rails power structure and trying to work from within to change things. At this point, unfortunately, I feel sufficiently outnumbered and unwelcome that that option is no longer open.
Here’s another problem in this tangle: Ruby (and Rails in particular) loves the rock star image. You see it in job posts, how people talk about their work, and the way Rubyists rant on their blogs. It’s macho, it can be offputting to both genders, and it makes it easy in this kind of situation to say, “what’s your problem? I’m just busy being awesome”. It’s also a significant barrier to adoption for people who aren’t already a part of this culture, and don’t find it appealing.
And Matt Aimonetti himself:
My view is that offending someone is walking up to them and saying: “You suck, your code sucks and your partner’s code sucks!”. That is not what I did in my talk. In the case of my talk, people knew what to expect, they picked the talk, and were warned by the organizers before I started that I would be using imagery potentially offensive to some. The topic of my talk was obvious, and I would have hoped that people who were likely to be offended would have simply chosen not to attend my talk or read my slides on the internet. It’s like complaining that television has too much material unsuitable for children, yet not taking steps to limit their viewing of it. You can’t have it both ways.
I’m going to choose to be a little Pollyanna-ish and say that there’s enough earnest discussion happening to keep me somewhat encouraged. And even though I disagree with Matt’s interpretation of some of the issues, I think it’s worth noting that he’s making (from my reading of it) a fairly decent good faith effort to have an actual discussion, and that’s helpful.
One thing that’s come up is this notion of men being offended on behalf of women. But it’s funny, when I think about it: When I looked at the slides, sure, part of my discomfort came from the notion of how my female Ruby programmer friends (many of whom did go to GGRC) felt about it. But honestly, part of the discomfort is self-centered. I don’t want to look at pictures of scantily clad women in a room full of 200 dudes. That kind of grosses me out. Not because it’s necessarily sexist or misogynist or anything. Just because, seriously, ick. Maybe that makes me uptight, I dunno.
And also, is it just me, or is Twitter seriously not helping this discussion? It seems like a 140 character limit is only just enough space to say “you’re sexist” or “you’re self-righteous”.
Posted Monday, April 27, 2009 | View Comments | Tagged: ruby, gender
I didn’t go to GoGaRuCo, which I’ve heard was great. I have been following the discussion about Matt Aimonetti’s talk and slides closely, and found Sarah Allen’s blog post (and follow-up comments) to be really interesting:
... the porn references continued with images of scantily-clad women gratuitously splashed across technical diagrams and intro slides. As he got into code snippets, he inserted interstitial images every few slides (removed from the slides below). The first time it happened, he mentioned that he wanted to keep everyone’s attention. It had the reverse effect. This technique was distracting and disrespectful to an audience who, frankly, is turned on by code. This crowd had just watch hour upon hour of code slide shows and live irb sessions, often on the edge of their seats as they absorbed the latest whiz-bang plugin or coding technique from one of the masters.
My two cents? Matt is probably a good guy, and he’s probably totally cool to women in his personal and professional life. This talk seems like a bit of a misfire to me, and a reminder that in the complicated world that we live in, it’s possible to upset other people without meaning to at all. You can prioritize unfettered expression if you want, but if that ends up makes a significant minority of Ruby programmers less psyched about being part of the community, personally I’d rather find some sort of middle ground.
I’m also liking the fact that a number of people commenting there (not everyone) are able to discuss this issue without calling people “puritan” or “uptight” on one side, or “sexist” or “exploitative” on the other side. These are complex issues and a bit of calm and benefit of the doubt helps.
Also, who the hell wants to be a porn star? That shit’s depressing. I’d rather have a career path where plastic surgery isn’t a big part of professional development, thanks.
Posted Monday, April 13, 2009 | View Comments | Tagged: ruby
I’ve just released the first version of admin_assistant, which is a gem meant to make it very fast to build admin interfaces in Rails. You can install it is a gem, though you’ll have to add Github as a gem source because of one of the dependencies. You can also install it from Github if you’re so inclined.
Here’s the README:
admin_assistant is a Rails plugin that automates a lot of features typically needed in admin interfaces. Current features include:
I’m following a few design principles in building this:
There are also some features I’m skimping on right now:
Basically, this plugin should act like a really great administrative assistant in your office. It tries to be extremely helpful, but it won’t get underfoot or tell you how to do your job.
Posted Tuesday, February 24, 2009 | View Comments | Tagged: ruby, apple
wallpaper_swipe is a quick script that scrapes photos off of The Boston Globe’s “The Big Picture” site and downloads it for use as a desktop wallpaper. It’s geared towards OS X; if anybody wants to patch it for other OSes that’d be cool too.
http://github.com/fhwang/wallpaper_swipe/tree/master
1. Run the script once by hand. This will take a long time.
$ ruby wallpaper_swipe.rb
or:
$ LOGGING=true ruby wallpaper_swipe.rb # Lots of log messagesThis will download every image it can find based on The Big Picture’s current RSS feed and download it into
~/Pictures/wallpaper_swipe. It will then open
that directory in Finder and you can scan through (Cover Flow is great for
this). Every image that you like should go into the subdirectory
~/Pictures/wallpaper_swipe/approved.
The reason there’s a manual approval process is that some of TBP’s photos are of, say, a dead child after a terrorist attack: Stirring photography, perhaps, but maybe not something you want as a desktop image. Or pictures of scantily clad people during Carnival, which might be NSFW, depending on where W is.
2. Set your System Preferences to use the “approved” folder for desktop images.
Open System Preferences and go to the Desktop & Screen Saver pane. Add the~/Pictures/wallpaper_swipe/approved folder to the folder pane on the left (use
the ”+” button, or just drag the folder into the folder pane). Select that
folder and tweak your settings.
3. Setup a cron to download incremental updates.
After you’ve run the script once, running it again will only download new photos. I set this up to run every day at 4 a.m.:
0 4 * * * cd /Users/francis/Tech/ruby/wallpaper_swipe; /usr/local/bin/ruby wallpaper_swipe.rb
If it downloads any new photos, it will open the ~/Pictures/wallpaper_swipe
folder in the Finder again. That way when I get on my computer in the morning I
know if I have any new images to sort through.
Comments or patches welcome. And it would be great if nobody used this code to take credit for or profit from TBP’s photos. Most photographers work very hard for not much money, and deserve our consideration.