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
Pivotal Labs

Standup 5/9/2008

Pivotal Labs
Friday, May 9, 2008

Interesting

  • attr_readonly marks an attribute as, ah, read only — use it to tell ActiveRecord that an attribute should not be a part of update operations. Rails uses attr_readonly internally with counter caches (search for “counter_cache” under ActiveRecord::Associations::ClassMethods) since counter caches are incremented/decremented directly in the database with sql. Without attr_readonly, subsequent updates of the counter_cache’d model would revert the counter to the value of the counter at the time the model was loaded.

Note: attr_readonly was either buggy or not exposed prior to 1.2.3. If you are using a version of rails prior to 1.2.3 you can do this instead:

def attributes_with_quotes(include_primary_key = true)
  attributes.inject({}) do |quoted, (name, value)|
    if column = column_for_attribute(name)
      # original:
      # quoted[name] = quote_value(value, column) unless !include_primary_key && column.primary
      quoted[name] = quote_value(value, column) unless !include_primary_key &&
          (column.primary || ["your_attributes", "listed_here"].include?(column.name))
    end
    quoted
  end
end

Ask for Help

  • help: Looking for recommendations on converting an existing schema to a new schema. We are considering dumping the existing schema to yaml (using ar_fixtures) and making the transformations there.
    • answer #1: One recent project had a “liberate” script that extracted information from the legacy database via sql statements and constructed AR model objects as necessary. The liberate script grew to some 1500 lines of code and was refactored many times.
    • answer #2: Another project did the data migration by first importing the legacy database and then using rails migrations as needed to transform the data to the new schema. Most of the migrations used sql for the transformations. These migrations did not have associated unit tests.
    • Please offer your suggestions in the comments.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup 5/8/2008

Pivotal Labs
Thursday, May 8, 2008

Interesting

  • Firebug 1.2 Alpha works with Firefox 3 Beta nightly builds
  • Firefox 2 and Firefox 3 can peacefully coexist on the same system with different profiles

Ask for Help

  • help: “JsUnit doesn’t work with Firefox 3″
    • answer #1: Apparently not with the file based url, but does work with the http url
    • answer #2: “There appears to be what some consider a bug in Firefox 3 in which JS access across frames has changed from Firefox 2…” (Follow that link for an interim fix starting at “Here’s the good news:”)
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup 5/7/2008

Pivotal Labs
Wednesday, May 7, 2008

Interesting

  • “JsUnit has been updated” A new feature available on trunk is a “modern” ui. The modern ui has 2 panes, with errors and failures listed on the left. Clicking on an error displays details on the right. Get this by 1) installing trunk, and 2) specifying “ui=modern” as a parameter.

Screen grab of old and new ui for jsunit

Ask for Help

  • help: “Selecting an iframe with Selenium RC fu“ It appears that selenium has the ability to select an iframe, but it doesn’t work in selenium rc fu.
    • answer: Apparently the selenium provided in selenium rc fu is an older version
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup 5/6/2008

Pivotal Labs
Tuesday, May 6, 2008

Ask for Help

  • “RSpec only Hoe?” How do you convince Hoe to only run specs and not tests?
    • In the distance a dog barks…
  • “Is there a fun way to learn Ruby?” I have a 500 page book, but is there a fun way to learn Ruby?
    • (various pivots look at each other) “Pairing…of course”
  • “Use RSpec to verify deployment?” Previously I used Rspec with JRuby to create stories for a java project. It would be nice to have a deployment story. The plan would say “apache goes here”, “mongrel goes there”, “mysql goes over there”. You could show the plan to your customer printed on a piece of paper and you could run it to do the deployment.
    • Capistrano can provide some of this vision.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup 05/05/2008

Pivotal Labs
Monday, May 5, 2008

Interesting Things

  • Interesting things were all about internal Pivotal Labs activities this week.

Ask for Help

  • Window.frames['name'] If we add a frame, then remove it, then add it again, it’s still there.

    • [silence]
  • “What’s that gem that draws a graph of your models?”

    • RailRoad

Sample RailRoad Output, model names changed to protect the innocent

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup May 2, 2008

Pivotal Labs
Friday, May 2, 2008

Ask for Help

  • “Can anyone recommend a tool to help find cross-site scripting (XSS) vulnerabilities?” One suggestion was Wikto.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup May 1, 2008

Pivotal Labs
Thursday, May 1, 2008

Interesting Things

  • Adobe has opened the spec for Flash and FLV (more or less).
  • IE 6 and 7 handle z-index much differently than other browsers. If you are doing anything with z-index, it’s probably safer to do your development in IE that day.

Ask for Help

  • “Is it really safe to set allow_concurrency in ActiveRecord if it’s going to be called from a script and not from Rails or Mongrel?”
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup April 28, 2008

Pivotal Labs
Tuesday, April 29, 2008

Interesting Things

  • Tip: acts_as_solr will revert to using Rexml if it can’t find the much faster libxml-ruby. So if your solr processes start to take forever, make sure libxml-ruby is being used.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup April 25, 2008

Pivotal Labs
Friday, April 25, 2008

Interesting Things

  • Erector is nearing its initial beta release.

    Erector is a Builder-like view framework, inspired by Markaby but overcoming some of its flaws. In Erector all views are objects, not template files, which allows the full power of object-oriented programming (inheritance, modular decomposition, encapsulation) in views.

  • The latest Rails Podcast features Pivotal’s Nathan Sobo talking about Treetop.

    Treetop is a language for describing languages. Combining the elegance of Ruby with cutting-edge parsing expression grammars, it helps you analyze syntax with revolutionarily ease.

Ask for Help

  • “Can anyone suggest any solutions, or point to a web site that seems to have solved the following problem: an iframe that’s showing content from one domain wants to communicate with its parent document that’s showing content from another domain, without modifying the parent document’s URL or refreshing the parent document’s page? Adding Javascript to the parent document is okay, but installing a proxy on the server of the parent document’s domain isn’t possible.”
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup April 22, 2008

Pivotal Labs
Tuesday, April 22, 2008

Interesting Things

  • Today is Earth Day
  • There are lots of parties around town due to the Web 2.0 Expo

Ask for Help

  • “Can anyone recommend a website monitoring service?” Some suggestions were Montastic, Site 24×7 and Scout.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Topics

  • agile (780)
  • rails (113)
  • testing (88)
  • ruby (83)
  • ruby on rails (70)
  • jobs (62)
  • javascript (55)
  • techtalk (44)
  • rspec (38)
  • ironblogger (32)
  • productivity (30)
  • activerecord (29)
  • gogaruco (29)
  • git (28)
  • nyc (27)
  • rubymine (26)
  • bloggerdome (23)
  • mobile (22)
  • process (21)
  • pivotal tracker (20)
  • cucumber (20)
  • jasmine (19)
  • design (18)
  • ios (18)
  • webos (17)
  • objective-c (17)
  • android (16)
  • palm (16)
  • "soft" ware (16)
  • fun (15)
  • tracker ecosystem (15)
  • ci (15)
  • cedar (15)
  • rails3 (14)
  • performance (14)
  • bdd (14)
  • gem (13)
  • css (13)
  • tdd (13)
  • selenium (12)
  • goruco (12)
  • bundler (12)
  • meetup (11)
  • railsconf (11)
  • nyc-standup (11)
  • capybara (10)
  • mac (10)
  • mojo (10)
  • chef (10)
  • api (10)
Subscribe to agile Feed
  1. ←
  2. 1
  3. ...
  4. 63
  5. 64
  6. 65
  7. 66
  8. 67
  9. 68
  10. 69
  11. ...
  12. 78
  13. →
  • 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 >