[LRUG] Convincing a bank to use Ruby

benjohn at fysh.org benjohn at fysh.org
Fri Mar 17 01:23:18 PST 2006


> I've just started at a bank and am hoping to help some fellow Rubyists
> convince said bank to allow me to use Ruby.
>
> What arguments do you think I should use?  Preferably ones that can be
> backed up (I'll develop 10x faster doesn't really cut it...)

Having gone through a similar process that resulted in an 8:1 vote in
favour of Ruby: you need to aleviate their fears and show them benefits.


Fear: it's immature, lacks good documentation, libraries, tools and
community, and no one big uses it.

Answer: It has all of these. In fact: The Pickaxe is an awesome
programming book (and there are others), there are numerous extremely
good tutorials on line at various abilities; it's libraries are
completely standard, extensive, and excelent (and also very good
packaging under gems); it has superb standard tools (irb, rdoc,
debugger, profiler, unit tests); and the community is very active (see
ruby-talk). Plenty of people use it (links to follow).


Fear: I wont be able to find anyone to maintain code written in Ruby.

Answer: It is true that you will find it much harder to employ someone
with extensive Ruby on their CV. However, the maintainability of code is
not about it's syntax. I know c++ (12 years), but it took me 3 months to
get to speed on the code base here. Ruby helps to _reduce_ this time
drasticaly, because: it supports and encourages (almost demands) highly
modular code that's extremely maintainable; it encourages inline
documentation; and it encourages experimentation with irb. Anyone who
can code will look at Ruby and get what's going on reasonably quickly. A
few links off to web tutorials (put this info in a README, in your
source tree, next to the code) will let them jump in to the community
and be up to speed in days.


Fear (not a big one, but I've heard it): Everything is an object,
doesn't that make code rather verbose?

Answer: Having everyithing as an object provides enormouse conceptual
simplicity, but does not make code verbose. Ruby is just as able to do
quick scripts as Perl; you don't have to think of it in an OO way, but
the objects are there for when you need them.


Benefits: It's actually more maintainable (for the reasons above). It's
extremely productive (because of the standardised package with it's
tools and libraries).



Good luck :) Here're some notes I put together, they may help you:




On 7 Mar 2006, at 18:38, Barnes, Benjohn wrote:

Groups and People using Ruby:

	National Oceanic and Atmospheric Administration -
	[http://www.devsource.com/article2/0,1895,1778695,00.asp]

	NASA -
	"What does NASA use Ruby for?"
	"For everything we can."
	[http://www.devsource.com/article2/0,1759,1778699,00.asp]

	Many, many small companies -
	[http://wiki.rubyonrails.com/rails/pages/RealWorldUsage]

Intro

	I will persuade you it's safe, mature and popular.
	Show it has significant benefits.
	Allay any fear you may have about its maintainability



Mature and Popular

	Not new.
	Adoption delayed by
		documentation translation.
		transfering enthusiasm over culture divide.
	Used all over the place.
	Very active developer community (hour turn arround on queries)



Benefits

	Clean, simple, consistent Perl
	Interpreted, great for "scripting" and whipping things up.

	Pure OO language
	Everything is an object, similar to Smalltalk
	More suitable for building maintainable, extensible applications.

	Dave Thomas (Author of The Pragmatic Programmer) -
	"Ruby keeps the convenience of Perl, but adds full object orientation.
Everything is an object, so there are no special cases. Unlike Perl,
classes and objects are trivial to write and use, so you find yourself
using them more. As a result, the programs you produce are better
structured and easier to maintain."

	Excellent reference books, tutorials, and an active community.

	Superb set of standard modules and standard tools in the standard
installation: Interactive shell, Debugger, Profiler, Documentation,
Unit testing framework, Packaging system.

	So productive.

	Lead software engineer is experienced with it (me).




Is it maintainable (selective quotes)?

	Matthew G says -
	"... the code in question is uncomplicated, well structured and looks
like it would be relatively easy to maintain by a moderately
experienced software engineer not previously exposed to the language
(but is competent with, and has been exposed to a couple of unrelated
programming languages), so long as reference material were available."

	Sarah M says -
	"... fairly quick and easy to pick up enough Ruby to be able to
understand and maintain existing scripts.  It all seemed pretty
logical. I agree with Matthew that a bit of cobbled together reference
info would help with this."

	Dave Thomas (again) -
	http://www.newsfactor.com/perl/story/20862.html
	"In addition, Ruby is far easier to maintain than Perl. The problem
with Perl is that once you get above a certain size, it's hard to keep
the application well structured. Not impossible ... but most Perl
programs start being spaghetti after a certain size."


	Me -

	Dificult maintainance is not about language syntax.

	Took months to learn SPI (My Ability?) - it's in C++, a language I've
used for 10 years.

	Mantainance easy when system understandable.

	Use tools that encourage a modular system (OO).

	Provide conceptual documentation in the source tree.

	Ruby enables and encourages good practices.

	=> Well structured, conceptually simple code.

	"It's better to have something well structured that people can quickly
learn to support, than to have something poorly structured that no
degree of language experience will render supportable."


Is a mix of Tech. bad?

	I (personally) don't think so. I think we should use the most suitable
tool for the job. I think Ruby is good for the Application like parts
of the system. Perl may be preferable for others.



More web refs with extracts:


I've scanned about for some raving advocacy and evangelism, but it looks
like the Ruby crowd is busy getting work done, rather than trying to
show off how big their tool is. Here are some reasonably measured
articles (and tasty quotes) that help show why it is so good.


http://www.linuxdevcenter.com/pub/a/linux/2001/10/25/ruby.html?page=2

"Ruby owes much to Perl. It resembles Perl in many ways, sharing many
shortcut globals (things like $0, $$, and so on), and it shares Perl's
power to manipulate textual data. But Ruby is like a sleek, elegant
Perl, with a fully integrated object model. It handles complex data
structures better, and seems better suited to programming in the large.
And, it's a heck of a lot easier to read.


http://www.amazon.com/exec/obidos/tg/feature/-/99126/104-5525357-1831921

"Ruby keeps the convenience of Perl, but adds full object orientation.
Everything is an object, so there are no special cases. Unlike Perl,
classes and objects are trivial to write and use, so you find yourself
using them more. As a result, the programs you produce are better
structured and easier to maintain.

...

"Ruby programs are readable by anyone familiar with a modern programming
language.


http://www.newsfactor.com/perl/story/20862.html

This article comments on Ruby's lack of documentation, which is now an
out of date comment - the docs are very good IMO. It also makes this
point:

"In addition, Thomas said, Ruby is far easier to maintain than Perl.
"The problem with Perl is that once you get above a certain size, it's
hard to keep the application well structured. Not impossible ... but
most Perl programs start being spaghetti after a certain size."


http://www.theperlreview.com/Issues/The_Perl_Review_0_6.pdf

This is an article in a Perl journal, so you'd think it would be a
reasonable comparison. It's a PDF.








More information about the Chat mailing list