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

Standup 01/02/2008

Joe Moore
Wednesday, January 2, 2008

Interesting Things

  • Rails tweaking: test startup times can be very slow due to Fixture loading, especially for HABTM. We monkey-patched the Fixture-loading code that handles HABTM, resulting in a test suite performance increase of 300% for one project! We’ll submit the patch to Rails core and keep you posted.

Ask for Help

  • “Does anyone know an efficient algorithm for detecting overlapping rectangles made of up latitudes/longitudes… in SQL?”
    Or, in other words, detecting if two selections on a map overlap. The latitudes and longitudes are stored in a MySQL database. MySQL has some GIS features that we’ll explore.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup 12/28/2007

Pivotal Labs
Friday, December 28, 2007

Interesting Things

  • Rails Bug: Test::Unit seems to be broken in Rails 2.0.2 when using multiple levels of test classes (i.e. inheritance). Trunk is fixed, so Rails 2.0.3 will be fine.
  • Chad wrote a small utility for checking/comparing Rails versions which wraps the version checking part of rubygems. This, of course, requires that your Rails project uses at least one gem… that’s a pretty good bet.

    The basic technique:

    have = Rails::VERSION::STRING
    requirement = '=1.99.1'
    Gem::Version::Requirement.new([requirement]).satisfied_by?(Gem::Version.new(have))
    
  • One pivot is having trouble finding a rogue puts statement in a gem somewhere. The suggestion comes a bit late in this case, but adding some breadcrumbs may help next time:

    puts "#{__FILE__}:#{__LINE__} find me!"
    

Ask for Help

  • Does anyone have details regarding Google Maps API developer permissions? Localhost-to-localhost requests work fine, but we need to test things between machines (actually, a virtual machine client and virtual machine host).
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Alexisms

Alex Chaffee
Wednesday, December 26, 2007

Sayings I use, only some of which are actually originally attributable to me. Anyone with research on a saying’s provenance, feel free to comment. This page, unlike a normal blog entry, will be updated as needed with stuff I find myself saying with air quotes.

A comment is a lie waiting to happen.

“Legacy” means any program that people are actually using.

(Feathers: “Legacy” means “no tests.”)

If you try hard enough, you can make anything fail.

There’s no such thing as human error. (Only system error.)

If you pay attention to something, it gets better.

It’s always a people problem. (Jerry Weinberg)

You can see a lot by looking. (Yogi Berra)

Yogi wrote a book called “You Can Observe A Lot By Watching” but I prefer to think he was misquoting himself.

Language Log has a take on this quote: She was seeing at me

Object-Oriented Programming is like teenage sex: everyone says they’re doing it; few actually are; and those who are rarely know what they’re doing. (Anonymous, via Misko)

Here’s a simple test for whether you’re doing it right: Is your data in the same class as the methods accessing it? Oh, really? Check again.

Double negatives are not unconfusing.

Encapsulation means putting similar things together, and keeping dissimilar things apart.

Of course, the trick of design is knowing along what axes to group or differentiate items. One rule of thumb that has served me well since the days of Gamelan — when we were sorting dozens of incoming applets per day into categories — is:

Don’t look at the item and think, “What category does this item belong in? Look at the category and think, “If I were looking for items in this category, would I want to find this item?”

In other words, make your API fit the mindset of the user, not that of the provider.

Conway’s Law: “Any piece of software reflects the organizational structure that produced it.”

Or, “The structure of the code reflects the structure of the coders.”

Read the error message.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Scrum Diagram

Alex Chaffee
Wednesday, December 26, 2007

Good Scrum diagram. Suitable for XP too (replace “sprint” with “iteration” and “daily scrum” with “daily standup”).

Courtesy of Mountain Goat Software

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joe Moore

Standup 12/21/2007

Joe Moore
Saturday, December 22, 2007

Interesting Things

  • Josh read Coda Hale’s interesting blog post about test driving (or rather, RSpec driving) his rake tasks:

    I love RSpec, and lately I’ve been making the transition from test-friendly development to full-on spec-driven development… I was working on a project recently which boiled down to “run these tasks in this order,” which is a natural fit for Rake.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joe Moore

Standup 12/20/2007

Joe Moore
Friday, December 21, 2007

Interesting Things

  • Video Lunch: Once in a while, you just want to see something cool. So on days when nothing else is going on, we show interesting videos during lunch, such as TED Talks or Videos from the Googleplex. Today, we’ll watch these:
    • TED Talks: Blaise Aguera y Arcas: Jaw-dropping Photosynth demo
    • TED Talks: Aubrey de Grey: Why we age and how we can avoid it
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joe Moore

Standup 12/19/2007

Joe Moore
Wednesday, December 19, 2007

Interesting Things

  • Rails Bug: composed_of seems to be broken, at least in Rails 1.99. The :mappings parameter states that it can take an array of symbol-pairs, but symbols do not work — only strings work. Example:
    Does not work:
composed_of :name
            :class_name => Name
            :mapping => [
                [:first_name, :first], # :symbol, :symbol does not work!
                [:last_name,  :last]  # :symbol, :symbol does not work!
            ]

Works!

composed_of :name
            :class_name => Name
            :mapping => [
                ['first_name', 'first'], # 'string', 'string' works!
                ['last_name',  'last']  # 'string', 'string' works!
            ]
  • Ruby ain’t Java! A recent Java-convert ran into the following: when calling a private instance method, you must not indicate self.private_method, but instead call private_method. Example:
Class PrivateCaller
    def call_private_here
        puts private_method        #=> works!
        puts self.private_method  #=> self?  uh oh!
    end

    private

    def private_method
        '*** You Called? ***'
    end
end

>> priv = PrivateCaller.new
=> #<privatecaller:0x14ec39c>
>> priv.call_private_here
*** You Called? ***
NoMethodError: private method `private_method' called for #</privatecaller:0x14ec39c><privatecaller:0x14ec39c>
        from (irb):4:in `private_caller'
        from (irb):23
        from :0
</privatecaller:0x14ec39c>
  • TextMate’s Ruby on Rails bundle does not work correctly with Rails 2.0.
  • RubyGems 0.95 is not compatable with geminstaller, written and maintained by our own Chad Woolley. Chad and the Gems folks are already on the case.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joe Moore

Standup 12/18/2007

Joe Moore
Tuesday, December 18, 2007

Ask for Help

  • “Please help feed the hungry of San Francisco.”

We helped! Our barrel is over flowing.

Food donation barrel overflowing

Food donation barrel overflowing

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joe Moore

Standup 12/17/2007

Joe Moore
Monday, December 17, 2007

Interesting Things

  • Rails 2.0 *blink* Rails 2.0.1 *blink* Rails 2.0.2 was released. This includes at least one Pivotal patch:

    Fix that validates_acceptance_of still works for non-existent tables (useful for bootstrapping new databases). Closes #10474 [hasmanyjosh]

  • Brown bag lunch: Today two folks from Sun will visit to tell us about their Glassfish and JRuby projects.

  • We have launched our replacement for Pivotal Blabs — Pivots, the Pivotal Labs network. This is a showcase for our own social networking platform. Check out everyone’s individual blogs here.
  • Several projects have written Javascript that catches errors and makes an AJAX call to the server, logging that error for future debugging. More on this later.

Ask for Help

  • “Can someone please help me set up my Capistrano 2.0 deploy?”
    Sure! He was having an issue with SVN dropping the connection during the initial project setup. Breaking down the command and running each step individually seemed to do the trick.
  • “Does anyone know a good Chinese delivery option near 3rd and Market?”
    Really… any suggestions?
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joe Moore

Thoughts on Linus Torvalds's Git Talk

Joe Moore
Wednesday, December 12, 2007

At Pivotal Labs last week we watched Linus Torvald’s Google talk about Git, the Source Code Management (SCM) system he wrote and uses to manage the Linux kernel code.

I’ve watched it twice now and here are some thoughts, based on quotes and themes from the video.

“I Never Care About Just One File”

Linus stated that one of the reasons Git was wonderful for him is that, as a high level code maintainer, he needs to merge thousands of files at once. In fact, he stated that he never cares about just one file.

Not so for me. As an in-the-trenches developer, my whole life is caring about just one file, over and over again. When I merge, I care about each file because, since I work on small teams and with small codebases, there is a fairly high likelihood that my changes will collide with those from another developer.

“The Repository Must Be Decentralized…. You Must Have a Network of Trust”

Linus made the point that central repositories suck for large projects where the morons must not have commit access — only the super privileged are allowed to commit code back to the repo. He argues that Git is better because it is a decentralized network of repositories — there is no central master, only Some Dudes who have repositories. Usually there is Some Dude In Charge, like Linus, and everyone tends to pull code from them. To update the “master” code version, Some Dude In Charge pulls code from the repositories owned by Some Other Wicked Smart Dudes, who have most likely pulled code from Some Other Trusted Dudes (And One Gal), and so on. Thus, rather than limit access to just the hand-selected few, everyone has their own local copy of the repository, and the smart merge from the smart who merge from the smart, resulting in some kind of official or de facto version.

While I like the local copy of the repo idea, Pivotal does not work the way Linus describes… but Pivotal is weird, in a good way. We all have full commit rights. Our network of trust is everyone. The Dude In Charge is named Continuous Integration. CI makes the official versions. CI runs the tests. CI makes sure that the deploy process works. I’m sure that we could coerce Git into working in a centralized-like way, where it merges automatically from the individual developers and runs the builds, but I’m not sure if that would be forcing a square peg into a penguin-shaped hole.

“Some Companies Use Git And Don’t Even Know It”

Linus described how developers at some companies use Git on their development machines, committing their changes and merging fellow developer’s changes with Git, then pushing those changes to central SVN repos. He rather mocked this, but it actually sounds like a good solution: developers merge, so use the tool that’s good at that. CI machines and deploy machines love centralized master repositories, so use that for those jobs.

“It Does Not Matter How Easy It Is To Branch, Only How Easy It Is to Merge”

Well said. I never thought about that before but he is completely right. I could never put my finger on why I never branch in SVN, even though it’s practically ‘free’ and easy to do. Now it’s obvious: who cares how easy it is to branch when merging sucks? Git is supposed to make merging incredibly easy because Git is content-aware rather than just file-aware… or something like that. I’ll believe it when I see it, but if Git really does make merging highly divergent branches easy then I’ll give it a try.

Joe’s Take

I’d like to try Git, especially if it makes branching and merging those branches as easy as Linus suggests, but I don’t think that Pivotal would get as much benefit out of it as large, distributed open source projects. A ‘really big’ project might have 10 developers, not thousands, and all must have commit rights. Our network of trust goes like this: if you are here, we trust you; if we don’t trust you, you have to leave. And the idea of having to merge directly from my fellow developers sounds like a pain in the ass… why would I want to merge from 3 separate pairs when I can pull code from the central repo and be reasonably sure (thanks to CI) that it is clean and green? Hopefully I’ll be able to answer those questions soon by using Git on a project.

(Note: originally posted on my personal blog at http://40withegg.com/2007/12/11/thoughts-on-linus-torvalds-s-git-talk)

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Topics

  • agile (780)
  • rails (113)
  • testing (88)
  • ruby (83)
  • ruby on rails (70)
  • jobs (62)
  • javascript (55)
  • techtalk (44)
  • rspec (38)
  • ironblogger (32)
  • productivity (30)
  • activerecord (29)
  • gogaruco (29)
  • git (28)
  • nyc (27)
  • rubymine (26)
  • bloggerdome (23)
  • mobile (22)
  • process (21)
  • pivotal tracker (20)
  • cucumber (20)
  • jasmine (19)
  • design (18)
  • ios (18)
  • webos (17)
  • objective-c (17)
  • android (16)
  • palm (16)
  • "soft" ware (16)
  • fun (15)
  • tracker ecosystem (15)
  • ci (15)
  • cedar (15)
  • rails3 (14)
  • performance (14)
  • bdd (14)
  • gem (13)
  • css (13)
  • tdd (13)
  • selenium (12)
  • goruco (12)
  • bundler (12)
  • meetup (11)
  • railsconf (11)
  • nyc-standup (11)
  • capybara (10)
  • mac (10)
  • mojo (10)
  • chef (10)
  • api (10)
Subscribe to agile Feed
  1. ←
  2. 1
  3. ...
  4. 66
  5. 67
  6. 68
  7. 69
  8. 70
  9. 71
  10. 72
  11. ...
  12. 78
  13. →
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • 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 >