I am giving a series of talks to a .NET (C#) development team on the Ruby language and environment. I am approaching it as an opportunity to highlight the benefits of Ruby over C#. At first, I want to concentrate on the language itself before moving into the environment (RoR vs ASP MVC, etc). What features of the Ruby language would you cover?
I gave a talk to a .NET user group a while ago about IronRuby, and faced similar problems. The things I focused on were:
Duck typing. There's nothing stupider than List<string> stringList = new List<string>()
;
Expressive and Concise syntax. Simple things like leaving out parentheses, array and hash literals, etc. (combined with duck typing, you get string_list = []
which is obviously nicer). All small things which add up in a big way.
Metaprogramming. Starting with simple things like attr_accessor
, then maybe something a bit more advanced if they don't immediately see the benefits. Don't try and compare things to lisp and wax on about programs writing other programs... people will just think you are smoking something. Stay simple and hammer home the point that you don't have to keep writing the same crappy boilerplate code anymore
As a good "finale", show them some normal NUnit style tests with all the mess of Assert.NotEqual<string> blah
that they usually have, then say "here's the same code written in ruby" and show them it written using rspec (it will be half the length and 10 times easier to read... if that doesn't sell them, nothing will).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With