Davis W. Frank's blog



Davis W. FrankDavis W. Frank
webOS Workshop Tech Talk posted
edit Posted by Davis W. Frank on Thursday February 18, 2010 at 10:29PM

As promised, the video from the webOS Workshop we held on January 23rd is posted on our talks page.

It's full of tips & tricks for developing webOS applications, including a live "pairing" session with the audience.

Slides (such as they are) are posted here.

Our customers are asking for richer interfaces and user experiences. And so we - and by "we" I mean the Rails development community - are writing more and more JavaScript. We've gone from ignoring JS (using RJS server-side) to rendering JSON and writing our own jQuery plugins.

But in this transition some of us left our objects & design patterns on the server. Just because you're writing a click handler in JavaScript doesn't mean it couldn't, or shouldn't, be a method on an object.

Davis W. FrankDavis W. Frank
Report: Palm webOS Workshop 1/23
edit Posted by Davis W. Frank on Wednesday January 27, 2010 at 08:45PM

Sarah Allen approached Pivotal back in December wanting to host a Palm webOS hack session. She knew that there was curiosity among the San Francisco Rails community about the platform and wanted to have a hands-on coding day where they could learn.

Davis W. FrankDavis W. Frank
Standup 2010.01.21: Questionable Latin Edition
edit Posted by Davis W. Frank on Thursday January 21, 2010 at 01:34PM

Interesting Things

  • Caveat Experior: Pivot Mike found a bug in Webrat in Selenium mode when using #click_link. He filed a ticket at Lighthouse.
  • Caveat Coracinatus: Attention to those "Riding the Toad" (I didn't make this up - it's on Hoptoad's homepage): the Hoptoad Notifier gem that was released on Jan 20, v2.1.1, is missing a file. Make sure to update to the latest version, v2.1.2 in order for this gem to work. You should be on the latest gem anyway because there's a deprecation in the session code that will stop working in February. If you have a site that's not actively being developed you will need to update the gem & redeploy your app in order to continue to receive exception notifications.

Davis W. FrankDavis W. Frank
Pivots & Movember
edit Posted by Davis W. Frank on Sunday November 08, 2009 at 06:52PM

For the past few years, Pivotal has had a mustache growing contest in November. For a month, upper lips got stubbly, then fuzzy, and in some cases down-right bushy. Much trash was talked and then awards were given & eleven months of bragging rights began.

Last fall, my sister-in-law asked if our competition was tied-in with the fund raising of Movember. We weren't. She told of how her entire office got involved and had a big party at the end of the month and they raised a whole bunch of cash to fight, lightly put, "dude cancer".

(Well most of them did - she told me about one guy who, when a much-delayed blind date finally got scheduled for November Movember 28th, he bailed & shaved before the big 'meet'. Serioulsy?First impressions are important, but if the date can't deal with the 'stache for a couple more days in the name of cancer then they're likely not "material". But I digress...)

So this year Pivots are growing mustaches for Movember and nearly a third of eligible upper lips are participating. There are a few different competitions going on and I wanted to catch you up on progress at the end of week one.

In the team competition we have Pivots-West - those in the San Francisco office - growing against Pivots-East - the New York City office. The team that raises the most money per 'stache will win a pub lunch, a trophy for their Pivotal office, and bragging rights for a year. We have various ad-hoc individual awards that we're working out as well, but more on that later.

As of Movember 8th:

  • Pivots-West have raised: $1,155.01 and are ranked 124th in the US
  • Pivots-East have raised: $100 and we won't talk about their ranking just now

All the money is tax deductible and goes to the Prostate Cancer Foundation and LiveSTRONG. We encourage all of our regular readers, and really, the whole Rails community to donate:

If you've already donated, then thanks! Once you've donated and are curious as the whisker progression, then please check out our Photo Blog.

That's all for now. See you next week for another progress update...

Davis W. FrankDavis W. Frank
Standup 9/29/2009: "Half The Battle" edition
edit Posted by Davis W. Frank on Tuesday September 29, 2009 at 10:19AM

Ask for Help

"Has anyone run into issues moving their SVN project to git, where externals move to submodules, and multiple team members' check-ins keep screwing up merges & pulls?"

Why, yes. Many folks have. And Pivot Sam has written up a nice how-to over here.

Interesting Things

  • Ruby eql? vs. == vs. equal in Ruby

Plenty of discussion of this in other places, so I won't recap.

However, note that Numeric classes cast when calling ==, but not when calling #eql. Which means (he says, pretending to fire up irb):

>> 1.0 == 1
=> true
>> 1.0.eql?(1)
=> false

It looks like the gems are still not building yet, which meant that you'll need a gem server in the meantime. Say, one at Rubyforge, which is where you should be releasing your gems anyway.

  • Public Service Announcement: your named_scope's get evaluated when the class is loaded, not when an instance is created.

So, for example, if you're building a named_scope for "articles posted in the future" and want to use Time.now, do it in a lambda. Now you know.

Davis W. FrankDavis W. Frank
Standup 9/28/2009: Another Slow-ish Monday
edit Posted by Davis W. Frank on Monday September 28, 2009 at 12:30PM

Interesting Things

Davis W. FrankDavis W. Frank
"Evening with webOS" Posted, PreDevCamp
edit Posted by Davis W. Frank on Wednesday August 05, 2009 at 08:56AM

Our "Palm webOS Night @ Pivotal Labs" was well attended two weeks ago. Mitch Allen, of Palm introduced talks by Palm's Jesse Donaldson & yours truly. Jesse walked through an overview of how to write a Mojo (the name for Palm's framework) application and I shared our experiences, including how test-driven development can work on the platform. After working with Palm's new operating system for several months it was great finally to be able to share our experiences, talk up agile practices, and answer questions.

But don't take my word for it - go see and/or listen for yourself, or just go read Jesse's slides or my slides.

The following week the San Francisco webOS Meetup was at Palm headquarters on July 28th. The organizers asked we give the same talks. We had a larger crowd but had similar questions about platform direction and experiences. While this event at Palm wasn't recorded, the content was largely the same and it was just as great to hear enthusiasm in the community.

This excitement carries over to this Saturday. August 8th is PreDevCamp, a worldwide, self-organizing event where developers will be hacking together to teach & learn how to write applications for webOS.

I'll be at the San Francisco event, which is going to be at Palm in Sunnyvale (not exactly SF), talkin' agile, helping out and of course, hacking a bit. If you're in the Bay Area, come say, "Hi." If you're not, then register for your local PreDevCamp and go code up some apps.

Davis W. FrankDavis W. Frank
Come to "An Evening with Palm webOS" at Pivotal Labs
edit Posted by Davis W. Frank on Thursday July 16, 2009 at 10:27AM

On Tuesday, July 21st, we're hosting "An evening with Palm's webOS" here at Pivotal Labs. Mitch Allen, Software CTO & author of the forthcoming book Palm webOS, and Jesse McDonald, Sr. Manager, Mojo Framework, of Palm, Inc., and I will be speaking. There will be some good introduction material from Palm and I'll be talking about Pivotal's experience developing for this new platform.

It's no secret we're fans of Palm's webOS and it's Mojo framework. We've been quoted often over the past few months about how productive the development environment is, especially for those familiar with web development tools & technologies. Over the past few months we have developed four applications that are currently available in Palm's App Catalog: Mobile by Citysearch, AP News, LikeMe, and Tweed, a client for Twitter.

We previewed Pockets, a set of code for helping with test-driven development, and Jasmine, our JavaScript testing framework in an O'Reilly Media webcast this week- it was well attended & received. Thanks!

Now that Palm has opened up SDK access to everyone, it's a great time to come learn what the fuss is all about and talk one-on-one with Palm engineers & Pivots about how to get started with webOS and Mojo.

Please register for & come to An evening with Palm's webOS. See you Tuesday!

Davis W. FrankDavis W. Frank
Standup 5/13/2009: Whole Lotta Blog Edition
edit Posted by Davis W. Frank on Thursday May 14, 2009 at 04:39AM

Interesting Things

  • Webrat + Selenium + IE7 => FAIL - The problem is in the file label.js, which is custom matcher code that Webrat injects into Selenium at run-time (EEK --ed.). That code was not IE7 compliant. The team decided to fork Webrat, pull out selenium-rc and use their own selenium-rc gem to solve the problem. There's a Lighthouse ticket for this this issue.
  • For those of you upgrading to Rails 2.3, one team had a large chunk of issues that made the upgrade take over a day. They had myriad issues with: Polonium, RSpec, & Cucumber. Another team reports that ActiveScaffold also made things difficult. Before you point to DHH's RailsConf 2009 Keynote where he said "Don't upgrade if things are working", the former team wanted to use...
  • default_scope - This is a great idea, but it's not yet ready for prime time. It can't be arbitrarily chained with ActiveRecord associations (much like acts_as_paranoid was originally implemented) - so you need to add calls it to the end of your chained association & scoping calls. Which doesn't really make it default, does it?
  • Think that your brand new download of RubyMine is a little slow? Make sure you have Java 1.6 installed, then open the plist file (locations vary by host OS) and change the value that says 1.5* to 1.6*. The Mine will now require Java 1.6, which is known to have snappier garbage collection. (I tried this today and found fewer beach balls of tranquility. YMMV. --ed.).
  • Stack Overflow DevDays were announced. It's a set of one-day conferences with San Francisco's being October 19th.

Help

Is Rails' built-in protect_from_forgery worth using? Does anyone turn it off?

The overall consensus is, "Of course we use it! Why would you turn off this default?" Well, It's a little bit of pain when you're constructing your own Ajax requests - it breaks perf tests, but it's turned off for other tests. You may get Invalid Authenticity Token exceptions. (Joseph?)

How do you aggregate results of background tasks in a nightly report?

At least turn on the cron flag for emailing you results of cron jobs. Or, look at Delayed Job. Since tasks live in the database, you could make a status page or have another job to mail a report.

Other articles: