Monthly Archives: September 2007

Technology Bias Can Be a Strength or a Weakness

I have been reading a number of posts around the web about Derek Sivers of CD Baby dumping Ruby on Rails to return to PHP.    I am sure just about every Ruby enthusiast has read the post over on the O’Reilly Ruby blog.

In case you missed it the post is about how CD Baby spent the last two years converting their PHP-based web application to Ruby on Rails only to have the project fail and Derek going back to PHP and doing it himself in two months.  Here is an except from the O’Reilly web site:

INTRO / BACKGROUND:

Back in January 2005, I announced on the O’Reilly blog that I was going to completely scrap over 100,000 lines of messy PHP code in my existing CD Baby (cdbaby.com) website, and rewrite the entire thing in Rails, from scratch.

I hired one of the best Rails programmers in the world (Jeremy Kemper aka bitsweat), and we set off on this huge task with intensity. The first few months showed good progress, and Jeremy could not have been more amazing, twisting the deep inner guts of Rails to make it do things it was never intended to do.

But at every step, it seemed our needs clashed with Rails’ preferences. (Like trying to turn a train into a boat. It’s do-able with a lot of glue. But it’s damn hard. And certainly makes you ask why you’re really doing this.)

Two years (!) later, after various setbacks, we were less than halfway done.* (To be fair to Jeremy’s mad skillz: many setbacks were because of tech emergencies that pulled our attention to other internal projects that were not the rewrite itself.) The entire music distribution world had changed, and we were still working on the same goddamn rewrite. I said fuckit, and we abandoned the Rails rewrite. Jeremy took a job with 37 Signals, and that was that.

I didn’t abandon the rewrite IDEA, though. I just asked myself one important question:

“Is there anything Rails can do, that PHP CAN’T do?”

The answer is no.

I threw away 2 years of Rails code, and opened a new empty Subversion respository.

Then in a mere TWO MONTHS, by myself, not even telling anyone I was doing this, using nothing but vi, and no frameworks, I rewrote CD Baby from scratch in PHP. Done! Launched! And it works amazingly well.

It’s the most beautiful PHP I’ve ever written, all wonderfully MVC and DRY, and and I owe it all to Rails.

Projects fail and this won’t be the last one.  What I find most interesting is not that the project failed, failed using Rails or even went back to PHP, but the number of comments from Derek’s post, 333 as of the time of this writing.  What amazes me beyond the number of comments but the number of comments by people taking the time to piss and moan about either how PHP sucks, the CD Baby site sucks or how Rails sucks and Derek should have known better.

This is not the first set of comments of this type I have seen, it shows a common pattern.  People spend their time becoming angry and venting to someone because they don’t like what they are reading.  This is obviously counterproductive, immature and makes the commenter lack credibility.   The shear number of comments to Derek’s posts reveals the true passion people have for a technology and points out how people often lack communications skills to adequately describe their bias to their technology.  The outbursts we see in posts mostly shows a defensive response to something they are taking as a personal attack.

You can see what I mean from a few of the comments:

Your website looks like a spam site.

Anonymous | September 22, 2007 07:11 PM

Haha at the Rail Kiddies…

No | September 23, 2007 01:46 AM

PHP is a super slow language that not even ruby can beat for performance.

Joe | September 23, 2007 07:54 AM

Why bother to post at all if just to attack?   I always find this interesting, many people take time out of their day just to post a negative comment instead of something constructive and useful.  Not all comments are negative and some are very useful, still showing a bias toward a language.  I think people who can successfully communicate why their language is better in solid technical reasons from a background of real experience really give value to a post.  Why waste time posting a comment it is not going to be constructive?

Our bias sometimes prevents us from adding value to our profession, whether it be a blog comment or even at our jobs.  I have seen people get incredibly agree when second-guessed in a meeting about a technology decision they have made.  It makes them look very bad to their peers and bosses.

I like to step back and think before reacting.  Sure, developers take pride in the technology they have chosen and it is easy to be reactionary to be put on the spot and asked to justify our bias.

I try to follow some rules of thumb:

  •  Think out-of-the-box – don’t just say your technology is “the” one to use always, because that is never the case.   Just because it is the technology we know it doesn’t mean it is the best one in this case so know when to have an open mind.
  • Know what you don’t know – we don’t know everything, don’t try to come across as a know-it-all, be willing to listen to others when the technology is something you are not familiar with
  • Leverage what you do know – be able to effectively communicate why your technology is best for the job.  Do it in a calm and intelligent way. 
  • Keep in mind the real goal, solving business problems.   When all is said and done this is what we are paid to do so just do it.  If your technology is not best for this particular business case then accept it and move on.

Here is another post on a different blog that shows a similar attack on Ruby on Rails by someone who just met Erlang and decided it was “the” technology for him.   Instead of a good list of technical reasons against Rails and how Erlang solves problems better, the author just attacks Rails and the Rails community with little technical reasons for anything.  This is another great example of a bias without thought and without real experience.  The post did receive a fair amount of comments pointing out holes in the anti-Rails arguments.

So, if you are going to comment on blogs, make the comments positive and have it add value to the conversation.  You will look more authoritative and will spark better quality comments from other readers.

Technorati Tags: ,

Castle Project 1.0 RC3 is out

The Castle Project has finally released its version 1.0 RC3 today.  It has been a long time coming but not for lack of work.  I am on the development discussion list and there is a lot of activity, much work has gone into this release.

Details on the release from the blog of the Castle Project founder:

ActiveRecord

  • Multiple db support without the need to extend ARBase
  • Refactored validation support to use the new Castle Validation
  • InPlaceConfigurationSource.Build() which is handy!
  • Added HqlNamedQuery
  • Lots of bug fixes

DynamicProxy

The RC3 is the first to include DynamicProxy 2 which has support for generics and is much much faster than version 1

MicroKernel/Windsor

  • Support for generic collections
  • Changed to use DynamicProxy 2
  • Added some sugar to IKernel and IWindsorContainer add/resolve methods
  • Child container support was improved, but still need some review – you’ve been warned
  • Added a simplistic eval support, you can do <?eval $BaseDirectory ?> on your config
  • Both DefaultKernel and WindsorContainer now implement IServiceProvider

MonoRail

  • Added Cache support (see the new Cache attribute)
  • Added IsPost/IsGet/IsPut/IsHead to Controller
  • Added Auto Form Validation
  • FormHelper is nearly perfection, still missing support for selects with multiple enabled
  • Support to register several view engines at once (bye composite view engine) – this is not as good as I’d like it to be. There’s no co-op among them..
  • Added handful of view components
  • Added support to test controllers, viewcomponents, wizard steps without the need to bring the ASP.Net to the table
  • Added JS generation support, and UpdatePage/UpdatePageTag view components
  • Format support on set operations, for example $Form.Select(”price”, [1..100], “%{textformat=’C’}”) is going to render the select elements with currency format
  • Added PaginationHelper.CreateCustomPage which is the most optimized way to deal with pagination
  • Added DiggStylePagination ViewComponent, based on Alex Henderson work
  • Added the following members to SmartDispatcherController (validation related) ValidationSummaryPerInstance : IDictionary, GetErrorSummary(object instance) : ErrorSummary, HasValidationError(object instance) : bool
  • Added ViewComponentDetails attribute (just like ControllerDetails)
  • Added ViewComponentParam attribute which tells MonoRail to bind the arguments as properties on your view component – reducing repetitive code rules
  • Added UrlHelper/UrlBuilder concept

Aspect#

Is out…

Components

  • Added Castle.Validator
  • Added Castle.DictionaryAdapter – still puzzled by this one
  • Improved Binder (another re-write of its implementation)

Other

  • Created the using.castleproject.org
  • Created the api.castleproject.org
  • Initial integration between the Castle.Services.Transaction with MS’ System.Transactions
  • Created Castle.Core

Well, basically that was it. We’ve been busy.

For those who don’t know what the Castle Project is, it is a set of libraries for implementing a Model-View-Controller (MVC) framework in .NET.  The key piece for this is MonoRail with ActiveRecord handling the models.  Most of the time we hear about Ruby on Rails and its MVC implementation but Castle does this on .NET. 

I did an interview with Hamilton Verissimo, founder of the Castle Project, for InfoQ last week.  Hamilton is a sharp guy and has lead the core team to produce a great open-source project.  I am working on a project using MonoRail and it is very nice to produce a web application this way.

Technorati Tags: , ,

Rubiverse Podcast

I recently discovered a Ruby-focused podcast called Rubiverse Podcast.   It is a new podcast, so the number of episodes are limited but the first two are very good.

The most recent one is an interview with Scott Bellware who is a Microsoft MVP but sees the downsides of Microsoft and has been gravitating toward Ruby on Rails.  I really enjoyed the interview.

Scott’s viewpoint is much as mine is these days and its nice to hear Scott speak the way I feel.  Scott is the found of the ALT.NET Conference and one I wish I could attend.  I am glad I am not the only one out there who thinks there has to be a better way to make a living.

Technorati Tags: , ,

Ruby East 2007 is Coming…

So, I recently learned about a local Ruby and Rails conference coming in a couple weeks to within driving distance to me, Ruby East 2007.   It will be on September 28, 2007 at the Penn State, Great Valley Campus. 

The speaker lineup looks good as does the agenda.  As a bonus the winners of the RailsRumble will be announced at this event.

So, who is going to attend? 

Technorati Tags: , ,

My Latest Article is up on InfoQ : Catching up with the Castle Project

My latest article titled “Catching up with the Castle Project” is up on the InfoQ web site.  I had the opportunity to chat with Hamilton Verissimo of the Castle Project.

I have been using this framework on some test projects to try to learn the .NET side of an MVC framework.  The talk with Hamilton was loaded with incite, thank you Hamilton for giving me the time.

Technorati Tags: ,

Ruby Makes You a Better Person – Scott Bellware

I am a frequent reader of Scott Bellware’s blog.  He had an interesting post today reflecting on a Ruby conference he recently attended.  His observation was how the speakers and the attendees seemed to take on a different perspective from the normal Microsoft conferences, the Ruby people are interested in using the right practices and the experiences they have learned instead of pushing the latest tools and technologies.

Scott does a great job of putting into words the feeling I get around people using Ruby.  I work with some Microsoft consultants and they are always pushing the latest and greatest tools and telling us how we can be doing more with more.  I think these days the .NET Framework and the tools are becoming more and more bloated.

When I am interacting with other Ruby (and Rails) developers I get the sense they are doing what they love and actually have fun while they are doing it.  I can remember the days when I was writing BASIC code on a KayPro and Intertec CP/M based systems.  I loved learning and the community, though small, was excited and happy.

I think the feelings we get come from the top-down. The goodness, the excitement and enthusiasm start at the top and trickle down to those who are willing to listen.  The principles of DRY (Don’t Repeat Yourself) and KISS are some of the ideas David Heinemeier Hansson (DHH) expressed in the early days of Rails.  Since Rails is entering it’s 2.0 version, a recent DHH RailsConf 2007 keynote showed the philosophy of the Ruby movement.  Rails 2.0 will have some new features but will also be taking things away that are not needed which is a great example of keeping things simple.

So why don’t I get these warm feelings when I am sitting back writing C# code?   It comes from the top-down, Ruby is a community but .NET is just about business.  Scott noticed the same thing I do.

Technorati Tags: ,

FiveRuns™ + RM-Install = Rails on Linux

One of the reasons I went with VMWare Workstation 6.0 was their support of Linux distributions.  I am a Windows XP user and developer and spend my day using it.  I used Microsoft Virtual PC for working with other operating systems other than Windows XP, but VPC never has done a great job hosting Linux. 

My goal is to become proficient with Linux (Ubuntu) and Ruby on Rails development on that platform.   VMWare Workstation does such an outstanding job of running Linux.

I don’t want to go off on a VMWare tangent, I want to talk about a company named Fiveruns.  Fiveruns is a company who has dedicated themselves to enterprise management for Rails.   This is all they do and they seem to be very good at it.

One of their products is called RM-Install.  RM-Install is a free download that will allow a less than savvy Linux user (me) to get a full Rails stack up and running in no time.  RM-Install actually will install the stack on Linux as well as Mac OSX and a Windows version is coming.

You have to register for a download and you get a single file which is executed and installs and configures the following:

  • Ruby 1.8.6
  • Rails 1.2.3
  • MySQL 5.0
  • SQLite 3.3
  • Subversion 1.4
  • Apache HTTP Server 2.2 (Production mode)
  • OpenSSL
  • ImageMagick 6.3
  • Mongrel/Mongrel Cluster
  • Capistrano
  • Gruff
  • Rake
  • RMagick

It takes only a few minutes to install and when done you are ready to go, no more to do but open a terminal window and create your Rails application.  The installation has a couple options, one for a development platform (no Apache) and a production mode (with Apache).

After I finished the install I created a Rails app, started Mongrel and browsed to http://localhost:3000 and I got the default Rails application page.  No, not magic but it demonstrates how easy it is use RM-Install to get up and running FAST.

The Fiveruns web site is done very well (using Rails) and has some good information about RM-Install and their other products. 

Technorati Tags: ,