Monday, June 13, 2011

Choosing a Programming Language and Framework for Your Startup

We had an interesting presentation at the LA CTO Forum by the CTO of a startup who chose Groovy / Grails as the framework for their startup.  t prompted a good discussion around how CTOs go about choosing the programming language and framework for their startup.  

Some common themes from the discussion:

Know Where You Are Going

Before you can possibly make a choice around language and framework you need to ask all the important questions that are talked about in Startup Software Development – Do Your Homework Before You Develop Anything and  Startup CTO or Developer.  

Closely Aligned Functional Needs

The most common reason that a language and platform is chosen is because there's an existing set of (often open source) functionality that you can tap into that aligns closely with your functional needs.  For example, you may have content management and community needs that closely align with Drupal.  There are some cautions around these choices, but it is often the basis of a choice.

Similarly, you may also have an existing code base or set of libraries written in a language.  This may push you in that direction.

Of course, if you are developing native mobile apps or building something on top of a particular code base or you need to integrate tightly with something, all of those factors may push you directly towards a particular language and framework.  For example, you might choose Sencha if you are building apps that run natively on several platforms (e.g., desktop, mobile, browser).

Existing People

In many cases, the choice comes more out of who's involved and existing code than based on what the "best choice" would be.  Most of the time, there are people / stakeholders who have a particular skill set.  Or you might have an investor (or founder) who's convinced that you need to work in a given language (some VCs love Ruby right now). 

Misconceptions

When I talk with founders and VCs there are often quite a few misconceptions around the choice of language and framework.

Misconception #1 - "You can build things 10x faster in Ruby."

With Ruby/Rails, Groovy/Grails and many other language/framework choices, some aspects of development are significantly faster.  It's way easier to get your pages setup in these languages than by choosing Java alone.  Of course, I'm not sure that anyone chooses Java alone.  They start with lots of other things.  Still there's no doubt that some aspects come quickly.  But if you are building anything with significant functionality to it, then first, don't believe the 10x.  You may get 3x improved speed for roughly 10-20% of the effort of building your site.  The rest is just down and dirty algorithmic programming.  It won't be significantly different in most languages.  Bottom line, you really are not seeing that much different between Ruby/Rails and Groovy/Grails in terms of development speed.

Misconception #2 - "Ruby is the obvious choice."

From Groovy/Grails :: Ruby/Rails :: 2011 State of the framework:

Rails and Grails are both excellent frameworks with their current releases. You really can't go wrong with either. Here are some things I find interesting about them though:

  • Rails (Ruby) does not scale as well as Grails (Groovy).
  • Rails is slightly better with NoSQL alternatives currently, but Grails is catching up quickly
  • Rails has more plugins.
  • Rails is more mature and has more features at this point in time because it's been around longer
  • Rails REST support is amazing
  • There are many more "big" Rails websites than Grails
  • Grails integrates with the JVM better than JRuby

In addition, I'm not quite sure why Ruby has become such a strong brand.  There are LOTs of language and frameworks to choose from.  If you don't believe me, take a look at some interesting data on what programming languages TIOBE Programming Community Index for June 2011 are in use and the current trends. 

Position
Jun 2011
Position
Jun 2010
Delta in Position Programming Language Ratings
Jun 2011
Delta
Jun 2010
Status
1 2 Java 18.580% +0.62%   A
2 1 C 16.278% -1.91%   A
3 3 C++ 9.830% -0.55%   A
4 6 C# 6.844% +2.06%   A
5 4 PHP 6.602% -2.47%   A
6 5 (Visual) Basic 4.727% -0.93%   A
7 10 Objective-C 4.437% +2.07%   A
8 7 Python 3.899% -0.20%   A
9 8 Perl 2.312% -0.97%   A
10 20 Lua 2.039% +1.55%   A
11 12 JavaScript 1.501% -0.58%   A
12 11 Ruby 1.484% -0.61%   A
13 9 Delphi/Object Pascal 1.070% -1.50%   A
14 16 Lisp 0.935% +0.28%   A
15 15 Pascal 0.731% +0.00%   A
16 - Assembly* 0.673% -   B
17 21 Transact-SQL 0.651% +0.16%   B
18 25 RPG (OS/400) 0.637% +0.22%   B
19 23 Ada 0.606% +0.17%   B
20 - Scheme* 0.579% -   B

 

If you look at Ruby's numbers it shows decline which I'm not sure I believe, but I also don't buy into the hype that surrounds it either.  It's a good language/framework, but it's not that savior that some believe.

I would also suggest that languages and frameworks have come and gone for many years.  Right now happens to be one of the most innovative times I've personally seen with new languages, frameworks, etc. coming around pretty much non-stop.   Not all of the newest languages are going to be winners.  If you are planning to build something that will last, I would claim there's risk in choosing something that's the newest thing.

So what's the bottom line?  This is a complex decision.  Get get help (see Free Startup CTO Consulting Sessions).  Get a few different perspectives.  And when a VC asks if you are building it in Ruby - be prepared with a smart answer.

2 comments:

Anonymous said...

What's "down and dirty algorithmic programming"?

Tony Karrer said...

Algorithmic programming is doing something like the matching algorithm at eHarmony. It is coding an algorithm - a specification of a set of rules that result in an answer.