October 2005 Archives
Here's in interesting blog post that compares Bill O'Reilly to Joe McCarthy. A choice excerpt:
MCCARTHY: You know the [American] Civil Liberties Union has been listed as "a front for, and doing the work of," the Communist Party?
OREILLY: [T]here is no question the ACLU and the judges who side with them are terror allies. (July 25, 2005)
While I'm sure Ann Coulter probably thinks this is a good thing (as Joe McCarthy was her role model), it certainly sends shivers down my spine.
I've been a Perl user for a very long time. How long? Let's see... probably 12 years. I'm fairly certain I first touched Perl back in 1993 to analyze the logs of the NCSA web server back when I was in college. Yet in the last few weeks, I've become extremely attached to Ruby for things I would normally do in Perl. Ruby has just a nice, clean object-oriented environment. Writing OO Ruby code is straight forward if you come from a C++ or Java background. There's no blessing of objects, choosing the object representation, crazy things to make sure inheritance works, or trying to use Class::MethodMaker to make it all just go away.
So why the switch? I decided to learn Ruby on Rails so I could hang out with all the cool kids. Of course, to learn Rails, I needed to learn Ruby. In the end, I not only walked away impressed with Rails, (which will have to wait for another blog entry), but I walked away very happy with Ruby. Part of my success of learning is due to the "Pickaxe" book, which is just a fantastic book. If you have any interest in learning Ruby, buy this book. A few really cool features of Ruby (besides the simplicity of writing OO code) that really stick out to me are:
-
The concept of attributes, and method names ending in "=". This kind of code is just way cool:
class Person def name=(name) # ... end end person = Person.new person.name = "Matz" - Closures. Martin Fowler has a good explanation on what is so cool about closures, with examples in Ruby.
- Absolutely everything is an object, including types that are typically primitives, such as integers and floats.
-
All classes are open. There's no such thing as a Java
finalclass. While this means you can actually override the plus operator for integers to redefine math, it also gives the flexibility to add methods to built-in types when needed. Surprisingly, I've already come across a case where that made my life easier.
So why Ruby instead of Python? Well, as I mentioned the original goal was to learn Rails, so Python wasn't exactly an option. But I've tried to learn Python in the past because some coworkers have been so gung-ho over it. But for some reason, Python never really clicked with me. When I needed to write a script, I'd try to do it in Python first, but always ended up going back to Perl because I just couldn't figure it out. Plus, the Python book I have, O'Reilly's Programming Python, was really awful. I can't remember the details, but the structure and tone of the book, again, just didn't click with me. I should probably give Python another chance, perhaps with a better book. But now that I know Ruby, I don't have as much as a compelling reason to learn Python anymore. The only draw for Python to me now is PyObjC, but I'm hoping someone will come out with a good Ruby to Objective-C bridge first.
So in the end, if you're looking to learn something new, spend some time with Ruby, especially if you're a Perl die-hard. In the words of Tim Bray: It sure looks like more than a fad to me.
According to his blog, David Heinemeier Hansson (DHH) of Ruby on Rails fame is emigrating to Chicago. He is joining his company, 37signals, in Bucktown on the northwest side. Think what you want of Rails, but I think it's awesome to see Chicago finally get some good tech publicity. Ever since the supernova-style implosions of sleazy companies like marchFirst and Divine, Inc., Chicago has been in dire need of good tech businesses. Not that Motorola isn't a good tech business. But let's face it, they hardly drive tech talent to Chicago. And they're located in the suburbs, which affects their cool, cuttings edge factor. I'm tired of seeing Silicon Valley and Seattle get all the good stuff. Chicago is a great city with some great tech talent that seems to be ignored by the technology industry. And it makes it that much sweeter that 37signals is located in Bucktown rather than downtown. There is so much more to Chicago than just the Loop, the Mag Mile, and Millennium Park. Plus, I lived in Bucktown for 5 years and I still have a soft spot for it, despite it's changes over the last 10 years. It's refreshing to see some good publicity for businesses in the neighborhoods, especially tech ones. Maybe this will be the beginning of Chicago's new tech persona.
