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

Does the set of all sets contain itself?

Pivotal Labs
Tuesday, April 3, 2012

No.

$ irb -r set
1.9.3p125 :001 > set = ObjectSpace.each_object(Set).to_set
 => #<Set: {#<Set: {...}>}>
1.9.3p125 :002 > set.include?(set)
 => false

However, the Enumeration of all Enumerations does contain itself.

1.9.3p125 :001 > e = ObjectSpace.each_object(Enumerator)
 => #<Enumerator: ObjectSpace:each_object(Enumerator)>
1.9.3p125 :002 > e.include?(e)
 => true

Why this is so is left as an exercise to the reader.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Standup 3/8/2012

Pivotal Labs
Thursday, March 8, 2012

Help

Standup Retrospective
1 week from today at lunchtime (3/15/2012 12:30)

Do I Really Need jquery-ujs.js

If I’m never going to do a remote form do I still need it?

RAILS_ENV for JavaScript project

Need a way to differentiate between development/production environments.

Thought about using hostname, ie localhost vs another hostname

Interesting

EC2

EC2 now supports 64bit instances for all instance types

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Standup 3/7/2012

Pivotal Labs
Wednesday, March 7, 2012

New Faces

No new faces today

Help

What is the approved way of finding out if a migration is pending? Trying to avoid Heroku restart.

Interesting

Heroku + submodule: .slugignore is your friend!

Onsi says:

Heroku supports git submodules! However, when building your slugs it includes the .git directory in your submodules. This unnecessarily inflates the slug’s size. To circumvent this make a .slugignore file in your app’s root directory add path/to/submodule/.git to it. You can also use .slugignore to ignore specs, docs, etc…

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Standup 03/05/2012

Pivotal Labs
Monday, March 5, 2012

New Faces

Rachel Bobbins – new intern

Help

Web 2 App – is there a service to mobile-optimise web sites?

There are many

Rubymine and Spork issue: when starting Spork from Rubymine, Rubymine doesn’t format test output correctly

The solution currently in use is to add a RUBYMINE_HOME path to the bash profile:

export RUBYMINE_HOME=/Applications/RubyMine.app/

And also the following block to a file loaded by spec_helper.rb (ex: YOUR_PROJECT/spec/support/rubymine.rb )

if ENV['RUBYMINE_HOME']
  $:.unshift(File.expand_path('rb/testing/patch/common', ENV['RUBYMINE_HOME']))
  $:.unshift(File.expand_path('rb/testing/patch/bdd', ENV['RUBYMINE_HOME']))
end

caveat: It may be necessary to launch Rubymine from a terminal with the mine command, rather than from the Dock or Spotlight, because variables set in .bash_profile normally apply only to the terminal environment in Mac OS X. See: Runtime Configuration Library: Environment Variables

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Mongo Madness!

Pivotal Labs
Friday, March 2, 2012

New faces

No new faces today.

Requests for help

“MongoMapper v. Mongoid v. Candy v. etc…? Which should I use?”

A1: Don’t use a mapper at all, just interact with MongoDB directly. If you use a mapper, choose a library that’s least like Active Record.
A2: We used MongoMapper and it worked out okay. It doesn’t behave like Active Record in some ways, but it wasn’t a huge problem.
A3: We had to fight against Mongoid, since it only provided a subset of what Active Record provides and it didn’t provide some MongoDB specific things.

“Does anyone have experience with the awesome nested set library? Nested set is getting corrupted when storing information in a tree”

No answers from the crowd.

Interesting/Protips

A heads up: Rails XSS – two patches were released, but one doesn’t work for Rails 2.

There’s a cool Blabs out about running jasmine in the background @ full speed. Check it out!

Subscribe to the Pivotal Blabs RSS feed!

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Longest Standup Ever

Pivotal Labs
Wednesday, February 29, 2012

New Faces

David, Mark, and Melinda are here from a client.
Kyle is interviewing.

Helps

“Simple form translates labels. How do we get this to work in nested models?”
Check yesterday’s email for answers.
“Dev Bootcamp is teaching people how to program, the Pivotal way. They’re looking for mentors – contact Will if you’re interested. Also, Sarah is going to visit them tomorrow (Thurs) over lunch. Let her know if you want to tag along.”

  • Does anyone know how to integrate with Google analytics using Garb (Google Analytics for Ruby). Jonathan would love to chat with you.*
  • Is there a commonly accepted javascript date library? *
    Check out strf-time.js; it’s an easy way to format dates and times. It doesn’t respond to daylight savings time in the right way, though, so watch out for that.

Also, Date.js (but it might fight with ember)

  • Does anyone know of a good worker system? *
    Simple worker is one option. Others?

Interesting Things

  • In Rails 3.2 now drops your namespace out of your automatically generated form classes. Make sure this doesn’t screw up your CSS!
  • If Postgres keeps printing out warning messages for you whenever you interact with your database, place “min_messages: warning” into your database.yml file and it will shut up.

*Get your time in!
*Gold conference room is now totally hooked up. Please don’t play around with the cables yourself.
*Brown bag lunches will be on Tuesday, starting next week.
*JSHint got pulled from RubyGems, so point your Gemfile to its github account instead.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

SF Standup 02/27/12

Pivotal Labs
Monday, February 27, 2012

New Faces

Elliot is here today

Helps

“How can I place stuff over flash plugins in the DOM? (z-index problem)”
You can place iframes on top of the flash plugin, or set the transparent attribute on the flash elements to true. There should also be a jQuery plugin that handles this.

Interesting Things

  • Ruby meetup tonight. People who are staying around for it should try to help set things up.
  • Poltergeist: a headless capybara driver that uses phantom.js. Check it out. Rick has used it with great success.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Standup 1/26/2012 – Dawn of the WebOS Dead

Pivotal Labs
Thursday, January 26, 2012

Ask for Help

*”ActiveRecord has three methods to determine the number of records: #count, #length, and #size. Which one should we use when?”

As a general rule, always use #size. It checks to see if the recordset has been loaded and if so returns the number of records. Otherwise it hits the database with a count query. The #count method will query the database every time when it’s called on an ActiveRecord scope. The #length method is proxied through to the array of the result set, so every time you call that all the records are pulled from the DB and instantiated.

*”We’re using pow in development and it’s pretty good except sometimes we see 12 second delays in serving assets. Has anyone else encountered this?”

Quite mysterious. Perhaps updating to the Pow 4.0 beta release might help.

Interesting Things

  • Is WebOS dead? This question can be answered at iswebosdeadyet.com. Enyo, the UIKit and data-management layer used in HP’s WebOS, is now available for other webkit browsers. It works with PhoneGap and applications based on Enyo are already in the pipeline for iOS and Android.

  • Webrick when used in development with the Rails Asset Pipeline appears to truncate large CSS files. The general consensus was “Don’t use Webrick” with shoutouts given to unicorn, mongrel, passenger(standalone) and pow.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Standup 1/24/2012 – Lobot Needs New Neighborhood

Pivotal Labs
Tuesday, January 24, 2012

Ask for Help

*”Has anyone used Lobot to install CI somewhere other than EC2?”

Crrrrrrickets…….

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Standup 01/19/2012: Dont stretch those cables

Pivotal Labs
Thursday, January 19, 2012

Ask for Help

How to scrub production data

  • try my_obfuscate
  • use handcrafted update-all sql

Interesting Things

  • Do not stretch monitor cables, they make the ports break
  • MySql: Different os have different rules on table case sensitivity(My_Table <-> my_table), be strict or you get into trouble
  • validates_acceptance_of can crash your asest:precompile on heroku (because it uses the db when loaded, but db is not yet ready), least hacky solution: validates_acceptance_of xxx unless ENV['RAILS_ASSETS_PRECOMPILE']
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Pivotal Labs

Subscribe to Pivotal's Feed

Author Topics

riddles (1)
agile (167)
capistrano (2)
rails (26)
movember (1)
git (10)
railsdoc (1)
object-design (1)
bdd (3)
cucumber (3)
linkedin (1)
oauth (1)
ruby (17)
tdd (2)
lvh.me (1)
rails 3.1.1 (1)
selenium (6)
homebrew (1)
mysql (5)
rvm (1)
sproutcore (1)
paperclip (2)
pry (1)
amazon (1)
heroku (1)
rails3 (2)
jasmine (3)
design (3)
process (12)
productivity (8)
learning (1)
olin (1)
migrations (2)
mongodb (2)
devise (2)
javascript (13)
rubymine (4)
ipad (1)
whurl (1)
head.js (1)
pairing (2)
tools (4)
pair programming (1)
rspec (10)
rspec2 (1)
ruby19 (1)
incubation (3)
startup (5)
api (1)
presenter (1)
vanna (1)
pivotal tracker (5)
capybara (1)
fakeweb (1)
webmock (1)
intern (1)
ruby on rails (25)
meetup (1)
textmate (1)
testing (20)
solr (4)
nyc-standup (11)
community (1)
opensource (3)
activerecord (4)
chrome (1)
mp4 (1)
activeresource (1)
flash (3)
neo4j (1)
nginx (1)
rsoc (1)
meta programming (1)
agile standup (7)
government (3)
webos (4)
xss (1)
jquery (1)
bundler (2)
ci (3)
gems (5)
postgresql (1)
geminstaller (1)
gemcutter (1)
cloud (2)
rack (2)
refraction (1)
gem (5)
refactoring (1)
validations (1)
webrat (1)
engine-yard (1)
firefox (2)
jsunit (1)
mongrel (2)
thin (1)
unicorn (1)
facebook (1)
rubygems (5)
jruby (1)
actioncontroller (1)
rails 2.3 (1)
palmpre (1)
autotest (1)
mac (2)
hosting (1)
goruco (11)
database (3)
railsconf (11)
gogaruco (4)
deployment (4)
github (1)
ie (1)
ajax (1)
intellij (1)
json (1)
asset packaging (1)
polonium (1)
character encoding (1)
utf-8 (1)
test (3)
civics (1)
hpricot (1)
rake (3)
sms (1)
unicode (1)
iphone (1)
java (1)
safari (1)
memory leaks (1)
rr (3)
editor (1)
css (1)
nyc (3)
performance (5)
fun (5)
enterprise rails (1)
health (1)
new and cool (1)
general (2)
treetop (1)
errors (1)
stack (1)
trace (1)
cache (1)
cookies (1)
freesoftware (1)
conferences (1)
development (1)
driven (1)
proxy (1)
caching (1)
peertopatent (1)
languages (1)
rest (2)
rubyforge (1)
sake (1)
file (1)
upload (1)
constants (1)
osx (1)
terminal (1)
pairprogramming (2)
  • 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 >