Sean BeckettSean Beckett
New Tech Talk: Biodynamic Winemaking
edit Posted by Sean Beckett on Tuesday December 28, 2010 at 11:19AM

Vintner Jared Brandt of A Donkey and Goat winery was a technical product manager before the first dot-com crash. He and his wife spent a year in France learning biodynamic wine production methods before returning to Berkeley to found their winery. Jared discusses their approach to winemaking in this evening talk at Pivotal Labs SF.

See all our talks at http://pivotallabs.com/talks

Adam MilliganAdam Milligan
Colorized output for Cedar
edit Posted by Adam Milligan on Thursday December 23, 2010 at 01:43PM

Thanks to Sean Moon and Sam Coward Cedar now has colorized output on the command line:

Colorized Cedar report

If you'd like to display colorized output like this you can specify the appropriate custom reporter class using the CEDAR_REPORTER_CLASS environment variable. We do this in our Rakefiles, like so:

task :specs => :build_specs do
  ENV["DYLD_FRAMEWORK_PATH"] = BUILD_DIR
  ENV["CEDAR_REPORTER_CLASS"] = "CDRColorizedReporter"
  system_or_exit(File.join(BUILD_DIR, SPECS_TARGET_NAME))
end

You can set the environment variable in whatever way works for you. You can also set it to any reporter class you choose, so customize away.

Will ReadWill Read
Standup 2010.12.23: Heroku Loves Resque
edit Posted by Will Read on Thursday December 23, 2010 at 01:27PM

Interesting Things

  • Auto scaling of Resque workers on Heroku works great! Look for some factored code to come in the future to make setup even easier.
  • Be aware of what you name your queues in Resque - there is an implicit alpha-ordering when workers come looking for work. This isn't an issue if your workers and queues are 1:1, but if you venture off the path, then this might affect your ops.
  • sunspot_matchers have been gemified. "The goal of these matchers are to make it easier to unit test search logic without having to construct the individual fixture scenarios inside of Solr and then actually perform a search against Solr." Happy sunspot testing!

ctrl+z

And of course, Happy Holidays from Pivotal Labs!

Will ReadWill Read
Standup 2010.12.22: Heroku Improvements, IE Memory leaks, and GPL
edit Posted by Will Read on Wednesday December 22, 2010 at 10:17AM

Ask for Help

"What tools can one use to track down JS memory leaks in IE 7/8?"

Interesting Things

  • Heroku no longer has the "ouchie guy" when the site is down. You now get a much more plain, less "comic-sans" response page. You can also customize your error page.
  • Heroku also appears to have done some work around setting your site in maintenance mode. Hopefully these changes will make going in to maintenance mode more robust than previous experiences.
  • Juicer, a tool used for compiling/compressing JS, has a dependency on cmdparse which is currently under GPL. The author of cmdparse is awaiting response from all the committers so that he can release it under a more flexible license.

Helps

Is there a way to get MySql indexing to speed up queries involving greater and less than operators on date columns?

Postgres handles these operators a little bit better than MySql, but may not actually solve this problem.

Using millis instead of dates would give the DB the best chance of handling this scenario.

We are using Git's subtree merge facility instead of submodules to stay synced to a different repository for part of our project. How do we push changes back to that repo?

See Tim Connor's blog post "Git sub-tree merging back to the subtree for pushing to an upstream". Early in that post is a pointer to an article describing the the subtree merge operation. Tim goes on to explain how to push your changes back through the chain.

Interesting

  • Some cloud environments leave the names of temp files visible even when their contents are not accessible. Be sure to use obfuscated names for your temporary files!

  • The "Headless" gem allows you to easily set up an alternate "display" that allows programs to execute in a headless environment. See this blog post about how to use Headless to run Selenium tests on a CI box: http://www.aentos.com/blog/easy-setup-your-cucumber-scenarios-using-headless-gem-run-selenium-your-ci-server

  • Ccrb will bog down to painfully slow levels if more than a couple of CC Tray clients are pinging it repeatedly during a build.

  • Cron will not honor your .rvmrc file unless you do some work to set up the environment. If you set up your cron job like this:

0 6 * * * /bin/bash -l -c 'echo /home/someuser/.rvm/bin/rvm rvmrc trust ... && cd ... 

the -l & -c parameters cause bash to load your environment as if your were logging in before running the specified commands. Someone also mentioned that rvm-shell can be used as a solution to this problem.

Andrew CantinoAndrew Cantino
Extreme Pairing
edit Posted by Andrew Cantino on Tuesday December 14, 2010 at 01:31PM

Given the recent interest and discussions around pair programming, I thought that now would be a good time to write up my experiences doing dual-computer, in-person pair programming with Mavenlink at Pivotal Labs. Pivotal Labs is all about pairing and every team here pairs full time. Our standard setup is to have two developers at each workstation, with two mice and keyboards. On Mavenlink, we recently upgraded our workstations and decided to keep the older model around to try out dual-computer pairing, which we’ve nicknamed "Extreme Pairing."

One commonly-expressed frustration with pair programming is that of wasted time while doing especially rote programming, research, documentation reading, or printout debugging tasks. People read documentation at different speeds, or want to try different Google searches in parallel, for example. Generally, the benefits of pair programming greatly outweigh the downsides, and we pair full-time to decrease the risk of failing to pair when it would retrospectively have been of great value due to knowledge sharing or bug prevention. However, in an effort to minimize these inefficiencies, the Mavenlink team has been exploring dual-computer pairing.

What follows is not Pivotal’s standard pairing setup. Everyone on this team has years of pair-programming experience and we have each developed our own intuition for which corners can be cut and which cannot. The following is recommended for advanced pairs only -- it can make experienced pairs more effective, but may be hazardous for newcomers to the pairing environment! We never “Extreme Pair” when conducting interviews and revert to a more traditional setup in that context.

Extreme Pairing

Each of our two pairing desks house a beefy i7 27-inch iMac and a slightly older 24-inch iMac, each with its own mouse and keyboard, and linked bidirectionally with Teleport. We sit centered around the larger iMac and use the second computer when we have separable tasks during pairing, such as research, running tests, or looking up documentation. We still do traditional pairing 90%+ of the time and focus on never falling into the traps of soloing: email checking, distractions, siloed knowledge, and untested code. Having the second computer has allowed us to split our focus when we can do so while still both maintaining understanding and ownership of everything that is going on. This is most effective and appropriate when:

  • tracking down bugs; we are both able to apply different tactics simultaneously while talking to each other. This allows us to divide and conquer, then rejoin when we’ve made progress in our understanding of the base problem.
  • looking at docs; we can both read at our own pace and synchronize afterwards.
  • the non-driving pair can support the driver by setting up the context for an experiment, running rake tasks, etc.
  • googling and researching
  • optimizing, one person can track down issues with Query Reviewer or Rack Bug while the other can identify the underlying problems in the source.
  • browser testing and CSS tweaking in multiple browsers. In particular, we have found running windows in Parallels on the non-primary machine a boon to speed and productivity on the primary machine.
  • capturing stories in Pivotal Tracker

More generally, any time a task requires focus on two different places at once, we split it up and assist each other. I think of this as synchronization in multi-threaded code - we split and rejoin on separable sub tasks, while both continuing to perform traditional pair programming when viewed from the scope of a story. We never work on separate stories and tasks that last longer then a minute or so. Smoothly moving from traditional pair programming to separately googling, debugging, or CSS tweaking keeps us agile and efficient while maintaining all of the very-real benefits that we find to exist with traditional pair programming,

Does this sound like fun? Mavenlink and Pivotal Labs are hiring!

Phil GoodwinPhil Goodwin
Standup 2010-12-14: Testing re-directs
edit Posted by Phil Goodwin on Tuesday December 14, 2010 at 09:14AM

Helps

"How can I test route redirects in Rails 3?"

Capybara (a Webrat clone for Rails 3) will do the job but we're looking for something a little more direct. It may be possible to test this by checking location headers and disabling automatic redirects in tools might increase visibility.

Phil GoodwinPhil Goodwin
Standup 2010-12-13: Wonky numbering in Google Docs
edit Posted by Phil Goodwin on Monday December 13, 2010 at 09:14AM

Interesting

  • Google docs does not always render the numbering in Word documents the same way Word does, we had an experience where the first item was not numbered and all the rest were off by one.

Help

  • Some pivots are having trouble with a flash embed tag's scale attribute. The desired behavior is that the movie scale to fit the size of the element. According to documentation, this should just work. The flash content will not scale, instead the content is getting cropped.

  • Anyone have experience using Amazon RDS with Heroku?

    Several projects at Pivotal have used this combination with great success.

Interesting

  • A project had some intermittently slow queries. The problem was traced back to some large strings in one of the columns. The team solved this problem by overriding the default scope, and only selecting the expensive column when needed.

Tyler SchultzTyler Schultz
Standup 2010-12-09: Aggregating hudson builds, Time gotcha
edit Posted by Tyler Schultz on Thursday December 09, 2010 at 09:17AM

Help:

  • Does anyone know of a way to aggregate multiple projects into one hudson build? A pivot currently has 4 hudson projects that he'd like to show as one status. If any one project fails to build, then the build should go red, but hudson should still build the other three.

Interesting:

  • Time gotcha:

In 1.8.7 you'll see this:

 > Time.now
 => Wed Dec 08 22:26:37 -0800 2010

 > 1.day.ago
 => Wed, 08 Dec 2010 06:26:44 UTC +00:00

 > 1.day.ago.to_date
 => Wed, 08 Dec 2010

 > (Time.now - 1.day).to_date
 => Tue, 07 Dec 2010

In 1.9.2 you'll see this:

 ruby-1.9.2-p0 > Time.now
 => 2010-12-08 23:28:26 -0800 

 ruby-1.9.2-p0 > 1.day.ago
 => Tue, 07 Dec 2010 23:28:26 PST -08:00 

 ruby-1.9.2-p0 > 1.day.ago.to_date
 => Tue, 07 Dec 2010 

 ruby-1.9.2-p0 > (Time.now-1.day).to_date
 => Tue, 07 Dec 2010 

Other articles: