IBM Lotus Symphony available for free

IBM has just released a “new” free office suite (word processor, spreadsheet and presentation software) called IBM Lotus Symphony.

Joel Spolsky thinks that this is a non-event and that the software will fail to get a large number of users. (Personally I am very happy with OpenOffice.org and NeoOffice)

I love this paragraph from Joel’s post:

“As a programmer, thanks to plummeting memory prices, and CPU speeds doubling every year, you had a choice. You could spend six months rewriting your inner loops in Assembler, or take six months off to play drums in a rock and roll band, and in either case, your program would run faster. Assembler programmers don’t have groupies.”

Will I ever be able to tell my students to learn Assembler after this?!?

Times to Stop Charging for Parts of Its Web Site

The New York Times will stop charging for accessing parts of its web site including 20 years of archive (from 1987 onwards).

The reason is (I quote):

“The business model for advertising revenue, versus subscriber revenue, is so much more attractive. The hybrid model has some potential, but in the long run, the advertising side will dominate.”

Fantastic! Instead of making us pay, the New York Times will get its money from advertising.

As a corollary, is it possible to have a (paper) newspaper in 2007 which does not have a website with 100% free content? Will that be possible in 2010? I have my doubts.

Alternative languages for the Java VM

According to Wikipedia,

A Java Virtual Machine (JVM) is a set of computer software programs and data structures which implements a specific virtual machine model. This model accepts a form of computer intermediate language, commonly referred to as Java bytecode, which conceptually represents the instruction set of a stack-oriented, capability architecture. This code is most often generated by Java language compilers, although the JVM can also be targeted by compilers of other languages.

This clearly indicates that any programming language that has a compiler that can produce Java bytecode can be used to write programs that run on the JVM.

In addition to the Java programming language, Robert Tolksdorf has created an exhaustive list of around 200 other programming languages that can be used to write programs that run on the JVM. The ones that I am interested in currently are (in alphabetical order):

Personally, as a fan of Ruby, I am watching JRuby very closely.

Which one do you want to watch today? :-)

The significance of JRuby and GlassFish

JRuby is a 100% pure-Java implementation of the Ruby programming language.

I have already written about the beauty and power of Ruby and how all smart people should start using it as soon as possible…

In essence, it allows programmers to write programs in Ruby which run on the Java Virtual Machine. The Ruby programming language is better (IMHO) than the Java programming language and, consequently, one can be more productive using Ruby than Java.

For example, this is a small Java program that reads words from the standard input and output the signature of the word (i.e. the letters of the word in sorted order) followed by the word. Cultured readers will recognize an exercise from Programming Pearls by Jon Bentley:

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

import java.util.Collections;
import java.util.Vector;

public class Sign
{
    public static void main(String[] args)
    {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        
        while (true) {
            String word = null;
            
            try {
                word = in.readLine();
            }
            
            catch (IOException e) {
                System.exit(1);
            }
            
            if (word==null) {
                break;
            }
            
            Vector<Character> letters = new Vector<Character>();
            
            for (int i=0; i<word.length(); i++) {
                letters.add(word.charAt(i));
            }
            
            Collections.sort(letters);
            
            for (Character letter : letters) {
                System.out.print(letter);
            }
            
            System.out.println(" " + word);
        }
        
        System.exit(0);
    }
}

46 lines! Not too bad for Java incidentally. Notice that I’ve used generics that have been introduced in Java recently. The heart of the program reads a word in a string, sends its characters to a vector, sort that vector and, finally, output the letters in sorted order.

The same program in Ruby is:

while word = gets
    word.chomp!
    letters = word.split("")
    letters.sort!
    puts letters.join("") + " " + word
end

which is an order of magnitude shorter and clearer (chomp! is used to strip the newline from the end of the word when input).

This program is a normal Ruby program and, hence, using Jruby it can be run atop a JVM. I’ve done some tests on my MacBook on a list of 234,936 English words:

Interpreter Runtime
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin] 5.702s
ruby 1.8.5 (2007-06-07 rev 3841) [i386-jruby1.0] 26.347s
java version “1.5.0_07″ 19.978s

From this, I conclude that for small programs, plain Ruby is quicker than anything that run on the JVM (another conclusion is that JRuby’s performance is comparable with Java). This is understandable because the Ruby interpreter is designed for small programs like this. But what about when you have to run a substancial Ruby on Rails application?

According to some important people, this is where JRuby really shines…

JRuby allows Ruby on Rails applications to run on a industrial-grade J2EE application server so much so that people have started predicting the demise of pure Ruby application servers like Mongrel. With the emergence of GlassFish, a free, open source, production-quality, enterprise J2EE application server, it becomes quite reasonable to use the following architecture to deploy easy-to-write yet enterprise-grade web applications:

Exciting times indeed :-)

18 September: an update

Eddy has a much quicker version of my Java program that runs in 4.222s and is therefore quicker than the plain Ruby version and is around 6 times quicker than the JRuby version. Eddy uses toCharArray() instead of sending the individual characters of the String in a Vector.

Thanks!

Post Scriptum

If you read the comments, you’ll see that a number of people are missing the point of this post. Maybe it’s badly written. The point is that Ruby of Rails applications can now run on JRuby which can itself run on GlassFish which is a good thing in my opinion.

Happy 13th birthday to us!

Time flies!

Today Christina and I are celebrating our 13th year together. We met on 11 September 1994 at the university of Réunion Island. I was in 2nd year studying Sciences et Structures de la Matière (aka Maths and Physics) and Christina was starting her first year in Lettres Modernes.

This photo was taken on my 21st birthday in a restaurant in Saint-Denis on the 25th of September 1994.

After about one year, we moved to Lyon in France where I finished my studies in Computer Science while she did a Masters in Information and Communications.

Back to Mauritius

We returned to Mauritius in 1998 and started working in January 1999. We managed to save a little bit of money and we got married in January 2000.

By that time, Christina was already working at the University of Mauritius while I was working at the Mauritius Chamber of Commerce & Industry.

Anya was born in 2002 shortly followed by Kyan in 2004. I joined the University of Mauritius shortly after.

Today, Anya is 5 years old and she is going to start primary school in a few months. Kyan is a strong 3 years old boy.

Christina and I feel exactly the same as we felt in 1994. We might be a little older physically but we have not changed a lot in our heads… That’s cool!

What next?

Great things! Stay tuned :-)