Making truly awesome stuff is hard. Pivot Carl Coryell-Martin proposes we identify common physiological responses and condense their design solutions into a pattern language. He presents a draft set of patterns in the context of crafting an iPhone app.
Monthly Archives: March 2010
SnapABug improves integration with Pivotal Tracker
SnapABug, a tool that allows you to embed a screen capture help widget on your site, has taken advantage of the recently released new version of the Pivotal Tracker API (V3) to improve the integration between SnapABug and Pivotal Tracker. SnapABug can now automatically upload web page snapshots as Tracker story file attachments.
Read more about this feature and other improvements here.
Pivotal Tracker integration with Zendesk
We’ve added Zendesk to the list of applications that Tracker integrates with. Zendesk is a “beautifully simple”, on demand customer support help desk system. This integration allows your development team to prioritize and collaborate around Zendesk tickets as linked Tracker stories, bringing development and support closer together in your organization.
To learn how to set up Zendesk integration for your project, visit the integrations help page. Once enabled, you’ll see a new panel in your project, allowing you to see and drag/drop Zendek tickets into the backlog or icebox. Story comments and state changes will appear in the corresponding Zendesk ticket as comments.

Note: At the moment, the Pivotal Tracker target in Zendesk does not create linked stories in Tracker. We’re working with Zendesk to enable that, and make the two integrations seamless.
Teach Rails, Save the World
Health Systems 20/20, a United States Agency for International Development (USAID) project, is looking for a partner to help train local programmers in Rwanda on Ruby on Rails and aid in the development of an innovative website to help the Ministry of Health in Rwanda better manage the health system, particularly to improve their budgeting and planning processes. The website will aid donors and NGOs in entering budget, expenditure, and results/outcome indicators, and help policy makers analyze this information for use as a part of their planning process.
Bringing all this information together and using it to inform decision-making will be quite innovative and has great potential to improve the lives of over 9 million Rwandans. If successful, this system could be used as a model in Africa, for bringing useful information together to make better health policy and making this kind of information more publicly available. The system will be fully open source.
USAID is aiming to have the training start sometime in the next 6 weeks and imagine it lasting 1-2 weeks. Work after that can be remote and will be in collaboration with local programmers. A first version of the system will be developed and deployed for data collection for a July-August 2010 timeframe. HS2020′s technical architect will work with you as well in country during the training and will assist with development.
Please contact Gregory Nelson (gregory_nelson@abtassoc.com) for more information and provide general cost information if you are interested.
Pseudo-classical inheritance in JavaScript — a rebuttal
A couple weeks ago Davis wrote about using pseudo-classical inheritance to make your JavaScript more object-oriented. I agree with a number of his points about the goal of well-structured code. However, based on my just-over-a-month experience in JavaScript, I personally don’t like to shoehorn the language into object-orientation via pseudo-classical inheritance.
For the sake of examples consider the following class hierarchy: Athlete, Footballer, and Defender.
Implementing this with pseudo-classical inheritance would look something like this, assuming the implementation of Object.extend() from here (I’ve had bad luck with the __super attribute in the past, but let’s assume it works for the moment).
This creates relationships between constructor functions and prototypes that look something like this (if you’ll excuse the ASCII art):
Object.prototype
^
|
Athlete() ----> Athlete.prototype
^
|
Footballer() ----> Footballer.prototype
^
|
Defender() ----> Defender.prototype
Arrows represent prototype attributes. Creating a new instance defender of the Defender class creates these relationships between the prototoypes and the instance:
Object.prototype
^
|
Athlete.prototype
^
|
Footballer.prototype
^
|
defender ----> Defender.prototype
This should look familiar; it’s exactly the pattern that Ruby uses for basic inheritance, with the prototype objects representing instances of Ruby’s Class object, and prototype attributes representing Ruby’s Object#class (horizontal) or Class#superclass (vertical) attributes. The lookup rules work the same as Ruby as well: start with methods on the instance (in Ruby these would be methods on the instance’s singleton class); if not found, look for a method on the instance’s class; if not found, look on the Class instance’s superclass; repeat until found or you run out of classes/prototypes.
This looks comfortable and familiar, but unfortunately JavaScript and Ruby have a fundamental difference: Ruby is a class-based language and JavaScript is not. Object instances have instance-specific state — instance variables — which the instance methods use. However, while the instance variable are attributes of the instance, the instance methods live on the class/prototype object. This isn’t a problem in Ruby, because the interpreter knows what’s going on and gives the methods defined on the class access to the instance variables defined on the instance. JavaScript has no such capacity, so all instance variables in these pseudo-classes must be public attributes of the instance. This attempt to create object-oriented behavior by approximating classes actually ends up precluding encapsulation, one of the fundamental aspects of object-orientation.
A different approach to creating our classes could look like this (with a nod to Douglas Crockford). There are a few things I prefer about this approach:
- Privates are private. Implementation methods such as #shoot and #feignInjury are hidden from the outside world. The same can be done for instance variables.
- Object definitions have a clearly defined structure: instance variables at the top of the function definition, ending with the declaration and definition of
self; public instance methods next, ending with the return of self; private instance methods at the end, where they belong. - Object definitions are nicely contained. In the first example the methods are defined at the top level, outside the constructor definition. In this second example everything that defines the class is nicely contained within a single function scope.
- No dependence on, or pollution of the global namespace with, a method such as #extend.
I’ve heard brought up a couple concerns with this style:
- Methods are, necessarily, defined on the object rather than the prototype, which can lead to duplication and inefficiency. This is a fair point, but I have yet to see it cause a problem. I’d be interested to see actual numbers that show how much of a performance hit this causes, given a certain number of object creations. In the meantime, I haven’t noticed a performance problem with code written this way, so I’m inclined to prefer encapsulation over theoretical performance issues.
- Objects defined this way do not properly set their constructor attribute upon creation. Some test methods (notably Jasmine’s
anymethod) depend on this. - Closures can be hard to grok.
We’ve recently finished up a reasonably sized project largely using this functional style of object definition, and it worked quite well. I’m sure there’s some reason that it shouldn’t have that I’ve overlooked; I’m curious to hear what that is.
Donkey & Goat Open House
Donkey & Goat Winery in Berkeley is having an open house Saturday March 20 2010. I’m personally a big fan of their wine. I’m enjoying a glass of their 2006 Syrah, The Recluse right now. Jared, one of the owners, has been kind enough to let us at Pivotal sample his wines on a few occasions. I’d heartily recommend going along to sample their wine, eat some food and learn about their wine making.
DONKEY & GOAT SPRING OPEN HOUSE PARTY SAT 3/20 1-5PM, AT THE WINERY IN BERKELEY
7 NEW WINES, EATS FROM BERKELEY’S SOON TO OPEN LOCANDA DA EVA AND THE MICHAEL LAMACCHIO TRIO, OUR FAVORITE BRAZILIAN JAZZ TRIO IS BACK!
SAVE $10 WITH ADVANCE TICKETS
Fortune 100 Company Seeks Rails Developers
At Pivotal Labs, one of the services we provide our clients is helping them interview and hire. This is an excellent opportunity for you to learn Extreme Programming by working side-by-side with Pivotal’s talented and experienced developers while at the same time joining a small and dynamic product team.
Pivotal Labs and our clients place a strong emphasis on Agile development and its many aspects: Pair Programming, Test-Driven Development, rapid iterations, and frequent refactoring. General technical requirements include serious web development experience, and a significant subset of Ruby, Rails, CSS, JavaScript, or MySQL.
A current Fortune 100 client is looking for experienced Rails developers to join their team. The preferred location is San Diego, but candidates from throughout California are encouraged to apply.
Job Description:
- Develop and maintain multiple Ruby on Rails applications for a Fortune 100 company
- Work directly with management to improve the product and the development process
- Test Driven Development with tools like RSpec, Test::Unit, JUnit, Jasmine and Selenium
- Pair Programming
- Aggressive Refactoring
Additional Skills desired:
- Ability to communicate and coordinate with technical and non-technical management
- Extend and improve the Continuous Integration, Build, and Deployment environments
- JavaScript, including experience with Javascript testing frameworks
- SQL
Please email your resume and cover letter to railsgig@gmail.com. Compensation commensurate with experience.
NYC Standup Round-up for Mar 1st – Mar 5th
It’s been a quiet week in New York City, my hometown. Let’s do the round-up.
Ask for Help
Ian Z. asked, “Given a
<select>input element, how do I select an option by its name and not its value using jQuery?”The answer? You can’t. Or you couldn’t. But the very act of observation changes the phenomenon which is observed), and by lunch, you could. Pat’s just crazy like that.
$.fn.chooseis available in chewable Gist form.
And that’s it. I’ll see you back here next week.
SF Standup 3/4-3/5/2010
Help
“What’s the best way to test that an array contains another array?”
A custom matcher using array - other_array was suggested.
Interesting
The team that was having problems with Prototype response codes found a partial solution.
They sometimes call abort() on the request which triggers the callbacks with a 0 response code. They found that if they set transport.onreadystatechange = function() {}; before calling abort() they could skip the callbacks, and manually call whatever clean-up they needed. That Prototype interprets 0 as a success still sounds strange.
Scala and Lift: Quite a Pair
David Pollak maintains Lift, a Rails-like app framework for Scala. In this talk, he and Martin Odersky, author of Scala, live-code a 30-line, real-time, web-based chat application and discuss the Scala constructs that allow for such concise apps.