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  to plan out a few months worth of work. … Read more
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…
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
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.
class Foo < AR::Base belongs_to :wibble, polymorphic: true end class Bar < AR::Base has_many :foo, as: :wibble end class Baz < SomeSubclassOfActiveRecordBase has_many :foo, as: :wibble end
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.
- 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 ...
$ rvm install 1.9.3-p0 --with-gcc=clang
... which points an explanation on RVM's issue tracker .
Advice for Rails Performance Optimization
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