Pivotal Labs

Evan Phoenix at Mountain West Ruby Conf

edit Posted by Chad Woolley on Monday March 31, 2008 at 05:20AM

I just attended (and thoroughly enjoyed) the Mountain West Ruby Conf, where Evan Phoenix gave a powerful keynote speech.

He talks about the status of Rubinius, and makes some profound observations on modern open source culture and community.

Here's some highlights, but if you participate in open source, and especially if you help run an open source project, I highly recommend that you watch the video:

  • Community: Rubinius' Giant Spec Suite, and its value not only as a living language specification for different implementations of Ruby itself, but as a "gateway drug" which provides a low barrier to get new contributors addicted to open source.
  • Trust: Asking for forgiveness vs. permission, and the Rubinius commit policy, where any accepted patch gets you commit rights. You can always roll back a change, and debate is healthy.
  • Worth: The impact of annoying fifteen year olds who make a lot noise versus "core" contributors.
  • Ego: You are not the project, Mr. Ego! The importance of being wrong and admitting your faults in public.
  • Innovation: Fostering innovation and debate vs closely holding the mythical "Keys to the Castle".

Standup 03/26/2008

edit Posted by Jonathan Barnes on Wednesday March 26, 2008 at 04:12PM

Help

  • Edward was wondering if anyone had any experience using XMPP4R or the XMPP protocol in general.

Interesting

  • Brown bag today has changed from RR to Lightning Talks. Anyone can present. The focus will be on interesting technology used on the various projects.

XPath CSS Class Matching

edit Posted by Alex Chaffee on Tuesday March 25, 2008 at 06:01PM

I'm writing Selenium tests again, which means a lot of XPath. Here's a trick I learned thanks to this article on Push Button Paradise.

The problem is, how do you write XPath that matches one class in a multi-class element like

<div class='foo bar'>

? The standard XPath equality operator matches a full string, so

//div[@class='foo']

won't work. The solution is arcane but I promise it works:

//div[contains(concat(' ',normalize-space(@class),' '),' foo ')]

Note that there must be spaces on either side of the class name 'foo'.

Since this is quite a mouthful, I've extracted it into a helper method. Here it is in Java:

/**
 * Generates a partial xpath expression that matches an element whose 'class' attribute
 * contains the given CSS className. So to match &lt;div class='foo bar'&gt; you would
 * say "//div[" + containingClass("foo") + "]".
 *
 * @param className CSS class name
 * @return XPath fragment
 */
protected static String containingClass(String className) {
  return "contains(concat(' ',normalize-space(@class),' '),' " + className + " ')";
}

Standup 03/25/2008

edit Posted by Jonathan Barnes on Tuesday March 25, 2008 at 03:53PM

Interesting

  • Brown bag for tomorrow 04/26/2008 will be Brians Double framework called RR, speakers will be anyone using the framework

Standup 03/24/2008

edit Posted by Jonathan Barnes on Monday March 24, 2008 at 04:28PM

Help

  • Steve was having problems getting rspec to run in Intelli-J Idea using some key combo including F10, it was suggested that he use Alt-F11 which runs ruby on the currently focused file.

Interesting

  • Nick Kallen's has_finder has been integrated into the rails trunk as named_scope, and will be available in the rails 2.1 release
  • Safari 3.1 implemented getElementsByClassname which breaks prototype's version. Courtenay has suggestions for a fix
  • Voting today for this weeks brown bag should know by tomorrow
  • Brown bag on Dtrace scheduled for 04/02/2008 with guest speaker Brian Cantrill
  • Brown bag on Merb scheduled for 04/09/2008 with guest speaker Yahuda Katz
  • Daemon, Brian, Nathan S., and Cory will be onsite with the client M-Th for the next 4 weeks
  • Intelli-J Idea 7.0.3 is available. You will need to update the ruby plugin (some people had trouble installing the plugin but most have had no problems) unsure about the entire new feture set but Edward noted that YAML files have syntax highlighting.

Standup 3/19/08

edit Posted by Dan Podsedly on Thursday March 20, 2008 at 08:14PM

Interesting

  • The defer method in EventMachine allows you to spawn processes in Ruby, like this (from comment in eventmachine.rb):

    operation = proc {
        # perform a long-running operation here, such as a 
        # database query.
        # as usual, the last expression evaluated in the block will 
        #be the return value.
    }
    callback = proc {|result|
        # do something with result here, such as send it back 
        # to a network client.
    }
    EventMachine.defer( operation, callback )
    
  • New art on the wall, check it out.

Help

  • Can anyone recommend a good hosted wiki for casual use? Some of the suggestions so far include pbwiki, MediaWiki (perhaps a bit heavy weight for personal use), and Google Pages.

Standup 03/18/08

edit Posted by Dan Podsedly on Wednesday March 19, 2008 at 02:06AM

Interesting

  • Ian Mcfarland talks to Geoffrey Grosenbach about Pivotal's agile culture in the May 17 episode of the Rails Podcast. Check it our here.
  • This Wednesday's brown bag will be a round table discussion about "Tracker and the client: The real vs. the ideal". Lunch provided, as always.
  • When something in Rails isn't working as expected, it may just be a bug that's been reported or fixed recently. Is a good idea to check the the Trac tickets at dev.rubyonrails.org.

Help

  • Rails rcov seems to get stuck in an infinite loop on Leopard.
  • Anyone know a good general practitioner within walking distance of the office?
  • Confirm dialogs are tripping up Selenium (8.1) on one of our projects. Something related to focus, perhaps?
  • What does NĂ­ Hea mean?

Why Rails will Reign Supreme, revisited

edit Posted by Christian Sepulveda on Tuesday March 18, 2008 at 07:25PM

Following up from my previous post on the same topic, I'd like to clarify a few points that hopefully address several of the comments on the post.

While the title of the post may be provocative, I am not asserting that Ruby/Rails will be the only framework; I generally don't believe there needs to be a single framework or in similar absolutes. (For more on this, see my post "Framework Wars: Now all Restaurants are Taco Bell") The following sentence in the post captures the scope of my position:

I think Ruby/Rails can and will replace Java as the language and platform of choice for software development in the enterprise and will similarly establish itself as the premier option for Web 2.0, cementing the bridge between both markets.

Java has the largest market share, estimated between 20% and 30%, depending on your source. (One example, though there are others, can be found in the following article "Programming Language Trends." ) Basically, I think Rails will have the largest market share; as Java is currently the default option for software projects (especially in enterprise), I think Ruby/Rails will be the new default. But as with Java, other frameworks will still thrive and will be more appropriate in various cases. I think this shift will take place over the next two to five years.

There are three critical questions that need to be addressed:

  • Is Java's position vulnerable?
  • Is Rails technically viable?
  • Why Rails, as opposed to another framework?

Java Vulnerability

The majority of my previous post on this subject addressed Java vulnerability; I think PHP was a disruptive innovation that changed the economics of software development. It is hard to justify a software project as requiring $10 million, more than 20 developers and a few years when a similar application was just created by two developers in six months.

PHP delivered the first blow that has made Java vulnerable, as stakeholders are increasing pressure and questioning of the costs of development. However, Java is general purpose langauge and there is a considerable investment in existing applications and infrastructure. While vulnerable, a successor needs to have similar flexibility.

Rails Viability

Rails is not without its problems, as I noted in the previous post:

There is much work to be done on Rails though. There are scalability issues and integration patterns are immature (on average, at least).

Scalability is the most frequently cited criticism of Rails. (I will reference the two related topics of scalability and performance simply as scalability.) It should be noted that for enterprise, which is the primary target audience regarding the claims in this post, most applications do not have more than a few thousand users and scalability is not much of an issue. However, scalability for a popular consumer web application and an internal IT application is very different. I am not trying to simply dismiss the scalability questions, but I think it is only one factor and a broad set of issues affects technology selections.

Twitter is probably the largest Rails application and there has been much discussion of Twitter's scaling challenges, though the Twitter team continues to improve the situation. Similarly, Facebook is hailed as an example of PHP scaling. While there is no Rails app (to my knowledge), which has scaled to Facebook traffic, Facebook and Twitter are not common scenarios. In these cases, the elected platform will only help or hinder to a degree; the decisions of its developers and how they use their technology options will have the overwhelming impact.

Rails scales horizontally, similarly to PHP, though perhaps not as efficiently in its use of hardware. That said, I think Rails is commonly criticized for scalability problems because it is unfortunately easy to make naive decisions, which still follow Rails conventions, but cause scale problems at low user or page volume. Is this a fundamental failing of Rails? Yes and no. On one hand, you can make decisions with any framework that will cause scalability problems early. However, part of the promise of Rails is that if you follow the conventions, you will be okay.

Scalability is not quite the black, unknown art that it used to be. Most of the patterns and approaches to achieve high scalability are well understood. Java had significant scalability and performance problems in its youth that were addressed. Today, some massively scaled applications are written with Java. Currently, there are Ruby and Rails initiatives that are working on improving performance and scalability, from Rubinius to various ActiveRecord improvements. I expect to see major Rails scalability improvements in the coming year. As an example, the Facebook application Friends for Sale is a Rails app with 300 million views a month.

Why Rails?

Assuming Java is vulnerable and technical viability isn't an obstacle, why Rails and not another framework? I think there are two other commonly cited alternatives: PHP and Pyhon/Django.

As I noted earlier, PHP is responsible, in my opinion, for first exposing Java's vulnerability to be replaced at the market share leader. However, I think it is hard to use PHP for general purposes beyond web applications and this inhibits its adoption in enterprise. For example, I can't imagine a socket-based message queue in PHP.

Another challenge for PHP, in my opinion, is that sustainable development is not as easily achieved as it is with Ruby. Automated testing is more flexible in Ruby/Rails and I think the abstraction/plugin architecture of Rails leads to more maintainable applications. (I know of a PHP application, whose developer is quite talented and decided to port from PHP to Rails. The Rails version had only 9% lines of code of the PHP version. While it can be dangerous to draw conclusions based solely on LOC, an application that is 9% the size of the original is easier to maintain and is more flexible.) While such design patterns are possible in PHP, I don't think they are employed in the average case and I think the average case influences market adoption.

Python and Django are commonly compared to Ruby and Rails. A simple google search of "rails vs. django" yields numerous articles. Ignoring zealot rants on both sides, I think most balanced discussions conclude both platforms can enable productive development teams and the creation of compelling applications. I don't think technical comparisons inform why Rails has the edge in gaining market share, but market trends themselves.

Consider the following data that I collected by searching on two popular job sites:

From Monster: Rails - 267 jobs, Django - 143 jobs
From Hot Jobs: Rails - 25 jobs, Django - 8 jobs

I offer these data examples only to convey that I think more developers/stakeholders are taking the Rails plunge than Django. As Pivotal and others have experienced, there are multiples to be gained in productivity gains. I am not claiming Django can't offer similar productivity gains, but I think it would have to offer even multiples over Rails to get significant numbers of stakeholders or developers to shift from Java to Ruby and then to Django. I haven't heard anyone claim Django offers productivity multiples over Rails.

Whether you believe the current Rails attention is based on merit or hype, as more and more organizations adopt Ruby/Rails, a synergistic, self-sustaining cycle takes hold and this is the primary consideration in my opinion. As referenced in my last post, Geoffrey Moore, in "Crossing the Chasm", discusses the adoption curve of technology. He notes that there is a gap in the adoption curve between a relatively small market of early adopters and the huge mass market. Crossing this "chasm" depends on keeping up with market demand and addressing any issues that hinder adoption. This is can be daunting for any organization, but Rails can leverage a strong and motivated community. Rather than a single organization with a few developers trying to bridge any gaps, there are many developers in multiple organizations (and independents) actively working to improve Rails. A few examples (that are also already achieving good results) include Engine Yard, Rubinius, jRuby, and Glassfish.

I close with the short version of my argument:

Ruby on Rails will replace Java as the programming language and platform with dominant market share. Java is vulnerable because alternatives such as PHP have proven viable for application development with dramatically lower costs. While Rails has its shortcomings, concerns such as scalability continue to improve; Rails is not unlike other early-technologies in this regard (consider Java in 1996-98). While other platforms may offer similar productivity benefits to Rails, such as Django, Ruby/Rails is growing in popularity and adoption. This growth can lead to positive, self-sustaining feedback cycle as each phase of Rails adoption improves Rails and encourages more Rails adoption.

Monkey

edit Posted by Nick Kallen on Sunday March 16, 2008 at 03:42AM

The next programming language I invent shall be named monkey. And instead of objects it will have patches.

POP, patch oriented programming.

In fact, all of the primitives will be built by reopening primitives. For example, to make the primitive 2, you start with 1, then patch 1 to act like 2.

Out of this, the whole of arithmetic is built. and so on for the most complex of programs.

Web 2.0, the Enterprise and Blurring Lines

edit Posted by Christian Sepulveda on Friday March 14, 2008 at 04:42PM

Enterprise's interest and adoption of Web 2.0 technologies grows each day. Much has been and is being written on this trend; simply google "web 2.0 enterprise" and you will have lots to read. My interest is the significance and impact of this trend.

I think enterprise systems have historically worshipped data: ERP, CRM, knowledge management, and data warehousing are applications that capture, mine and organize data. While of course such information is important, data and the "system" tend to be the first class citizens at the expense of the interests of users (i.e. people).

By contrast, I think Web 2.0 applications are people-centric. Social networking has informed many new models of how to organize information and anchor it to people. The data exists to support the person, whereas the reverse feels true at times in enterprise. Furthermore, user experience and satisfaction are emphasized, if for no other reason than pragmatic market survival. Enterprise software rarely makes user satisfaction a primary goal.

I think enterprise software will evolve to reorient data modeling around people and focus on the quality of user experience. The legacy of being data-centric is based on the assumption that workers are more productive if provided better information. While I don't challenge that assumption, I think the implementation of said principle has presumed volume and completeness of information was the key. I think Web 2.0 has shown that data accessibility, which is driven by data structure and usability, is more important.

Application integration has been challenging in enterprise. At times it was just expensive and in other cases simply didn't work. Technologies like CORBA or DCOM and the more recent SOA/ESB/SOAP approach, while ranging in adoption, haven't delivered great results, in my opinion. But most IT shops have tried to implement these standards nevertheless.

Mashups have demonstrated application integration can be relatively cheap and simple. Where numerous enterprise integration have spent tens of millions of dollars for mediocre results, it is fairly common place for Web 2.0 applications to share data, expose API's and leverage other applications based on modest effort. REST, JSON and simple XML/HTTP APIs are proving more effective and attractive than the presumed standards of SOAP in enterprise.

Integration has always been a pain point in enterprise and I think Web 2.0's approach can provide some insight for tactics that make it more economically and technically viable.

Many enterprise IT groups and ISV's are already looking to exploit and borrow Web 2.0 technologies and experience. While I think this will result in lower development costs, better applications and probably higher productivity, I don't think the trend will simply consist of enterprise visiting the land of Web 2.0 and bringing back trinkets from its travels.

I think the line between consumer Web 2.0 and enterprise will blur and fade, though not completely. Many of the same people who are users of enterprise software at work, are users of Web 2.0 at home. And they already use the same applications in both arenas; Google Maps and Wikipedia are just two examples of such applications.

Many sales groups already use LinkedIn to generate and pursue leads. (The salesforce.com AppExchange has applications to integrate with LinkedIn.) Google Apps is frequently used by office workgroups to collaborate on documents instead of using Microsoft Office.

Ten years ago email was typically a discrete application; at the millennium "Send As Attachment" functionality was commonplace in applications. Web 2.0 technologies such as RSS feeds are already being integrated into many applications and I imagine the ubiquity of other Web 2.0 elements will continue. I think we are quickly approaching a world where the tools used at work and at play will frequently be the same.

Other articles: