Export or edit this event...

Portland Ruby Brigade monthly meeting

New Relic
111 SW 5th Avenue, Suite 2700
Portland, Oregon 97204, United States (map)
Public WiFi

Access Notes

Check in at the security desk to get access to the 27th floor. This usually isn't required for official events and meetups.

This meeting: Come on up to the 29th floor. The elevator will be unlocked after 6:00pm.



We'll have pizza & beer starting at 6pm, so stop by early if you want to have dinner and socialize before the presentations.


Making the Most of the lib Directory in a Rails App - Brett Chalupa

Where does code goes that does not cleanly fit within the MVC structure that Rails suggests? Does one create a new folder within the app directory and introduce a new concept to the app? The vendor directory?! Should it go in a gem? When the conventions of Rails do not cover a concept or approach, it is difficult to know where to put classes and modules.

Over the years, I have been putting more code in the lib directory. It allows for more object oriented code composition, faster tests, and a clear path for extraction into gems. Working in a directory with nothing but a "tasks" directory can be a bit daunting at first, but soon enough it will start to feel like home.

In this talk, I want to show the benefits of putting code in the lib directory, when to put code in lib, how to test code in lib, how to configure a Rails application to use the lib directory, and common pitfalls to watch out for. There will be plenty of examples, open source code to reference, and hopefully other folks sharing their experiences with the lib directory.

Designing by Contract: Using Types to Write Safer Code by Thomas Reynolds

Contracts.ruby is a library which allows Ruby code to be type-checked at runtime. By simply providing a type for input parameters and output values, you can drastically reduce common, and hard to track, Ruby bugs. We will discuss types in a simple, pragmatic and non-academic way as well as looking at code samples from Middleman v4 which is entirely covered by contracts.

After presentations we'll have more socializing time.

Thanks to New Relic for providing the venue and beer, pizza & snacks this month!

ARRIVING BY BIKE? Cyclists are welcome to park their bikes in the New Relic office. Bikes are not allowed in the building lobby, however, and must use the freight elevator. To get your bike up to the 29th floor, enter the building's parking lot by going down the ramp at 5th and Pine. Go past the booth -- no need to pick up a ticket -- and turn right. Go straight until you almost run into the elevator lobby, then go right again. On the back side of the elevator block you'll see a beat up pair of double doors marked "freight elevator." You can get up by buzzing in with the intercom, and saying you're here for New Relic. Ride on up to the 29th floor, you'll easily find the bike parking.

ABOUT THE GROUP: The Portland Ruby Brigade, also known as pdxruby and pdx.rb, is a user group for Ruby programmers in the Portland, Oregon area. The group welcomes all programmers interested in the language and its implementations, tools, libraries and frameworks, such as Ruby on Rails. The group has been meeting since August 2002 for presentations, demos and discussions. Every month 35-75 people come together to share their knowledge, projects and enthusiasm for Ruby. If you'd like to present or have a topic you'd like discussed, please post to the mailing list. The group usually meets on the first Tuesday of the month, "Ruby Tuesday" -- see you there!