It has been already 1 year since Windows Vista is out. In my new company, I had a new computer with Vista on it. I quickly installed Ubuntu in dual boot. I was happy with Ubuntu for my work, until I received many Excel files OpenOffice was not able to read properly. I decided to give a try to Vista. My first impression of it when I had the computer was quite negative. I was not able to find things that used to be easy to find. It seemed slow and not very interesting.
As I thought I had to use it, I managed to make it a bit more pleasant by adopting the old Windows 95 style instead of the default colors and effects everywhere. I dislike the standard effects because it seems that they are only there to distract you from what you want to do with the computer, and don’t help you to do things. I have used Windows a long time before, and installing Total Commander and Opera made Vista a bit more responsive for some tasks. Explorer is really slow and bloated.
Still on the big Java project we are working with, it took 14 minutes to (clean and) build the first time. I struggle to find out why it was so slow. Under Ubuntu, the same command took 5 minutes. As I thought it was swapping to disk, I decided to order more RAM so that I have 3GB (the build process takes around 1GB). If I build it many times in a row, because of the file cache, I can have the build in 4.30 min but it never happens in real life. In real cases it always takes at least 14 minutes, event with 3GB. And it still seems to swap !?! Now I am not even sure of anything, the fact is I did not manage to make it faster. I tried messing with various registry parameters for the cache/memory with no success. This article is completely wrong about Vista memory being much better managed. It is really awfully managed. That frustrated me how a new OS can be 3x slower, until I heard about gnumeric. Gnumeric is able to read all kinds of difficult Excel formulas, and all my Excel documents worked under Ubuntu.
So after 2 weeks of experiencing the slowness of Vista, and the first blue screen (BSODs are back with Vista), I switched back to Ubuntu. Other than being awfully slow, Vista does not have that many drawbacks, but it does not have anything compelling either when compared to XP (except a maybe better security system).
One of my first web framework was a custom one, based on the book Web Development with Java Server Pages. That was in 1999, when Struts was not yet known. But it was web-MVC, very near from what Struts gave later, without the custom tag stuff (custom tags were not yet part of JSP specifications).
Until 2007, Struts was IMHO the most used web framework and the default choice, even though many contenders appeared, with more features, better code. 2007 saw the maturity of some of these framework. As similar framework to Struts, I particularly like Stripes, because the API is very lean. Some component frameworks got a lot of buzz as well, Tapestry some time ago, and today Wicket. I tried both, and while they are very interesting, and can be very productive for some tasks (web application more than web site), I am not convinced they are the tech of 2008. Web Applications are better done with Flex, or GWT.
The major news in the past few years has been Ruby On Rails. Everybody tried to replicate it in every language (with their own twist): Django in Python, Lift in Scala, ErlyWeb in Erlang, Cake in PHP, Grails (along with now abandonned Sails, and less populair Trails) in Java. And some people fought for making the point they had the idea before Rails. But Rails is what made Rails-like development popular. After trying Rails soon after it was out (way before 1.0) and more recently (just before 2.0), I was amazed by the progress of Rails. I was impressed in 2004 about Rails, because the approach was new and effective. I disliked a bit the choice of Ruby. In the end in the project we ended up rewriting the persistence layer because our application was very specific. And I ported the app very quickly to Java. In 2007, I was even more impressed, and did not need to dwelve into arcanes of Rails anymore, but merely using it was enough to do lots and lots of things.
In 2008 the Ruby On Rails mentality will continue to prevail. In the Java world, Grails is the most likely to benefit from it. But I would not be surprised if there was another new Rails-like contender in the game (Rails on JRuby?). It could also be something based around Spring as their current MVC solution is not very good and very old fashioned.
I tried KDE4.0 last week, when it was everywhere in the news. I was very disappointed.
I have a long experience of trying beta software, not well known software. I have used Linux since 1998 (partly). I have even used windows beta at one point. And I have seen nothing as crappy as KDE4.0 release.
It is not usable at all.
Now I can understand what are KDE motivations to do such a bad release. It is to gain momentum in their project. KDE4.0 is in development at least since 2002 - 6 years! By creating a .0 release now even if it is an alpha, they have at least something officially out and hope to have developers starting to improve it. It is especially important for them because Gnome has, in the mean time, made regularly lots of improvements.
I admire the initiative, KDE 3.5 needed lots of improvements, and KDE4 goals are the right ones. But it just feel like the release was more political than everything else. Hell, even Linus seems to use Gnome nowadays.
My previous post about Ubuntu Gutsy vs Fedora 8 was weak. It is difficult to find a very good distro. Depending on the computer, I have had different experiences. On some computers, Ubuntu really shines and work with minimal tweaking. On some others, Ubuntu is unstable/does not handle wireless correctly and Fedora is much more stable.
The main issues I can see with Fedora 8 are:
LVM by default. I don’t think it is a good idea to go LVM by default since lots of basic tools are still not handling it properly. And if you want to read your disk by something else than a distro with LVM you are screwed. Ext3 straight is imho a much wiser choice. Plus it is rarely a problem to resize partitions as it is not something one does often.
Fewer programs in the repositories available. Under ubuntu, I was using gtkguitune to tune my guitar, it was in the default repositories. It does not exist for Fedora and I did not manage to compile it due to too old dependencies (GTK 1.2). I found accordeur on sourceforge which is a better program and is available as RPM, so in the end I found something. But while searching I saw the choice was not as wide as with Ubuntu.
Packages too small: it is not exactly clear what packages you need to start compiling programs with Fedora. If you look in the default categorization, way too many things are silly to enable by default. Also generally package management seems less stable/less easy to use than with Ubuntu.
What I like:
newer Linux kernel, with better scheduler. Fedora seems more responsive.
bluetooth relatively well handled by default. The standard method of editing /etc/bluetooth/default works well to plug keyboard.
wifi well handled by default. I had lots of problems with Ubuntu on my computer and the wifi card, I don’t have them with Fedora.
Next step:
maybe try Suse 10.3 as I just found out that Amarok is the best music player on earth today. As music playing is very important for my computer, a KDE based distro makes sense.
But that would be a silly typical Linux user reaction.
Recently, there was an interesting post about Haskell performance and Haskell parallelization showing Haskell could outperform C on a simple Fibonacci example.
A friend of mine, Peter (that I seem to manage to constantly piss off) thought about it on another level, saying you could achieve a _MILLION_ times better using a direct formula in C or Java, the Binet formula.
I decided to try as the improvement scale seemed a bit surprising. I first compared a Java recursive fibonacci with a Haskell one. Here are the results for Haskell GHC 6.6.1 vs Java 1.6.0 on Linux for fib(44): Then I decided to check out the time for fib(44) or any fib at all, I was unable to measure precisely enough since it always came out as 0ms, in Haskell, or in Java. Looping out 10 million times, Java gave out 7.3s and Haskell something similar (but my method to loop 10 million times in Haskell is probably very bad). The original post actually points to a link that describes various algorithms for Fibonacci. They basically say that for large n, the rounding is not precise enough, they also propose algorithms in log(n). I tried and was really impressed by the performance of those algorithms. Again I could not measure the difference for a single calculation between it and the binet formula as elapsed time is always 0. The binet formula becomes inexact already at n=71 in Java with doubles.
Of course the original post is still quite interesting, it shows how easy it can be to parallelize calculations in Haskell. But the example is silly as another algorithm can lead to 10 millions times the performance. Still Haskell performs well with the shit or good algorithm when compared to Java.
I was pretty happy with Ubuntu 7.10, but when Fedora 8 came out I decided to give it a try. Last time I tried it it was Core 2 or something like that, and it was NOT good.
At first Fedora 8 looks quite good, has a good Live CD install, reminiscent of Ubuntu. The positive side is that it is based on the latest Kernel. It manages my Thinkpad T42 very well (suspend, hibernate work). But after a few days, one notice Fedora is not as stable as Ubuntu, for example:
I have had weird behavior with windows not being updated properly
I experienced big problems when playing with LVM,
It is also a general impression when interacting with the system.
One can wonder why Fedora 8 does not install OpenOffice by default.Ubuntu is IMHO still the king of distros.
I am disappointed about the Jarkarta Commons DbUtils project. I give a link to it, because it’s a bad project (even if written in clean code). It is very simple, but it really does not do much for you.
I was looking for a very simple abstraction of JDBC. I thought bringing Spring in my project would be overkill. After trying DbUtils, I think again. It does not help. It does not handle frequent cases well, and it does not save many lines of code.
I am a bit angry about it as I noticed that by using it, my test program that was taking 2s with straight JDBC before is now using 1 minute!
The reason behind this huge performance penalty is that there is no way to just reuse a PreparedStatement with the existing classes. For each query with a same sql, it will create a new PreparedStatement object, even if you reuse the connection. I am surprised since this is probably why PreparedStatement is used in the first place. How can such a project be part of Jakarta repository?
Now I just wish Spring was more Guice like, maybe I should write a Spring JDBC like layer for Guice.
I was struggling to find a bug in a very simple application, it ended up being something as simple as using the damned Boolean.getBoolean("true") call instead of Boolean.valueOf("true").booleanValue() call.
The Boolean.getBoolean method is something you almost never need to use, as it checks if a particular system property is true or false. There is a similar method for Integer.getInteger, and a quick google search shows I am not the only one to think those method should never have been part of the basic API for Boolean/Integer. It is too easy to confuse with parseBoolean/parseInt, especially as parseBoolean does not exist in JDKs prior to JDK 1.5 (parseInt is older).
I can not imagine the improductivity this method has produced given its part of one of the most used class in the world.
I am currently experimenting with Scala. It seems quite convenient for web applications. Using Tomcat, it is possible to have a very productive developer environment. Here is a sample Embedded Tomcat you can start in a Scala project:
val CATALINAHOME : File = new File("../newsbeef.com"); val WEBAPPS : File = new File(CATALINAHOME,"webapps"); val ROOT : File = new File(CATALINAHOME,"web"); val HOSTNAME : String = "localhost"; val PORT : int = 8080;
Here is a sample Scala Servlet outputing html directly. This is a simple example, but it shows something important. With Scala, the view layer can just be regular scala classes. There is no need for JSP or other templating languages as Scala already embbeds XML very nicely. By using the reloadable feature of Tomcat (there are also other pure Scala ways) and Eclipse autocompile, changes are instantanously taken in account.
I am finally happy with my OS. I had previously [some complaints]({{ relref . “1-year-of-mac-mini–the-deception-point.md” }}) about MacOs X and the Mac Mini. It is now over, with Ubuntu, I am very happy of my quiet system.
I use Quod Libet for Audio, it has similar interface as iTunes, with more features (ability to play most audio formats). I chose Quod Libet instead of the standard Rhythmbox because of its practical mp3 tags handling. This also means that unlike iTunes, when I reimport my full library with another player, or on another computer, I have it all organized the right way, because the right meta data is in the audio files and not in a xml file that sometimes gets corrupted.
I can use Open Office (not yet available in non alpha version for Mac Os X).
I can use Picasa or other more standard alternatives instead of iPhoto.
I can use free guitar tuners, plenty of esoteric software.
Remote control, fancy bluetooth apple keyboard, cd burning, dvd player, printer work flawlessly. And it’s all free software (except Picasa which is only gratis).