Hackfest around Testing

Posted by ryan, Thu Jan 21 09:42:00 UTC 2010

Most of the activity in the group happens on the mailing list. I’ve been lax in making sure the blog stays updated. Please join the list if you’re interested in keeping up.

On Monday, Jan 25, we will be having a evening meeting at Prism. Rather than doing a presentation, this will be more of a coding share/hackfest. Our focus will be on testing but any code discussions are welcome.

Check out the mailing list for more details.

1 comment | Filed Under: | Tags:

Time to Clean Your Filters

Posted by andy, Fri Aug 14 08:47:00 UTC 2009

I always forget to clean or change the air filters in my house. By the time I pull them down they're a lint-filled mess. Unfortunately, filtering in your Rails code may end up the same way as your users layer in new ad hoc filtering requirements for your most important classes.

How do you handle filtering a list you've presented to a user, with all the combinations and permutations of user-driven ad hoc parameters? And how do you then layer sorting and paging on top of the filtered mess? Check out Filtering, sorting, paging... oh my! for some ideas on clean code to produce the results your users need without expanding the public API of your Rails app.

0 comments | Filed Under: | Tags:

June Meeting: Writing a DSL in Ruby

Posted by ryan, Fri Jun 12 11:41:00 UTC 2009

This month I will be reviewing Slither, an open source DSL I wrote in Ruby for parsing and building fixed-width text files. I’ll walk through the use case for the project and demo it’s use. I also plan to talk about my approach to building and testing the DSL.

In the meantime, feel free to fork or clone the project on Github and take a look. I’d love for you guys to come with questions, suggestions and even patches. I’m looking forward to it.

Presenter: Ryan Wood, sourcescape.com

Date: Tuesday, June 23, 2009

Doors are open at 11:45am so we can chat before the presentation begins at 12:00pm. If you’re pressed for time at lunch, feel free to come right at 12:00pm.

Location

Immedion will be graciously hosting our group. Click here for directions.

2 comments | Filed Under: Meetings Ruby | Tags:

May Meeting: CouchDB

Posted by ryan, Wed May 20 09:24:00 UTC 2009

“Imagine a world without SQL, a world where your database doesn’t even have a schema, a world where you don’t have to worry about shoehorning your objects into relational tables.” Well this is the world promised by CouchDB, the new document oriented database from the Apache Foundation. So come out and see if it lives up to all the hype!

Presenter: Colin Alstad, Prism Content Solutions

Date: Tuesday, May 26, 2009

Doors are open at 11:45am so we can chat before the presentation begins at 12:00pm. If you’re pressed for time at lunch, feel free to come right at 12:00pm.

Location

Immedion will be graciously hosting our group. Click here for directions.

0 comments | Filed Under: Meetings | Tags:

That's Not My Job!

Posted by andy, Mon Apr 20 14:22:00 UTC 2009

Methods of Delegation with Ruby and ActiveRecord

What do you do when your data domain is well-factored but just isn't 'convenient'? For example, suppose you create a data model in which both a Person and a Building have an Address and you've pulled out a ZipCode class so that you can prompt your user to select from a list of previously known city/state pairs. Do you compromise your award winning data model and repeat (gasp!) data? Do you provide a series of convenience methods? No! Teach your objects (and maybe yourself) to delegate.

In this talk we'll look at ways that ActiveRecord simplifies delegation and how you can take advantage of Ruby to build similar delegation in non-ActiveRecord classes.

Meeting: Tuesday April 28 at High Noon

Check here for directions if you have not joined us before.

0 comments | Filed Under: Meetings | Tags:

New article: Globbing up javascript

Posted by andy, Mon Mar 16 12:01:00 UTC 2009

I've just published another article called 'Globbing up javascript' that covers the basics of Dir.glob and how it can be used to clean up all the javascript (stylesheet, etc) include in your layouts. If you've gotten frustrated by having to maintain that 'golden list' of javascript files or ever been frustrated when some piece of javascript logic for your Web2.0 app failed to appear because you forgot to update the list then head on over and check it out. If not, you might still find it a useful technique for your bag of tricks.

0 comments | Filed Under: | Tags:

Meeting: March 24 @ 12pm

Posted by ryan, Sun Mar 15 22:24:00 UTC 2009

At next meeting, I’m (Ryan) going to be talking about Git, the notorious version control system. Rails and many of the open source projects have moved from Subversion (svn) to Git. I’ll be discussing the benefits and challenges of it. I hope you’ll come out.

Doors are open at 11:45am so we can chat before the presentation begins at 12:00pm. If you’re pressed for time at lunch, feel free to come right at 12:00pm.

Location

Immedion will be graciously hosting our group. Click here for directions.

0 comments | Filed Under: Meetings | Tags:

Meeting: Jan 27 at lunch

Posted by ryan, Thu Jan 15 11:03:00 UTC 2009

We will be meeting on the 27th. For the new year I thought we would start having smaller (15-20 min) talks by group members. Please come and share what you’ve been doing in the Ruby or Rails world. If you’ve stumbled on some gotchas or found a cool gem. Come out and share with the rest of us. It will be very informal. No pressure, no preparation (well, don’t spend more that 15 mins or so if you do want to prepare).

Doors are open at 11:45am so we can chat before the presentation begins at 12:00pm. If you’re pressed for time at lunch, feel free to come right at 12:00pm.

Location

Immedion will be graciously hosting our group. Click here for directions.

Free License!

I’ll be demoing Balsamiq Mockups and thanks to their generosity, I’ll be giving away a license for their desktop mockup product. I look forward to seeing everyone.

0 comments | Filed Under: Meetings | Tags:

Fixing the Broken Pipes: Updating RubyGems

Posted by andy, Tue Oct 14 14:30:00 UTC 2008

Why do we need the plumber?

If you're like me you might slip into a comfort zone and not keep up with all the updates to gems and plugins, especially since github has taken plugin/gem development and forking viral. Usually that's not much of a problem. Unless, of course, the change is to the gem package manager itself.

I'm not sure exactly what changed. What I know is that any time I tried to do a '(sudo) gem install my-cool-gem' it failed with an error that looked like this


Bulk updating Gem source index for: http://gems.rubyforge.org/
Bulk updating Gem source index for: http://gems.github.org/
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
     Errno::EPIPE: Broken pipe reading http://gems.rubyforge.org/gems/...some-poor-gem.gem

As best as google has been able to help me find the problem lay in the the increasingly large number of gems available. The large, uncompressed source of gems times out the connection. Fortunately that appears to be fixed in the latest version of rubygems. Version 1.3.0 was released yesterday. But now you've got a chicken-and-egg problem if you have relied on gems to update itself -- the Broken Pipe problem prevents you from getting the version that doesn't have the Broken Pipe problem.

Installing the gem locally

The simple answer to the question is to install the gem from a local source rather than a remote source. It works the same as the tried and true "gem install my-cool-gem" with just one extra step. Here's what I did specifically to fix the issue with the gem package manager.

  1. Navigate over to the rubygems download page at rubyforge.
  2. Download the latest rubygems-update gem (currently rubygems-update-1.3.0.gem)
  3. Move the gem somewhere handy in case you want to install it again.
    Personally I created a Gems subfolder and moved the gem from ~/Desktop to ~/Gems.
  4. Install the gem locally using a locally named source:
    sudo gem install rubygems-update -n ~/Gems
  5. Once the gem update is installed you still have one more step! (Emphasis for my own needs -- I keep forgetting this). From the command line:
    update_rubygems

Once I updated to rubygems v 1.3.0 the Broken Pipe Problem disappeared on my Ubuntu box. Hope the same is true for you!

0 comments | Filed Under: | Tags: