Pivotal Labs

Tracker in agile project tool review post

edit Posted by Dan Podsedly on Wednesday August 27, 2008 at 08:32PM

Bruno Miranda posted a review of various agile project management tools including Mingle, VersionOne, TargetProcess, and Tracker. Check it out here.

We've let Bruno know that Tracker is actually under active development. One of the first new features that we'll be rolling out soon is a REST API, followed by various usability improvements that will make it easier to work with larger projects.

We're also looking for more suggestions on how to make Tracker better, especially in the area of higher level planning. Send your ideas to tracker@pivotallabs.com, or post them on Satisfaction.

And if you haven't tried it yet, the Tracker beta is fully open to the public, feel free to sign up.

Standup 08/27/2008

edit Posted by Jim Kingdon on Wednesday August 27, 2008 at 04:26PM

  • Does anyone have any experiences with one of the object mother libraries like object daddy? (Answers at standup were "no, we always wrote our own object mothers in a domain-specific way"). The appeal of a library is that it might help keep track of what needs to be done to make an object pass rails validation.

  • Clock.zone now has exists. (Background, pivotal has a Clock class which has a now method which can be implemented either by a call to Time.now for production, or a mock clock which lets tests specify the "time"). This is so that the rails 2.1 features like Time.zone.now have an analog in Clock.

How to tell Apple/DotMac/MobleMe Backup that .Trash is trash

edit Posted by Alex Chaffee on Tuesday August 26, 2008 at 07:14PM

First of all, fie on Apple for giving both their cloud storage service and their backup program names that are almost completely google-proof. They've recently corrected one of those by renaming "dot mac" to "MobileMe" but calling your backup program "Backup" is a great way to make it really hard to investigate. It's like, imagine how hard it would be to do a background check on someone named John Doe.

So I use the Dot Mac Backup and it works pretty smoothly, which is the second most important feature in a backup program. (The most important feature is the ability to actually restore files.) But then one day it said that to incrementally back up my "Home Minus Media" set -- the set containing my Home Folder, but excluding big-ticket items like Music, Movies, Backups, Downloads, and so on -- would require 63 DVDs. WTF?

It turned out that the problem occurred after I trashed a few old DVD rips that I had finished watching, and the culprit was the directory /Users/chaffee/.Trash. Seems like the UI was helpfully excluding it from the list of subdirectories of /Users/chaffee, it being a system file and all, so I couldn't mark it to exclude. That's OK, I think, I'm a power user, so I'll just check the box that says "Show invisible system files."

Except there's no such box. Try as I might, I can't find a way to exclude the Trash folder from the UI. I had to dig into the file system and edit Backup's own data file, as follows.

Standup 08/26/2008

edit Posted by Jim Kingdon on Tuesday August 26, 2008 at 04:14PM

  • Looking for options to maintain a website of technical documentation with the following:

    • A somewhat technical person, but not a programmer, must be able to maintain the site (think a technical manager or a tech writer).
    • I need to display code samples, so this should be easy/convenient
    • Somewhat skinnable (custom logo, custom fonts & colors)

    The ideal examples would be the google chart api or google maps api

    A possible solution is a wiki (mediawiki?). Something google-code-like gets extra points for the issue tracker. Google groups gets points for the mailing list. Google sites seems like is might be a decent basic option (it's easy to point a CNAME at it too).

    Experience reports/recommendations appreciated.

  • Rails hackfest is on through the end of August. Get points for getting patches accepted, and win prizes.

Continuous Integration - in a Box: exploring TSTTCPW

edit Posted by Chad Woolley on Saturday August 23, 2008 at 10:45AM

I just released cinabox. It is intended to be The Simplest Thing That Could Possibly Work to set up a Continuous Integration (CI) server, using cruisecontrolrb (CCRB).

Watch the Screencast!

Cinabox Screencast

In addition to being a (hopefully) useful tool to help people easily set up CI systems for various platforms and languages, it is also an experiment in simplicity and minimalism:

  • The project consists of only two simple scripts, one shell script to bootstrap ruby, and one ruby script to set up cruisecontrolrb.
  • In the script, readability and simplicity are favored over clever abstractions and DRYness. Hopefully, even people who don't know shell scripting or Ruby can read the scripts and easily understand the commands it is executing.
  • A standardized environment is assumed: A dedicated Ubuntu 8.04 system, Ruby 1.8.6, and latest dependencies via aptitude. PCs and Virtual Machines are cheap, and Linux and CCRB are free. There's really no reason you shouldn't be able to run a dedicated CI box. If this environment doesn't work for you for some reason, the scripts should be self-explanatory enough that you can easily hack it up to work for your environment (and contribute your version back to to the project!).
  • I use the magic fairy dust of GitHub to eliminate build scripts, release scripts, packaging, versions, and pretty much all the regular boring overhead of a project. The README.txt is my only documentation. The GitHub "Download Tarball" link automatically provides packaging and uniquely-named packages (by the git hex commit id) for each "release".

I'm pretty pleased with how this turned out. I hope it will lower the barrier for people to start trying out Continuous Integration, as well as provoke some thought about simplicity and minimalism. I've tried it out on a few flavors of Ubuntu VMs and my personal box, and it works for me. Please let me know what you think, and feel free to offer any suggestions for improvement.

Standup 08/21/2008

edit Posted by Jonathan Barnes on Thursday August 21, 2008 at 04:57PM

Interesting Things

  • APIdock.com is a web app that provides a rich and usable interface for searching, perusing and improving the documentation of projects that are included in the app.

Standup 08/20/2008

edit Posted by Jonathan Barnes on Wednesday August 20, 2008 at 04:36PM

Ask for Help

"We are getting 504 Gateway errors and we thing it is because our mongrels are freezing up do to inability to allocate memory, what to do?"

Without more info on the problem a few possibilities were suggested, such as the OS might be swap thrashing or the OS has no more memory to allocate.

One suggestion is to cut down your swap space to 0 in an attempt to verify that your mongrels are asking for too much, basically remove to OS swapping memory to disk from the equation.

Another suggestion is to boost your swap up to some insane size, also to take it out of the equation, the theory being that we know mongrel can leak memory, we trust the OS to keep the used memory in RAM, and we have plenty of disk space, so why put your OS in the position of not grating a mongrel what it is asking for.

Both solutions above don't seem ideal but, whatever, we are pragmatists, and if we combine those with periodic monitoring of the system using top/ps/vmstat, at least your mongrel can keep running and this may give you time to figure out why mongrel may be so memory hungry

Standup 08/19/2008

edit Posted by Jonathan Barnes on Tuesday August 19, 2008 at 04:25PM

Interesting Things

  • If your wanting better out-of-the-box error messaging you can use one or both of the following plugins:
    • active_record_full_messages_should_be_nicer
    • validates_associated_displaying_associated_errors

If you choose to use both however ORDER DOES MATTER (use the order specified above) otherwise the validates_associated one just doesn't seem to work.

  • Hash Iterations is very expensive (this includes my_hash.keys and my_hash.to_a etc...). We think this is related to the way hashes are stored in large, sparsely populated hashtables. If you can, avoid iterating over a hash, and if you must, try using a SequencedHash (which is provided by the collections gem) which solves this by storing hashes as both traditional hashtables and arrays, allowing for fast random access (the hashtable) as well as fast iteration (the array).

Ask for Help

"We want to load a different set of libraries for our selenium test than our regular tests. We tried to create a 'selenium' environment and pass that to the rake:test task but that didn't work, anyone know why?"

You cannot run in non 'test' environment with the rake tasks as the 'test' environment is hard coded into the test task, and passing a different RAILS_ENV seems to only have the effect of telling the 'test' environment what database to base it's schema off of.

Proposed work around - pass a second environment variable e.g. selenium=true and switch on that. (it's not ideal so we are still open to better solutions)

Standup 08/11/2008

edit Posted by Joseph Palermo on Monday August 11, 2008 at 04:33PM

Interesting Things

  • If you have a "target" method on your model, things will get a bit weird when you try to access this method through an association. Since associations have their own "target" method, you actually need to call assocation.target.target, or probably better, don't create methods called "target".
  • Since Time.now always returns the time for the local timezone, if you use it in your fixtures, but then have your app running under a different time zone, the times in your fixtures will be incorrect. Use the active support helpers such as 0.days.ago instead, or if you have a timezone configured in your environment, you can use Time.zone.now

Ask for Help

"How can I test the route helpers in RSpec? If I'm passing a complex set of options to a helper I'd like to test that it's giving me what I expect."

Nobody had any serious suggestions, although many humorous testing scenarios were mentioned.

Standup 08/08/2008

edit Posted by Sean Beckett on Friday August 08, 2008 at 04:27PM

Interesting Things

  • When using time zones in Rails 2.1, if you specify a zone, any datetime ActiveRecord attributes will be returned in that zone. E.g. if you specify Eastern Time, and then later request changed_at from an ActiveRecord, it will be returned in ET. However, if you ask for Time.now it is always returned in the local time zone, regardless of TZ settings. This isn't necessarily bad or unexpected behavior, but it can lead to test failures if you save a time to an ActiveRecord, get it back, and then compare the values. One workaround is to use Time.zone.now, which will always respect the current time zone, although this doesn't help with large existing codebases.

Ask for Help

"We're FlexMock for some of our Test::Unit unit tests, and recently added some new tests; nothing that is exercising new parts of the code or creating new mocks. However, for some reason when we call previously existing mocks we get errors from Rspec. These are not exceptions or assertion failures, but full-stop errors as if there were a syntax error. Turns out Rspec reopens the Test::Unit::TestCase class and overwrites some behavior, although the cause of the errors remain entirely unclear. Anyone know why it would do that and how to prevent it in the future?"

A few people mumbled about Rspec magic, but actual help was not immediately forthcoming.

Other articles: