Read other people’s code

The best way to improve yourself as a human being is to absorb the insights of others.

Specifically for programming - read other people’s code!

I stumled across this nifty little method “all?” examining some FactoryGirl examples:

%w{ ant bear cat}.all? {|word| word.length >= 3}   #=> true
%w{ ant bear cat}.all? {|word| word.length >= 4}   #=> false
[ nil, true, 99 ].all?                             #=> false

Short URL for this post: http://tmblr.co/ZM2Vby3QTNM