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

Standup 10/13/2010: Charting suggestions, rvm issues, spewing errors to hoptoad/newrelic

Pivotal Labs
Wednesday, October 13, 2010

Help

“Anybody have a favorite for charting on the client-side?”

Google charts works well for getting something simple going quickly, use Flot for anything beyond that. Some people mentioned the existence of Raphael.js, but nobody had much experience with it.

“We had to make sure we were using rvm as a function instead of a binary and-”

You installed it wrong – the install checks that rvm is a function.

“We are seeing a lot of errors (more than the hoptoad limits) going to hoptoad and newrelic for error types that are handled by rails built-in rescues, like 404s for ActiveRecord::RecordNotFound. The app is serving up the correct error page, but still sending an error to the services.”

These services hook in lower than that so they can get all error info. Make sure nothing happened to their config of which errors to ignore, because they have their own way of skipping them.

Also consider turning off the default route to cut back on crawlers. This would likely just trade 405s for 404s, though.

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

Standup 10/12/2010: checking in Gemfile.lock versus ruby version differences

Pivotal Labs
Tuesday, October 12, 2010

Help

“Yesterday we agreed to always check in the Gemfile.lock, but 1.8 and 1.9 versions differ slightly so…?”

It wouldn’t quite make sense to maintain a whole separate branch, but someone cleverly suggested making the file a symlink and having your .rvmrc manage which file the symlink points to.

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

Standup 10/11/2010: checking in Gemfile.lock, chef client-server, rspec test vs. develoment, and IE7 only quirks mode

Pivotal Labs
Monday, October 11, 2010

Ask for Help

“Does everybody check their Gemfile.lock into source control?”

Yes! Yehuda said so and if you don’t the earth might fall into the sun.

“Anybody have any experience using chef client-server?”

A number of people said they had seen it go down in flames and get ripped out of projects in favor of chef solo.

*”Is there a way to get IE7 to render in quirks mode, but IE8 and everything else in standards?”

Not that anybody knows of. IE6 can be triggered by an xml prolog before the doctype, but they fixed that for IE7. So your choices are IE6 and earlier in quirks and IE7+ in standard, or all IEs in quirks.

Interesting Things

  • A pivot had trouble with rspec being not be installed in development mode and getting rake spec to run right, but others had had no trouble with it in test env only.

  • You can do layouts in pure css that used to be a lot of work, like 100% height with fixed px headers/footers, using the display:table|table-row|table-cell styles.

This will work in the standards based browsers and IE8+. This means you need to use an alternative for IE7, either js, expressions in an IE only stylesheet, or a quirks-mode based layout using fixed padding. I experimented with this over the week-end and blogged about it: The new css 100% width and height with header and sidebar

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joseph Palermo

Standup 9/29/2010: ActiveRecord finders strings vs ints; Paperclip and S3 timeouts

Joseph Palermo
Wednesday, September 29, 2010

Ask for Help

“S3 is giving us 400 timeout responses on every first upload for a request. All subsequent uploads for the same request seem to work fine.”

This turned out to be a bug in the HEAD version of Paperclip. They added a fingerprint method that creates a MD5 hash out of the original file, but the method forgets to rewind the original file when done. So S3 times out while waiting for data, but then rewinds the file before trying again. So it does ultimately get uploaded, but it was leading to ~10 second delays in the middle of the request.

Interesting Things

  • Be careful when doing MyModel.find_by_column-that-is-a-string in ActiveRecord. If you pass it an integer it won’t do a type conversion and will pass it down to SQL as an unquoted integer. MySQL will then not use any indexes you have on that column. This is with Rails 2.3.x and MySQL 5.0.x
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Dan Podsedly

Defrosting your Icebox

Dan Podsedly
Tuesday, September 28, 2010

Pivotal Tracker makes it easy to add stories to you project. Hit Ctrl-A, type a quick sentence along the lines of “As a user, I can…so that…”. On most of our projects, we find ourselves discovering new stories all the time, based on the continuous feedback loop that Tracker encourages. Not all stories end up in the backlog, but it’s liberating to be able to capture new ideas and user feedback as they occur.

The downside of this is that the icebox, where all new and unprioritized stories live, can grow out of control very quickly. It’s not uncommon for longer lived, active projects to end up with hundreds, even thousands of stories on ice.

Yesterday’s Priorities

A large and growing icebox can be a burden. Your project takes longer to load, it’s harder to find that story you’re sure you added just a few weeks ago. It becomes harder to focus on the future, due to what feels like ever growing debt of promises and yesterday’s priorities.

In our eternal optimism as software developers, we like to hang on to our stories. We know we’ll have more bandwidth just as soon as we get through this month’s big release. Besides, we’re hiring, right?

Story Overflow

The reality is that on most software projects, the rate of new story discovery far exceeds the rate at which stories get completed. Typically, a new story in the icebox either gets prioritized and moved to the backlog fairly quickly (either immediately or in the next planning session), or it ends up staying in the Icebox indefinitely. New priorities have a way of displacing older ones.

Stories are perishable, and get stale over time, even when on ice (so to speak). It’s good practice to clean up your icebox regularly, and delete stories that have been sitting there for a while, and are unlikely to see the light of day any time soon. The old stories may have seemed really important at some point in the past, and involved the whole team spending hours in front of a whiteboard or a table full of cards writing them, but if the feature becomes a priority again in the future, you’re probably better off doing it again, based on all the new knowledge you’ll have by then. The important thing is the conversation and a fresh flow of ideas, not so much the stories themselves.

Export before Deleting

To preserve the ideas and any comment discussion in these old stories, it’s a good idea to export them before deleting them. You can do so by selecting them in the icebox via the selection boxes to the right of story titles, and using the Actions menu to export them. You can also export the entire icebox on the project Export CSV page, which is accessible via the Actions menu in your project.

Another option is to move old icebox stories from your active project to a separate project, which serves as a searchable archive. You can move stories from one project to another via the Actions menu as well.

We typically keep exported old stories in a Google Docs spreadsheet, shared with the entire development team. The flexibility of a spreadsheet makes it possible to slice and organize the stories in arbitrary ways, and the shared nature of Google Docs make it easy to for anyone on the team to go back and look for ideas from the past, even to re-import selected stories back into your Tracker project if it’s really needed.

Icebox as an Inbox

Use the Icebox as an inbox, for continuous review of new stories, rather than a permanent storage device. As new ideas, feature requests, and bugs come in, triage them regularly. If a new story is really important, for example a production bug, you’ll probably drag it into the backlog immediately. Otherwise, review newly created stories with the team at the next iteration review and planning session, and either estimate them and prioritize them (by dragging them to the backlog), or move them into a system better suited for long term storage, like a Google Docs spreadsheet or a more general purpose project management or issue tracking tool, like JIRA or Lighthouse. Tracker has built-in integrations with these tools, allowing you to bring back and link stories easily with drag and drop import.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joseph Palermo

Standup 9/27/2010: Careful with S3 wildcard certs and bucketnames

Joseph Palermo
Monday, September 27, 2010

Ask for Help

“Does anybody have solutions for a public sandbox?”

They want people to be able to modify their data, but want the data to roll itself back to the clean state at specific times, or after certain events have happened.

Some people are having problems with the latest RubyMine EAP build. When using our standard keyboard map they are unable to make new lines, they have to use Shift-Enter.

Interesting Things

  • People have good things to say about http://html5boilerplate.com/
  • A team ran into a problem with https and S3. Using the bucketname.s3.amazonaws.com syntax instead of the s3.amazonaws.com/bucketname syntax can fail when using https if your bucketname has too many segments. This is a known limitation of wildcard certificates.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup 09-24-2010: Facebook Outage => Red Builds

Pivotal Labs
Friday, September 24, 2010

Ask for Help

“Facebook(or other third party service) is down, and my build is broken. What should we do about this?”

Without extensively mocking Facebook, some of our projects have separated tests that require any third parties. Then, you can accept builds even if tests from that collection fail.

“How to remove errors from validations?”

The best way to handle this is to disable the validations in question by overriding them, though in some cases it may require you to dive deeper into ActiveRecord. Most likely you want to refactor to not have to do this, and if its a plugin you’re using, modify that. Our own Socialitis project is rumored to include code to accomplish this as well.

Interesting Things

“document.execCommand”

Adam has been doing work with execCommand, which may be useful to you if you’re trying to add text editor-like features to your webpage.

“range.surroundContents”

If the end of your range has an empty element, surroundContents can choke. The best thing to do is programmatically alter your range when it is in this situation, or you may get an exception about a “partial selection”. Also, you’ll need to be careful to insert the right sort of node depending on the contents of your range as to not introduce invalid markup into your page.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Davis W. Frank

Jasmine in Rails 3

Davis W. Frank
Thursday, September 23, 2010

UPDATE: We’ve released a new version of the Jasmine Gem and these steps are no longer required. Please see the announcement here


Bad news, everyone! At the moment, the released Jasmine gem is not yet Rails 3 compatible.

Good news, everyone! We now have a short term workaround while we deal with the work needed to work seamlessly with Rails 3.

The Jasmine gem is the easiest way to integrate Jasmine into your web project, including Rails. It adds auto discovery of source & spec files, a tiny Rack app for running them, and a Continuous Integration task (using Selenium) to run your tests on every check in. We use this gem on all of our Rails projects today.

It uses RSpec to gather results from JavaScript making them available at the command line or part of your build results. And RSpec 2, which is required for Rails 3, has changed its interface. So the Jasmine gem is broken with Rails 3. We know what we need to do to fix the this, but until then here’s the workaround.

But what if I’m not using Rails?

This fix is only for Rails 3. If you project is not using Rails or does not require RSpec 2, then you can ignore this post.

How the fix works

We’re going to use Bundler to install the Jasmine gem from a local repo copy of a branched version of what’s on Github. Got it?

The Fix

Once you’ve already created your Rails 3 project, here’s a script that does the right things to vendor the Jasmine gem:

What you see above:

  • making a vendor/gems directory if you don’t already have one
  • getting the Jasmine gem code: cloning the Jasmine gem, getting Jasmine itself (as a submodule), then getting & checking out the correct branch
  • copying some files from the Jasmine repo up into the gem’s directories (a step Bundler can’t do for us)

Once this is done, you need to add this line to your Gemfile, likely in a test group (if you have one):

gem 'jasmine', :path => 'vendor/gems/jasmine'

Run a bundle install to get the Jasmine gem installed.

cd ../../..
bundle install

Now you can run the generator to make your Rails project a Jasmine project.

bundle exec jasmine init

Try running the example Jasmine specs:

rake jasmine

…and hit http://localhost:8888. You should see 5 specs pass.

Now you’ll need to edit jasmine.yml and point to your source, spec, and helper files. Delete the example files once you get your specs up and working.

Lastly, you need to check in the Jasmine gem source into your project so that other development machines and your CI box can run your Jasmine specs.

  • Remove the .git directories in vendor/gems/jasmine and vendor/gems/jasmine/jasmine
  • Remove the .gitignore files in vendor/gems/jasmine and vendor/gems/jasmine/jasmine
  • Add vendor/gems/jasmine to your repo directly (git add vendor/gems/jasmine)

That should do it.


UPDATE: There was an issue in the repo branch that has been fixed.

Using these instructions the first time, you should be fine.

If you’ve already run them, then you need to:

cd vendor/gems/jasmine
git pull
cd ../../..
bundle install

And then rake jasmine:ci should work fine.

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

Standup 09-23-2010: ActiveRecord, Cucumber, and JS error info

Pivotal Labs
Thursday, September 23, 2010

Ask for Help

“Rails 3 / mysql2 gem: Errors from ActiveRecord due to DB handler going bad while running Cucumber tests. What to do?”

Cucumber does some forking, which may result in your connection being shared in multiple processes, which in turn results in Bad Things©. There may be a way to disable this behavior in the Cucumber rake task. A blunter, less desirable solution may be changing ActiveRecord to reconnect more frequently.

“How do I get HopToad-like errors back from my client-side Javascript?”

Put an error handler on document. You could make an AJAX request back to your server from there to send debugging information. Alternatively, making an AJAX request at the time of your error may not be safe, so you can also put a request in the source tag of an image or script tag, and this may be more reliable.

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

Standup 09-21-2010: Ugg boots revisited

Pivotal Labs
Tuesday, September 21, 2010

Ask for Help

“Any issues with git-submodules in projects?”

Comments from Pivots regarding git-submodules:

  • Heroku doesn’t currently support them
  • You could use Bundler to include your potential submodules as a dependency.

“What do we do about spam on our blog posts? Disable comments?”

Our blogs have a forthcoming spam filtering service. Hopefully we will see this deployed soon! Until then, filtering is manual.

“What are people using for role-based permissions?”

  • declarative_authorization plugin
  • CanCan plugin is noted to be possibly a lighter weight solution for simpler cases.

Interesting Things

  • Enabling auto-flushing in Rails 3 should be done with care, as it can cause exceptions to be thrown when combined with nested permissions in possibly unexpected places.
  • When using default_scope, there is still issues with ordering your scopes in Rails 3.
  • Rails 3 automatically escapes user input thus adding a layer of protection against XSS attacks.
  • 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 agile Feed
  1. ←
  2. 1
  3. ...
  4. 33
  5. 34
  6. 35
  7. 36
  8. 37
  9. 38
  10. 39
  11. ...
  12. 79
  13. →
  • 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 >