Why I like NetBeans 6.0
December 10, 2007
Roughly a week ago, the NetBeans 6.0 IDE (originally created by Sun) was released. And boy is it amazing; it even downloaded and installed the new Ruby on Rails 2.0.1 for me when I opened it for the first time.
I’ve always felt that Visual Studio is superior to any other IDE, with Eclipse being a close runner-up. That has changed now, and the new NetBeans is my new favorite for coding in anything but .NET. Just look at the code completion for Ruby, which includes a documentation window that pops up when you highlight a class in the list.

Also the way you can start your Rails site and surf around is great, it’s just like how you do it in Visual Studio. Just press F6 and a WEBrick server fires up and a browser window opens with your site in it. So smooth it makes your favorite milkshake blush.
It is open source, free, cross-platform, provides awesome tutorials (which Eclipse does too by the way) and the installer for the Ruby version is only 19 megabytes. 19 megabytes of love. It’s so good it almost makes me want to choose Java over C#. Almost.
It’s not very fast though… but then again, neither is Ruby. And no, I’ve never understood the Ruby community hype around TextMate, or vi and Emacs for that matter. To steep a learning curve for me…
Which programming language is the fastest?
June 15, 2007
I recently came across The Computer Language Benchmarks Game that compares the speed of different programming languages on the Gentoo and Debian linux distributions. It’s interesting (although not super serious), but what does it say?
Firstly C and C++ are the winners on both the platforms. Then you have a whole bunch of languages listed, of which I’m mostly interested in Java, C# and Ruby. The latter two are about half as fast as C/C++ and Ruby is in the bottom of the list. Not so strange since Ruby is an interpreted scripting language. It would be interesting to know if the JIT-languages are tested when compiling for the first time, or when the code is cached in the memory for subsequent calls, since there can be a huge difference. Also, the C# code is run with Mono in the tests, and I don’t know if that has any performance implications as compared to the Microsoft .NET platform.
But my primary argument against this speed comparison is optimality. I’m sure that this argument has been made a thousand times by others, but still. The tests must have been performed on optimal code in all the languages, or else the comparisons wouldn’t have any validity at all. Then the question really is: how difficult is it to write optimal code in any of the programming languages in the test. There is a reason why there’s been an increase in high level languages and the usage of them, it’s because C/C++ makes it very easy to write bad code. How often do you have problems with memory leaks in C#? That’s right.
What I mean is that you probably don’t have to be a super programmer to write decent performing code in the higher level languages, you’d have more of a challenge doing it in C or Assembler. And apparently most developers weren’t good enough since there’s been such a shift in focus towards C#/Java. Think about Ruby on Rails for example, the active record wrapper makes it easy to quickly write some code that interacts with a database without getting horrible performance, whereas if you write the stored procedures/SQL yourself, stuff can get really messy if you’re not very good. Abstraction has good and bad sides.
I’m not being a sore loser here, I’m know that you can write really good performance code with C/C++. Just don’t accept the benchmarking tests you see without considering the circumstances.
How popular Ruby really is
June 7, 2007
In my post “The future of web development“, I wrote about the company Thoughtworks and how 40 % of their new business this year is Ruby. That doesn’t really reflect how popular Ruby is generally, now does it? Well, via a colleague of mine I’ve found a more credible source of what languages are the biggest. TIOBE Software uses search engines and some magic to calculate a monthly index which shows that Java is number 1. C# scores a measly 7th place, with a 3,4 % rating, and Ruby is on the rise, jumping from the 19th to the 10th position since June 2006, with a 2,1 % rating.
Watch the facts and figures for yourself at the TIOBE website. Too bad I can’t find a similar rating for web applications only…
Java and Excel
October 20, 2006
I needed to read from and write to Excel-workbooks with a Java application, which proved to be pretty easy.
The answer is HSSF from the Jakarta POI project. POI provides access to Microsoft Format files and HSSF (short for “Horrible SpreadSheet Format”, funnily enough) enables you to work with Excel ‘97-2002 files. I haven’t tried using it on the new 2007 Excel format, that would be a funny little proof of concept for the future.
So, just download the library and start programming. It’s very easy, but may require a lot of customization in order to get the data formatted the way you want. Nice code snippets are given to you as examples on the Busy Developers’ Guide to HSSF Features page.
Great stuff!