Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

Adam Berlin

Posts By

Learning Languages and Frameworks

You’re getting an itch 

So, you’ve been programming for a while now, but you’ve been using one stack.  Let’s say you’ve been building web applications with Java, Javascript and HTML.  New languages or frameworks seem like fun, but you are…

Read more

Read More

Whiteboard Architecture

You have a vision of your system’s architecture in your head. How do you share that with your team?

Do Whiteboard Architecture. At Pivotal Labs, our teams do Agile Inceptions [1] to plan out a few months worth of work. …

Read more

Read More

Mini Refactoring Pair Programming Backlog

Here at Pivotal Labs, the engineers practice Extreme Programming, which means our teams write automated tests, we do pair programming, and we continuously refactor.

In the past, I’ve been overly eager to refactor.  I have had:


several refactorings in…

Read more

Read More

Pivotal NYC Software Design Lunch: Single Responsibility Principle

Recently, some like-minded engineers at Pivotal NYC started to get together to discuss software design. Our topics so far have included agile architecture, emergent design, and other related topics. This month, we’re focusing on a topic that comes up often …

Read more

Read More

Searching for BDD patterns in Python

I’ve been writing automated tests in a Test Driven Development style for about 6 years now. Much of my experience comes from working in frameworks like rspec in Ruby, mocha in Node.js, or jasmine for client-side Javascript. These frameworks have …

Read more

Read More

NYC Standup – February 27th, 2012


Monit + 'check program' + Zombies

from Dave Goddard

Monit recently introduced a new type of service to check ; "check program" which will run a script each cycle (or specified number) and will end up being good or bad depending on the exit code. After we started using this, we noticed that the script was often marked as a zombie on the machine ; at first we blamed the script, but eventually discovered that this is expected behaviour by monit, and that monit is planning to fix it RSN (real soon now)

Polymorphic Associations and Active Record Subclasses

from Adam Milligan

If you have a polymorphic association, Rails will use the base class of the parent of the association (as defined by ActiveRecord) as the class name of the associated parent.

For instance:

class Foo < AR::Base
  belongs_to :wibble, polymorphic: true

class Bar < AR::Base
  has_many :foo, as: :wibble

class Baz < SomeSubclassOfActiveRecordBase
  has_many :foo, as: :wibble

The class of the wibble association when instantiated for Bar will be Bar.

The class of the wibble association when instantiated for Baz will be SomeSubclassOfActiveRecordBase, not Baz, unless SSOARB.abstract_class returns true.

Read More

Installing Ruby 1.9.3 w/ RVM on Mac OSX Lion

  • Ruby 1.9.3
  • RVM 1.10.0
  • Mac OSX 10.7.2
  • XCode 4.2

Our team ran into an issue installing Ruby 1.9.3 on Lion today. When running...

$ rvm install ruby-1.9.3

... the installer fails with an error message including "checking whether the C compiler works... no" even though we had XCode and gcc installed.

After some reading on StackOverflow and Github I found this solution [1]...

$ rvm install 1.9.3-p0 --with-gcc=clang

... which points an explanation on RVM's issue tracker [2].


Read More

Don't Sweep It Under the Rug

Advice for Rails Performance Optimization

Upcoming Launch

Recently, our team releasing to a large set of users and needed to ensure that our application could meet the performance needs of the new users. Launch day was a month away. Months of steady Agile feature development needed to meet a healthy amount performance engineering.

We started with a few goals in mind. We wanted:

  • data-driven improvements
  • to prefer simple performant code to complex caching strategies
  • to use available tools to provide visualization for badly performing requests

Read More