Posts Tagged ‘Ruby’

Star Ruby (The-Delong-Star-Ruby)It is the end of the first “week” with the book. Due to very busy pre holidays period and holidays it actually took me a month to get through it. I hope things will be less hectic in coming weeks so that I can live up to the book’s title.

So week one with Ruby then. Everyone interested in software development has almost certainly come across this language. It has captured the interest of disgruntled masses with very productive Rails framework back in 2005. I remember seeing the infamous blog demo videocast and being blown away by the fact that this guy seems to be able to knock up a blog from scratch in about 15 minutes. What I was even more impressed with was how clean and sensible the code he was writing was. I tinkered around with Ruby for a little bit back then, but I got pulled more deeply into the world of Java at that time, as as this was lingua franca in company where I worked and the idea was that it was more important for me to master that than a side language.

So what did I miss out on by doing that?  For one Ruby is a pure Object Oriented programming language which means that everything including literals is an object. It uses strong and dynamic (duck) typing strategies. This allows for polymorphism by functionality rather then by declared types; which gives you more freedom and less typing at the expense of compile time type checking. All the classes in Ruby are open and can be extended, including classes such as String and NilClass. It supports mixins (think interfaces with implementation) as a workaround for multiple inheritance. Provided APIs are rich and frequently provide same functionality via different methods. Ruby and it’s APIs rely on code blocks (closures, higher order functions – how ever you want to call them) heavily.  It also provides good metaprogramming facilities.  All of this makes it a wonderful and expressive language, but at the same time it gives you all the rope you want to hang yourself. Read on »

Book Cover: Seven Languages in Seven Weeks: A Pragmatic Guide to Learning Programming Languages by Bruce A. TateLately I have a feeling that Java ecosystem is getting a bit stale. To add to that grass seemed greener on the other side of the fence. Several of my friends that I started my coding career with in J2EE trenches have deserted and moved on to Ruby. None of them ever mentioned regretting the move.

Then new languages that run on JVM started gaining traction and I had a little play with Groovy couple of years ago. I liked the language very much and I grokked why my friends were so happy with Ruby path they’ve chosen. Sheer expressiveness and productivity provided were impressive. I tried to push for Groovy to be used at work but it never got beyond utilities and scripts. I once read that someone said that the problem Groovy has, is that it is not called Business Logic Expression Language. It seems that sentiment rings quite true.

Anyway as I mentioned earlier Java no longer feels quite like a nice new comfy shirt. I am feeling that it’s constraining me and due to my brushes with alternative, there is always that little question in the back of my head: “Am I using the proverbial golden hammer?”

Recently I started looking over the fence again and I am seeing that there seems to be more choice than ever. One of the languages that sparked my interest was Scala. I checked out some of the websites devoted to it and found that community seems quite vibrant and that the language itself is very interesting indeed. Also the fact that it allows and encourages functional programming sparked my interest even further. I am quite familiar with object orientation and have merely brushed with functional programming at uni. The prospect of getting my head around something new and the promises that functional programming paradigm brings (especially regarding concurrency) got me quite excited.

As I almost decided to devote more time to Scala I have attended Agile Testing & BDD eXchange. In one of the presentations Erik Stenman talked about Erlang amongst other things and caught my attention. Read on »