Jonathan Berger's blog



Jonathan BergerJonathan Berger
NY Stand-up: Gonna Get Down on Friday the 13th
edit Posted by Jonathan Berger on Friday May 13, 2011 at 02:07PM

Interesting

Kris Hicks reassures us that the vim path through git interactive rebases need not lead to maddness. If you'd like to do an interactive rebase in your editor of choice (rather than Textmate, the Pivotal default) you can set the GIT_EDITOR flag. So go ahead to the terminal and

export GIT_EDITOR=vim && git rebase -i origin/master

Vim will launch, changes will be made, commits will be squashed, and all will be right with the world. Until you try to save; after making your changes and :wq-ing, the terminal will admonish you Could not execute editor.

The problem is a vi + Mac OS X + git incompatibility with pathogen (the vim package manager). To fix it, add the following lines to your .vimrc file:

filetype on
filetype off
...pathogen crap...
filetype on

For more on this issue, see http://andrewho.co.uk/weblog/vim-pathogen-with-mutt-and-git

Dangerous

Rayban reminds us that you best yield before you exit the block.

For example:

around_save :check_something, :if => "my_attribute_changed?"

def check_something
  return unless my_attribute == "foo"
  yield
  # do some stuff...
end

will not save unless my_attribute == "foo"— if your condition to run the around filter rarely happens you might not notice this fairly obvious behavior and be confused confused confused.

Jonathan BergerJonathan Berger
NY Standup for Wednesday, May 4: Star Wars Day
edit Posted by Jonathan Berger on Wednesday May 04, 2011 at 07:23AM

Dangerous / Interesting

  • Schubert warns us that Rail's extensions that add to_time method may cast types in unexpected ways: Date#to_time => Time Time#to_time => Time but DateTime#to_time => DateTime

  • Use === when checking equality with DateTime and you don't care about precision (This does not work with Time however)

  • Your humble author cautions that the new Laullon GitX is not ready for prime time. When adding multiple files with a single click, a garbage commit with a long funny name is created without adding the files. Instead, consider Brother Bard's excellent fork of GitX

  • Ian "Waffles" Zabel mentioned that jQuery 1.6 has been released. Notable changes include case-mapping of HTML5 data- attributes, performance improvements, and more.

  • Lee Edwards reminds us "It's Star Wars Day. May the 4th be with you." <⁄rimshot>

Jonathan BergerJonathan Berger
Pivotal Labs NY hosts the Agile Experience Design meetup
edit Posted by Jonathan Berger on Wednesday August 19, 2009 at 07:35AM

On Tuesday night Pivotal Labs NY hosted the first "Agile Show & Tell", organized by the Agile Experience Design Meetup. More after the fold...

Jonathan BergerJonathan Berger
Pivotal Labs showcases at the NYC New Tech Meetup
edit Posted by Jonathan Berger on Wednesday June 03, 2009 at 04:33PM

Last night Pivotal participated in the first ever New Tech Meetup Showcase. The Showcase offered 60 NYC technology companies a chance to show off their wares to a large and enthusiastic crowd, and Pivots Mark Michael, Dan Podsedly, and Ian McFarland held down the Pivotal table, demoing Tracker and seeing what other companies had to offer. The New York New Tech Meetup is the biggest meetup in the world with over 10,000 members, and—this being Internet Week in NYC—many of them were out in force. After the Showcase the action moved to 700-person auditorium where 7 companies gave 5-minute live demos to a rapt house.