After a strange trip through Smalltalk-land, I'm back to enjoying Ruby.
As I alluded to in my wrap-up post for 2010, I'm now working with Ruby
more frequently than I was a year ago.
One of my main frustrations with Ruby used to be how slow it was. Now
with Ruby 1.9 & rvm I'm much happier using it. The way that rvm
manages gem sets for you and setting a per-directory .rvmrc file
really makes switching between various rubies & gems for various
projects really easy.
I'm working on two projects right now that both use Ruby 1.8.7, but
all my new Ruby development is done in Ruby 1.9 as well as migrating
said 1.8 projects to 1.9.
Another change is that digging into Lisp lately combined with my year
and a half of Smalltalk has given me a new appreciation for Ruby's
meta-programming abilities, each for different reasons.
The Ruby code that drives meta stuff might be ugly, but at least its
easy to write & understand. Ruby doesn't have macros in the same way
Lisp does, but after working in Smalltalk what Ruby has is good
enough.
I'm pretty tired of everything being a "pattern" in Smalltalk.
Metaprogramming can be done with Smalltalk but its more tedious than
Ruby because there is no good way to explicitly show the logic you're
using, and you need a class for everything. But that'll be in another
post soon.
I once again enjoy development in Rails because of the changes in
Rails 3 too. I still get perpetually annoyed by the occasional gem
that just decides to monkey-patch code at will, but if you use gems &
plugins judiciously and read their code its not too bad.
Also, the Lisp code I've been writing for fun has given me a new
appreciation for code-as-data. Ruby can't do that easily, but you can
go the other way and use data structures to generate code. Rails uses
this a little to its advantage, but I've been using that style more
lately for my code too.
Instead of writing a collection of small methods to assemble a larger
method, I've been writing more generalized methods that use various
parameters to dynamically look up method & classes (as one example).
This results in a Lisp-like coding style where I write a "mini-DSL"
that concisely states the logic then implement the code to drive that.
In the end I'm thankful for the ambitious community behind Ruby, and
Rails and all of the great work everyone is doing. It's good to see
problems getting fixed and the technology continually improving. It's
also nice to actually have people living near me who also work with
this stuff daily. I can't say that for Smalltalk or Common Lisp!
In my next post I'll outline my qualitative experiences using Common
Lisp vs. (Pharo) Smalltalk.
It really is indescribable and not for the faint of heart or the selfish. The beautiful thing about parenting is that it shows you who you really are (not who you think you are), and gives you chances every day to grow.
It makes you see what really matters in life, assuming you actually come to this realization. I've seen plenty of people not realize this and fight to keep their identity, their original idea of what they wanted for themselves while also trying to be a parent. That doesn't work.
Part of parenting is a certain amount of ego destruction. You have to go through that if you want to genuinely care for another human being.
This is what makes the experience of parenting so great. It is a kind of Zen experience of making yourself better by destroying your concept of self (and putting another 'self' first more than your own self would like).