Pivotal Labs

Main menu

Skip to primary content
Skip to secondary content
  • About
  • Case Studies
  • Team
    • Executives
    • Locations
      • San Francisco (HQ)
      • Boston
      • Boulder
      • Denver
      • London
      • Los Angeles
      • New York
  • Community
    • Blogs
    • Tech Talks
    • Events
  • Careers
    • Lifestyle
    • Principles & Practices
    • Benefits
    • FAQ
    • Apply
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker

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

Ian Zabel
Monday, May 16, 2011

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:
    http://www.gnu.org/software/bash/manual/bashref.html#Brace-Expansion

Dangerous

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.

Events

  • 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.

Stretches

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.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

One comment

  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 ==.

    May 16, 2011 at 9:02 am

Add New Comment Cancel reply

Your email address will not be published.

Ian Zabel

Ian Zabel
New York

Recent Posts

  • Level up your development workflow with GitHub & Pivotal Tracker
  • TeamCity is pretty cool, you should totally check it out
  • [Standup][NYC] Standup 10/6/2011 — Github competition
Subscribe to Ian's Feed

Author Topics

ci (4)
git (2)
github (1)
pivotaltracker (1)
workflow (1)
teamcity (3)
cimonitor (1)
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Contact
  • Labs
  • Events

Contact Us

contact@pivotallabs.com
+1 415-77-PIVOT
TwitterLinkedInFacebook

Pivotal Tracker

Tracker is the award-winning agile project management tool that enables real-time collaboration around a shared, prioritized backlog.
Visit pivotaltracker.com >