Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

[Standup][NY] Mon 5/16/2011: Best Stretch Leader EVAR

Interesting Things

  • Beware setting class variables in Rails Initializers: Schubert warned us that if you’re setting vars on your Rails classes inside of config/initializers, you’ll see weird things happen in development mode.

    If you set a class var on a model in an initializer, the value will be available on your first request to the app. However, upon the second request, Rails will reload the class, but it will not reload the initializers. At this point, you’ll have lost the value.

  • Bash Brace Expansion: If you ever find yourself renaming a file in some faraway path, you think to yourself, “Wouldn’t be nice if I didn’t have to specify the entire path and filename twice?” Many shells provide you with a nice shortcut.

    So, instead of:

    mv /a/b/c/d/foo.feature /a/b/c/d/bar.feature

    You can use:

    mv /a/b/c/d/{foo,bar}.feature

    It’s pretty hot. Of course, there are many other applications of brace expansion. Check out the reference here:


Schubert rewired a bunch of power cables in the server room. If you notice that something isn’t right, you now know who to blame.


  • Peter mentions that BarCamp NYC is this weekend, May 21, 22. It sounds like a lot of fun, and a great place to learn and meet interesting people.

  • Agile UX will be meeting here this Thursday. The topic will be Rails for UXers.


Finally, Austin lead us in stretches this morning. It was quite exhilarating. Most of us ripped our pants and snapped our credit cards in half.

  1. Joseph Palermo says:

    “Class reloading” does not accurately describe what happens in Rails, but that is what everyone calls it.

    We ran into a related issue recently where we were saving classes in a hash that was hanging off of ActiveRecord::Base.

    Classes don’t get reloaded between requests, what actually happens is classes get unloaded after a request. When the next request comes, attempts to reference those classes again cause the class loader to find the sources and read them again. This does not actually reload those same classes, but actually gives you completely new classes with the same name.

    This was an important distinction for us, since we were comparing existing classes with the ones we had saved off. is_a? will no longer do what you expect, nor will ==.

Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *