I've been monitoring the various Java vs. Ruby discussions on websites such as Slashdot and TheServerSide, and decided to share my thoughts on the matter.
I think that the following points give Ruby and Rails a trajectory for success:
The Ruby language is nicely designed, at least as simple as Java.
The Ruby language is dynamic, allowing me to express simple programming constructs concisely and to easily implement more powerful constructs such as dynamic class extensions.
Although Ruby is slower than Java right now, the new Ruby VM looks promising and I expect Ruby to be on par with Java performance in less than a year. Remember that Java 1.0 was very slow until Microsoft implemented their JIT VM and Sun followed suit.
New Java features such as templates make code look a mess and remind me of C++. The ugliness of templates reinforces for me the elegance of dynamic typing.
Ruby on Rails is quick to learn and great for implementing web applications. It might not currently support some of the features of J2EE, but the Rails community seems quick to add features that are commonly needed. Upcoming new features such as SwitchTower push the envelope on what an integrated framework provides.
One of the best things about Ruby on Rails is that it's open source, elegant, and very small. You can browse through the code and understand a good chunk of how it works in just a few days. This makes it quick to extend and debug. I bet that the Rails source code is at least 10x smaller than its J2EE equivalent.
The inventor of Rails, David Hansson, has a clear and consistent philosophy that I agree with. He and his team are focused on keeping Rails simple and enjoyable. Rather than building everything and the kitchen sink into the core, they are adding hooks into the framework that allow the community to write plugins for extended functionality. This allows the core to remain small and stable while also enabling rapid evolution of competing higher-level features.
Regardless of the points that anyone might raise in a comparison of J2EE and Rails, the only way to truly understand their differences is to build applications in both. After spending the last 8 years writing Java products like JGL, Voyager, EXML, Glue and Fabric, I decided to try out both PHP and Ruby on Rails before selecting a language and framework for my new product.
Ruby on Rails was the clear winner for me. It's possible but unlikely that my opinion will change when I get to final deployment of my new application. Indeed, I expect to become increasily happy with my choice as the evolution and popularity of Rails accelerates.
Instant Runnoff voting is an idea that makes total sense; rather than just voting for your favorite candidate, you list the candidates in order of preference. If your #1 choice does not win, your vote is allocated to your #2 choice and so on.
The current system makes it virtually impossible for a third politial party to emerge, since most voters don't want to waste their single vote on a candidate that is unlikely to win. With instant runnoff voting, there is no reason not to vote your true preference.
The unfairness of the current system is made very clear by this great video by John Cleese.
The encumbents don't like competition, so it's unlikely that this system will ever become a national practice. However, it's interesting to note that it's used when selecting the Lord Mayor of London. Good for the British!
This article in New Scientist describes the criteria that is currently used to predict the most likely place to find alien life; stars that are stable and are have Earth-like planets.
Personally, I think this criteria is wrong; here's why:
I believe that any lifeform that evolves to our current intelligence level will figure out fairly quickly how to create digital life. Digital life is similar to biological life except that its mind can be encoded digitally, providing profound benefits such as immortality, speed-of-light travel, and the ability to continually upgrade both its mind and its hosting evironment. For more thoughts on digital life, see this blog entry.
Digital life is the natural evolution of biological life. Digital life can live in any host sufficiently advanced to contain and execute its mind. In once sense, these hosts are like computers, but far more advanced than anything we have built so far; under a microscope, even the most primitive of these hosts would look as complex as a human brain.
It's interesting to ponder what a digital lifeform would be like, and what it would do with its life.
Biological minds live inside biological bodies that require organic food for fuel, air to breathe, gravity to maintain muscle tone, and a ton of other constraints. Biological lifeforms evolved on planets over billions of years and therefore planets are their natural habitat. They can certainly survive in space, but they have a lot of biological baggage that they have to deal with.
Digital lifeforms, on the other hand, can host themselves in custom bodies adapted for a variety of environments. Such bodies could be built out of advanced inorganic materials that could operate happily on a planet, inside a star, on in deep space. Given the range of possible options, I think that living on a planet would be pretty boring for a digital lifeform when compared with alternatives such as exploring the universe at near-light speeds.
My guess is that digital lifeforms will usually leave their planet of origin and travel through deep space to explore the wide reaches of the universe. Their biological creators would most likely also explore space, but to a much lesser degree due to both physical and mental constraints.
If I'm correct, Earth-like planets might be the most likely place to find biological lifeforms, but not the best place to look for their digital offspring; these would have left a long time ago and traveled to places they find more "interesting".
This begs another question; what kind of place would a digital lifeform find interesting? That's a topic for a future blog entry!
Right now it's 6:55am on Sunday morning, and I've been hacking through the night on some Ruby and Rails code. As usual, the noise of garbage collection has been terrible for the last hour. One of the reasons that it gets so bad is that 3 separate trucks collect garbage from my same area, spaced about 20 minutes apart. It's odd that it can't be handled by a single truck.
I've lived in Georgetown, Washington D.C., for a little over a year now and although I like the scenery, I have found it to be a terrible place to live. The reason is noise pollution. I live close to the intersection of M street and Pennsylvania avenue, and there is an almost 24-hr barrage of noise.
Tow trucks park next to my house with their noisy engines running from 1am to 4am. Garbage collection starts at around 5am, with three separate trucks generating a ton of noise through to about 6:30am. Then the construction starts at around 7am, with two separate developments about 20 feet from my house. I'm writing this entry at 8:30am and the hammering has been going on continuously for over an hour.
One of the reasons I'm looking forward to moving to San Francisco is to escape what has become an unbearably noisy environment. I usually sleep well and try to get at least 8 hours a night. But over the last year, my frequency and quality of sleep has greatly declined and I'm a constant state of sleep deprevation.
I highly recommend that anyone who is seriously thinking of moving to Georgetown keep their eyes and ears open and get acquainted with its environment. If I had known a year ago what I know now, I would *never* had moved here. Feel free to email me if you want any more information about what it's like to live in this part of town.
I've been invited to participate in the Microsoft SPARK event in Las Vegas, March 18-19. It's a workshop-style forum for sharing ideas about the future of software technologies, especially with regards to the web. It's perfect timing, because at that point my furniture and car will be making their way from DC to San Francisco and I won't have a bed to sleep on.
After much deliberation, I've decided to move to San Francisco. I think it's the best place for my new startup, and it also has great weather and plenty of smart, inspirational people. I spent the last week searching for a place to live and finally found a good location in Pacific Heights. If all goes according to plan, I'll be relocating from Washington D.C. around the middle of March.
I'm looking forward to attending the first Ruby on Rails conference in Chicago in June. Over the years, I've had the pleasure of being at some of the early conferences on object-oriented programming (OOPSLA), agent technology, neural networks and Java (JavaOne). The early conferences are generally more technical and interesting because they're filled with early adopters who want the latest leading edge materials. As a technology matures, its associated conferences tend to be targeted towards mainstream participants who are more interested in high-level overviews and ROI case studies which bores the heck out of most techies.