↓ Skip to main content

Ruby

Microsoft is getting more dynamic

·279 words·2 mins
at least as the programming language languages are concerned. One of the things that will be presented on the MIX07 is Dynamic Language Runtime, a new platform suitable to host high level, dynamic languages such as Python and Ruby. For Python, there is already pretty decent .NET implementation - namely IronPython. What is coming now is IronPython 2.0 based on the DLR as well as - yesss - IronRuby. It is great that this is happening. In Java world, JRuby is very close to being full implementation of the language. The speed of the JRuby is still not quite in the proximity of the C implementation, but the large selling point of JRuby is its capability of deploying Ruby application (or even a Rails application) inside Tomcat or any other Java Web container. This removes largest obstacle of using Ruby in enterprise environment - namely being "new" and not approved platform. When the .NET runtime will be able to host Ruby code, acceptance in enterprise space will be even higher.

Accessing SQL Server 2005 from Ruby

·232 words·2 mins
The natural gravity of our environment keeps pulling me out of scripting and Ruby world back to .Net zone :-). Out of curiosity, I looked into how easy or hard is it to access other database from Ruby, than the default MySQL which dominates all books, samples and tutorials. I have found three ways (at least), one likely platform independent and two Windows only. The platform independent requires module ADO.rb and works with the DBI interface. This sounds very similar to the way how Perl used to access databases, so I put this at the end of the list (some details are here). First Windows only methods used ODBC - no, thanks. Configuring machine specific data sources is not the way I wanted.

In praise of the polyglot

·136 words·1 min
If you've ever envied the ability of multilingual friends to bridge language gaps wherever they travel or gained new appreciation for your native language by learning a new one, then you can probably see the advantage of being a programming language polyglot. Developer polyglots travel the IT world more freely than do monolinguists (sure that they can apply their skills in any environment), and they also tend to better appreciate the programming language called home, because among other things they know the roots from which that home is sprung. Isn't it time you became a polyglot?

Gems and bookmarks

·742 words·4 mins
This was one great weekend ! Easter should be more often than once a year, I guess. Unlike Christmas, there was no shopping craziness before and much less overeating danger. Not counting overdose of chocolate, of course, but that's OK. I managed do mostly nothing for about one day - up to Friday evening. Then I dived into the Ruby and Ruby on Rails world. After reading this and one third of this book, I like Ruby even more. I actually did write some code - not much, but rewrote some of my old Python scripts I use to manage files and repositories. The new Ruby version is shorter and IMHO more elegant (even with my limited command of Ruby idioms), much better readable - albeit a bit slower than Python version. But that does not change my very positive impression of new language. In addition to these (and btw, the mixin's are so great it is even scary), I learned to love the Rake and gem tools. Gem is pre-packaged Ruby component, managed as unit, that can be installed and updated remotely using the gem tool. It solves the problem of versioning - something I wished Java had from the beginning. It also provide similar functionality as the GAC in .NET: allows side-by-side existence of multiple versions of the same component and makes component available to other programs. Very clever, very convenient. Same story as with the language - gem is something similar that Perl did have with CPAN, but it is just cleaner, nicer and polished ...

Couple of things I really like about Ruby

·324 words·2 mins
I guess it is too early to write any more systematic opinion about the language you know less than 10 days, but after reading the Programming Ruby 2nd edition (thank you, Safari Books) I have found out that I actually do like couple of Ruby features a lot. Your mileage may vary - what speaks here is my Java/C#/C++/C/Python/Perl background and bias. Here there are my favorite Ruby-isms (so far) in no particular order:

Managing knowledge portfolio

·641 words·4 mins
There are few technical books which you enjoy first time you read them, remember the experience and keep coming back. One of such classic books is The Pragmatic Programmer - from journeyman to master - by David Thomas and Andrew Hunt. If you have not read it, get it, it is worth every cent. Since the book was written - ages ago, back in 2000 - it did not loose anything of its freshness and value - which one cannot say about most of technical books written earlier than 2-3 years ago. Inspired by the success of their initial creation, Dave and Andrew started the website and continued writing whole Pragmatic Programmer series of books.