Nicholas GreenfieldNicholas Greenfield
NY Standup: 8/1/2011
edit Posted by Nicholas Greenfield on Monday August 01, 2011 at 07:50AM

Ask for Help

".DS_Store not disappearing from git even though ignored and removed?"

A developer had some .DS_Store files accidentally checked into a project. It was added to the .gitignore and git rm'd out of the project but they seem to keep showing up as untracked files. Any ideas?

Interesting Things

Pivotal Designer Inspiration Blog

The Pivotal designers are keeping an inspiration blog, you can check it out at http://pivotaldesign.tumblr.com

Nicholas GreenfieldNicholas Greenfield
NY Standup: 8/1/2011
edit Posted by Nicholas Greenfield on Monday August 01, 2011 at 07:50AM

Ask for Help

".DS_Store not disappearing from git even though ignored and removed?"

A developer had some .DS_Store files accidentally checked into a project. It was added to the .gitignore and git rm'd out of the project but they seem to keep showing up as untracked files. Any ideas?

Interesting Things

Pivotal Designer Inspiration Blog

The Pivotal designers are keeping an inspiration blog, you can check it out at http://pivotaldesign.tumblr.com

Sean MoonSean Moon
NYC Standup: 2011-07-29
edit Posted by Sean Moon on Friday July 29, 2011 at 07:07AM

Help

"How to test content_for in a view using rspec-rails 2?"

It looks like rspec used to have a convenience method for testing what was passed to a content_for in a view. What are the options for testing this? One option is rendering the entire view in a controller test using render_views and testing the content there.

Mocking out the call to content_for would be nice, but it's difficult to get a hold of the view object which this method is called on in your view.

"What do you recommend for autoresizing textareas as users interact with them?"

A few projects are using Autogrow Textarea.

This one looks nice as well, though I haven't a chance to use it besides the demo on the page.

Interesting

"apply @font-face directly to elements containing text, not their parents"

Looks like you might get some unexpected aliasing artifacts with @font-face if you don't heed the advice given above.

"fields_for: child-index vs. index?"

You might come across

f.fields_for :object, :child-index: => i

or

f.fields_for object, :index => i

when you're making many fieldsets. What's the difference?

As you might notice above, the form helpers use child-index for the indices on the inputs when the object to render fields for is a symbol (or a string), and index when passed an actual object.

--

Now for some gems that some Pivotal folks have found useful recently

  • validates_timeliness for your date and time validation needs

  • hash_syntax converts hashes between the :key => value and key: value syntax (or the other way).

Events

Yoga tonight. Stay cool over the weekend!

Glenn JahnkeGlenn Jahnke
Performance stories - Writing two stories instead of one
edit Posted by Glenn Jahnke on Monday July 25, 2011 at 09:58PM

TL;DR

Estimating performance stories are total bike-shed conversations.

  1. Write a figure-out-what-to-do story which generates the knowledge to estimate #2 (with repeatable benchmarks)
  2. Now estimate and execute the actual story around doing the optimization (and compare benchmarks)
  3. Repeat until your slowness is gone

Onsi FakhouriOnsi Fakhouri
The Vegetarian Version | It's Pure and Good
edit Posted by Onsi Fakhouri on Friday July 22, 2011 at 09:30AM

Ask for Help

"We're trying to get the Google Docs API working on our project but we keep hitting unauthorized/bad request responses. Help!"

One thought: some ruby OAuth implementations are known to fail. Try shelling out and running a command line OAuth to make sure this isn't an incompatibility with your ruby OAuth library.

Interesting Things

  • Ruby is slower than node.js.

    Two loops and a square root turns out to be a recipe for ruby slowness. The v8 engine wins again!

  • Ubiquitous Singaporean Chile ("Sambal Chilli") now available - briefly - in the San Francisco lounge (courtesy of Nate Clark).

    To quote Nate: "It's usually Shrimp based but this is the Vegetarian version which I find to be pure and good."

  • Gogaruco sign up is now open.. and the early bird tickets are gone. Sign up soon!

Onsi FakhouriOnsi Fakhouri
I Bless the Rains Down in Africa
edit Posted by Onsi Fakhouri on Monday July 18, 2011 at 09:34AM

(Title: Standup 7/18/2011: I Bless the Rains Down in Africa)

Ask for Help

"I want a super-lightweight rack-based CMS/blogging setup. Any thoughts?"

Try out Toto a light-weight git-powered blog engine.

Sean MoonSean Moon
NYC Standup: 2011-07-14
edit Posted by Sean Moon on Thursday July 14, 2011 at 07:10AM

Help

"Firefox still doesn't support text-overflow: ellipsis. What to do?"

Looks like Mozilla has been slow on picking up this text overflow property. It's due to be supported in Firefox 7. In the meantime, JT suggests the use of the AutoEllipsis jQuery plugin

Interesting

"@pivotalnyc"

For those that aren't aware, the Pivotal New York office occasionally tweets as @pivotalnyc.

"caniuse.com"

Ian passes along a good resource to check out the availability of CSS properties on various browers, which can be found at http://caniuse.com.

David JacobsDavid Jacobs
Standup 7/8/2011: Lazy time
edit Posted by David Jacobs on Friday July 08, 2011 at 09:36AM

Interesting Things

It turns out NTP, the service that keeps our Unix boxes synced with international time servers, is lazy on the client side.

At Pivotal, our Macs sync up to time.apple.com to accurately reflect the time. This server isn't lazy and will give back the current time when queried.

However, the NTP client-side daemon on our Macs has drifted as far off as 30 seconds because it isn't actively polling time.apple.com. This can lead to strange errors (like longer download times than usual from certain servers). The simple fix is to reconnect to time.apple.com, or the NTP server of your choice.

David JacobsDavid Jacobs
Standup 7/6/2011: Pivotal Tracker, Apple style
edit Posted by David Jacobs on Wednesday July 06, 2011 at 09:20AM

Interesting Things

Pivotal Tracker is now available as a free iPad app in the iOS App Store! It's based on the popular TrackerBot app from Vulpine Labs, which was recently acquired by Pivotal Labs. Dan Posedly gives more details over at his Pivotal blog.

David EliahuDavid Eliahu
Standup 6/30/2011: CI via Dropbox!
edit Posted by David Eliahu on Thursday June 30, 2011 at 09:36AM

Interesting Things

  • To view the CI box remotely, a client has created a script that takes a screenshot of the CI build and uploads it to Dropbox every thirty seconds. On the remote machine, the screensaver has been set to this image file in the Dropbox folder, and has also been set to refresh every thirty seconds. The inventor's name? Rube Goldberg. Next, he will be switching to FedEX.

  • When building Android Apps with IntelliJ, the first image in the image directory (alphabetically) often fails to load, and then sporadically reappears in random places in the app. The fix: Add a very small image that appears at the top of the image directory (e.g. "aaaaaaa.png"), or don't build with IntelliJ. Since this issue doesn't seem to show up with command line build tools (e.g. Ant or Maven), you could probably tell IntelliJ to use one of those to build with.

Other articles: