Ruby Ruby Ruby Ruby

by marc 29. March 2008 05:00

I casually mentioned that learning new stuff - Ruby in this case - is sometimes a bit hard. So Huw challenged me to define what I found hard and maybe they could sort that out in their implementation of Sapphire.

I've been revisiting Ruby the past couple of weeks following a conversation with a colleague. (I spent some time learning Rails a couple of years ago to see what the furore was about). With the IronRuby and DynamicSilverlight efforts going on, it's probably Very Handy to know.

So, actually I found I struggled with some concepts much less than I did last time. The key issues for me had been:

  • Symbols. Just found them a bit weird. This wasn't really a big deal. I suppose one of the issues here is that their use can depend on the individual coder rather than as a language practice so they can seem a bit intangible.
  • Codeblocks. This is owing to them not being declared in the method signature (you can, but no-one does). You have to look for the yield keyword. On the other hand, recent practice with lambdas and so on in C# means that I understand the general subject a lot better now.
  • Macros. How to achieve the Rails-y belongs_to :post type statements in the class was just a piece of knowledge I didn't have, but I now understand how to create these macros so another mystery is solved.

Overall then, I'm much more positive about my Ruby skill levels. One thing Huw mentioned was that you can make assertions about the expected arguments and their types in comments  for methods in the RubyInSteel IDE which appear as part of the intellisense capability. Now, I've owned the product for quite a while but of course I hadn't read the manual. This seems useful for a relative n00b like me - at least while learning.

Technorati Tags: , ,

Comments

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.0
Original Theme by Mads Kristensen and adjusted by me