Long-time Pivot Joe Moore had to learn how to effectively remote pair with developers across the country. He shares the lessons he’s learned about the technologies and personal interactions that allow him to remote pair 8 hours a day without going mad.
WebMock 1.7 is out! Danny Burkes had written a gem/monkey-patch for previous versions of WebMock that allowed you to disable or enable it at will. The latest version of WebMock now includes such functionality, and fixes a bug with selenium-webdriver; Danny suggests upgrading WebMock over using his gem.
With all of the chaos on BART as of late, commuters headed to East Bay are in need of alternative transportation. Good news: you don’t have to rely on BART!
- The Alameda/Oakland Ferry leaves the Ferry Building periodically (here’s the schedule), and gets you to Oakland in 35 minutes. From there it’s easy to hop on BART and get home!
- AC Transit is proving to be equally reliable; the FS line leaves at 6 and 7pm and gets to Berkeley in 20 minutes, with a BART stop a short walk from there.
Ask for Help
“Where in SF should I get a pre-paid SIM card?”
A lot of Pivots in the SF office are visiting from abroad; today we had Mike from our Singapore office wondering how he can get an affordable cell plan while he’s here. The T-Mobile store at 845 Market seems to be the best place.
- Google bought Motorola Mobility! It seemed quite a few people had never even heard of this branch of Motorola before (myself included), so it was interesting to learn that Google spent $12.5B on an unknown branch. It turns out, however, that Motorola Mobility is actually just the mobile devices division of Motorola.
- Ian and Max are joining us as new Pivots! Welcome.
- Mike is visiting from the Singapore office for one month — enjoy SF!
Ask for Help
A [recent?] change to Rails 3 moved
helper :all from the default
ActionController::Base — which would be fine, except that there’s little documentation on how to override this (for example, when you don’t want all helpers included in your controller class)
There is a lesser known method from AbstractController::Helpers
# Clears up all existing helpers in this class, only keeping the helper # with the same name as this class. def clear_helpers
You would think that since
helper :all is being called from the base class, there would be no way to override it. Except for this little bit of code at the bottom of
def self.inherited(klass) super klass.helper :all if klass.superclass == ActionController::Base end
clear_helpers will “work” for all subclasses of
ApplicationController — which is everything you should care about. And the default, all helpers included, remains.
Artifice test pollution: The Lees ran into an issue where every fifth selenium test was failing. They tracked it down to using Artifice to stub responses in their tests. Since Webdriver communicates with the browser through http requests the stubbed Artifice responses were being received by Webdriver, causing unexpected behavior. Be careful stubbing with Artifice or you may accidentally stub all localhost requests.
Devise stretches: Todd found that you can speed up your test suite by turning down Devise’s level of password encryption in your testing environment. He got a 10% bump by including the following code in spec_helper:
Devise.setup do |config| config.stretches = 1 end
For more tips on cutting down your test suite’s run time:
Ask for Help
“What do you tell Rails the default timezone is if your database has no concept like that?”
The best solution was to convert all rows in your DB to UTC and set Rails to also use UTC. There are MySQL commands to convert whole databases over to UTC, and can be run overnight if necessary.
There is a new release of Fixture Builder!
- Supports Rails 2 and 3
- Supports using existing Rails style fixture files using
config.legacy_fixture = Dir[path_to_old_fixtures]in your fixture_builder.rb file
- Its better tested too!
- Go grab it at https://github.com/rdy/fixture_builder#readme
Rails 3 Helpers
Rails now includes all helpers across your project in controllers that extends ApplicationController. Apparently there isn’t a setting to override this behavior either, and this is a change from Rails 2 where the scaffold would just include a line at the top of your controller like
helpers :all which could easily be deleted.
- Malloc/Seg Faults in 1.9.2: A few developers have been running into Malloc/Seg Fault errors recently. The cause is yet to be determined.
At Pivotal Labs, one of the services we provide our clients is helping them interview and hire. Pivotal Labs and our clients place a strong emphasis on Agile development and its many aspects: Pair Programming, Test-Driven Development, rapid iterations, and frequent refactoring.
Below is the description for a Ruby developer position for Bookish, a new venture backed by some of the biggest publishers in the world, who are redefining the way people discover, explore, and interact with books and authors.
At Bookish our core platform is built in Ruby and Scala, with reading apps built on SproutCore. We love open source and seek to build meaningful contributions for the Ruby and Scala communities. We also run the NYC SproutCore meetup, which will feature Yehuda Katz in September.
This position starts as long-term contract and can become full time.
We love Agile when it’s sensible and foster a fantastic work environment in our 18th Street HQ, next to City Bakery. We have top of the line Mac workstations and accessories, Thursday social hours, Friday lunches, Xbox, and a nap room.
We are seeking creative, motivated ROR and JS developers to:
- Design and code highly interactive Web and Client-side UX with pjax and handlebars.
- Contribute to our test-driven culture and help automate everything
- Love being on a team that is pragmatic, clever, open-minded and hard-working.
- Prototype new approaches fast — deploy early and often.
- Troubleshoot and maintain critical production and testing environments. Diagnose and address issues whenever and wherever they occur.
- Run hard and reap the rewards with our tight-knit team.
- Help build our Ruby depth, mentor and be mentored, and learn a ton in the process.
- +1 for Rubyists interested in Scala and SproutCore
We seek Ruby and JS experience, but above all generalists who have lots of successes committing at every layer of the stack, ideally on consumer-scale apps. You must write well-structured, readable, well-documented and tested code. (Be able to show us samples of which you are most proud.)
- Ambitious, driven, and talented individuals who wants to work on hard problems
- Team player who feels at home in a flat-structured, highly collaborative and sometimes noisy environment.
- Strong opinions about BDD, testing, deployment, version control and dependency management
- Ability to balance beauty and pragmatism in your designs and code.
- Relational databases (Postgres 9)
- Linux: expert day-to-day facility
- Enjoy pair programming from time to time.
- Believe the only way to deliver quality fully engaging with all stake holders.
- Search (scoring functions, clustering, distributed indexing, etc.) with SOLR/Lucene
- Amazon Web Services (EC2, S3, EBS, etc.) and cloud infrastructure in general.
A minimum of 3 years applicable software engineering, with a trail of outstanding references from peers. Reference-able projects you have coded from stem to stern, of any size. Minimally a BA/BS in Computer Science, Computer Engineering or related field.
To apply please send the following to firstname.lastname@example.org:
- Cover email explaining why you want to join us.
- Resume (online, PDF, or plain text) and link to online profiles (Twitter, Github, StackOverflow, Quora, LinkedIn)
cycle(even, odd): Jonathan pointed out a method in rails that allows you to apply classes to the even and odd numbered indexes of collections, allowing you to easily apply zebra striping patterns to a collection. Peter mentioned the alternative CSS pseudo-selector “nth-child,” which does the same thing with CSS and properly recalculates in the case where you remove an element with AJAX. Unfortunately, nth-child does not work with IE so if you have to support IE, use cycles, otherwise use nth-child.
will_paginate 3.0: Ian mentioned that version 3 of the will_paginate gem was recently released. It now uses scopes, bringing it up to speed with Kaminari, another popular pagination gem.
home_run hates ActiveSupport: JT and Micah pointed out that if you’re adding a duration to a DateTime using home_run, like “DateTime.now + 1.day,” it doesn’t play well with ActiveSupport. It assumes that the number on the right is supposed to be days, which it converts to seconds 86,400 and then changes to days again(86,400 days). The ‘+’ operator has been fixed in edge rails, but not yet back ported. They pointed out that although it doesn’t read well, using #since on any instance of DateTime will act how you would hope the ‘+’ operator would.
Ask for Help
- Arel v2.1.5 is incompatible with mysql2 gem. Java/Android doesn’t have such problems. (Feel free to start a flame war below, but please resist the urge to compare DHH to Hilter or Gosling to Goebbels.)