Quick vim svn blame snippet

written about about 1 month ago |
1 comment

Just to prove the theory that every incredibly incomprehensible piece of code you come across is probably your own, I penned a quick svn blame vim command.


vmap gl :<C-U>!svn blame <C-R>=expand("%:p") <CR> \| sed -n <C-R>=line("'<") <CR>,<C-R>=line("'>") <CR>p <CR>

Just highlight the disgusting code in question, and bask in your own shame!

Getting back into the swing of things.

written about 3 months ago |
2 comments

The past three weeks have been a total whirlwind of excitement, glamour, drinking, more glamour, sickness, boredom, and a bit more glamour.

I gave a presentation on BDD with shoulda for Mountain West Ruby Conf in Salt Lake City (video above).

It must be nice to live in a city completely surrounded by gorgeous snow capped mountains. And the library where the conference was held was an incredible example of architecture. Lots of sweeping curves and generous amounts of glass.

After that, it was off to present at Scotland on Rails. I’ve never been to a city as thoroughly beautiful as Edinburgh. It seemed like every street was lined with buildings older than my own country.

I’ll be putting the shots I took for both of these trips up on my flickr account as soon as I have time to unload them.

Unfortunately, I fell under the grips of a serious cold at the end of that trip, and just finished recovering last weekend. So now it’s time to get back up to speed.

I’ll be in New York next weekend for GoRuCo, Brisbane on the 9th for some personal time, San Diego on the 23rd for more of the same, Portland on the 29th for RailsConf, and Portland again in July for OSCON, where I’ll be giving a 3 hour tutorial on advanced ruby metaprogramming.

In fact, I’ve got so many trips planned this season, that I’ve started using Dopplr to keep track of them. Check out my profile and itinerary in the sidebar, stage left.

And I promise to get back to more technical posts as soon as the dust settles.

Email your Backpack GTD items

written about 4 months ago |
0 comments

Like most kids out there, I’m a follower of the GTD system. I’ve gone through a bunch of GTD software and have boiled it down to a combination of Backpack and a pad of paper in my hip pocket.

I thought I’d share a script I wrote that emails me my list of todo items every morning.

First off, my backpack GTD system is pretty straight forward:

  1. A page for each context, the names of which start with ’@’ – so @work, @phone, @online, @zipcar, @home, @blog, etc.
  2. Each context page includes a single list named “Tasks”

That’s about it. I’ve also got a someday/maybe page, and a page for each major project, but those don’t get emailed to me.

Download this script, change the constants at the top, and plop it on a server somewhere. You should test it on the server it will live on by running /usr/local/bin/ruby /home/tsaleh/bin/email_todos.rb

Then setup your crontab to run that sucker every morning. My crontab looks like this:


@daily /usr/local/bin/ruby /home/tsaleh/bin/email_todos.rb 

That should be it. The next morning you’ll get a list of the tasks you have to complete for each context.

Politiquotes - Who said what, when, and where

written about 4 months ago |
0 comments

I’d like to announce the launching of a small side project of mine:

Politiquotes

A political awareness app where you can post, vote on, and discuss quotes from your favorite candidates.

So join up and get your quote on!

Shoulda 4.0.1 - the lean and mean release

written about 4 months ago |
0 comments

Crossposted from GiantRobots

look at that drool

Shoulda is a great tool for cleaning up your tests, but there was always some dirt under the hood that was keeping me up at night. I don’t want to just move complexity around – I want to remove it entirely.

A recent change in edge rails forced me to get off my butt and do that.

So everyone give a warm hello to the latest Shoulda gem. It now uses a Context class in the backend, prints out should_eventually tests in a clear way, names the bare shouldas nicely, and fixes a few small bugs.

I also took the opportunity to fix some of the outstanding issues in the shoulda rails plugin (with a lot of great help from the community).

So grab the latest plugin and have some fun:


piston install https://svn.thoughtbot.com/plugins/shoulda/tags/rel-4.0.1 vendor/plugins/shoulda

Also, please let me know if you find any bugs or issues.

Upcoming conferences

written about 5 months ago |
0 comments

I’m totally psyched to say that I’ve been invited to speak at Scotland on Rails. I’ll be in the company of some truly amazing ruby developers, and I highly recommend that you reserve your ticket now. Who can resist a conference in site of an ancient scottish stronghold? Or, more to the point, who can resist the scotch?

I’ve also been invited to speak at the Mountain West Ruby conference alongside speakers like Philippe Hanrigou and Jeremy McAnally. There are a lot of talks at this one that I’m excited about seeing – especially the ones on Datamapper and CouchDB.

So if you’re at either of those conferences, then please drop by and say hi. And, yes, I’m just as fuzzy as my picture in real life.

Rails Rumours

written 5 months ago
1 comment

Elephants

written 5 months ago
0 comments

Switchpipe

written 5 months ago
0 comments

37 Signals introduces line breaks

written 5 months ago
0 comments

A couple of small, but totally useful plugins

written 5 months ago
0 comments

Rescuing Net::HTTP exceptions

written 5 months ago
3 comments

Shoulda in Advanced Rails Recipes

written 7 months ago
0 comments

Version Control and “the 80%”

written 8 months ago
0 comments

Book Review: Troubleshooting Ruby Processes by Philippe Hanrigou

written 8 months ago
0 comments

Almost Painless Nested Resources

written 9 months ago
0 comments

Remember your MVCs

written 9 months ago
0 comments

RubyEast '07

written 9 months ago
0 comments

My Second Markup & Style Meeting

written 10 months ago
0 comments

Serving 138 Emails a Second

written 10 months ago
0 comments

Ruby East

written 10 months ago
0 comments

Moved to Mephisto

written 10 months ago
0 comments

Trunk Mephisto, Edge Rails, Piston, and Mongrel. Oh, My.

written 10 months ago
0 comments

Time may be money, but so is morale

written 10 months ago
1 comment

Brittle Tests

written 10 months ago
0 comments

Shoulda news

written 11 months ago
0 comments

Programming as fate

written 11 months ago
0 comments

Specin rSpec with Rails

written 11 months ago
0 comments

Shoulda gets busy with your controllers

written 11 months ago
0 comments

Introducing the Shoulda Testing Plugin

written 11 months ago
0 comments

It's the little things...

written 11 months ago
0 comments

Highrise to LDAP Gateway

written 11 months ago
1 comment

cruise_control.rb campfire plugin

written 11 months ago
0 comments

And then there was...

written 11 months ago
0 comments

Campfire API Where Art Thou?

written about 1 year ago
2 comments

Presenting at RailsConf 2007

written about 1 year ago
0 comments

And apparently...

written about 1 year ago
0 comments

ActiveResource from javascript

written about 1 year ago
0 comments

Memories...

written about 1 year ago
0 comments

Battle over testing strategies over at thoughtbot

written about 1 year ago
0 comments

Ennui

written about 1 year ago
1 comment

First rails patch!

written about 1 year ago
6 comments

Quick snippet to add to the top of your environment.rb file

written about 1 year ago
0 comments

LDAP Server for ActiveRecord Models

written about 1 year ago
0 comments

Mocking a network resource with camping

written about 1 year ago
0 comments

Yay!

written about 1 year ago
0 comments

Second refactoring of security roles

written about 1 year ago
0 comments

I heart Ruby

written about 1 year ago
0 comments

Hyperlinks to specific emails in other applications.

written about 1 year ago
0 comments

LDAP Server for ActiveRecord Models

written about 1 year ago
2 comments

Thread safety in Rails and ActiveRecord

written about 1 year ago
2 comments

Using wrapper classes with ActiveRecord to enforce security rules

written about 1 year ago
0 comments

heh...

written about 1 year ago
0 comments

Am I crazy?

written about 1 year ago
0 comments

I had no idea...

written about 1 year ago
0 comments

Command line utility to interrogate models

written about 1 year ago
0 comments

acts_as_graph

written about 1 year ago
0 comments

Now, don't be hatin'

written about 1 year ago
1 comment

migration data dumper on rubyforge

written about 1 year ago
0 comments

Migration Data Dumper Plugin

written about 1 year ago
0 comments

Someone snarfed my plugin!

written about 1 year ago
0 comments

Migration data dumper plugin

written about 1 year ago
0 comments

Helloooo!

written about 1 year ago
0 comments