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
  • Tools
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker
Jacob Maine

SF Standup 3/4-3/5/2010

Jacob Maine
Friday, March 5, 2010

Help

“What’s the best way to test that an array contains another array?”

A custom matcher using array - other_array was suggested.

Interesting

The team that was having problems with Prototype response codes found a partial solution.

They sometimes call abort() on the request which triggers the callbacks with a 0 response code. They found that if they set transport.onreadystatechange = function() {}; before calling abort() they could skip the callbacks, and manually call whatever clean-up they needed. That Prototype interprets 0 as a success still sounds strange.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Jacob Maine

SF Standup 3/3/2010: Disappearing response codes

Jacob Maine
Wednesday, March 3, 2010

A Palm project uses Prototype for their ajax calls. They noticed that Prototype casts low-level errors (network errors, etc.) to a response code of 0. Unfortunately, the rest of Prototype interprets 0 as “success”. When they hacked Prototype to interpret 0 as a failure, another darker problem emerged. In some cases, for example if they send two requests in rapid succession, even if both responses have 200 in their headers, Prototype will report the second’s response code as 0. So, 0 can indicate success or failure in different scenarios.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Topics

  • agile (783)
  • rails (117)
  • testing (90)
  • ruby (86)
  • ruby on rails (71)
  • jobs (62)
  • javascript (59)
  • techtalk (44)
  • ironblogger (42)
  • rspec (39)
  • bloggerdome (34)
  • productivity (34)
  • activerecord (30)
  • rubymine (30)
  • git (29)
  • gogaruco (29)
  • nyc (27)
  • design (24)
  • mobile (23)
  • pivotal tracker (22)
  • process (21)
  • cucumber (21)
  • jasmine (19)
  • ios (18)
  • tracker ecosystem (17)
  • webos (17)
  • objective-c (17)
  • fun (16)
  • android (16)
  • palm (16)
  • ci (16)
  • "soft" ware (16)
  • bdd (15)
  • tdd (15)
  • cedar (15)
  • rails3 (14)
  • performance (14)
  • css (14)
  • gem (13)
  • mouse-free development (12)
  • selenium (12)
  • goruco (12)
  • bundler (12)
  • api (12)
  • keyboard (11)
  • meetup (11)
  • railsconf (11)
  • nyc-standup (11)
  • capybara (10)
  • mac (10)
Subscribe to prototype Feed
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Tools
  • 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 >